Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] create a command


Jody Garnett probaly wrote:
> 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?

This is a first test for a import tool, but not for visualization. It
imports into the JGrass workspace for further analyses. For now I want
it to be launched as an action tool.

>> 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

So this is just a name.

>> - give the icon path
>> - give a nice name
>>   
> remember to use the %NAME trick so the name can be internationalized.

Don't worry, I read the docs well :) Everything in JGrass for now is en,
it, de.

>> - 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).

Yes, but what is this exactly? Id of a layer? Of a view?

>> 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.

Alright, so I will put my hope in Richard :)

Thanks Jody,
Ciao
Andrea




> 
> Jody
> 
> 


Back to the top