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


It is probably because of the exception from the icon path issue.  I would suggest getting the icon working first with the information I provided in a separate email.  Then see if the selector gets called.

Larry Dunnell
Internet address: ledunnel@xxxxxxxxxx




Anil T Samuel <ANIL.SAMUEL@xxxxxxxxxx>
Sent by: dtp-dev-bounces@xxxxxxxxxxx

07/05/2006 07:28 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





Hi Larry

I have the following class as LabelSelector

package oracle.dbtools.connectivity.ui.explorer.providers.label;
public class ServerExplorerLabelSelector implements LabelSelector{

                public boolean select(Object element) {
               System.out.println(this.getClass()+".select("+element+")");
                                 return true;
                }

It is specified in plugin.xml as
<extension point = "org.eclipse.datatools.connectivity.sqm.core.ui.labelService">
                                 <contributor
                       type = "oracle.dbtools.connectivity.catalog.OracleView"
                       iconLocation = "platform:/plugin/oracle.dbtools.connectivity/icons/view.png"
                       displayType = "View"
                       selector = "oracle.dbtools.connectivity.ui.explorer.providers.label.ServerExplorerLabelSelector">
               </contributor>
</extension>

The flow doesnot seems to reach the select(..) method.

Regards
Anthos


----- Message from Lawrence E Dunnell <ledunnel@xxxxxxxxxx> on Mon, 3 Jul 2006 14:56:50 -0700 -----
To:
DTP development mailing list <dtp-dev@xxxxxxxxxxx>
Subject:
Re: [dtp-dev] Overriding icons using labelService extension point



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

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@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
_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev


Back to the top