Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Pallete icons don't show up
Pallete icons don't show up [message #899269] Tue, 31 July 2012 09:38 Go to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Hi everyone.

I'm trying to implement a graphiti editor.
I provided a ImageProvider, my icons are in project root, I overrided getCreateImageId() and getCreateLargeImageId, but the icons don't show up in pallete. It appears a small red squares instead.

Anyone know why?
I have this:
 <extension
      point="org.eclipse.graphiti.ui.imageProviders">
   <imageProvider
         class="mainPackage.MyEditorDiagramImageProvider"
         id="mainPackage.MyEditorImageProvider">
   </imageProvider>

@Override
protected void addAvailableImages() {
	addImageFilePath(IMG_CLASSA, "icons/16/a.png");
	addImageFilePath(IMG_CLASSB, "icons/16/b.gif");
}

And I refer to IMG_CLASSA, and IMG_CLASSB in getCreateImageId().
But I don't know they are not show.

Thanks in advance
Re: Pallete icons don't show up [message #899281 is a reply to message #899269] Tue, 31 July 2012 10:38 Go to previous messageGo to next message
Matthias Gorning is currently offline Matthias GorningFriend
Messages: 81
Registered: April 2010
Location: Germany
Member
Does the the path "icons/16/" really exist in your project root?

Did you include the icons folder in the build.properties?

BR,
Matthias
Re: Pallete icons don't show up [message #899285 is a reply to message #899269] Tue, 31 July 2012 10:48 Go to previous messageGo to next message
Matthias Gorning is currently offline Matthias GorningFriend
Messages: 81
Registered: April 2010
Location: Germany
Member
Perhaps you only declared your image provider but not the usage if it?

In this case you must add these lines to your plugin.xml:

<extension
	point="org.eclipse.graphiti.ui.diagramTypeProviders">
	<diagramTypeProvider
		class=""
		...
                <diagramType
			id="">
		</diagramType>
		<imageProvider
			id="mainPackage.MyEditorImageProvider">
		</imageProvider>
	</diagramTypeProvider>
</extension>

BR,
Matthias
Re: Pallete icons don't show up [message #899296 is a reply to message #899285] Tue, 31 July 2012 11:52 Go to previous message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
It was exactly that.

Somehow, I skipped those lines when I was reading the tutorial.

Thank you very much.
Rui
Previous Topic:Check if there is any PE at a given location in a Diagram?
Next Topic:Move Shepe
Goto Forum:
  


Current Time: Thu Apr 25 16:04:32 GMT 2024

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

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

Back to the top