Having problems integrating new model in ecore [message #548242] |
Wed, 21 July 2010 08:48 |
ruben ![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=unjugon%40hotmail.com) Messages: 2 Registered: July 2010 |
Junior Member |
|
|
Hey all,
I am integrating a working model I use for a graphical modelling tool as a package in another ecore model.
For this I manually added the package to ecore, created a new genmodel from the updated ecore, and regenerated the model, edit, and editor code from it. Then copied my tool´s gmfgraph and gmftool, and created the gmfmap linking it to the new ecore. From the gmfmap I create the gmfgen as usual, and make sure the Gen Editor generator and Gen Plugin properties have the right values. Then I create the diagram code, launch the runtime and I can create new diagrams using my tool!
The problem I have is that I made manual changes to my original diagram code, so that I sometimes access the model when a graphical element is changed. This works in my "standalone" tool, but after the integration it ceases to work. Basically, I have something like:
//class MSimpleProcessEditPart
public void updateFace() {
MSimpleProcess msp = (MSimpleProcess) ((Node) MSimpleProcessEditPart.this.getModel()).getElement();
inLabel = msp.getProcessName();
if (msp.getRecursive()) inLabel = inLabel+" *";
When I change a property in a MSimpleProcess node, it calls that function. What happens is the diagram gets blocked somehow when i do it, and I cannot change anything in it unless I reopen it. When I debug it, it jumps from the line "if (msp.getRecursive()) inLabel = inLabel+" *";" to:
"protected void postcommit(InternalTransaction tx)" inside public class DiagramEditingDomainFactory from "org.eclipse.gmf.runtime.diagram.core".
I am lost tbh, please help.
Thank you!!
[Updated on: Wed, 21 July 2010 09:02] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.39400 seconds