Merge remote-tracking branch 'origin/GP-2848-dragonmacher-theme-fixups'

This commit is contained in:
Ryan Kurtz 2023-02-16 12:50:44 -05:00
commit b252544c15
16 changed files with 219 additions and 250 deletions

View file

@ -61,13 +61,13 @@ class FGActionManager {
private static final String LAYOUT_CLASS_NAME = "LAYOUT_CLASS_NAME";
//@formatter:off
private static final Icon GROUP_ICON = new GIcon("icon.functiongraph.action.vertex.group");
private static final Icon GROUP_ADD_ICON = new GIcon("icon.functiongraph.action.vertex.group.add");
private static final Icon UNGROUP_ICON = new GIcon("icon.functiongraph.action.vertex.ungroup");
private static final Icon GROUP_ICON = new GIcon("icon.plugin.functiongraph.action.vertex.group");
private static final Icon GROUP_ADD_ICON = new GIcon("icon.plugin.functiongraph.action.vertex.group.add");
private static final Icon UNGROUP_ICON = new GIcon("icon.plugin.functiongraph.action.vertex.ungroup");
private static final Icon EDIT_ICON = new GIcon("icon.functiongraph.action.vertex.edit.label");
private static final Icon FULL_SCREEN_ICON = new GIcon("icon.functiongraph.action.vertex.full.screen");
private static final Icon XREFS_ICON = new GIcon("icon.functiongraph.action.vertex.full.screen");
private static final Icon EDIT_ICON = new GIcon("icon.plugin.functiongraph.action.vertex.edit.label");
private static final Icon FULL_SCREEN_ICON = new GIcon("icon.plugin.functiongraph.action.vertex.full.screen");
private static final Icon XREFS_ICON = new GIcon("icon.plugin.functiongraph.action.vertex.full.screen");
//@formatter:off
private PluginTool tool;
@ -127,7 +127,7 @@ class FGActionManager {
// subgroup 3, after the refresh and layout actions
chooseFormatsAction.setToolBarData(new ToolBarData(
new GIcon("icon.functiongraph.action.vertex.edit.format"), layoutGroup, "3"));
new GIcon("icon.plugin.functiongraph.action.vertex.edit.format"), layoutGroup, "3"));
chooseFormatsAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Function_Graph_Action_Format"));
@ -144,7 +144,7 @@ class FGActionManager {
}
};
homeAction.setToolBarData(
new ToolBarData(new GIcon("icon.functiongraph.action.viewer.home"), toolBarGroup1));
new ToolBarData(new GIcon("icon.plugin.functiongraph.action.viewer.home"), toolBarGroup1));
homeAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Function_Graph_Action_Home"));
@ -166,7 +166,7 @@ class FGActionManager {
}
};
resetGraphAction.setToolBarData(
new ToolBarData(new GIcon("icon.functiongraph.action.viewer.reset"), layoutGroup, "1"));
new ToolBarData(new GIcon("icon.plugin.functiongraph.action.viewer.reset"), layoutGroup, "1"));
resetGraphAction.setDescription("<html>Reloads the graph--All positioning and grouping " +
"information is <b>lost</b>");
resetGraphAction.setHelpLocation(
@ -659,7 +659,7 @@ class FGActionManager {
return controller.getGraphedFunction() != null;
}
};
Icon image = new GIcon("icon.functiongraph.action.viewer.clone");
Icon image = new GIcon("icon.plugin.functiongraph.action.viewer.clone");
cloneAction.setToolBarData(new ToolBarData(image, toolbarEndGroup));
cloneAction.setDescription(
"Create a snapshot (disconnected) copy of this Function Graph window ");
@ -889,7 +889,7 @@ class FGActionManager {
// This icon will display when the action has no icon. This allows actions with no good
// icon to be blank in the menu, but to use this icon on the toolbar.
layoutAction.setDefaultIcon(new GIcon("icon.functiongraph.action.viewer.layout"));
layoutAction.setDefaultIcon(new GIcon("icon.plugin.functiongraph.action.viewer.layout"));
List<ActionState<FGLayoutProvider>> actionStates = loadActionStatesForLayoutProviders();
for (ActionState<FGLayoutProvider> actionState : actionStates) {
@ -944,14 +944,14 @@ class FGActionManager {
private void addVertexHoverModeAction(String group) {
//@formatter:off
Icon pathsToVertexIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.paths.to.vertex");
Icon pathsFromVertexIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.paths.from.vertex");
Icon pathsFromToVertexIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.paths.from.to.vertex");
Icon pathsIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.paths.all");
Icon cyclesIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.cycles");
Icon forwardScopedIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.scoped.flow.forward");
Icon reverseScopedIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.scoped.flow.reverse");
Icon nothingIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.off");
Icon pathsToVertexIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.paths.to.vertex");
Icon pathsFromVertexIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.paths.from.vertex");
Icon pathsFromToVertexIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.paths.from.to.vertex");
Icon pathsIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.paths.all");
Icon cyclesIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.cycles");
Icon forwardScopedIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.scoped.flow.forward");
Icon reverseScopedIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.scoped.flow.reverse");
Icon nothingIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.off");
//@formatter:off
HelpLocation pathHelpLocation =
@ -1020,16 +1020,16 @@ class FGActionManager {
}
private void addVertexSelectedModeAction(String group) {
//@formatter:off
Icon pathsToVertexIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.paths.to.vertex");
Icon pathsFromVertexIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.paths.from.vertex");
Icon pathsFromToVertexIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.paths.from.to.vertex");
Icon cyclesIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.cycles");
Icon allCyclesIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.cycles.all");
Icon forwardScopedIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.scoped.flow.forward");
Icon reverseScopedIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.scoped.flow.reverse");
Icon nothingIcon = new GIcon("icon.functiongraph.action.viewer.vertex.hover.off");
Icon pathsToVertexIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.paths.to.vertex");
Icon pathsFromVertexIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.paths.from.vertex");
Icon pathsFromToVertexIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.paths.from.to.vertex");
Icon cyclesIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.cycles");
Icon allCyclesIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.cycles.all");
Icon forwardScopedIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.scoped.flow.forward");
Icon reverseScopedIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.scoped.flow.reverse");
Icon nothingIcon = new GIcon("icon.plugin.functiongraph.action.viewer.vertex.hover.off");
//@formatter:off

View file

@ -30,7 +30,8 @@ import ghidra.util.HelpLocation;
public class FGSatelliteUndockedProvider extends ComponentProviderAdapter {
static final String NAME = "Function Graph Satellite";
private static final Icon ICON = new GIcon("icon.functiongraph.action.provider.satellite");
private static final Icon ICON =
new GIcon("icon.plugin.functiongraph.action.provider.satellite");
private FGController controller;
private JComponent satelliteComponent;

View file

@ -61,7 +61,7 @@ public class FunctionGraphPlugin extends ProgramPlugin implements OptionsChangeL
static final String OPTIONS_NAME_PATH =
ToolConstants.GRAPH_OPTIONS + Options.DELIMITER + FUNCTION_GRAPH_NAME;
static final Icon ICON = new GIcon("icon.functiongraph.action.provider");
static final Icon ICON = new GIcon("icon.plugin.functiongraph.action.provider");
private static final String USER_DEFINED_FORMAT_CONFIG_NAME = "USER_DEFINED_FORMAT_MANAGER";

View file

@ -46,9 +46,9 @@ import ghidra.util.UndefinedFunction;
public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph> {
//@formatter:off
private static final Color PICKED_COLOR = new GColor("color.bg.functiongraph.vertex.picked");
private static final Color START_COLOR = new GColor("color.bg.functiongraph.vertex.entry");
private static final Color END_COLOR = new GColor("color.bg.functiongraph.vertex.exit");
private static final Color PICKED_COLOR = new GColor("color.bg.plugin.functiongraph.vertex.picked");
private static final Color START_COLOR = new GColor("color.bg.plugin.functiongraph.vertex.entry");
private static final Color END_COLOR = new GColor("color.bg.plugin.functiongraph.vertex.exit");
private static final Color UNDEFINED_FUNCTION_COLOR = new GColor("color.bg.undefined");
//@formatter:on
@ -65,7 +65,7 @@ public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph>
public FGComponent(FGView functionGraphView, FGData data,
LayoutProvider<FGVertex, FGEdge, FunctionGraph> layoutProvider) {
// Note: we cannot call super here, as we need to set our variables below before
// Note: we cannot call super here, as we need to set our variables below before
// the base class builds.
// super(data.getFunctionGraph());
@ -84,8 +84,8 @@ public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph>
setStatusMessage(message);
}
// Note: can't do this here due to timing...restoring the groups may trigger
// callbacks into the view code, which at the point of this constructor has
// Note: can't do this here due to timing...restoring the groups may trigger
// callbacks into the view code, which at the point of this constructor has
// not yet been initialized
//
// restoreSettings();
@ -217,11 +217,12 @@ public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph>
com.google.common.base.Function<FGEdge, String> edgeLabelTransformer = e -> e.getLabel();
renderContext.setEdgeLabelTransformer(edgeLabelTransformer);
// note: this label renderer is the stamp for the label; we use another edge label
// note: this label renderer is the stamp for the label; we use another edge label
// renderer inside of the VisualGraphRenderer
VisualGraphEdgeLabelRenderer edgeLabelRenderer =
new VisualGraphEdgeLabelRenderer(new GColor("color.fg.label.picked"));
edgeLabelRenderer.setNonPickedForegroundColor(new GColor("color.fg.label.non.picked"));
VisualGraphEdgeLabelRenderer edgeLabelRenderer = new VisualGraphEdgeLabelRenderer(
new GColor("color.fg.plugin.functiongraph.label.picked"));
edgeLabelRenderer.setNonPickedForegroundColor(
new GColor("color.fg.plugin.functiongraph.label.non.picked"));
edgeLabelRenderer.setRotateEdgeLabels(false);
renderContext.setEdgeLabelRenderer(edgeLabelRenderer);
@ -229,16 +230,16 @@ public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph>
Color bgColor = vgOptions.getGraphBackgroundColor();
if (vgOptions.isDefaultBackgroundColor(bgColor)) {
// Give user notice when seeing the graph for a non-function (such as an undefined
// function), as this is typical for Ghidra UI widgets.
// Don't do this if the user has manually set the background color (this would require
// Give user notice when seeing the graph for a non-function (such as an undefined
// function), as this is typical for Ghidra UI widgets.
// Don't do this if the user has manually set the background color (this would require
// another option).
Function function = functionGraphData.getFunction();
if (function instanceof UndefinedFunction) {
viewer.setBackground(UNDEFINED_FUNCTION_COLOR);
}
else {
viewer.setBackground(new GColor("color.bg.functiongraph"));
viewer.setBackground(new GColor("color.bg.plugin.functiongraph"));
}
}
@ -274,11 +275,11 @@ public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph>
//==================================================================================================
// Accessor Methods
//==================================================================================================
//==================================================================================================
@Override
public void dispose() {
// big assumption - the components below will be disposed by the controller, so we don't
// big assumption - the components below will be disposed by the controller, so we don't
// dispose them, as they may be cached
functionGraph = null;
functionGraphData = null;
@ -314,17 +315,17 @@ public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph>
public void setVertexFocused(FGVertex v, ProgramLocation location) {
//
// NOTE: we must focus the vertex before we set the program location, as focusing the
// NOTE: we must focus the vertex before we set the program location, as focusing the
// vertex will turn on the cursor, which allows the cursor to be properly set when we
// set the location. Reversing these two calls will not allow the cursor to be set
// set the location. Reversing these two calls will not allow the cursor to be set
// properly.
//
//
boolean wasFocused = v.isFocused();
// As per the note above, the vertex must think it is focused to update its cursor, so
// focus it, but DO NOT send out the event. The 'pick to sync' will not trigger an
// API-wide notification of the focused vertex.
// focus it, but DO NOT send out the event. The 'pick to sync' will not trigger an
// API-wide notification of the focused vertex.
gPickedState.pickToSync(v);
v.setProgramLocation(location);

View file

@ -21,7 +21,7 @@ import generic.theme.GIcon;
public abstract class ExperimentalLayoutProvider extends FGLayoutProviderExtensionPoint {
private static final Icon ICON = new GIcon("icon.functiongraph.layout.experimental");
private static final Icon ICON = new GIcon("icon.plugin.functiongraph.layout.experimental");
@Override
public Icon getActionIcon() {

View file

@ -44,7 +44,7 @@ import ghidra.util.layout.VerticalLayout;
import util.CollectionUtils;
/**
* This panel looks similar in appearance to the LisGraphComponentPanel, with a header, actions
* This panel looks similar in appearance to the LisGraphComponentPanel, with a header, actions
* and a body.
*/
public class GroupedFunctionGraphComponentPanel extends AbstractGraphComponentPanel {
@ -139,10 +139,8 @@ public class GroupedFunctionGraphComponentPanel extends AbstractGraphComponentPa
add(genericHeader, BorderLayout.NORTH);
add(contentPanel, BorderLayout.CENTER);
Border beveledBorder =
BorderFactory.createBevelBorder(BevelBorder.RAISED,
new GColor("color.border.bevel.highlight"),
new GColor("color.border.bevel.shadow"));
Border beveledBorder = BorderFactory.createBevelBorder(BevelBorder.RAISED,
new GColor("color.border.bevel.highlight"), new GColor("color.border.bevel.shadow"));
setBorder(beveledBorder);
@ -156,7 +154,7 @@ public class GroupedFunctionGraphComponentPanel extends AbstractGraphComponentPa
}
/**
* A bit of a hack that triggers the text area to update its preferred height now before we
* A bit of a hack that triggers the text area to update its preferred height now before we
* render so that it doesn't change later.
*/
private void updateTextAreaSizeToForceTextLayout() {
@ -189,7 +187,7 @@ public class GroupedFunctionGraphComponentPanel extends AbstractGraphComponentPa
}
};
groupAction.setDescription("Combine selected vertices into one vertex");
Icon imageIcon = new GIcon("icon.functiongraph.action.vertex.group");
Icon imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.group");
groupAction.setToolBarData(new ToolBarData(imageIcon, secondGroup));
groupAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Group_Vertex_Action_Group"));
@ -202,10 +200,10 @@ public class GroupedFunctionGraphComponentPanel extends AbstractGraphComponentPa
}
};
regroupAction.setDescription("Restore vertex and siblings back to group form");
imageIcon = new GIcon("icon.functiongraph.action.vertex.regroup");
imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.regroup");
regroupAction.setToolBarData(new ToolBarData(imageIcon, secondGroup));
regroupAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Regroup"));
regroupAction
.setHelpLocation(new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Regroup"));
// ungroup
ungroupAction = new DockingAction("Ungroup Vertices", FunctionGraphPlugin.class.getName()) {
@ -215,10 +213,10 @@ public class GroupedFunctionGraphComponentPanel extends AbstractGraphComponentPa
}
};
ungroupAction.setDescription("Ungroup selected vertices into individual vertex");
imageIcon = new GIcon("icon.functiongraph.action.vertex.ungroup");
imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.ungroup");
ungroupAction.setToolBarData(new ToolBarData(imageIcon, secondGroup));
ungroupAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Ungroup"));
ungroupAction
.setHelpLocation(new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Ungroup"));
// add to group
addToGroupAction = new DockingAction("Add to Group", FunctionGraphPlugin.class.getName()) {
@ -243,12 +241,12 @@ public class GroupedFunctionGraphComponentPanel extends AbstractGraphComponentPa
}
};
addToGroupAction.setDescription("Add the selected vertices to this group");
imageIcon = new GIcon("icon.functiongraph.action.vertex.group.add");
imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.group.add");
addToGroupAction.setToolBarData(new ToolBarData(imageIcon, secondGroup));
addToGroupAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Group_Add"));
// color
// color
setVertexMostRecentAction = new SetVertexMostRecentColorAction(controller, vertex);
setVertexMostRecentAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Group_Vertex_Action_Color"));
@ -614,7 +612,7 @@ public class GroupedFunctionGraphComponentPanel extends AbstractGraphComponentPa
@Override
Component getMaximizedViewComponent() {
// 7937:3 - this will need to change if we want to support showing only the vertices inside of
// this group vertex. To make this happen we probably need to be able to have the
// this group vertex. To make this happen we probably need to be able to have the
// group vertex contain its own graph that we can set on the viewer if the user hits
// the full display button.

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
*
*
*/
package ghidra.app.plugin.core.functiongraph.graph.vertex;
@ -115,10 +115,10 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
setLayout(new BorderLayout());
listingPanel = new FGVertexListingPanel(controller, controller.getMinimalFormatManager(),
program, addressSet);
listingPanel.addButtonPressedListener(
new FieldNavigator(tool, controller.getNavigatable()));
listingPanel.addButtonPressedListener(
controller.getSharedHighlighterButtonPressedListener());
listingPanel
.addButtonPressedListener(new FieldNavigator(tool, controller.getNavigatable()));
listingPanel
.addButtonPressedListener(controller.getSharedHighlighterButtonPressedListener());
listingPanel.setStringSelectionListener(controller.getSharedStringSelectionListener());
fieldPanel = listingPanel.getFieldPanel();
@ -135,10 +135,8 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
add(listingPanel, BorderLayout.CENTER);
Border beveledBorder =
BorderFactory.createBevelBorder(BevelBorder.RAISED,
new GColor("color.border.bevel.highlight"),
new GColor("color.border.bevel.shadow"));
Border beveledBorder = BorderFactory.createBevelBorder(BevelBorder.RAISED,
new GColor("color.border.bevel.highlight"), new GColor("color.border.bevel.shadow"));
setBorder(beveledBorder);
addKeyListener(new FieldPanelKeyListener());
@ -168,7 +166,7 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
createActions();
// Sets the initial view of the graph to NOT be full-screen, and show
// Sets the initial view of the graph to NOT be full-screen, and show
// the full function graph.
setFormat(false);
@ -234,7 +232,7 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
}
/**
* Signals to rebuild this component's data model. This call should not do any real work
* Signals to rebuild this component's data model. This call should not do any real work
* if the model is not 'dirty'.
*/
@Override
@ -298,11 +296,11 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
String secondGroup = "group2";
setVertexMostRecentAction = new SetVertexMostRecentColorAction(controller, vertex);
setVertexMostRecentAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Color"));
setVertexMostRecentAction
.setHelpLocation(new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Color"));
ToolBarData toolBarData = setVertexMostRecentAction.getToolBarData();
setVertexMostRecentAction.setToolBarData(
new ToolBarData(toolBarData.getIcon(), firstGroup));
setVertexMostRecentAction
.setToolBarData(new ToolBarData(toolBarData.getIcon(), firstGroup));
xrefsAction = new DockingAction("Jump To XRef", FunctionGraphPlugin.class.getName()) {
@Override
@ -311,7 +309,7 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
}
};
xrefsAction.setDescription("Jump to a XRef");
Icon imageIcon = new GIcon("icon.functiongraph.action.vertex.xrefs");
Icon imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.xrefs");
xrefsAction.setToolBarData(new ToolBarData(imageIcon, firstGroup));
xrefsAction.setHelpLocation(new HelpLocation("FunctionGraphPlugin", "Vertex_Action_XRefs"));
@ -325,7 +323,7 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
}
};
maximizeViewModeAction.setDescription("Reverts view from graph to fullscreen");
imageIcon = new GIcon("icon.functiongraph.action.vertex.maximize");
imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.maximize");
maximizeViewModeAction.setToolBarData(new ToolBarData(imageIcon, firstGroup));
maximizeViewModeAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Full_View"));
@ -340,7 +338,7 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
}
};
minimizeViewModeAction.setDescription("Reverts view from fullscreen to graph");
imageIcon = new GIcon("icon.functiongraph.action.vertex.minimize");
imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.minimize");
minimizeViewModeAction.setToolBarData(new ToolBarData(imageIcon, firstGroup));
minimizeViewModeAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Full_View"));
@ -352,7 +350,7 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
}
};
groupAction.setDescription("Combine selected vertices into one vertex");
imageIcon = new GIcon("icon.functiongraph.action.vertex.group");
imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.group");
groupAction.setToolBarData(new ToolBarData(imageIcon, secondGroup));
groupAction.setHelpLocation(new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Group"));
@ -363,11 +361,11 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
}
};
regroupAction.setDescription("Restore vertex and siblings back to group form");
imageIcon = new GIcon("icon.functiongraph.action.vertex.regroup");
imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.regroup");
regroupAction.setToolBarData(new ToolBarData(imageIcon, secondGroup));
regroupAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Regroup"));
regroupAction
.setHelpLocation(new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Regroup"));
genericHeader.actionAdded(setVertexMostRecentAction);
@ -673,7 +671,7 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
void dispose() {
//
// Let's go a bit overboard and help the garbage collector cleanup by nulling out
// Let's go a bit overboard and help the garbage collector cleanup by nulling out
// references and removing the data from Jung's graph
//
@ -709,11 +707,10 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
//==================================================================================================
// Inner-inner classes
//==================================================================================================
//==================================================================================================
private class ListingHoverAdapter extends ListingHoverProvider {
public ListingHoverAdapter() {
super();
}
@Override

View file

@ -49,17 +49,18 @@ public class SetVertexMostRecentColorAction extends MultiActionDockingAction {
this.controller = controller;
this.vertex = vertex;
setDescription("Set this block's background color");
colorIcon = new ColorIcon3D(new GColor("color.bg.functiongraph.paint.icon"), 12, 12) {
@Override
public Color getColor() {
return controller.getMostRecentColor();
}
};
colorIcon =
new ColorIcon3D(new GColor("color.bg.plugin.functiongraph.paint.icon"), 12, 12) {
@Override
public Color getColor() {
return controller.getMostRecentColor();
}
};
Icon blankIcon = new EmptyIcon(16, 16);
MultiIcon multiIcon = new MultiIcon(blankIcon);
Icon paintBrushImage = new GIcon("icon.functiongraph.action.vertex.choose.color");
Icon paintBrushImage = new GIcon("icon.plugin.functiongraph.action.vertex.choose.color");
Icon scaledBrush = ResourceManager.getScaledIcon(paintBrushImage, 16, 16);
Point point = getLowerLeftIconOffset(blankIcon, colorIcon);
@ -100,11 +101,11 @@ public class SetVertexMostRecentColorAction extends MultiActionDockingAction {
colorProvider.setVertexColor(vertex, newColor);
}
};
Icon imageIcon = new GIcon("icon.functiongraph.action.vertex.choose.color.palette");
chooseColorAction.setMenuBarData(
new MenuData(new String[] { "Choose New Color" }, imageIcon));
chooseColorAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Color"));
Icon imageIcon = new GIcon("icon.plugin.functiongraph.action.vertex.choose.color.palette");
chooseColorAction
.setMenuBarData(new MenuData(new String[] { "Choose New Color" }, imageIcon));
chooseColorAction
.setHelpLocation(new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Color"));
clearColorAction =
new DockingAction("Clear Vertex Color", FunctionGraphPlugin.class.getName()) {
@ -115,8 +116,8 @@ public class SetVertexMostRecentColorAction extends MultiActionDockingAction {
}
};
clearColorAction.setMenuBarData(new MenuData(new String[] { "Clear Background Color" }));
clearColorAction.setHelpLocation(
new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Color"));
clearColorAction
.setHelpLocation(new HelpLocation("FunctionGraphPlugin", "Vertex_Action_Color"));
}
@Override
@ -174,7 +175,7 @@ public class SetVertexMostRecentColorAction extends MultiActionDockingAction {
@Override
/**
* This is used by our button above to show a popup. We need to override the
* value here, since
* value here, since
*/
public Point getLocationOnScreen() {
if (vertex.isFullScreenMode()) {
@ -210,7 +211,7 @@ public class SetVertexMostRecentColorAction extends MultiActionDockingAction {
JComponent vertexComponentPanel = vertex.getComponent();
// Start with our (this button) coordinates and add those to our container's
// value recursively until we reach our vertex panel. We have to stop there,
// value recursively until we reach our vertex panel. We have to stop there,
// since the vertex panel
int x = getX();
int y = getY();

View file

@ -90,17 +90,17 @@ public class FunctionGraphOptions extends VisualGraphOptions {
private boolean updateGroupColorsAutomatically = true;
//@formatter:off
public static final Color DEFAULT_GROUP_BACKGROUND_COLOR = new GColor("color.bg.functiongraph.vertex.group");
private GColor defaultVertexBackgroundColor = new GColor("color.bg.functiongraph");
private GColor defaultGroupBackgroundColor = new GColor("color.bg.functiongraph.vertex.group");
public static final Color DEFAULT_GROUP_BACKGROUND_COLOR = new GColor("color.bg.plugin.functiongraph.vertex.group");
private GColor defaultVertexBackgroundColor = new GColor("color.bg.plugin.functiongraph");
private GColor defaultGroupBackgroundColor = new GColor("color.bg.plugin.functiongraph.vertex.group");
private GColor fallthroughEdgeColor = new GColor("color.bg.functiongraph.edge.fall.through");
private GColor conditionalJumpEdgeColor = new GColor("color.bg.functiongraph.edge.jump.conditional");
private GColor unconditionalJumpEdgeColor = new GColor("color.bg.functiongraph.edge.jump.unconditional");
private GColor fallthroughEdgeColor = new GColor("color.bg.plugin.functiongraph.edge.fall.through");
private GColor conditionalJumpEdgeColor = new GColor("color.bg.plugin.functiongraph.edge.jump.conditional");
private GColor unconditionalJumpEdgeColor = new GColor("color.bg.plugin.functiongraph.edge.jump.unconditional");
private GColor fallthroughEdgeHighlightColor = new GColor("color.bg.functiongraph.edge.fall.through.highlight");
private GColor conditionalJumpEdgeHighlightColor = new GColor("color.bg.functiongraph.edge.jump.conditional.highlight");
private GColor unconditionalJumpEdgeHighlightColor = new GColor("color.bg.functiongraph.edge.jump.unconditional.highlight");
private GColor fallthroughEdgeHighlightColor = new GColor("color.bg.plugin.functiongraph.edge.fall.through.highlight");
private GColor conditionalJumpEdgeHighlightColor = new GColor("color.bg.plugin.functiongraph.edge.jump.conditional.highlight");
private GColor unconditionalJumpEdgeHighlightColor = new GColor("color.bg.plugin.functiongraph.edge.jump.unconditional.highlight");
//@formatter:on
private boolean useFullSizeTooltip = false;
@ -174,12 +174,10 @@ public class FunctionGraphOptions extends VisualGraphOptions {
new HelpLocation(OWNER, "Layout_Compressing"), USE_CONDENSED_LAYOUT_DESCRIPTION);
options.registerThemeColorBinding(DEFAULT_VERTEX_BACKGROUND_COLOR_KEY,
defaultVertexBackgroundColor.getId(),
help, DEFAULT_VERTEX_BACKGROUND_COLOR_DESCRPTION);
defaultVertexBackgroundColor.getId(), help, DEFAULT_VERTEX_BACKGROUND_COLOR_DESCRPTION);
options.registerThemeColorBinding(DEFAULT_GROUP_BACKGROUND_COLOR_KEY,
defaultGroupBackgroundColor.getId(),
help, DEFAULT_GROUP_BACKGROUND_COLOR_DESCRPTION);
defaultGroupBackgroundColor.getId(), help, DEFAULT_GROUP_BACKGROUND_COLOR_DESCRPTION);
options.registerOption(UPDATE_GROUP_AND_UNGROUP_COLORS, updateGroupColorsAutomatically,
help, UPDATE_GROUP_AND_UNGROUP_COLORS_DESCRIPTION);
@ -191,12 +189,10 @@ public class FunctionGraphOptions extends VisualGraphOptions {
conditionalJumpEdgeColor.getId(), help, "Conditional jump edge color");
options.registerThemeColorBinding(EDGE_UNCONDITIONAL_JUMP_COLOR_KEY,
unconditionalJumpEdgeColor.getId(), help,
"Unconditional jump edge color");
unconditionalJumpEdgeColor.getId(), help, "Unconditional jump edge color");
options.registerThemeColorBinding(EDGE_FALLTHROUGH_COLOR_KEY, fallthroughEdgeColor.getId(),
help,
"Fallthrough edge color");
help, "Fallthrough edge color");
options.registerThemeColorBinding(EDGE_CONDITIONAL_JUMP_HIGHLIGHT_COLOR_KEY,
conditionalJumpEdgeHighlightColor.getId(), help,
@ -207,8 +203,8 @@ public class FunctionGraphOptions extends VisualGraphOptions {
"Unconditional jump edge color when highlighting the reachablity of a vertex");
options.registerThemeColorBinding(EDGE_FALLTHROUGH_HIGHLIGHT_COLOR_KEY,
fallthroughEdgeHighlightColor.getId(),
help, "Fallthrough edge color when highlighting the reachablity of a vertex");
fallthroughEdgeHighlightColor.getId(), help,
"Fallthrough edge color when highlighting the reachablity of a vertex");
}