Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] menubuilder and actions

Richard just added this extension point I beleive.  Richard Ideas?

Jesse

On Apr 19, 2007, at 5:01 AM, Andrea Antonello wrote:

I am trying to create an Action to be added to a menu created through
the menubuilder extention.

Mainly I want to create a button that launches a dialog, then the user
chooses some layer and the action does something.

That said, I first tried to create an ActionTool from the udig
extention, which is rather easy and seemed to fit my needs.

However when I started udig, i got a nice exception:
java.lang.NullPointerException
	at
net.refractions.udig.project.ui.internal.tool.display.ToolManager.setA ctiveTool(ToolManager.java:508)
	at
net.refractions.udig.project.ui.internal.tool.display.ToolManager.setC urrentEditor(ToolManager.java:407)
	at
[ and so on ]

which nicely made appear my tool in the toolbar, but broke every other
button on the bar, i.e. only my button populated the toolbar. Rather
aggressive... :)

Since I couldn't figure out why activeModalToolProxy was null at the
point all this occured, I decided to step over to the menuBuilder and
create a "normal" Action.

Now I notice that the menubuilder misses the
protected void makeActions( IWorkbenchWindow window )
method, which is mandatory to activate and register the actions to the
workbench.
Which is the proper way to add my Action, that extends Action and
implements IAction?

Ciao
Andrea






_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top