Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] Can't draw link in generated editor.
[Eugenia] Can't draw link in generated editor. [message #770065] Fri, 23 December 2011 08:31 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 15
Registered: December 2011
Junior Member
Hello,

following .emf-Code is given:

@gmf(foo="bar")
@namespace(uri="config", prefix="config")
package config;

@gmf.diagram(foo="bar", onefile="false")
class Diagramm {
  !resolve val Action[*] actions;
  !resolve val Data[*] sData;
}

// Data-Nodes
abstract class Data{
  ref ActionInputLink[*]#theData actionInputs;
}

@gmf.node(label="name", figure="rounded", label.placement="none", color="50,55,55")
class ResultData extends Data {
  ref ActionOutputLink#result actionOutput;
}

@gmf.node(label="name", figure="ellipse", label.placement="none", color="0,0,255")
class NewData extends Data {
}

// Action-Nodes
@gmf.node(label="name", figure="rounded", size="100,200", color="219,238,253")
class ZipAction extends Action {
  @gmf.compartment(layout="list", collapsible="false")
  val Destination[1..3] dest;
}

abstract class Action extends NamedElement {
  !resolve val ActionInputLink[1]#action input;
  !resolve val ActionOutputLink[1]#action output;
}

@gmf.node(label="name, param", figure="rectangle", label.icon="false", label.pattern="{0}: {1}")
class Destination extends NamedElement {
  attr String param;
}


// Links
@gmf.link(source="theData", target="action",
target.decoration="arrow", style="dash", width="1")
class ActionInputLink {
  ref Action#input action;  
  ref Data#actionInputs theData; 
}

@gmf.link(source="action", target="result", color="130,130,130",
target.decoration="arrow", style="solid", width="3")
class ActionOutputLink {
  ref Action#output action;
  ref ResultData#actionOutput result;   
}

// Baseclass
class NamedElement {
  attr String name;
}


After creating the editor i am not able to draw an ActionOutputLink (Link from ZipAction to ResultNode).
What am i doing wrong here?

Note: This is basically similar to the basically gmf-Example ( gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial5#overview).
Since i dont know too much about gmf i am using eugenia, which helps me a lot to stay with GMF Wink

Thanks in advance.

Wolly




Re: [Eugenia] Can't draw link in generated editor. [message #772286 is a reply to message #770065] Thu, 29 December 2011 12:32 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 15
Registered: December 2011
Junior Member
Hello again,

Maybe i wasn't clear enough what i tried to achieve...

I have two sorts of Nodes: ActionNodes and ResultNodes.
Further i have two sorts of Links: in to ActionNode and out of a ActionNode.

What i am trying to do is to get a ActionNode with at most two Links, one of each sort of Link.

The Editor from the GMF-Tutorial (http://gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial5) has the desired behaviour. But how do i do that with Eugenia?

Thanks in advance.

Wolly
Re: [Eugenia] Can't draw link in generated editor. [message #772296 is a reply to message #772286] Thu, 29 December 2011 13:00 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 918
Registered: July 2009
Senior Member
Hi Wolly,

Apologies for the late reply. I can't seem to be able to reproduce the issue in your first message (see http://dl.dropbox.com/u/5636547/epsilon-forum/config.png)

Could you perhaps enforce the "at most one" constraint using validation rules? (see http://www.eclipse.org/gmt/epsilon/doc/articles/evl-gmf-integration/ for an example)

Cheers,
Dimitris
Re: [Eugenia] Can't draw link in generated editor. [message #772304 is a reply to message #772296] Thu, 29 December 2011 13:26 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 15
Registered: December 2011
Junior Member
Hi Dimitris,

thanks for your reply.

In your screenshot there is one sort of Link: From Action to Resultnode.

Did u tried to add one more Resultnode and link it to the given Action? Like i said in my first posting i wasnt able to do so.
Can u draw more then one Link Action->ResultNode?

The "at most one"-Constraint: I havn't tried the EVL-constraints yet since i am battling more newbie-Problems like "Custom Icons for tools". With given GMF-Example i thought, that it is possible to achieve this constraint without EVL as done in the GMF-Example. In my mind i have also the word "Audit in gmfmap" for implementing constraints...

I will give EVL a try as soon as i solved the Problems with Custom Icons. At the Moment i am wondering, why i can see my icons in the palette but not in the toolbar Confused Maybe i should write a posting about that...

Greetings,
Wolly

Re: [Eugenia] Can't draw link in generated editor. [message #772322 is a reply to message #772304] Thu, 29 December 2011 14:09 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 918
Registered: July 2009
Senior Member
Hi Wolly,

I actually can't create any ActionInputLinks between a ZipAction and a ResultData instance. This seems to be a GMF bug as if I create a model in the tree editor, GMF is able to visualise it without problems. I'd suggest trying an alternative design where ActionInputLinks and ActionOutputLinks are contained (val) under Diagram and are ref'd by Data and Actions.

Cheers,
Dimitris
Re: [Eugenia] Can't draw link in generated editor. [message #772340 is a reply to message #772322] Thu, 29 December 2011 14:50 Go to previous message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 15
Registered: December 2011
Junior Member
Hi Dimitris,

thats the way it works (and used in the Eugena GMF Filesystem-Tutorial).

So the answer to my initial posting is "..seems to be a GMF bug...".

I hoped to get the "at most one" constraint built-in like shown in the GMF-Tutorial. But then u obviously have to use (plain) GMF without Eugenia-support.

Well, then i have to use EVL for getting the constraint. Smile

Greetings,
Wolly

Previous Topic:[Eugenia] Color and Size of a Custom Figure
Next Topic:[Eugenia] Custom Icons for Tools
Goto Forum:
  


Current Time: Thu Dec 18 19:42:50 GMT 2014

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

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