Hi John:
So we are down to two things before docs a) visibility b) enablement
I found a decent code example for visibility. It is controlled with ActionSets
(which is something that is part of the perspective definition; so the
perspective can turn off tool categories that would otherwise annoy users).
Inside MentuToolcategory.contirbute(IMenuManager) the have the following:
1) looking up the current action sets
IWorkbench workbench = PlatformUI.getWorkbench();
IContextService contextService = (IContextService)
workbench.getService(IContextService.class);
Collection<String> active = (Collection<String>
)contextService.getActiveContextIds();
2) when "contributing" tools
for( ModalItem item : this ) {
ToolProxy tool = (ToolProxy) item;
String categoryId = tool.getCategoryId();
if( contextService.getDefinedContextIds().contains(categoryId)){
// we have an context for this tool category
if( !active.contains( categoryId )){
continue; // skip this category please!
}
}
We should be able to do something similar when defining our paletteRoot :-)
Please reply to this email and tell me if the above works for you...
--
Jody Garnett
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel