1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Type Hierarchy: adds command-id and kbd-shortcut

This commit is contained in:
Markus Schorn 2007-01-22 15:26:09 +00:00
parent 25dfcccfb3
commit c2f52f81de
5 changed files with 15 additions and 17 deletions

View file

@ -965,11 +965,11 @@
sequence="M1+G"
contextId="org.eclipse.cdt.ui.cEditorScope"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
<!--key
<key
sequence="F4"
contextId="org.eclipse.cdt.ui.cEditorScope"
commandId="org.eclipse.cdt.ui.edit.text.c.open.type.hierarchy"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/-->
commandId="org.eclipse.cdt.ui.edit.open.type.hierarchy"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
<!--key
sequence="M1+M2+H"
contextId="org.eclipse.cdt.ui.cEditorScope"
@ -1095,12 +1095,12 @@
description="%ActionDefinition.openCallHierarchy.description"
name="%ActionDefinition.openCallHierarchy.name"
id="org.eclipse.cdt.ui.edit.open.call.hierarchy"/>
<!--command
<command
name="%ActionDefinition.openTypeHierarchy.name"
description="%ActionDefinition.openTypeHierarchy.description"
categoryId="org.eclipse.ui.category.navigate"
id="org.eclipse.cdt.ui.edit.text.c.open.type.hierarchy">
</command-->
id="org.eclipse.cdt.ui.edit.open.type.hierarchy">
</command>
<!--command
name="%ActionDefinition.openTypeInHierarchy.name"
description="%ActionDefinition.openTypeInHierarchy.description"
@ -1191,13 +1191,13 @@
retarget="true"
tooltip="%OpenCallHierarchy.tooltip">
</action>
<!--action
definitionId="org.eclipse.cdt.ui.edit.text.c.open.type.hierarchy"
<action
definitionId="org.eclipse.cdt.ui.edit.open.type.hierarchy"
label="%OpenTypeHierarchyAction.label"
retarget="true"
menubarPath="navigate/open.ext"
id="org.eclipse.cdt.ui.actions.OpenTypeHierarchy">
</action-->
</action>
<!--action
id="org.eclipse.cdt.ui.actions.openTypeInHierarchy"
class="org.eclipse.cdt.internal.ui.browser.typehierarchy.OpenTypeInHierarchyAction"

View file

@ -2284,10 +2284,6 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IR
// action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_DEF);
// setAction("OpenDefinition", action); //$NON-NLS-1$
// action = new OpenTypeHierarchyAction(this);
// action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_TYPE_HIERARCHY);
// setAction("OpenTypeHierarchy", action); //$NON-NLS-1$
fShowInCViewAction = new ShowInCViewAction(this);
action = fShowInCViewAction;
action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_CVIEW);

View file

@ -125,7 +125,7 @@ public interface ICEditorActionDefinitionIds extends ITextEditorActionDefinition
* Action definition ID of the navigate -> open type hierarchy action
* (value <code>"org.eclipse.cdt.ui.edit.text.c.open.type.hierarchy"</code>).
*/
public static final String OPEN_TYPE_HIERARCHY= "org.eclipse.cdt.ui.edit.text.c.open.type.hierarchy"; //$NON-NLS-1$
public static final String OPEN_TYPE_HIERARCHY= "org.eclipse.cdt.ui.edit.open.type.hierarchy"; //$NON-NLS-1$
/**
* Action definition ID of the navigate -> open action

View file

@ -21,11 +21,10 @@ import java.util.List;
import org.eclipse.cdt.core.model.ICElement;
class THGraphNode {
private static final Object[] NO_MEMBERS= new Object[0];
private List fOutgoing= Collections.EMPTY_LIST;
private List fIncoming= Collections.EMPTY_LIST;
private ICElement fElement;
private Object[] fMembers= NO_MEMBERS;
private Object[] fMembers= null;
THGraphNode(ICElement element) {
fElement= element;

View file

@ -288,7 +288,10 @@ class THHierarchyModel {
public Object[] getMembers() {
if (fHierarchySelection != null) {
THGraphNode gnode= fGraph.getNode(fHierarchySelection.getRepresentedDeclaration());
return gnode.getMembers(fShowInheritedMembers);
Object[] result= gnode.getMembers(fShowInheritedMembers);
if (result != null) {
return result;
}
}
return NO_CHILDREN;
}