Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » editing diagram files by hand
editing diagram files by hand [message #223482] Tue, 31 March 2009 07:20 Go to next message
Marcin Cylke is currently offline Marcin CylkeFriend
Messages: 61
Registered: July 2009
Member
Hello

I'm in need of creating a large set of test data for my editor. I figured
out it would be best to just create a sample structure in my diagram file
and then copy it n-times. Unfortunatelly it does not work - my newly
copied data does not appear on the diagram. What should I watch for when
doing such generation?

- I have a standard - GMF generated serialization, each diagram has a
model file and diagram file
- I tried changing xsi:id for each copied group - so that each had its own
unique one
- I've added elements in diagram file and in model file
- I've changed href attributes in "_diagram" file to point to the correct
element in model file.

Still it does not work.

Any help would be appreciated.

Marcin
Re: editing diagram files by hand [message #223696 is a reply to message #223482] Tue, 31 March 2009 16:38 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Marcin,

I suggest you creating new diagram via GMF notation model API (see org.eclipse.gmf.runtime.diagram.core.services.ViewService)
and save it using EMF resources.

-----------------
Alex Shatalin
Re: editing diagram files by hand [message #223989 is a reply to message #223696] Thu, 02 April 2009 07:48 Go to previous messageGo to next message
Marcin Cylke is currently offline Marcin CylkeFriend
Messages: 61
Registered: July 2009
Member
Hello
This seems reasonable, but I'm not able to do it on my own, as I keep
running into problems with it.

Could You direct me to some kind of usage example?

Marcin
Re: editing diagram files by hand [message #223997 is a reply to message #223989] Thu, 02 April 2009 09:43 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Marcin,

See generated ???DiagramEditorUtil - this class is responsible for initializing
diagram for an existing model element. From createDiagram() method you can
realize how to create diagram for an exisitng domain model element. Nodes
can be created in a similar way - just use ViewService.createNode() method
instead.

-----------------
Alex Shatalin
Previous Topic:Retrieve elements from xmi file with both diagram and emf models
Next Topic:Probléme of link constraint
Goto Forum:
  


Current Time: Tue Sep 24 16:04:36 GMT 2024

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

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

Back to the top