Thanks for your reply.

In fact I first tried adding the toggle button with the org.eclipse.ui.menus
extension point using as locationURI
toolbar:org.eclipse.ui.main.toolbar?after=additions but the button doesn't
show up. The button has an impact on the visibility of layers' labels on the
map. That's why I tried the net.refractions.udig.project.ui.tool extension
point.

This is what I first tried:

<extension point="org.eclipse.ui.menus">
   <menuContribution
         allPopups="false"
         locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
      <command
            commandId="com.test.showhidelabels"
            icon="icons/btn_show-hide_icon.gif"
            label="Show/Hide Labels"
            style="toggle"
            tooltip="Show/Hide Labels">
      </command>
   </menuContribution>
</extension>

On Fri, Jun 17, 2011 at 9:50 AM, Jody Garnett <[email protected]>wrote:

> Can I ask what you are trying to do a bit more?
>
> The net.refractions.udig.project.ui.tool extension point is specifically
> about adding map tools to the project (internally some code processes this
> extension point and creates buttons (for ActionTools) and little drop down
> lists (for ModalTools).
>
> You can add your own toggle button by adding a action of some sort to the
> coolbar using the eclipse menu facilities
> --
> Jody Garnett
>
>  On Thursday, 16 June 2011 at 11:04 PM, Jaime Lop wrote:
>
> Hello everyone,
>
> I want to add a toggle button to the main uDig toolbar. Is that possible?
>
> I can create a normal action button like this but I cannot find any way to
> make it a toggle action button:
>
>   <extension
>          point="net.refractions.udig.project.ui.tool">
>       <actionTool
>             class="com.test.ShowHideLabelsTool"
>             icon="icons/btn_show-hide_icon.gif"
>             id="com.test.showlabels"
>             name="Show/Hide labeks"
>             onToolbar="true"
>             tooltip="Show/Hide labels">
>          <enablement></enablement>
>       </actionTool>
>    </extension>
>
> Regards,
> Jaime
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to