mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Call Hierarchy Filter fails to hide enumerators.
This commit is contained in:
parent
a9fd68785e
commit
70fc23d8c3
4 changed files with 10 additions and 8 deletions
|
@ -75,7 +75,7 @@ public class CHContentProvider extends AsyncTreeContentProvider {
|
||||||
return NO_CHILDREN;
|
return NO_CHILDREN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (node.isVariable() || node.isMacro()) {
|
else if (node.isVariableOrEnumerator() || node.isMacro()) {
|
||||||
return NO_CHILDREN;
|
return NO_CHILDREN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006 Wind River Systems, Inc. and others.
|
* Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -38,8 +38,8 @@ public class CHMultiDefNode extends CHNode {
|
||||||
return fChildren[0].isMacro();
|
return fChildren[0].isMacro();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVariable() {
|
public boolean isVariableOrEnumerator() {
|
||||||
return fChildren[0].isVariable();
|
return fChildren[0].isVariableOrEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006 Wind River Systems, Inc. and others.
|
* Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -18,6 +18,7 @@ import java.util.List;
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
|
import org.eclipse.cdt.core.model.IEnumerator;
|
||||||
import org.eclipse.cdt.core.model.IMacro;
|
import org.eclipse.cdt.core.model.IMacro;
|
||||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||||
import org.eclipse.cdt.core.model.IVariableDeclaration;
|
import org.eclipse.cdt.core.model.IVariableDeclaration;
|
||||||
|
@ -121,8 +122,9 @@ public class CHNode implements IAdaptable {
|
||||||
return fRepresentedDecl instanceof IMacro;
|
return fRepresentedDecl instanceof IMacro;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVariable() {
|
public boolean isVariableOrEnumerator() {
|
||||||
return fRepresentedDecl instanceof IVariableDeclaration;
|
return fRepresentedDecl instanceof IVariableDeclaration ||
|
||||||
|
fRepresentedDecl instanceof IEnumerator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFirstReferenceOffset() {
|
public int getFirstReferenceOffset() {
|
||||||
|
|
|
@ -374,7 +374,7 @@ public class CHViewPart extends ViewPart {
|
||||||
public boolean select(Viewer viewer, Object parentElement, Object element) {
|
public boolean select(Viewer viewer, Object parentElement, Object element) {
|
||||||
if (element instanceof CHNode) {
|
if (element instanceof CHNode) {
|
||||||
CHNode node= (CHNode) element;
|
CHNode node= (CHNode) element;
|
||||||
return !node.isVariable();
|
return !node.isVariableOrEnumerator();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue