Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Diagram Partitioning
Diagram Partitioning [message #523477] Fri, 26 March 2010 15:12 Go to next message
Dennis sui is currently offline Dennis suiFriend
Messages: 35
Registered: February 2010
Member
Hi,

i have problems with the feature "double-click to open a new Diagram Instance"

My model looks like this.

Document Root
-RootState
- -State
- - - Substate
- - - - Events
- - - - Actions
- - - - etc.


I created a GMF editor with RootState as root for the Canvas.


Substate is an affixed Child on State. If a double-click on Substate is received, a new Diagram Window should open with SubState as Root!

I tried this http://wiki.eclipse.org/Diagram_Partitioning example.

First i did everything as described in Usecase 1 "same type". When I double-clicked on a Substate, nothing happend.

Then I tried the Usecase 2 "different type" example.
I created a second GMFGraph, Tool, Map and GMFGen File for the Substate.
I created the source for my second editor and changed everything as explained in the example.
But still nothing happend.

I debugged the code and figured out that the
Diagram intializeNewDiagram()

function throws an exception because the value d on:
Diagram d = ViewService.createDiagram(getDiagramDomainElement(),getDiagramKind(), getPreferencesHint());

is null !

Has anyone an idea ?
Re: Diagram Partitioning [message #523541 is a reply to message #523477] Fri, 26 March 2010 18:11 Go to previous messageGo to next message
Dennis sui is currently offline Dennis suiFriend
Messages: 35
Registered: February 2010
Member
I solved the problem.

I have just used the Canvas from the main GMFGraph in the GMFMap instead of creating a new GMFGraph with a new Canvas!



Re: Diagram Partitioning [message #536079 is a reply to message #523541] Wed, 26 May 2010 21:45 Go to previous messageGo to next message
AlexejS Mising name is currently offline AlexejS Mising nameFriend
Messages: 25
Registered: May 2010
Junior Member
Hello, I have got the same problem, and I don't understand your solution. Can you describe it better, please?
Re: Diagram Partitioning [message #536160 is a reply to message #536079] Thu, 27 May 2010 09:41 Go to previous messageGo to next message
Dennis sui is currently offline Dennis suiFriend
Messages: 35
Registered: February 2010
Member
Hi,

i try it.

The Main Element in your *.gmfgraph is a "Canvas" Element.

Now, when you create a NEW *.gmfmap you have to fill the Attribute "Diagram Canvas" in the Element "Canvas Mapping" with THIS "Canvas" Element .

The Palette can be a new one.

So, in my case, it works only if i use only ONE *.gmfgraph.

I hope this is understandable and helps you.
Re: Diagram Partitioning [message #536474 is a reply to message #536160] Fri, 28 May 2010 12:28 Go to previous message
AlexejS Mising name is currently offline AlexejS Mising nameFriend
Messages: 25
Registered: May 2010
Junior Member
Thx for help!

I did so, but my problem was an other.

In my model definition I did a generalization from my Node to my Diagram-Klass instead of a spezialisation.


Thx

Alexej

Previous Topic:Propsheet customization
Next Topic:Drop shadow border
Goto Forum:
  


Current Time: Fri Jun 21 10:15:18 GMT 2024

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

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

Back to the top