[udig-devel] create a command
Jody Garnett
jgarnett at refractions.net
Wed May 30 12:30:04 PDT 2007
Andrea Antonello wrote:
> Alright, I need some explanation on tools creation, else I will end up
> to fill the whole UI of Udig with randomly ordered JGrass commands.
>
> Example:
> I want to create a set of tools able to import and export different map
> formats into and out of the JGrass workspace.
> So what I do is:
>
Is that a tool? Or an Import and Export wizard? Based on your questions
it sounds like you are asking about a Tool. I would like to ask what
your workflow is ... what steps does a user take to import / export a
map format?
> 1) Create a category: so I
> - supply an id
> - have no idea on what to say for commandId, since there will be a bunch
> of command in this category
>
often people take something similar to the classname
> - give the icon path
> - give a nice name
>
remember to use the %NAME trick so the name can be internationalized.
> - have no idea about what the selectionProvider does
>
I do not know either.
> - have no idea about what the applicabilityId is
>
Applicability has to do with if the tool is enabled for that layer or
not. You can turn off editing for one layer, (or selection for that matter).
> 2) Create an actionTool: so I
> - set the ID and the tooltip and the name and the class and the icon
> - choose whether to put it on the toolbar (where?) or not
> - supply the id of the just created category
> - don't know how to handle commandIDs, commandHandler and menuPath even
> if they sound like very good to tune configuration.
>
> Can someone please light my way?
>
Looking at the docs:
http://udig.refractions.net/confluence/display/DEV/5+Working+with+GIS+Application
Did not answer our questions; we will ask Richard when he get's back
(tomorrow?) and if not it would be time to read the javadocs and experiment.
Jody
More information about the udig-devel
mailing list