Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » POJO Domain Model - How do I get started? (I`d like to use a non-EMF-model as Domain Model. The domain model only consists of POJOs)
POJO Domain Model - How do I get started? [message #635602] Wed, 27 October 2010 13:34 Go to next message
Lukas Olbrich is currently offline Lukas OlbrichFriend
Messages: 17
Registered: October 2010
Junior Member
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 plugin.xml
* 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,
lukode

Re: POJO Domain Model - How do I get started? [message #635804 is a reply to message #635602] Thu, 28 October 2010 08:06 Go to previous messageGo to next message
Tim Kaiser is currently offline Tim KaiserFriend
Messages: 118
Registered: July 2009
Senior Member
Hi,

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
of IIndependenceSolver
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" <luko.de.be@gmail.com> wrote in message
news:ia99hp$c0c$1@news.eclipse.org...
> 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
> plugin.xml
> * 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,
> lukode
>
>
Re: POJO Domain Model - How do I get started? [message #637047 is a reply to message #635804] Wed, 03 November 2010 22:50 Go to previous message
Lukas Olbrich is currently offline Lukas OlbrichFriend
Messages: 17
Registered: October 2010
Junior Member
hey,
thx for your reply.
well, unfortunately we decided for a first version in gef exactly that day, that i posted my question. so, at the moment we will stick to gef and hopefully use graphiti for the upcoming version.
i will post my progress.
regards,
Lukas

[Updated on: Wed, 03 November 2010 22:52]

Report message to a moderator

Previous Topic:update in case of removed business objects
Next Topic:state feedback during creation of a connection
Goto Forum:
  


Current Time: Sat Jul 11 14:40:57 GMT 2020

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

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

Back to the top