Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 12
Registered: ‎10-14-2015

GMSC java Plugin - @Action icon can it only display for specific project?

Hi,

 

I am try to have created a Action Java Plugin (e.g. Sample Below),  at the @Action parameter, how to set if only Specific Project being display instead of now it display for all project?  

 

Sample Below:

@Action(icon="expand-25.svg",actionLocation=ActionLocation.FAVORITES, activeRequired = true, minimumSelection = 1, maximumSelection = 1)
public void FitMe() {
// get selected elements
MapSelectionCurator mapSelectionCurator = ApplicationContext.getBrowser().getMapSelectionCurator();
//GMap map = ApplicationContext.getBrowser().getMap();

Object[] selectedElementIds = mapSelectionCurator.getSelectedElements();

if (selectedElementIds == null) return;
if (!ApplicationContext.getInstance().isOffline())
{
ApplicationContext.getBrowser().fitSelection();

}
else
{
offlineFitSelection();
}

}

 

Thanks & Regards,
Cath

 

Frequent Contributor
Posts: 90
Registered: ‎10-13-2015

Re: GMSC java Plugin - @Action icon can it only display for specific project?

[ Edited ]

Hi Cath,

 

check this ... https://bitbucket.org/jhettler/hgdn_gmsc_java/wiki/gmsc.actioncondition, whole solution is in repo.

 

But I am afraid in the actionLocation where you have your action, you can achieve just that the icon is grayed out, but always visible - I guess this is the default behavior and there is no easy way, how to hide the icon or label of the action. If you put the action to the actionLocation.LEGENDCONTEXT, actionLocation.MAPCONTEXT or actionLocation.ELEMENTCONTEXT, the icon will be hidden in case of actionCondition is false, but not in case if you put it somewhere else (here will be just grayed out). 

 

Hope this helps!

 

Regards,

Jakub

 

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.