Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » DiagramEditor inside MultiPageEditor?
DiagramEditor inside MultiPageEditor? [message #636357] Sun, 31 October 2010 11:27 Go to next message
Volker Wegert is currently offline Volker WegertFriend
Messages: 182
Registered: July 2009
Senior Member
Hello,

I'm wondering whether it is possible to use the DiagramEditor as a page inside
a MultiPageEditor. I've already implemented this for GMF generated editors
(see article
http://www.eclipse.org/articles/article.php?file=Article-Int egrating-EMF-GMF-Editors/index.html),
and I'm thinking about moving one of my projects from GMF to Graphiti. For
this, I'd need two pages for different diagrams of the same diagram type (or
at least, with the same feature configuration). From a first look at
DiagramEditorInternal, this should be possible, but there are a few things I
might have to adapt (like command registrations). Has anyone attempted to use
the DiagramEditor as a MultiPageEditor page before? Since Graphiti is still in
incubation, would it be possible to create an intermediate superclass of
DiagramEditorInternal that contains all the stuff that standalone editors and
MultiPageEditor pages have in common?

Thanks
Volker Wegert

--
* Volker Wegert * http://www.volker-wegert.de/contact *
"With sufficient thrust, pigs fly just fine. However, this is not necessarily
a good idea. It is hard to be sure where they are going to land, and it could
be dangerous sitting under them as they fly overhead." (RFC 1925)
Re: DiagramEditor inside MultiPageEditor? [message #636569 is a reply to message #636357] Mon, 01 November 2010 22:36 Go to previous messageGo to next message
Shenxue Zhou is currently offline Shenxue ZhouFriend
Messages: 60
Registered: July 2009
Member
Volker Wegert wrote on Sun, 31 October 2010 05:27
Hello,

I'm wondering whether it is possible to use the DiagramEditor as a page inside
a MultiPageEditor. I've already implemented this for GMF generated editors
(see article
http://www.eclipse.org/articles/article.php?file=Article-Int egrating-EMF-GMF-Editors/index.html),
and I'm thinking about moving one of my projects from GMF to Graphiti. For
this, I'd need two pages for different diagrams of the same diagram type (or
at least, with the same feature configuration). From a first look at
DiagramEditorInternal, this should be possible, but there are a few things I
might have to adapt (like command registrations). Has anyone attempted to use
the DiagramEditor as a MultiPageEditor page before? Since Graphiti is still in
incubation, would it be possible to create an intermediate superclass of
DiagramEditorInternal that contains all the stuff that standalone editors and
MultiPageEditor pages have in common?

Thanks
Volker Wegert

--
* Volker Wegert * http://www.volker-wegert.de/contact *
"With sufficient thrust, pigs fly just fine. However, this is not necessarily
a good idea. It is hard to be sure where they are going to land, and it could
be dangerous sitting under them as they fly overhead." (RFC 1925)


I've tried to put Graphiti diagram editor inside a multi-page editor. In my multi-editor, I also have an xml form editor and xml source editor (my domain object is persisted as an xml document). The three editors share the same model objects. I did bridge between different editor inputs and I had listeners on the model objects (mine is non-emf based).

Overall, things work fine.

Shenxue
Re: DiagramEditor inside MultiPageEditor? [message #645426 is a reply to message #636569] Fri, 17 December 2010 09:08 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 8
Registered: September 2010
Junior Member
Hi Shenxue,

could you explain me in a few steps, how to put a diagram editor in a multi-page editor?

Greetings,

Eddi
Re: DiagramEditor inside MultiPageEditor? [message #654987 is a reply to message #645426] Thu, 17 February 2011 21:39 Go to previous messageGo to next message
spcmdr is currently offline spcmdrFriend
Messages: 15
Registered: January 2011
Junior Member
Hi

I need some help with MultiPageEditor.
When you add a page (composite) to a MultiPageEditor, when you manipulate the composite, how do you tell the editor that it has been updated ?

Regards
Re: DiagramEditor inside MultiPageEditor? [message #655066 is a reply to message #654987] Fri, 18 February 2011 08:56 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Is this question really Graphiti related or just about multi page editors in
general? If the latter you might have a look into the newsgroups
eclipse.platform.pde or eclipse.platform.rcp and may post there.

Alternatively there are quite some tutorials out in the web about writing
multi page editor (google for "eclipse multipageeditor tutorial", it gives
lots of hits).

Michael
Re: DiagramEditor inside MultiPageEditor? [message #659290 is a reply to message #636569] Fri, 11 March 2011 21:17 Go to previous messageGo to next message
Erik Englund is currently offline Erik EnglundFriend
Messages: 49
Registered: July 2009
Member
Shenxue,

Could you be more specific about how you accomplished having a diagram, form, and XML editor all in the same editor.

I've tried this as well and run into problem with synchronization between the pages.

Here is what I would like:
- use the WST editor for the XML editor to get highlighting and XSD checking
- Use either GMF (though I'm just about at my wits end with it) or switching to graphiti for a diagram
- A simple form editor for other parts of the model

Currently I use a MultiPageFormEditor, somewhat like how the plugin.xml editor works. I kind of crammed in the EMF editor stuff and added form editor pages.

On one of the other pages I include the WST Editor,

And finally by sharing an editing domain I also include the GMF editor.

Re: DiagramEditor inside MultiPageEditor? [message #659572 is a reply to message #659290] Mon, 14 March 2011 15:46 Go to previous messageGo to next message
Shenxue Zhou is currently offline Shenxue ZhouFriend
Messages: 60
Registered: July 2009
Member
Eric,

I actually extended Sapphire Editor to add a graphiti based diagram page to it. Sapphire is an eclipse incubator project http://www.eclipse.org/proposals/sapphire. Sapphire editor comes with a java based model for your xml file and a multi-page editor (a form based editor and wtp's xml source editor.) Since Sapphire has its own model, my Graphiti based diagram page also uses that model. Synchronization between the diagram page, form page and xml source page are done using listener mechanism provided by Sapphire model.

Shenxue
Re: DiagramEditor inside MultiPageEditor? [message #659574 is a reply to message #659572] Mon, 14 March 2011 15:56 Go to previous messageGo to next message
Erik Englund is currently offline Erik EnglundFriend
Messages: 49
Registered: July 2009
Member
Shenxue,

In my looking into sapphire I noticed they use their own java based modeling stuff. How well does this play with EMF?

Erik
Re: DiagramEditor inside MultiPageEditor? [message #659605 is a reply to message #659574] Mon, 14 March 2011 19:23 Go to previous message
Shenxue Zhou is currently offline Shenxue ZhouFriend
Messages: 60
Registered: July 2009
Member
A few years ago, our team was developing a few xml editors. The original solution we took was using EMF for the model and editor. We ran into many issues with that approach and we ended up re-writing the model and thus the editor. The re-wrote model is based on the simple w3c DOM model and uses Java annotations. We also developed a declarative approach for the form based xml editor.

So to answer your question, Sapphire based models and EMF based models don't interact. Sapphire models and editors are designed to be a replacement for the EMF based models and xml editors. We have developed quite a few xml editors using Sapphire and we are very happy with them in terms of ease of development, productivity and consistency of UI of different editors.
Previous Topic:Text versus MultiText
Next Topic:cool idea
Goto Forum:
  


Current Time: Tue Apr 23 09:01:36 GMT 2024

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

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

Back to the top