Popup Menu / Image / Compartment [message #59168] |
Wed, 04 October 2006 17:09 |
Eclipse User |
|
|
|
Originally posted by: leonardo.coelho.siliconstrategy.com.br
Hi!!
I have a EClass that is represented by a node and an element inside a
compartment. They are the same class with subtle differences in
behaviour. And, of course, a strong difference in the interface.
I have 2 pallete buttons and I can represent them with different images,
no problem.
In the diagram, I can represent them with different images overriding
XXXItemProvider#getImage. Then, they are shown different in my diagram.
However, when we stop the cursor over a blank part of the diagram, it
appears a menu where I can choose one of the nodes to insert. And when
we stop the cursor over the compartment, it appears the mentioned
element (to be added to the compartment), but they have the same image!!!
I´d like to represent them with different images... one for the element
that can be added to the whole diagram and another to be inserted in a
specific compartment. Where can I set it??
Thx!!!
--
=============================/============================== ====
Leonardo Coelho
=============================/============================== =====
|
|
|
Re: Popup Menu / Image / Compartment [message #59218 is a reply to message #59168] |
Wed, 04 October 2006 18:10 |
Michael Golubev Messages: 383 Registered: July 2009 |
Senior Member |
|
|
Hi,
Try to set "icon" attributes for your element types in the plugin.xml.
Something like :
<specializationType
id="org.eclipse.uml2.diagram.clazz.Package_3006"
---> icon="/icons/full/obj16/Package.gif"
name="Package"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice=" org.eclipse.uml2.diagram.clazz.edit.helpers.Package2EditHelp erAdvice ">
<specializes id="org.eclipse.uml2.diagram.clazz.Package_1000"/>
<param name="semanticHint" value="3006"/>
</specializationType>
Regards,
Michael
"Leonardo Coelho" <leonardo.coelho@siliconstrategy.com.br> wrote in message
news:eg0pmp$s0f$1@utils.eclipse.org...
> Hi!!
>
> I have a EClass that is represented by a node and an element inside a
> compartment. They are the same class with subtle differences in behaviour.
> And, of course, a strong difference in the interface.
>
> I have 2 pallete buttons and I can represent them with different images,
> no problem.
>
> In the diagram, I can represent them with different images overriding
> XXXItemProvider#getImage. Then, they are shown different in my diagram.
>
> However, when we stop the cursor over a blank part of the diagram, it
> appears a menu where I can choose one of the nodes to insert. And when we
> stop the cursor over the compartment, it appears the mentioned element (to
> be added to the compartment), but they have the same image!!!
>
> I
|
|
|
Re: Popup Menu / Image / Compartment [message #59243 is a reply to message #59218] |
Wed, 04 October 2006 19:12 |
Eclipse User |
|
|
|
Originally posted by: leonardo.coelho.siliconstrategy.com.br
I´m sorry. I guess i didn´t get it... could you be more clear? which
plugin.xml? edit? diagram?
Have you got my problem? The popup menu I´ve mentioned is auto generated
by GMF to add elements to the diagram. It shows up when we stop moving
the cursor.
I´d like to control (programaticaly would be better) its images and use
it in a different fashion when we are inside a compartment.
Regards,
leo
Michael Golubev escreveu:
> Hi,
>
> Try to set "icon" attributes for your element types in the plugin.xml.
> Something like :
>
> <specializationType
> id="org.eclipse.uml2.diagram.clazz.Package_3006"
> ---> icon="/icons/full/obj16/Package.gif"
> name="Package"
> kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
> edithelperadvice=" org.eclipse.uml2.diagram.clazz.edit.helpers.Package2EditHelp erAdvice ">
> <specializes id="org.eclipse.uml2.diagram.clazz.Package_1000"/>
> <param name="semanticHint" value="3006"/>
> </specializationType>
>
> Regards,
> Michael
>
> "Leonardo Coelho" <leonardo.coelho@siliconstrategy.com.br> wrote in message
> news:eg0pmp$s0f$1@utils.eclipse.org...
>> Hi!!
>>
>> I have a EClass that is represented by a node and an element inside a
>> compartment. They are the same class with subtle differences in behaviour.
>> And, of course, a strong difference in the interface.
>>
>> I have 2 pallete buttons and I can represent them with different images,
>> no problem.
>>
>> In the diagram, I can represent them with different images overriding
>> XXXItemProvider#getImage. Then, they are shown different in my diagram.
>>
>> However, when we stop the cursor over a blank part of the diagram, it
>> appears a menu where I can choose one of the nodes to insert. And when we
>> stop the cursor over the compartment, it appears the mentioned element (to
>> be added to the compartment), but they have the same image!!!
>>
>> I´d like to represent them with different images... one for the element
>> that can be added to the whole diagram and another to be inserted in a
>> specific compartment. Where can I set it??
>>
>> Thx!!!
>>
>> --
>>
>> =============================/============================== ====
>> Leonardo Coelho
>> =============================/============================== =====
>
>
--
=============================/============================== ====
Leonardo Coelho
=============================/============================== =====
|
|
|
|
Powered by
FUDForum. Page generated in 0.09996 seconds