mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 16:55:38 +02:00
2005-06-08 Alain Magloire
Move to the IContentTypeManager framework: PR 86645 * src.org.eclipse/cdt/ui/tests/DOMAST/DOMAST.java
This commit is contained in:
parent
18d3837fe0
commit
ac6c8db915
2 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-06-08 Alain Magloire
|
||||
Move to the IContentTypeManager framework: PR 86645
|
||||
* src.org.eclipse/cdt/ui/tests/DOMAST/DOMAST.java
|
||||
|
||||
2005-03-13 Bogdan Gheorghe
|
||||
Updated references to IndexManager to reflect new indexing framework.
|
||||
|
||||
|
|
|
@ -42,8 +42,6 @@ import org.eclipse.cdt.core.dom.ast.c.ICASTDesignator;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
|
||||
import org.eclipse.cdt.core.filetype.ICFileType;
|
||||
import org.eclipse.cdt.core.filetype.ICFileTypeConstants;
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
|
@ -66,6 +64,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
|||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.content.IContentType;
|
||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.jface.action.Action;
|
||||
|
@ -1259,9 +1258,13 @@ public class DOMAST extends ViewPart {
|
|||
}
|
||||
|
||||
IProject project = file.getProject();
|
||||
ICFileType type = CCorePlugin.getDefault().getFileType(project, file.getFullPath().lastSegment());
|
||||
String lid = type.getLanguage().getId();
|
||||
if ( lid != null && lid.equals(ICFileTypeConstants.LANG_CXX) ) {
|
||||
String lid = null;
|
||||
IContentType type = CCorePlugin.getContentType(project, file.getFullPath().lastSegment());
|
||||
if (type != null) {
|
||||
lid = type.getId();
|
||||
}
|
||||
if ( lid != null
|
||||
&& ( lid.equals(CCorePlugin.CONTENT_TYPE_CXXSOURCE) || lid.equals(CCorePlugin.CONTENT_TYPE_CXXHEADER)) ) {
|
||||
return ParserLanguage.CPP;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue