Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 05:32 Go to next message
xiang yuanbo is currently offline xiang yuanboFriend
Messages: 8
Registered: March 2012
Junior Member
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 14:20 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1921
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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 14:54 Go to previous messageGo to next message
Nikolai Raitsev is currently offline Nikolai RaitsevFriend
Messages: 102
Registered: July 2009
Senior Member
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] Thu, 22 March 2012 01:41 Go to previous message
xiang yuanbo is currently offline xiang yuanboFriend
Messages: 8
Registered: March 2012
Junior Member
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: Thu, 22 March 2012 01:41]

Report message to a moderator

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


Current Time: Sun Aug 09 09:59:22 GMT 2020

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

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

Back to the top