GMF Runtime - Creating an editor manually [message #730384] |
Wed, 28 September 2011 05:38  |
Eclipse User |
|
|
|
I'm interested in building an editor with GMF Runtime manually.
The reason is, that we have an own file format, we have to read first with xtext and than want to forward the emf data to the editor for displaying it. So we have no XMI file to display.
We have already a working GEF solution, but now we want to change to GMF. Perhaps we can simply adjust some imports and functions so it works?
Otherwise can someone tell me how to start from the very first? I tried today to start with a simple class extending the DiagramEditorWithFlyOutPalette, analog to the class GraphicalEditorWithFlyoutPalette like it was described for GEF at the end of the tutorial part 3 at vainolo.com. Unfortunately i'm not allowed yet to post the link.
But it doesn't work exactly like that and instead i got a NullPointerException:
java.lang.NullPointerException
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.getOperationHistory(DiagramEditor.java:1086)
It would be fine, if somebody can help me anyway. Thank you in advance!
[Updated on: Wed, 28 September 2011 05:47] by Moderator
|
|
|
Re: GMF Runtime - Creating an editor manually [message #730390 is a reply to message #730384] |
Wed, 28 September 2011 05:44   |
Eclipse User |
|
|
|
On 28/09/2011 11:38, Mischa Nietfeld wrote:
> I'm interested in building an editor with GMF Runtime manually.
>
> The reason is, that we have an own file format, we have to read first
> with xtext and than want to forward the emf data to the editor for
> displaying it. So we have no XMI file to display.
GMF (Runtime and Tooling) does not depend at all on how the file is
serialized (XMI, XML, DSL with XText) - except when loading models from
files. They directly rely on EMF.
You could use GMF Tooling to create your editor, and do the necessary
few changes to have your EObjects deserialized correctly according to
your file format. If you do that, please track your progress and share
it with the community, that would be a high-value contribution.
> We have already a working GEF solution, but now we want to change to
> GMF. Perhaps we can simply adjust some imports and functions so it works?
Why does *functionally* make you want to move to GMF ?
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
|
|
|
|
|
Re: GMF Runtime - Creating an editor manually [message #731674 is a reply to message #731670] |
Sun, 02 October 2011 08:10  |
Eclipse User |
|
|
|
Hi Andreas,
you are right, we have not only one model for the notation and the semantic model altogether. So we have two files and one connecting file that describes the link between this data. If i open this file, the other both (domain and diagram) should be read and the content should be displayed.
I will now first try to update the with GMF Tooling generated editor for my purpose. If it does not seem to work fine, i will try to do it from scratch and if also this fails in the next days, i think we will stay at GEF. Because it would be nice to have but currently we do not need it urgently.
Thank you too for your code example. I will have a look at it.
|
|
|
Powered by
FUDForum. Page generated in 0.03736 seconds