GMF without a model elements file [message #183835] |
Tue, 22 April 2008 12:40 |
Eclipse User |
|
|
|
Originally posted by: cold.phusion.gmail.com
Hi all,
I have a question regarding the sources of model elements for the GMF
diagrams. AFAIK there are only two options:
- a single file that stores both model elements and diagram information.
- two separate files - one for the model elements and one for the
diagram information.
Unfortunately, in both cases the model elements are available only for
the current diagram.
Is there a way to keep all diagram models in a single place and then
load specific elements to the diagrams - like a model provider, sort of
speak?
Thanks,
Alex
|
|
|
Re: GMF without a model elements file [message #183842 is a reply to message #183835] |
Tue, 22 April 2008 12:49 |
Eclipse User |
|
|
|
Originally posted by: 5d5.mail.ru
Write custom logic to serialize EMF Resource; it's an API - you may
provide arbitrary implementation.
Alexander Shterev wrote:
> Hi all,
>
> I have a question regarding the sources of model elements for the GMF
> diagrams. AFAIK there are only two options:
> - a single file that stores both model elements and diagram information.
> - two separate files - one for the model elements and one for the
> diagram information.
> Unfortunately, in both cases the model elements are available only for
> the current diagram.
> Is there a way to keep all diagram models in a single place and then
> load specific elements to the diagrams - like a model provider, sort of
> speak?
>
> Thanks,
> Alex
|
|
|
|
Re: GMF without a model elements file [message #184690 is a reply to message #183851] |
Tue, 29 April 2008 11:27 |
Eclipse User |
|
|
|
Originally posted by: cold.phusion.gmail.com
Thank you for the replies. I've tried a couple of things, including a
tutorial about creating multiple diagrams for the same domain model -
this way two diagrams can write in the same DiagramDocument. I'm stuck,
however, on supplying the diagram with a different resource rather than
a file. The instances of the models must be synchronized with a server
and parsing a data file is not a suitable option.
I tried to follow the hint of Dmitry, but I'm not sure which classes
should be overwritten. My suggestions for the time are IDiagramDocument
and IDocumentProvider.
If you have any further hints, I would appreciate it :]
Regards,
Alexander
Alex Shatalin wrote:
> Hello Alexander,
>
> You can try shortcutting functionality - using this feature you can add
> arbitrary model element onto your diagram. This functionality used in
> GMF-generated ecore diagram example - you can play with it.
>
> -----------------
> Alex Shatalin
>
>
|
|
|
|
|
|
Re: GMF without a model elements file [message #187911 is a reply to message #187803] |
Tue, 20 May 2008 11:50 |
Eclipse User |
|
|
|
Originally posted by: 5d5.mail.ru
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg09141.html
Jonas wrote:
> Dmitry,
> i want to make sure that i got you right, do you think the following
> solution would work and make sense:
> Diagrams and all elements are included in one model, the elements which
> are in that diagram have references to it (e.g. diagram.getElements()).
> If a diagram is opened a custom resource is instanciated, containing all
> EObjects which are referenced from the corresponding diagram and a
> second one containing the diagram itself. The generated gmf editor is
> opened with these resources. Do you think this could work?
> Thanks
> Jonas
>
>
>> Write custom logic to serialize EMF Resource; it's an API - you may
>> provide arbitrary implementation.
>>
>> Alexander Shterev wrote:
>>> Hi all,
>>>
>>> I have a question regarding the sources of model elements for the GMF
>>> diagrams. AFAIK there are only two options:
>>> - a single file that stores both model elements and diagram information.
>>> - two separate files - one for the model elements and one for the
>>> diagram information.
>>> Unfortunately, in both cases the model elements are available only
>>> for the current diagram.
>>> Is there a way to keep all diagram models in a single place and then
>>> load specific elements to the diagrams - like a model provider, sort
>>> of speak?
>>>
>>> Thanks,
>>> Alex
|
|
|
|
Powered by
FUDForum. Page generated in 0.02995 seconds