1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Bug 342069: Fixed failing Hudson unit tests

This commit is contained in:
Andrew Gvozdev 2011-04-24 23:39:53 +00:00
parent a27af205a9
commit 20bcd2c790

View file

@ -24,6 +24,7 @@ import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.internal.core.Configuration; import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.content.IContentType;
public final class CfgInfoContext{ public final class CfgInfoContext{
private static final String DELIMITER = ";"; //$NON-NLS-1$ private static final String DELIMITER = ";"; //$NON-NLS-1$
@ -91,13 +92,16 @@ public final class CfgInfoContext{
buf.append(fInType.getId()); buf.append(fInType.getId());
} }
String instanceId = buf.toString(); ILanguage language = null;
if (fInType!=null) { if (fInType!=null) {
ILanguage language = LanguageManager.getInstance().getLanguage(fInType.getSourceContentType()); IContentType contentType = fInType.getSourceContentType();
fContext = new InfoContext(project, instanceId, language); if (contentType!=null) {
} else { language = LanguageManager.getInstance().getLanguage(contentType);
fContext = new InfoContext(project, instanceId); }
} }
String instanceId = buf.toString();
fContext = new InfoContext(project, instanceId, language);
} }
return fContext; return fContext;
} }