Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » specifying icons in exeed(How to specify icons in exeed)
specifying icons in exeed [message #1037368] Tue, 09 April 2013 13:19 Go to next message
oskar saiz is currently offline oskar saizFriend
Messages: 17
Registered: February 2013
Junior Member
Hi.

A very simple question:

I'm starting to use exeed.
I want to make an annotation to specify the icon: @exeed(icon...
How should I do this? Full path, path relative to what...
A simple example of this would be appreciated.

Thanks in advance

Oskar
Re: specifying icons in exeed [message #1037750 is a reply to message #1037368] Wed, 10 April 2013 01:00 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Oskar,

Currently, the selection of icons is limited to the built-in icons provided by Exeed [1]. Could you please file an enhancement request so that we can also provide support for custom plugin-based icon locations?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT.Epsilon

Cheers,
Dimitris

[1] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/plugins/org.eclipse.epsilon.dt.exeed/icons
Re: specifying icons in exeed [message #1042265 is a reply to message #1037750] Tue, 16 April 2013 07:40 Go to previous messageGo to next message
oskar saiz is currently offline oskar saizFriend
Messages: 17
Registered: February 2013
Junior Member
Hi Dimitris.

I've just filed the enhancement request as you suggested.

Anyway I'm not able to change icons even using the ones provided by Exeed.

I've tried with Icon and classIcon; with the name of the icon and with the name and path of the icon, but no success.

Some samples:

@exeed(classIcon="return 'compare.gif';")
@exeed(Icon="return 'icons/compare.gif';")

How should this be done?

Thanks a lot
Oskar
Re: specifying icons in exeed [message #1042534 is a reply to message #1042265] Tue, 16 April 2013 14:44 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Oskar,

Off the top of my head it should be

@exeed(classIcon="compare")
@exeed(icon="return 'compare';");

Below is an example of an annotated metamodel and I've also attached a deck of slides I've used in the past to present Exeed. I hope to find some time to transcode this to a HTML page with new screenshots etc. soon but any help with this would be more than welcome Smile

http://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.examples.exeedoo/

Cheers,
Dimitris
  • Attachment: Exeed.pdf
    (Size: 491.04KB, Downloaded 272 times)
Re: specifying icons in exeed [message #1043224 is a reply to message #1042534] Wed, 17 April 2013 12:46 Go to previous messageGo to next message
oskar saiz is currently offline oskar saizFriend
Messages: 17
Registered: February 2013
Junior Member
Hi Dimitris.
Thank you for the reply.
I tested it. Here the result:

1.- This works:
a) @exeed(ClassIcon="compare")

2.- These do not work;
b) @exeed(icon="compare")
c) @exeed(icon="return 'compare';")
d) @exeed(classIcon="return 'compare';")

c) and d) do worry me: Does this mean that I cannot use a EOL expression for specifying the icon?
Must I use just an icon name (as in (a))?

Thanks again

Oskar
Re: specifying icons in exeed [message #1043267 is a reply to message #1043224] Wed, 17 April 2013 13:42 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Oscar,

I can't reproduce c) as the following works fine for me

---
@namespace(uri="foo", prefix="")
package foo;

@exeed(icon="return 'package';")
class X {
attr XType type;
}
---

d) shouldn't work because "classIcon" is meant to be a static string. For context-specific icons, "icon" should be used instead.

Cheers,
Dimitris
Re: specifying icons in exeed [message #1043814 is a reply to message #1043267] Thu, 18 April 2013 06:47 Go to previous messageGo to next message
oskar saiz is currently offline oskar saizFriend
Messages: 17
Registered: February 2013
Junior Member
Hi Dimitris.

You are right.
c) case is also working. @exeed(icon="return 'compare';")

Anyway, I'd like to point a couple of things:

1.- According to previows message answers I would derive that the exeed documentation is not correct:
http://www.eclipse.org/epsilon/doc/articles/exeed-reference/

It says:
classIcon: EOL expression that returns the icon of the instances that conform to the EClass.

In my opinion, it should say somthing like:
classIcon: name of the icon of the instances that conform to the EClass. It is not a EOL expression but a name.


2.- When both annotations (icon and classIcon) are combined, it is not working as expected.
For instance:
@exeed(classIcon="clock")
@exeed(icon="return 'package';")

According to exeed documentation, when 'icon' is specified, it should override the classIcon annotation.

My experimentation suggest that the first annotation is "winning".

In the example above, when both annotations are used (icon and classIcon), the 'classIcon' one wins. (In the example, the "clock" icon is shown).

However, changing the order, the 'package' one wins.
@exeed(icon="return 'package';")
@exeed(classIcon="clock")

This sounds like a bug. Doesn't it?


Thanks again

Oskar
Re: specifying icons in exeed [message #1043849 is a reply to message #1043814] Thu, 18 April 2013 07:34 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Oskar,

I've just fixed #1 on the website. Regarding #2 with the following metamodel, instances of X always appear with a "class" icon regardless of the order of the two annotations. Are you encountering a different behaviour?

--
@exeed(classIcon="class")
@exeed(icon="return 'package';")
class X {
attr XType type;
}
--

Cheers,
Dimitris
Re: specifying icons in exeed [message #1043859 is a reply to message #1043849] Thu, 18 April 2013 07:48 Go to previous messageGo to next message
oskar saiz is currently offline oskar saizFriend
Messages: 17
Registered: February 2013
Junior Member
Hi Dimitris.

Yes. If I write

@exeed(icon="return 'package';")
@exeed(classIcon="class")

always the 'package' icon appears.


Anyway, in your example the behaviour isn't either the expected one:
When both are specified, the one of the "icon" should win, in this case de 'package' icon, shouldn't it?

Thansk again

Oskar

Re: specifying icons in exeed [message #1043876 is a reply to message #1043859] Thu, 18 April 2013 08:11 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Oskar,

You're right (I clearly shouldn't be replying to newsgroup messages before I've had coffee Smile ). I'll try to fix this shortly.

Cheers,
Dimitris
Re: specifying icons in exeed [message #1046355 is a reply to message #1043876] Sun, 21 April 2013 20:17 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Actually, both details should go under the same annotation (Exeed only looks at the first @exeed annotation for each element):

@exeed(classIcon="class", icon="return 'package';")

Cheers,
Dimitris

[Updated on: Sun, 21 April 2013 20:17]

Report message to a moderator

Re: specifying icons in exeed [message #1046615 is a reply to message #1046355] Mon, 22 April 2013 06:23 Go to previous message
oskar saiz is currently offline oskar saizFriend
Messages: 17
Registered: February 2013
Junior Member
That made it!!!
Thanks a lot Dimitris.

Bye
Oskar
Previous Topic:GMF outline view
Next Topic:Can you auto build eugenia and xtext
Goto Forum:
  


Current Time: Thu Apr 18 16:11:25 GMT 2024

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

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

Back to the top