Skip to main content



      Home
Home » Modeling » Graphiti » Pallete icons don't show up
Pallete icons don't show up [message #899269] Tue, 31 July 2012 05:38 Go to next message
Eclipse UserFriend
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 06:38 Go to previous messageGo to next message
Eclipse UserFriend
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 06:48 Go to previous messageGo to next message
Eclipse UserFriend
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 07:52 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 17:34:41 EDT 2025

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

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

Back to the top