Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Graphiti as Multiple Xml Editor(How to use Graphiti as a Editor for multiple Xml editors)
Graphiti as Multiple Xml Editor [message #760438] Fri, 02 December 2011 11:30 Go to next message
mcd  is currently offline mcd Friend
Messages: 4
Registered: December 2011
Junior Member
Hello!

Im working on an Eclipse plugin. What I want to do is making a custom editor that can open xml files. I want to show a Flow diagram based on that file and I want to allow changes in the diagram. After saving the file I want to save back to Xml. Is it possible to do that?

If not, I have already parsed the Xml files and I have a EMF model that contains everything that the Xml files contains. Can I load a EMF object into Graphiti?
Re: Graphiti as Multiple Xml Editor [message #760775 is a reply to message #760438] Mon, 05 December 2011 09:09 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
I not sure what you exactly mean with "loading"...

I would simply write a Graphiti editor that works with the EMF model you
already have. By adding graphitical representations of your model objects
you will create links to these objects and they will get loaded inside your
diagram editor.

HTH,
Michael
Re: Graphiti as Multiple Xml Editor [message #761163 is a reply to message #760775] Tue, 06 December 2011 02:22 Go to previous messageGo to next message
mcd  is currently offline mcd Friend
Messages: 4
Registered: December 2011
Junior Member
Load means that I have a custom Xml file format that I want to parse and show as an editable diagram.

What I want to do is a graphical Xml editor with diagrams.

I already wrote the Xml to EMF and EMF to Xml functions, but I want to know that Graphiti can show the EMF object as a diagram.

If so, then can I capture the "Save" editor event to use my custom EMF to Xml implementation?

Re: Graphiti as Multiple Xml Editor [message #762619 is a reply to message #761163] Thu, 08 December 2011 11:54 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Graphiti can surely be used to create visual representations of any EMF
objects you have.

You can also capture the save event, but that will mean for now you have to
override the method doSave of the currently internal class
DiagramEditorInternal. For the next release we are working on making the
editor public API.

Michael
Re: Graphiti as Multiple Xml Editor [message #762652 is a reply to message #762619] Thu, 08 December 2011 12:59 Go to previous messageGo to next message
mcd  is currently offline mcd Friend
Messages: 4
Registered: December 2011
Junior Member
Sounds very promising

Can you give me a hint about how I can feed my EMF object to the GMF editor?
Re: Graphiti as Multiple Xml Editor [message #763137 is a reply to message #762652] Fri, 09 December 2011 08:40 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Sorry? I thought you wanted to build a Graphiti editor?

Michael
Re: Graphiti as Multiple Xml Editor [message #763330 is a reply to message #763137] Fri, 09 December 2011 15:25 Go to previous messageGo to next message
mcd  is currently offline mcd Friend
Messages: 4
Registered: December 2011
Junior Member
I want to do an Eclipse graphical editor with Graphiti. What i want to do is to feed the editor with xml files and let the user edit (save, load, view) the xml file with a graphical tool.
Is it possible to do that?

And is it possible to feed the graphical editor from multiple xml files and save the graphical editor changes to multiple xml files?

The xml files has a predefined syntax.

I have already did a parser that parses all the xml files, and make an EMF Object (!).

[Updated on: Fri, 09 December 2011 15:27]

Report message to a moderator

Re: Graphiti as Multiple Xml Editor [message #764461 is a reply to message #763330] Mon, 12 December 2011 08:19 Go to previous message
Tim Kaiser is currently offline Tim KaiserFriend
Messages: 118
Registered: July 2009
Senior Member
Hi,

this posting might help:

http://www.eclipse.org/forums/index.php/t/261941/

Best, Tim
Previous Topic:Export as gif file failing
Next Topic:Direct Editing with TYPE_MULTILINETEXT
Goto Forum:
  


Current Time: Fri Apr 19 01:53:01 GMT 2024

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

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

Back to the top