Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Empty runtime Outline
Empty runtime Outline [message #1021556] Wed, 20 March 2013 10:09 Go to next message
Simon Zutterman is currently offline Simon ZuttermanFriend
Messages: 28
Registered: October 2012
Junior Member
Hi,

When i am modeling a diagram, my outline view stays blank. The object are there though, because if i select a node in my diagram, something is selected in the outline view. (see attachment, it will become clear).

so: How can i display the names of my objects in the outline view?


index.php/fa/13943/0/
Re: Empty runtime Outline [message #1027219 is a reply to message #1021556] Tue, 26 March 2013 18:01 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 55
Registered: February 2013
Member
Hi Simon,

I would suggest to use EcoreTool's DiagramOutlinePage, which in my opinion follows a more straightforward approach of a FilteredTree-component to display the model.
See the plugin org.eclipse.emf.ecoretools.diagram.outline in EcoreTools.
It is very easy to adapt to your DiagramEditor.

Regards
Thomas
Re: Empty runtime Outline [message #1027366 is a reply to message #1027219] Tue, 26 March 2013 22:31 Go to previous messageGo to next message
Simon Zutterman is currently offline Simon ZuttermanFriend
Messages: 28
Registered: October 2012
Junior Member
Hi Thomas,

I would very much like to try this out, though since i'm an eclipse amateur, i don't know how to use this EcoreTools outline in a runtime editor. I already use it when making an ecore diagram model and find it very useful.
I can see in the Plug-in Development screen that the org.eclipse.ecoretools.diagram.ui.outline is installed, but how do use this ecore tools outline when i'm modeling in my generated diagram?

Regards, and any help would be much appreciated!
Simon
Re: Empty runtime Outline [message #1036477 is a reply to message #1027366] Mon, 08 April 2013 12:40 Go to previous message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 55
Registered: February 2013
Member
Hi Simon,

the adaption is pretty straightforward.

1. Add the dependency of the diagram.ui.outline plugin to your generated diagram-plugin.
2. In your generated XXXDiagramEditor, modify the method:
public Object getAdapter(Class type){
  ...
  if(type == IContentOutlinePage.class)
    return new XXXDiagramOutlinePage(...);
}


Make the new XXXDiagramOutlinePage extend AbstractDiagramOutlinePage and implement the abstract mehtods, it requires.
For that, create a second class XXXModelNavigator that extends AbstractModelNavigator.

You can take a look at the code of org.eclipse.emf.ecoretools.diagram, which provides an implementation of the outline-view above for the ecore-editor.

Regards
Thomas
Previous Topic:How to edit a label mapped by ExpressionLabelMapping?
Next Topic:click behaviour to edit a label
Goto Forum:
  


Current Time: Thu Apr 25 08:20:47 GMT 2024

Powered by FUDForum. Page generated in 0.03240 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top