Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Difference between Diagram Type and Diagram Type Provider
Difference between Diagram Type and Diagram Type Provider [message #731542] Sat, 01 October 2011 16:30 Go to next message
vinaybedre is currently offline vinaybedreFriend
Messages: 8
Registered: September 2011
Junior Member

Can anyone tell me the difference between Diagram Type and Diagram Type Provider in Graphiti.

Vinay Bedre
Re: Difference between Diagram Type and Diagram Type Provider [message #731561 is a reply to message #731542] Sat, 01 October 2011 18:22 Go to previous message
Hernan Gonzalez is currently offline Hernan GonzalezFriend
Messages: 188
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
When you code a Graphiti application, you tipically define your own DiagramType (basically, a string identifier) and its DiagramTypeProvider (basically a Java class. that is associated to a DiagramType; the declaration is done in your plugin.xml. This is explained in the first pages of the tutorial ("Features" and "Diagram").

In the typical workflow, When a diagram is saved, its DiagramType is saved inside it. And when the Graphiti editor loads it (assuming we are using the default DiagramEditor), it discovers the type, and find a declared DiagramTypeProvider that understand that type, and instantiates its Java class. This object will provide the editor with all the behaviour and features to show/manipulate the diagram.

[Updated on: Sat, 01 October 2011 18:23]

Report message to a moderator

Previous Topic:Grahical editor refresh on underlying resource changed
Next Topic:Connection without semantic object
Goto Forum:

Current Time: Sun Jan 24 21:45:41 GMT 2021

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

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

Back to the top