Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » [GMF] Create Undefined ??
[GMF] Create Undefined ?? [message #764560] Mon, 12 December 2011 07:35 Go to next message
Eclipse UserFriend
Hello everybody.

I already asked it in the forums of Epsilon, but i got the answer that it is more a GMF related question.

I created a Modell like that :

I have one object goal. This goal can reference more goals, but with 2 different relations.

When i now draw a link in canvas with the small rectangles at everynode (drag and drop)
i get 2 proposals.
I can "Create Undefined" and "Create Undefined".

This names appear in the title of the porperty view as well.
How i can change these names ?

The Epsilon Forum proposes to change this in plugin.properties file of xyz.diagram projekt.
I did that. But nothing changes. What im doing wrong ?
And can anybody tell me where i can change the picture as well ?

Here is the link of the other thread in epsilon forum:

http://www.eclipse.org/forums/index.php/t/265016/

Greetings
Snakebyte

[Updated on: Mon, 12 December 2011 07:37] by Moderator

Re: [GMF] Create Undefined ?? [message #765114 is a reply to message #764560] Tue, 13 December 2011 07:56 Go to previous messageGo to next message
Eclipse UserFriend
no ideas ?
Re: [GMF] Create Undefined ?? [message #765121 is a reply to message #765114] Tue, 13 December 2011 08:07 Go to previous messageGo to next message
Eclipse UserFriend
Could it be that bug? https://bugs.eclipse.org/bugs/show_bug.cgi?id=354467

--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Re: [GMF] Create Undefined ?? [message #765122 is a reply to message #765114] Tue, 13 December 2011 08:10 Go to previous messageGo to next message
Eclipse UserFriend
Yes maybe it is.

It doesnt matter what i set in plugin.properties.
The value changes sometimes, and sometimes not Sad

Can you plz give me a short explanation on how to fix this ?

[Updated on: Tue, 13 December 2011 08:34] by Moderator

Re: [GMF] Create Undefined ?? [message #765152 is a reply to message #765122] Tue, 13 December 2011 09:17 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I did the following to fix this for my case.

In your plugin where you define the genmodel:

1) Create a folder called transformations
2) create a file called postRec.qvto
3) Place this content in the file

modeltype GMFGEN uses gmfgen('http://www.eclipse.org/gmf/2009/GenModel');
transformation postRec(inout gmfgenModel : GMFGEN);

main() {
--Fix the Create Undefined Bug 354467 
gmfgenModel.objectsOfType(GenLink)->asOrderedSet()
 ->select(l | l.elementType.oclIsTypeOf(SpecializationType) and l.elementType.displayName = 'Undefined')->forEach(link)
 {
   link.elementType.displayName := link.modelFacet.oclAsTyp(FeatureLinkModelFacet).metaFeature.ecoreFeature.name.firstToUpper();
 };
}


4) Delete your genmodel
5) Generate your genmodel but check on the last page of the wizzard "Extra in-place gmfgen transformation after a reconcile step"
6) Put the text box below: platform:/resource/plugin-id/transformations/postRec.qvto
7) Delete .properties file in generated plugin (Otherwise changes do not take effect)
8) Generate code from genmodel

This should fix your problem.

Ralph

[Updated on: Tue, 13 December 2011 09:17] by Moderator

Re: [GMF] Create Undefined ?? [message #765190 is a reply to message #765152] Tue, 13 December 2011 10:30 Go to previous messageGo to next message
Eclipse UserFriend
Works. Great. Thank you.
But if i do that, i lose my validate option under Edit ? Why ?

Do you know where i can set these pictures as well ?

[Updated on: Tue, 13 December 2011 10:33] by Moderator

Re: [GMF] Create Undefined ?? [message #766230 is a reply to message #765190] Thu, 15 December 2011 07:20 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

did you try to exchange the files for creation in your .edit plugin generated by EMF. It should be named something like xxx.edit/icons/full/ctool16. It is possible that you might not have validation enabled set to true. Use this line in your transformation

genDiagram := gmfgenModel.objectsOfType(GenDiagram)->asOrderedSet()->first();
genDiagram.validationEnabled := true;


Outside of main you should of course define gendiagram as follows:

property genDiagram : GenDiagram = null;


Ralph
Re: [GMF] Create Undefined ?? [message #766233 is a reply to message #766230] Thu, 15 December 2011 07:22 Go to previous message
Eclipse UserFriend
An example for my whole transformation can be found here:

http://code.google.com/a/eclipselabs.org/p/melanie/source/browse/de.uni_mannheim.informatik.swt.gmf.plm/transformations/postRec.qvto

[Updated on: Thu, 15 December 2011 10:27] by Moderator

Previous Topic:How to set properties of an object automatically when it is created in the diagram?
Next Topic:OCL Validation Error not correctly raised!!! (Update: Please delete this post!)
Goto Forum:
  


Current Time: Sun Jul 13 17:19:57 EDT 2025

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

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

Back to the top