|Re: POJO Domain Model - How do I get started? [message #635804 is a reply to message #635602]
||Thu, 28 October 2010 08:06
| Tim Kaiser
Registered: July 2009
the editor needs the transactional editing domain already
to make changes to the pictograms model (the diagram).
So even if you do not have a domain model which is
(EMF-) file based but just in-memory you would need to
provide a transactional editing domain for
manipulation of the diagram model.
For opening an editor programmatically you may have a look at
the CreateDiagramWizard class.
If you want to visualize a non-EMF model make sure you deliver an instance
with your FeatureProvider. There, you have to implement
a lookup facility for your domain model objects.
Does it help?
Best regards, Tim
"luko.de.be" <email@example.com> wrote in message
> Dear all,
> i'm new to this newsgroup and especially to graphiti.
> We`re trying to develop a software as RCP application in which we`d like
> to offer a graphical user interface to create directed graphs. Those
> graphs consist of interconnected nodes. The domain model is implemented as
> simple POJOs, unfortunately we did not use EMF.
> I found graphiti and do actually have several questions.
> I started with the following steps:
> * check out graphiti from CVS
> * find the documentation and go through it
> * created my plugin
> * created my diagramtype and diagramtypeprovider and the extensions in the
> * created an extension (java-class) of the DiagramEditor and declared this
> as editor in the editors-extensionpoint
> * created an extension (java-class) of the DiagramEditorInput
> Following Problems:
> * the diagramEditorInput expects a TransactionalEditingDomain. Actually,
> i do not have a workspace resource. My "resource" is a model consisting
> of objects within the jvm. Is this at all possible with graphiti?
> Since i cannot provide an EdititingDomain (as far as i know) i tried to
> create an EditorInput as implementation of IEditorInput.
> That actually led to the following problem: * the DiagramEditor obviously
> expects either a FileEditorInput or a DiagramEditorInput. I do not provide
> either of them.
> In conclusion:
> I`d like to know, if the graphiti diagram editor can only handle file
> based inputs (the implementation of DiagramEditorInternal lets me think
> that) and also, if generally speaking, there is an easy way to adapt
> graphiti to POJO models and how to actually do that.
> Sorry for the possible lack of information, but i do not really get
> through this.
> Best regards,
Powered by FUDForum
. Page generated in 0.02203 seconds