Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Images in Use Case
Images in Use Case [message #472678] Wed, 23 January 2008 18:19 Go to next message
Raphael is currently offline RaphaelFriend
Messages: 47
Registered: July 2009
Member
Hello!!!

I would like to know where should I change in the source code, to modify
the default images (the images in toolbar) from th Use Case Diagram.

Thanks...

Raphael
Re: Images in Use Case [message #472683 is a reply to message #472678] Wed, 23 January 2008 18:31 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Raphael,

To change an icon in the palette entry go to UMLPaletteFactory#create<element_kind>CreationTool().
Modify code that sets icon.
For Actor element it will be 'createActor2CreationTool()' method,
entry.setSmallIcon(UMLElementTypes.getImageDescriptor(UMLEle mentTypes.Actor_2002));
code.

Best wishes,
Tatiana.

> Hello!!!
>
> I would like to know where should I change in the source code, to
> modify the default images (the images in toolbar) from th Use Case
> Diagram.
>
> Thanks...
>
> Raphael
>
Re: Images in Use Case [message #472689 is a reply to message #472683] Wed, 23 January 2008 20:44 Go to previous messageGo to next message
Raphael is currently offline RaphaelFriend
Messages: 47
Registered: July 2009
Member
Hello Tatiana!!!

Ok, I found this line in UMLElementTypes class:

public static final IElementType Actor_2002 =
getElementType("org.eclipse.uml2.diagram.usecase.Actor_2002 ");
//$NON-NLS-1$

So sorry for the question, but, where did it find the location in my
computer for the images?!?

Does it search for images in
"\org.eclipse.uml2.diagram.common\icons\obj16" directory?! If yes, where
should I change this in the source?!?

Thanks again Tatiana,
Thanks for your pacience!!
Raphael


Tatiana Fesenko wrote:

> Hello Raphael,

> To change an icon in the palette entry go to
UMLPaletteFactory#create<element_kind>CreationTool().
> Modify code that sets icon.
> For Actor element it will be 'createActor2CreationTool()' method,
>
entry.setSmallIcon(UMLElementTypes.getImageDescriptor(UMLEle mentTypes.Actor_2002));
> code.

> Best wishes,
> Tatiana.

>> Hello!!!
>>
>> I would like to know where should I change in the source code, to
>> modify the default images (the images in toolbar) from th Use Case
>> Diagram.
>>
>> Thanks...
>>
>> Raphael
>>
Re: Images in Use Case [message #472698 is a reply to message #472689] Thu, 24 January 2008 12:17 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Raphael!!

As I understand now, you want to change icons everywhere - not only in the
toolbar, but also element icons and icons in the modeling assistant.
Icons are provided by UMLItemProviderAdapterFactory class from org.eclipse.uml2.uml.edit
plugin. It takes them from org.eclipse.uml2.uml.edit\icons\obj16.

You can implement your own UMLItemProviderAdapterFactory which returns icons
that you need. You can take AlternativeUMLItemProviderAdapterFactory from
our org.eclipse.uml2.diagram.common plugin as example. It is it that takes
icons from \org.eclipse.uml2.diagram.common\icons\obj16. This factory provides
alternative icons in ClassD if a user changes icon style in the preferences
page.

Best wishes,
Tatiana.

> Hello Tatiana!!!
>
> Ok, I found this line in UMLElementTypes class:
>
> public static final IElementType Actor_2002 =
> getElementType("org.eclipse.uml2.diagram.usecase.Actor_2002 ");
> //$NON-NLS-1$
>
> So sorry for the question, but, where did it find the location in my
> computer for the images?!?
>
> Does it search for images in
> "\org.eclipse.uml2.diagram.common\icons\obj16" directory?! If yes,
> where should I change this in the source?!?
>
> Thanks again Tatiana,
> Thanks for your pacience!!
> Raphael
> Tatiana Fesenko wrote:
>
>> Hello Raphael,
>>
>> To change an icon in the palette entry go to
>>
> UMLPaletteFactory#create<element_kind>CreationTool().
>
>> Modify code that sets icon. For Actor element it will be
>> 'createActor2CreationTool()' method,
>>
> entry.setSmallIcon(UMLElementTypes.getImageDescriptor(UMLEle mentTypes.
> Actor_2002));
>
>> code.
>>
>> Best wishes,
>> Tatiana.
>>> Hello!!!
>>>
>>> I would like to know where should I change in the source code, to
>>> modify the default images (the images in toolbar) from th Use Case
>>> Diagram.
>>>
>>> Thanks...
>>>
>>> Raphael
>>>
Re: Images in Use Case [message #617089 is a reply to message #472678] Wed, 23 January 2008 18:31 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Raphael,

To change an icon in the palette entry go to UMLPaletteFactory#create<element_kind>CreationTool().
Modify code that sets icon.
For Actor element it will be 'createActor2CreationTool()' method,
entry.setSmallIcon(UMLElementTypes.getImageDescriptor(UMLEle mentTypes.Actor_2002));
code.

Best wishes,
Tatiana.

> Hello!!!
>
> I would like to know where should I change in the source code, to
> modify the default images (the images in toolbar) from th Use Case
> Diagram.
>
> Thanks...
>
> Raphael
>
Re: Images in Use Case [message #617095 is a reply to message #472683] Wed, 23 January 2008 20:44 Go to previous message
Raphael is currently offline RaphaelFriend
Messages: 47
Registered: July 2009
Member
Hello Tatiana!!!

Ok, I found this line in UMLElementTypes class:

public static final IElementType Actor_2002 =
getElementType("org.eclipse.uml2.diagram.usecase.Actor_2002 ");
//$NON-NLS-1$

So sorry for the question, but, where did it find the location in my
computer for the images?!?

Does it search for images in
"\org.eclipse.uml2.diagram.common\icons\obj16" directory?! If yes, where
should I change this in the source?!?

Thanks again Tatiana,
Thanks for your pacience!!
Raphael


Tatiana Fesenko wrote:

> Hello Raphael,

> To change an icon in the palette entry go to
UMLPaletteFactory#create<element_kind>CreationTool().
> Modify code that sets icon.
> For Actor element it will be 'createActor2CreationTool()' method,
>
entry.setSmallIcon(UMLElementTypes.getImageDescriptor(UMLEle mentTypes.Actor_2002));
> code.

> Best wishes,
> Tatiana.

>> Hello!!!
>>
>> I would like to know where should I change in the source code, to
>> modify the default images (the images in toolbar) from th Use Case
>> Diagram.
>>
>> Thanks...
>>
>> Raphael
>>
Re: Images in Use Case [message #617552 is a reply to message #472689] Thu, 24 January 2008 12:17 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Raphael!!

As I understand now, you want to change icons everywhere - not only in the
toolbar, but also element icons and icons in the modeling assistant.
Icons are provided by UMLItemProviderAdapterFactory class from org.eclipse.uml2.uml.edit
plugin. It takes them from org.eclipse.uml2.uml.edit\icons\obj16.

You can implement your own UMLItemProviderAdapterFactory which returns icons
that you need. You can take AlternativeUMLItemProviderAdapterFactory from
our org.eclipse.uml2.diagram.common plugin as example. It is it that takes
icons from \org.eclipse.uml2.diagram.common\icons\obj16. This factory provides
alternative icons in ClassD if a user changes icon style in the preferences
page.

Best wishes,
Tatiana.

> Hello Tatiana!!!
>
> Ok, I found this line in UMLElementTypes class:
>
> public static final IElementType Actor_2002 =
> getElementType("org.eclipse.uml2.diagram.usecase.Actor_2002 ");
> //$NON-NLS-1$
>
> So sorry for the question, but, where did it find the location in my
> computer for the images?!?
>
> Does it search for images in
> "\org.eclipse.uml2.diagram.common\icons\obj16" directory?! If yes,
> where should I change this in the source?!?
>
> Thanks again Tatiana,
> Thanks for your pacience!!
> Raphael
> Tatiana Fesenko wrote:
>
>> Hello Raphael,
>>
>> To change an icon in the palette entry go to
>>
> UMLPaletteFactory#create<element_kind>CreationTool().
>
>> Modify code that sets icon. For Actor element it will be
>> 'createActor2CreationTool()' method,
>>
> entry.setSmallIcon(UMLElementTypes.getImageDescriptor(UMLEle mentTypes.
> Actor_2002));
>
>> code.
>>
>> Best wishes,
>> Tatiana.
>>> Hello!!!
>>>
>>> I would like to know where should I change in the source code, to
>>> modify the default images (the images in toolbar) from th Use Case
>>> Diagram.
>>>
>>> Thanks...
>>>
>>> Raphael
>>>
Previous Topic:Two cosmetic issues in ClassD
Next Topic:Loop Nodes and Conditional Nodes in Activity Diagrams
Goto Forum:
  


Current Time: Thu Apr 25 09:06:47 GMT 2024

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

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

Back to the top