/**
* Retrieves the forward navigation action that is used by much of the map components such as
* the MapEditor and the LayersView. Executes the last undone Nav command on the current map.
*/
public IAction getFORWARD_HISTORYAction() {
Map activeMap = ApplicationGISInternal.getActiveMap();
forwardLock.lock();
try{
if (forwardAction == null) {
forwardAction = new Action(){
/**
* @see org.eclipse.jface.action.Action#run()
*/
public void run() {
Map activeMap = ApplicationGISInternal.getActiveMap();
if (activeMap != ApplicationGIS.NO_MAP)
activeMap.forwardHistory();
}
};
forwardAction.setImageDescriptor(sharedImages
.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD));
forwardAction.setText(Messages.ToolManager_forward);
forwardAction.setToolTipText(Messages.ToolManager_forward_tooltip);
forwardAction.setActionDefinitionId("org.eclipse.ui.navigate.forward"); //$NON-NLS-1$
}
if (activeMap != ApplicationGIS.NO_MAP)
forwardAction.setEnabled(activeMap.getCommandStack().canRedo());
else
forwardAction.setEnabled(false);
return forwardAction;
}finally{
forwardLock.unlock();