Merge remote-tracking branch 'remotes/origin/GT-2973-dragonmacher-snapshot-navigation-arrows'

This commit is contained in:
Ryan Kurtz 2019-07-19 09:28:36 -04:00
commit 6d05537b7f
17 changed files with 768 additions and 402 deletions

View file

@ -19,6 +19,7 @@ import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.*;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import docking.ActionContext;
@ -195,8 +196,9 @@ public class NextPrevAddressPlugin extends Plugin {
}
Navigatable navigatable = getNavigatable(context);
return historyService.hasNext(navigatable) ||
historyService.hasPrevious(navigatable);
boolean hasNext = historyService.hasNext(navigatable);
boolean hasPrevious = historyService.hasPrevious(navigatable);
return hasNext || hasPrevious;
}
};
clearAction.setHelpLocation(new HelpLocation(HelpTopics.NAVIGATION, clearAction.getName()));
@ -289,11 +291,9 @@ public class NextPrevAddressPlugin extends Plugin {
return null;
}
//////////////////////////////////////////////////////////////////////
// //
// Inner Classes //
// //
//////////////////////////////////////////////////////////////////////
//==================================================================================================
// Inner Classes
//==================================================================================================
private class NextPreviousAction extends MultiActionDockingAction {
@ -311,7 +311,12 @@ public class NextPrevAddressPlugin extends Plugin {
@Override
public boolean isValidContext(ActionContext context) {
return (context instanceof NavigatableActionContext);
return false;
}
@Override
public boolean isValidGlobalContext(ActionContext globalContext) {
return (globalContext instanceof NavigatableActionContext);
}
@Override
@ -374,8 +379,9 @@ public class NextPrevAddressPlugin extends Plugin {
this.service = service;
this.navigatable = navigatable;
setMenuBarData(new MenuData(new String[] { buildActionName(location, formatter) },
navigatable.getNavigatableIcon()));
Icon navIcon = navigatable.getNavigatableIcon();
setMenuBarData(
new MenuData(new String[] { buildActionName(location, formatter) }, navIcon));
setEnabled(true);
}

View file

@ -32,7 +32,7 @@ public class HorizontalRuleAction extends DockingAction {
*
* @param owner the action owner
* @param topName the name that will appear above the separator bar
* @param bottomName the name that will apppear below the separator bar
* @param bottomName the name that will appear below the separator bar
*/
public HorizontalRuleAction(String owner, String topName, String bottomName) {
super("HorizontalRuleAction: " + ++idCount, owner, false);