Skip to content
Snippets Groups Projects
Commit 2be3d4a4 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

fixed model element handler use in navigator

parent 43ea5715
No related branches found
No related tags found
No related merge requests found
......@@ -48,18 +48,35 @@ public interface IModelElementHandler<T extends EObject> extends
/** Returns image descriptor to be used as icon image. */
public ImageDescriptor getIconImageDescriptor();
/** Returns all children acting as nodes. */
/**
* Returns all children acting as nodes, which are usually displayed as edit
* parts by graphical editors and entries in the navigator tree.
*/
List<EObject> getSubnodes(T element);
/** Returns all children acting as connectors. */
/**
* Returns all children acting as connectors, which are usually display as
* edit parts in graphical editors, but NOT as entries in the navigator
* tree.
*/
List<EObject> getConnectors(T element);
/** Returns all connections entering this element. */
/**
* Returns all connections entering this element, which are usually
* displayed as edit parts in graphical editors.
*/
List<EObject> getIncomingConnections(T element);
/** Returns all connections leaving this element. */
/**
* Returns all connections leaving this element, which are usually displayed
* as edit parts in graphical editors.
*/
List<EObject> getOutgoingConnections(T element);
/** Returns all children acting as a (visible) specification. */
/**
* Returns all children acting as a (visible) specification, which are
* displayed as child entries in the navigator tree, but not as edit parts
* in graphical editors.
*/
List<EObject> getSpecifications(T element);
}
......@@ -59,7 +59,11 @@ public class NavigatorTreeContentProvider implements ITreeContentProvider {
IModelElementHandler<EObject> handler = IModelElementService.INSTANCE
.getModelElementHandler((EObject) parentElement);
if (handler != null) {
return handler.getSubnodes((EObject) parentElement).toArray();
List<EObject> children = handler
.getSubnodes((EObject) parentElement);
children.addAll(handler
.getSpecifications((EObject) parentElement));
return children.toArray();
}
}
return new Object[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment