Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2008-03-04 13:45:54 +0000
committerAnton Leherbauer2008-03-04 13:45:54 +0000
commitd860addc6d1f0336dfd4e0ddd13e9ebf99b5b257 (patch)
treebba57c7dad2d7d98b469d8fb6f9cdda003f47afc /core/org.eclipse.cdt.core/model/org
parent83a13921acd9226a7bab847717fc309ad6ec8f45 (diff)
downloadorg.eclipse.cdt-d860addc6d1f0336dfd4e0ddd13e9ebf99b5b257.tar.gz
org.eclipse.cdt-d860addc6d1f0336dfd4e0ddd13e9ebf99b5b257.tar.xz
org.eclipse.cdt-d860addc6d1f0336dfd4e0ddd13e9ebf99b5b257.zip
Use new node selection API and fix for 220392: empty macro is not highlighted as a macro reference
Diffstat (limited to 'core/org.eclipse.cdt.core/model/org')
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
index 4999f370e20..effc6869ffe 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
@@ -91,7 +91,6 @@ import org.eclipse.core.runtime.OperationCanceledException;
public class CModelBuilder2 implements IContributedModelBuilder {
private final TranslationUnit fTranslationUnit;
- private String fTranslationUnitFileName;
private ASTAccessVisibility fCurrentVisibility;
private Stack<ASTAccessVisibility> fVisibilityStack;
private IProgressMonitor fProgressMonitor;
@@ -182,7 +181,6 @@ public class CModelBuilder2 implements IContributedModelBuilder {
* @throws DOMException
*/
private void buildModel(IASTTranslationUnit ast) throws CModelException, DOMException {
- fTranslationUnitFileName= ast.getFilePath();
fVisibilityStack= new Stack<ASTAccessVisibility>();
// includes
@@ -256,7 +254,7 @@ public class CModelBuilder2 implements IContributedModelBuilder {
}
private boolean isLocalToFile(IASTNode node) {
- return fTranslationUnitFileName.equals(node.getContainingFilename());
+ return node.isPartOfTranslationUnitFile();
}
private Include createInclusion(Parent parent, IASTPreprocessorIncludeStatement inclusion, Set<Include> allIncludes) throws CModelException{

Back to the top