Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] Overriding icons using labelService extension point

Thanks Larry.

But now I am hit with another hiccup.

I have an icons directory in the plugin jar with PNG images for DSE icons and I have them spec'd in the plugin.xml. It works fine when I run test the plugin within the Eclipse IDE; but fails when run standalone with following exception in the org.eclipse.ui.workbench/log file.

Caused by: java.io.FileNotFoundException: file:/home/anthos/projects/opensource/eclipse-platform/plugins/oracle.dbtools.connectivity_1.0.0.jar!/icons/dbconn.png (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:106)
	at java.io.FileInputStream.<init>(FileInputStream.java:66)
	at org.eclipse.swt.internal.Compatibility.newFileInputStream(Compatibility.java:155)
	at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:153)
	... 67 more

The icons in jar file :-
[anthos@bilbo opensource]$ jar -tvf /home/anthos/projects/opensource/eclipse-platform/plugins/oracle.dbtools.connectivity_1.0.0.jar | grep icons
    0 Tue Jul 04 10:45:20 EST 2006 icons/
  857 Tue Jul 04 10:45:20 EST 2006 icons/dbconn.png
  779 Tue Jul 04 10:45:20 EST 2006 icons/plsql_package.png
  734 Tue Jul 04 10:45:20 EST 2006 icons/view.png

extension point in plugin.xml:-
<extension point = "org.eclipse.datatools.connectivity.sqm.core.ui.labelService">
               <contributor
type = "oracle.dbtools.modelbase.db.MaterializedView"
                       iconLocation = "icons/view.png"
                       displayType = "MaterializedView">
               </contributor>
               <contributor
                       type = "oracle.dbtools.modelbase.db.DatabaseLink"
                       iconLocation = "icons/dbconn.png"
                       displayType = "DatabaseLink">
               </contributor>
                               <contributor
type = "oracle.dbtools.connectivity.catalog.OracleView"
                       iconLocation = "icons/view.png"
                       displayType = "View">
               </contributor>
                               <contributor
                       type = "oracle.dbtools.modelbase.db.OraPackage"
                       iconLocation = "icons/plsql_package.png"
                       displayType = "Package">
               </contributor>
       </extension>

Any clue ?

Regards
Anthos
Lawrence E Dunnell wrote:

Sorry for the late reply.

The key to getting your icon to show is to specify the "selector" attribute in the labelService extension point. The class you specify in the "selector" attribute can specify whether of not the object in question should use the "overriding" icon.

The selector class implements the org.eclipse.datatools.connectivity.sqm.core.internal.ui.LabelSelector interface. If provided, this class will be used in addition to the type to determine if the label information should be passed back for the given object.

*public* *interface* LabelSelector
{
    *public* *boolean* select( Object element );
}

I will add this information to the defect and resolve it.

Larry Dunnell
Internet address: ledunnel@xxxxxxxxxx




*Anil T Samuel <anil.samuel@xxxxxxxxxx>*
Sent by: dtp-dev-bounces@xxxxxxxxxxx

07/02/2006 05:36 PM
Please respond to
DTP development mailing list <dtp-dev@xxxxxxxxxxx>


	
To
	DTP development mailing list <dtp-dev@xxxxxxxxxxx>
cc
	
Subject
	Re: [dtp-dev] Overriding icons using labelService extension point



	





Bug logged.. _Go To Bug 149420_ <https://bugs.eclipse.org/bugs/show_bug.cgi?id=149420>

Anthos
Anil T Samuel wrote:
Hi

The following xml snippet to over-ride the default icon with vendor specific one doesnot seem to work. I am using the same type (org.eclipse.datatools.modelbase.sql.tables.ViewTable) as the one used for View in org.eclipse.datatools.connectivity.sqm.core.ui package.

<extension point = "org.eclipse.datatools.connectivity.sqm.core.ui.labelService">
                                 <contributor
type = "org.eclipse.datatools.modelbase.sql.tables.ViewTable"
                        iconLocation = "icons/view.gif"
                        displayType = "View">
               </contributor>
 </extension>

Same was the result when I tried OracleView->ViewTable as the type.

I shall log this as a bug, if it is one.

Anthos

_______________________________________________
dtp-dev mailing list
_dtp-dev@eclipse.org_ <mailto:dtp-dev@xxxxxxxxxxx>
_https://dev.eclipse.org/mailman/listinfo/dtp-dev_
_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev

------------------------------------------------------------------------

_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev



Back to the top