Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » attribute representation like magicdraw(how to show attribute name and value at same line)
attribute representation like magicdraw [message #1088585] Sat, 17 August 2013 09:32 Go to next message
Gianni Rosa is currently offline Gianni RosaFriend
Messages: 11
Registered: August 2013
Junior Member
Hi Folks! I am new in epsilon and eugenia so I appreciate every help about it.

I need to draw a diagram like magic draw so I need to show for every attribute in a class the name, type and value of that.

Also I need to show in a child class his parent with brackets.

Can I do that in Eugenia?

Thanks for help.
Re: attribute representation like magicdraw [message #1090529 is a reply to message #1088585] Tue, 20 August 2013 09:11 Go to previous messageGo to next message
Gianni Rosa is currently offline Gianni RosaFriend
Messages: 11
Registered: August 2013
Junior Member
Nobody can help me?

I saw the expression label mapping but is doesn't work!

Any help is appreciates!
Re: attribute representation like magicdraw [message #1091246 is a reply to message #1090529] Wed, 21 August 2013 08:26 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Does this help?

http://eclipse.org/epsilon/doc/articles/eugenia-polishing/

Cheers,
Dimitris
Re: attribute representation like magicdraw [message #1091291 is a reply to message #1091246] Wed, 21 August 2013 09:52 Go to previous messageGo to next message
Gianni Rosa is currently offline Gianni RosaFriend
Messages: 11
Registered: August 2013
Junior Member
yes, I had already seen the polishing and it works well for the purpose.

Now I have another problem. I would like to show the color of a rectangle on the basis of a parameter defined in the input model (not metamodel!), for example in eol:
var p: mymetamodel!Page;

if (p.id.value='*') {
PageBaseMetaTagCompartmentFigure.foregroundColor=ColorConstants.green;
}
else {
PageBaseMetaTagCompartmentFigure.foregroundColor=ColorConstants.red;
}

It's possible to do that in ECore2GMF.eol? I need to build automatically the plugin so I can't modify the code after the creation of diagram plugin.

Thank you for your support Dimitris, I appreciate a lot and I am very grateful to you!

Gianni


Re: attribute representation like magicdraw [message #1091299 is a reply to message #1091291] Wed, 21 August 2013 10:03 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Gianni,

If you need the appearance of your diagram elements to be derived from model-specific information, you'll need to modify the GMF generated code to support this. [1] provides an example of doing this.

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/doc/articles/eugenia-nodes-with-runtime-images/
Re: attribute representation like magicdraw [message #1091482 is a reply to message #1091299] Wed, 21 August 2013 15:17 Go to previous messageGo to next message
Gianni Rosa is currently offline Gianni RosaFriend
Messages: 11
Registered: August 2013
Junior Member
Hi Dimitris,
I am new in Eugenia and Eclipse pluging building. The code you posted me it's a little bit complicated at this stage.

I need only to modify the figure.setBackgroundColor() at the basis of a model's attribute. Where can I put this control?

I follow your tutorial but in the method handleNotificationEvent at this line (ComponentFigure figure = (ComponentFigure) this.getPrimaryShape()Wink I get an error cast exception so I can't go further Sad

Cheers,
Gianni

Re: attribute representation like magicdraw [message #1091490 is a reply to message #1091482] Wed, 21 August 2013 15:31 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Gianni,

Could you please send me a copy of your projects so that I can have a look?

Cheers,
Dimitris
Re: attribute representation like magicdraw [message #1091492 is a reply to message #1091490] Wed, 21 August 2013 15:33 Go to previous messageGo to next message
Gianni Rosa is currently offline Gianni RosaFriend
Messages: 11
Registered: August 2013
Junior Member
by mail?
Re: attribute representation like magicdraw [message #1091499 is a reply to message #1091492] Wed, 21 August 2013 15:49 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

You can either attach it here or send it by e-mail at epsilon.devs@gmail.com

Cheers,
Dimitris
Re: attribute representation like magicdraw [message #1091506 is a reply to message #1091499] Wed, 21 August 2013 15:55 Go to previous messageGo to next message
Gianni Rosa is currently offline Gianni RosaFriend
Messages: 11
Registered: August 2013
Junior Member
ops! Sorry I have just sent you at your personal mail! Do you need the forward also at epsilon.devs@gmail.com?
Re: attribute representation like magicdraw [message #1091995 is a reply to message #1091506] Thu, 22 August 2013 07:31 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

That'd be great.

Cheers,
Dimitris
Re: attribute representation like magicdraw [message #1092065 is a reply to message #1091995] Thu, 22 August 2013 09:30 Go to previous messageGo to next message
Gianni Rosa is currently offline Gianni RosaFriend
Messages: 11
Registered: August 2013
Junior Member
You have new mail Smile
Re: attribute representation like magicdraw [message #1092558 is a reply to message #1092065] Fri, 23 August 2013 00:11 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Gianni,

Thanks. As a starting point for your investigation on customising GMF-generated code, I'd suggest trying to first reproduce [1] in your setup (please let me know if you run across any problems while doing this). My understanding was that you were trying to do this so I was really expecting a half-baked implementation of [1] instead of your custom metamodel; apologies for any confusion caused.

Once you've done this, modifying the generated code of your editor to support your requirements should be much easier.

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/doc/articles/eugenia-nodes-with-runtime-images/
Previous Topic:Define UML property
Next Topic:ETL Transformation incase of more than one package
Goto Forum:
  


Current Time: Fri Apr 19 19:53:51 GMT 2024

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

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

Back to the top