Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problems with multi-page editors
Problems with multi-page editors [message #115372] Thu, 29 March 2007 10:01 Go to next message
Eclipse UserFriend
Originally posted by: Stefan.Warwas.freenet.de

Hi,

I have following problem: I created a multi-page editor with two
diagrams, but whenever I insert the "related diagram" reference and
generate the source code, the main diagram is "destroyed". "destroyed"
means that the main diagram is still working but I can't place nodes
anymore. Before I "related" both diagrams it was working. Additionally
the palette of the main diagram is mixed up with the sub-diagram's
palette. When I place the mouse cursor in the main diagram a bubble with
all elements I can create there opens. But all elements in that bubble
are disabled. When I open an old diagram where nodes have already been
placed, the double click feature works.



What I did (I am using GMF 2.0M5uh):

- create the main editor (genmodel, gmftool, gmfgraph, gmfmap)
- create the sub-editor (gmftool, gmfmap; use genmodel and gmfgraph of
main diagram)
- edit gmfgen of sub-editor:
- Gen Editor Generator
* Model ID (editor id)
* Package Name Prefix (main-package for sub-diagram)
- Gen Plugin:
* ID (name of project folder)
* Name (plugin name)
- Gen Editor View:
* ID: is automatically set when I change the package name
- Gen Diagram.Editor
* Editing Domain ID: is automatically set when I change
GenPlugin.ID
- edit gmfmap of main editor:
* insert "related diagram" reference to the sub-editors gmfmap
- edit gmfgen of main editor:
- Open Diagram Behaviour
* Diagram Kind: GenEditorGenerator.ModelID
* Editor ID: GenEditorView.ID
- generate source code of both diagrams



I tried this several times and I got always the same problem described
above. Have I missed to set some attributes or is it just a bug?

Do I have to set the "Package Name Prefix" attribute to another value
compared to the main diagram or do they have to be the same?

I have absolutely no idea what could be wrong. Thanks a lot in advance!

There is also another bug: when I set the "diagramKind" and "editorID"
attributes in a gmfgen file and regenerate it from the corresponding
gmfmap file, the values of both attributes are discarted and one has to
set them again.

Regards,

Stefan
Re: Problems with multi-page editors [message #115620 is a reply to message #115372] Fri, 30 March 2007 07:47 Go to previous messageGo to next message
Eclipse UserFriend
Hello Stefan,

So, once more: the problem appear only ater setting "related diagrams" property
and regenerating the code? (without this property and with all the same options
generated code works well in multy-page editor?)

> There is also another bug: when I set the "diagramKind" and "editorID"
> attributes in a gmfgen file and regenerate it from the corresponding
That's really strange - AFAIKSee from the code these properties should be
preserved if changed by user.

-----------------
Alex Shatalin
Re: Problems with multi-page editors [message #115964 is a reply to message #115620] Mon, 02 April 2007 02:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Stefan.Warwas.freenet.de

Hi,

> So, once more: the problem appear only ater setting "related diagrams"
> property and regenerating the code? (without this property and with all
> the same options generated code works well in multy-page editor?)
>

Your remark was helpful. My problem had nothing to do with the "related
diagram" attribute. I finally found out that one has to set the
GenEditorGenerator.DiagramFileExtension attribute of the sub-editor to a
different value than that of the main editor. Otherwise the editor
behaves pretty strange. Perhaps this value should be set automatically
to a valid value by the generator.

>> There is also another bug: when I set the "diagramKind" and "editorID"
>> attributes in a gmfgen file and regenerate it from the corresponding
> That's really strange - AFAIKSee from the code these properties should
> be preserved if changed by user.

I recognized this several times. I think it is a bug. Perhaps someone
else can can confirm it.


Regards,

Stefan
Re: Problems with multi-page editors [message #116051 is a reply to message #115964] Mon, 02 April 2007 07:31 Go to previous messageGo to next message
Eclipse UserFriend
Hello Stefan,

> Otherwise the editor behaves pretty strange. Perhaps this value should
> be set automatically to a valid value by the generator.
Unfortunately generator does not know anything about your second diagram,
so this property can not be automatically modified – you should made it unique
in scope of all the GMF editors..

> I recognized this several times. I think it is a bug. Perhaps someone
> else can can confirm it.
Can you try to localize it and provide us with steps to reproduce (m.b. with
some particular models)?

-----------------
Alex Shatalin
Re: Problems with multi-page editors [message #116239 is a reply to message #116051] Mon, 02 April 2007 09:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fbanica.soluta.net

Hello there,

is there any tutorial or article speaking about how to make 2 or more
diagrams in the same project (something like Stefan did)?

Thanks,



Floppy


"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6120de8c94342605319a7@news.eclipse.org...
> Hello Stefan,
>
>> Otherwise the editor behaves pretty strange. Perhaps this value should
>> be set automatically to a valid value by the generator.
> Unfortunately generator does not know anything about your second diagram,
> so this property can not be automatically modified - you should made it
> unique in scope of all the GMF editors..
>
>> I recognized this several times. I think it is a bug. Perhaps someone
>> else can can confirm it.
> Can you try to localize it and provide us with steps to reproduce (m.b.
> with some particular models)?
> -----------------
> Alex Shatalin
>
>
Re: Problems with multi-page editors [message #116276 is a reply to message #116239] Mon, 02 April 2007 10:16 Go to previous message
Eclipse UserFriend
Hello FLORIN,

You can realize what you should modify from this document: http://wiki.eclipse.org/index.php/GMF_GenModel_Hints

-----------------
Alex Shatalin
Previous Topic:GMF_Tutorial Part 2 and Validation
Next Topic:Problem with diagram creation from model file
Goto Forum:
  


Current Time: Sat May 10 12:17:30 EDT 2025

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

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

Back to the top