mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Call Hierarchy: fix qualified label, enablement of direction button
This commit is contained in:
parent
aa114afeef
commit
e5b2b98f55
2 changed files with 3 additions and 2 deletions
|
@ -59,6 +59,7 @@ import org.eclipse.ui.part.ViewPart;
|
|||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.model.IFunction;
|
||||
import org.eclipse.cdt.core.model.IMethod;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.refactoring.actions.CRefactoringActionGroup;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
|
@ -167,7 +168,7 @@ public class CHViewPart extends ViewPart {
|
|||
}
|
||||
|
||||
private boolean allowsRefTo(ICElement element) {
|
||||
if (element instanceof IFunction) {
|
||||
if (element instanceof IFunction || element instanceof IMethod) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ public class CElementLabels {
|
|||
//qualification
|
||||
if( getFlag( flags, M_FULLY_QUALIFIED ) ){
|
||||
ICElement parent = method.getParent();
|
||||
if (parent != null && parent.exists()) {
|
||||
if (parent != null && parent.exists() && !(parent instanceof ITranslationUnit)) {
|
||||
getTypeLabel( parent, T_FULLY_QUALIFIED | (flags & P_COMPRESSED), buf );
|
||||
buf.append( "::" ); //$NON-NLS-1$
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue