Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Creating/Opening several GMF diagrams
[Teneo] Creating/Opening several GMF diagrams [message #115778] Wed, 26 March 2008 10:38 Go to next message
Matthias Treitler is currently offline Matthias TreitlerFriend
Messages: 117
Registered: July 2009
Senior Member
Hi Martin!

I followed your (very good) GMF Tutorial and got everything working!
But I have a certain use case and I hope it is feasable with Teneo ;)!

I want to open one or more graphical editors, each with there own domain
model instance and GMF diagram instance: so (technically speaking)
URIEditorInput shall be not equal between the model instances.

I think this line can help me (copied from the tutorial):
public static final URI DATABASE_URI =
URI.createURI("hbxml://?dsname=mindmap&query1=from Map&query2=from
Diagram");

But certainly I dont know how. Ok, it would be possible to create for each
new diagram editor a DataStore, but ..hmm... answer yourself.

Is there another way to select a specific domain element and the related
diagram element from the Database?! Or is it only possible to store
exactly *one* domain and diagram element to a database?!

Maybe, the solution is rather easy, but I am really new to Teneo...

Thank you in advance!

Best regards,
Matthias
Re: [Teneo] Creating/Opening several GMF diagrams [message #115793 is a reply to message #115778] Wed, 26 March 2008 10:58 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Matthias,
Good that the tutorial works for you. The tutorial is just 2 weeks old so if there are things I need
to change to make it easier then let me know.

Regarding your question, the solution is to use a different query in the uri. The datastore can
remain the same. You can use any hql query in the uri to load a specific diagram and related domain
object(s). So in this way you can for example have a list view which shows the diagrams (you can
load the current set of diagrams from the db using hql either within a resource or outside of a
resource) and when clicking on a diagram open a resource using a specific hql in the uri to open
that diagram:
hbxml://?dsname=mindmap&query1=from Map&query2=from Diagram where name='MySelectedDiagram'

The datastore can be the same for all resources/queries.

gr. Martin


Matthias wrote:
> Hi Martin!
>
> I followed your (very good) GMF Tutorial and got everything working!
> But I have a certain use case and I hope it is feasable with Teneo ;)!
>
> I want to open one or more graphical editors, each with there own domain
> model instance and GMF diagram instance: so (technically speaking)
> URIEditorInput shall be not equal between the model instances.
>
> I think this line can help me (copied from the tutorial):
> public static final URI DATABASE_URI =
> URI.createURI("hbxml://?dsname=mindmap&query1=from Map&query2=from
> Diagram");
>
> But certainly I dont know how. Ok, it would be possible to create for
> each new diagram editor a DataStore, but ..hmm... answer yourself.
>
> Is there another way to select a specific domain element and the related
> diagram element from the Database?! Or is it only possible to store
> exactly *one* domain and diagram element to a database?!
>
> Maybe, the solution is rather easy, but I am really new to Teneo...
>
> Thank you in advance!
>
> Best regards,
> Matthias
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Creating/Opening several GMF diagrams [message #116011 is a reply to message #115793] Wed, 26 March 2008 21:31 Go to previous message
Matthias Treitler is currently offline Matthias TreitlerFriend
Messages: 117
Registered: July 2009
Senior Member
Hi Martin!

Thanks, works perfectly ;) !

Best regards,
Matthias
Re: [Teneo] Creating/Opening several GMF diagrams [message #615983 is a reply to message #115778] Wed, 26 March 2008 10:58 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Matthias,
Good that the tutorial works for you. The tutorial is just 2 weeks old so if there are things I need
to change to make it easier then let me know.

Regarding your question, the solution is to use a different query in the uri. The datastore can
remain the same. You can use any hql query in the uri to load a specific diagram and related domain
object(s). So in this way you can for example have a list view which shows the diagrams (you can
load the current set of diagrams from the db using hql either within a resource or outside of a
resource) and when clicking on a diagram open a resource using a specific hql in the uri to open
that diagram:
hbxml://?dsname=mindmap&query1=from Map&query2=from Diagram where name='MySelectedDiagram'

The datastore can be the same for all resources/queries.

gr. Martin


Matthias wrote:
> Hi Martin!
>
> I followed your (very good) GMF Tutorial and got everything working!
> But I have a certain use case and I hope it is feasable with Teneo ;)!
>
> I want to open one or more graphical editors, each with there own domain
> model instance and GMF diagram instance: so (technically speaking)
> URIEditorInput shall be not equal between the model instances.
>
> I think this line can help me (copied from the tutorial):
> public static final URI DATABASE_URI =
> URI.createURI("hbxml://?dsname=mindmap&query1=from Map&query2=from
> Diagram");
>
> But certainly I dont know how. Ok, it would be possible to create for
> each new diagram editor a DataStore, but ..hmm... answer yourself.
>
> Is there another way to select a specific domain element and the related
> diagram element from the Database?! Or is it only possible to store
> exactly *one* domain and diagram element to a database?!
>
> Maybe, the solution is rather easy, but I am really new to Teneo...
>
> Thank you in advance!
>
> Best regards,
> Matthias
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] Creating/Opening several GMF diagrams [message #616000 is a reply to message #115793] Wed, 26 March 2008 21:31 Go to previous message
Matthias Treitler is currently offline Matthias TreitlerFriend
Messages: 117
Registered: July 2009
Senior Member
Hi Martin!

Thanks, works perfectly ;) !

Best regards,
Matthias
Previous Topic:How to copy eResources such that xmi ids are maintained across resources
Next Topic:Extra Primary Key Join Column
Goto Forum:
  


Current Time: Thu Jun 24 19:56:01 GMT 2021

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

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

Back to the top