Skip to main content



      Home
Home » Modeling » Graphiti » Read diagram from a combined file.(Read diagram, combined file)
icon5.gif  Read diagram from a combined file. [message #825677] Wed, 21 March 2012 01:32 Go to next message
Eclipse UserFriend
Would it be possible to save and load diagram and model file into a combined file likes:
<Root>
<Diagram-part>
...
</Diagram-part>
<POJO-part>
...
</POJO-part>
</Root>

Thanks in advance!
Re: Read diagram from a combined file. [message #826001 is a reply to message #825677] Wed, 21 March 2012 10:20 Go to previous messageGo to next message
Eclipse UserFriend
As long as your domain objects are EMF objects this is no problem. The
tutorial does exactly that (although we would recommend to separate
graphical and domain data into separate files).

Michael
Re: Read diagram from a combined file. [message #826021 is a reply to message #825677] Wed, 21 March 2012 10:54 Go to previous messageGo to next message
Eclipse UserFriend
I'm not the Graphiti-Guru, but I think it's possible.

1.) Its easy, if you use EMF for your Domain Objects/Model: look at Graphiti chess example, its works "out of the box"
2.) Its more complicated, if you use Non-EMF-Domain Objects/Model: I would make it in a follow way:
- Create Initial file with diagram and objects file
- Store diagram file and objects file in a two different files temporary
- Open your graphiti editor initially with this two files
- On save-actions write your temporary objects file (the diagram file writes automatically by graphiti) and merge boths (diagram and objects) in your target file.

Best regards,

Nikolai
Re: Read diagram from a combined file. [message #826377 is a reply to message #826021] Wed, 21 March 2012 21:41 Go to previous message
Eclipse UserFriend
Thank you. (2)that's what we currently did:).

Regards, Yuanbo
Nikolai Raitsev wrote on Wed, 21 March 2012 10:54
I'm not the Graphiti-Guru, but I think it's possible.

1.) Its easy, if you use EMF for your Domain Objects/Model: look at Graphiti chess example, its works "out of the box"
2.) Its more complicated, if you use Non-EMF-Domain Objects/Model: I would make it in a follow way:
- Create Initial file with diagram and objects file
- Store diagram file and objects file in a two different files temporary
- Open your graphiti editor initially with this two files
- On save-actions write your temporary objects file (the diagram file writes automatically by graphiti) and merge boths (diagram and objects) in your target file.

Best regards,

Nikolai

[Updated on: Wed, 21 March 2012 21:41] by Moderator

Previous Topic:Copy & Paste default behavior
Next Topic:How to link diagrams with each other?
Goto Forum:
  


Current Time: Wed Jul 23 06:27:23 EDT 2025

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

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

Back to the top