Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Modify gmf.node
Modify gmf.node [message #1253650] Sat, 22 February 2014 14:16 Go to next message
Anthony Mer is currently offline Anthony MerFriend
Messages: 2
Registered: February 2014
Junior Member
Hello to all! I'm new here and the reason why I am creating this post is how I should modify the structure of a node.

I know I can define a node with this notation

@gmf.node(label="name")


But I want the node have two rectangles as demonstrated in the tutorial EuGENia: Affixed Nodes in GMF (I can't post links). The problem is that in this example the node Component has a @gmf.affixed to another node and I want the two rectangles in the same node because I just have one class in the metamodel to define the two rectangles.

How can I do that? I must change the @gmf.node or create a ECore2GMF.eol?

I can not find any documentation regarding this or similar questions, can someone help me in this situation? Thank you!
Re: Modify gmf.node [message #1255208 is a reply to message #1253650] Mon, 24 February 2014 07:38 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

I'm not sure I fully understand what the desired graphical syntax would look like. Could you please draw a sketch of the envisioned editor and attach it here with a copy of your metamodel so that I can advise?

Cheers,
DImitris
Re: Modify gmf.node [message #1257957 is a reply to message #1255208] Thu, 27 February 2014 00:10 Go to previous messageGo to next message
Anthony Mer is currently offline Anthony MerFriend
Messages: 2
Registered: February 2014
Junior Member
Hi Dimitris,

I did what I wanted, which was a small rectangle and one large rectangle on the same node. However I saw no method of filling the small rectangle with black background. How can I do this? The metamodel is defined in the following textual representation:

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

@gmf.diagram(foo="bar")
class ZecModel {
  val Element[1] rootNode;
}

@gmf.node(figure="polygon", polygon.x="0 80 80 0 0 30 30 50 50 80", polygon.y="10 10 45 45 10 10 0 0 10 10", label="name")
class Element {
	attr String[1] name;
}


Thank you!
Re: Modify gmf.node [message #1258792 is a reply to message #1257957] Thu, 27 February 2014 19:16 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Anthony,

Does the following do the trick?

> color (optional) : an RGB color that will be set as the node's background color (e.g. 255,0,0).

If not, I'd suggest figuring out how this can be achieved by editing the .gmfgraph model manually and then automating the process using a polishing transformation [1].

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/doc/articles/eugenia-polishing/
Previous Topic:How to create plugin to execute egl files
Next Topic:Update model from EGL
Goto Forum:
  


Current Time: Thu Mar 28 13:48:18 GMT 2024

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

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

Back to the top