Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Canonical Edit Policy synchronization failure?
Canonical Edit Policy synchronization failure? [message #520715] Sun, 14 March 2010 18:58
Pavol is currently offline PavolFriend
Messages: 4
Registered: March 2010
Junior Member
Hi,

I understand that canonical edit policy keeps model and view synchronized. If I make some changes to the domain model, the view will change accordingly.

I used GMF to create my editor and all the generated files seem to be ok. The canonical edit policy is installed correctly.

My editor is able to create node A on the canvas. I can add node B (as compartment) as a child to node A. If I use creation tool from the palette to create node B inside node A, it all goes all right and works properly. But I want, that node B will be created automatically when I create node A. So I decided to use AEditHelper and to override the method

protected ICommand getConfigureCommand(ConfigureRequest req) {..} 


Inside this method, I create element B and then set A containment pointing to the element B. Here is some pseudocode example:

A a_element = (A) req.getElementToConfigure();
B b_element = InstructionSetFactory.eINSTANCE.createB();
a_element.setHasB(b_element); 



After that, the model is created properly (If I look at the ecore XMI output file). And I suppose if the canonical edit policy is installed, that the view will be created properly. And the view really seems to be created properly. Problem is when I close the Editor and then Re-Open it again. After the Re-Opening, the view of the node B is not created. There is another output file from the editor (so called *_diagram file) and there are differences when I compare the *_diaram output file from manual creation of node B and the output file from this automatic creation of node B through editHelper. The ecore XMI output file looks allways the same.

What am I doing wrong?

Please help me!

Thanks, Pavol.

Previous Topic:GMF Customization Help - Recreate Connection on drop of a node
Next Topic:Type-Usage-Concept
Goto Forum:
  


Current Time: Tue Mar 19 06:08:17 GMT 2024

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

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

Back to the top