Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] uDig 1.1.x: removing commit and rollback from menus

Mauro Bartolomeoli wrote:
No way, they are correctly removed from the toolbar, but not from the Edit menu. I presume I need to remove the items from the menuCategories List too, but this one is not visible from derived classes.
We have a number of stories on how integration between tools and menus can work; - old way - make an action set that matches the tool category name and don't enable that action set for your perspective - new way - a "visible" check on the menu contribution; you can use any expression here including checking to see if the action set is enabled

Long and short of it; the tool manager should be checking the actionset; and only contributing categories of tools that are enabled; for making a spatial data viewer you would make a perspective that does not enable any of the "edit" categories; I would like to:
a) figure this out
b) add those steps to the udig branding tutorial (as an example of what a perspective can do)

Jody

Jesse Eichar wrote:
I would have thought that you could do it with a custom toolManager. One idea is to remove the tools from the ActionToolCategory by doing a getActionCategory with the id: Messages.ToolCategory_other. Next iterate through the tools and remove the two action tools.

I am adding a hook in the next version so that you can filter out the actions you don't want before they are added rather than having to search for it a remove it.

Jesse

On 4-Jun-08, at 2:33 PM, Mauro Bartolomeoli wrote:

Can anyone tell me how to remove those two items from the edit menu in a custom application? I need to build one with no editing function available. I have removed the editing tools plugin, but commit and rollback tools are on the default tools plugin. Can I selectively remove those two contributions? I have been able to remove them from the toolbar using a custom toolManager, but I'm not able to do the same with the edit menu. I have understood that the tools appear when a map is created/opened, but I can't find in uDig the code implementing the adding/removal of the tools. Can you help me to understand how the tools are managed from the application?

Thanks in advance,
Mauro Bartolomeoli

_______________________________________________
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



Back to the top