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

@ -1,79 +1,65 @@
[Defaults]
color.bg.functiongraph = color.bg
color.bg.plugin.functiongraph = color.bg
color.fg.label.picked = color.fg
color.fg.label.non.picked = color.fg.disabled
color.fg.plugin.functiongraph.label.picked = color.fg
color.fg.plugin.functiongraph.label.non.picked = color.fg.disabled
color.bg.functiongraph.vertex.group = rgb(226, 255, 155)
color.bg.functiongraph.vertex.entry = color.palette.lightgreen
color.bg.functiongraph.vertex.exit = color.palette.lightred
color.bg.functiongraph.vertex.picked = color.palette.yellow
color.bg.plugin.functiongraph.vertex.group = rgb(226, 255, 155)
color.bg.plugin.functiongraph.vertex.entry = color.palette.lightgreen
color.bg.plugin.functiongraph.vertex.exit = color.palette.lightred
color.bg.plugin.functiongraph.vertex.picked = color.palette.yellow
color.bg.functiongraph.edge.fall.through = color.flowtype.fall.through
color.bg.functiongraph.edge.fall.through.highlight = rgb(255, 127, 127)
color.bg.functiongraph.edge.jump.conditional = color.flowtype.jump.conditional
color.bg.functiongraph.edge.jump.conditional.highlight = lime
color.bg.functiongraph.edge.jump.unconditional = color.flowtype.jump.unconditional
color.bg.functiongraph.edge.jump.unconditional.highlight = rgb(127, 127, 255)
color.bg.plugin.functiongraph.edge.fall.through = color.flowtype.fall.through
color.bg.plugin.functiongraph.edge.fall.through.highlight = rgb(255, 127, 127)
color.bg.plugin.functiongraph.edge.jump.conditional = color.flowtype.jump.conditional
color.bg.plugin.functiongraph.edge.jump.conditional.highlight = lime
color.bg.plugin.functiongraph.edge.jump.unconditional = color.flowtype.jump.unconditional
color.bg.plugin.functiongraph.edge.jump.unconditional.highlight = rgb(127, 127, 255)
color.bg.functiongraph.paint.icon = rgb(189, 221, 252) // gentle pale blue
color.bg.plugin.functiongraph.paint.icon = rgb(189, 221, 252) // gentle pale blue
icon.functiongraph.layout.experimental = package_development.png
icon.functiongraph.action.vertex.xrefs = brick_link.png
icon.functiongraph.action.vertex.maximize = fullscreen_view.png
icon.functiongraph.action.vertex.minimize = graph_view.png
icon.functiongraph.action.vertex.group = shape_handles.png
icon.functiongraph.action.vertex.group.add = shape_square_add.png
icon.functiongraph.action.vertex.regroup = edit-redo.png
icon.functiongraph.action.vertex.ungroup = shape_ungroup.png
icon.functiongraph.action.vertex.choose.color = paintbrush.png
icon.functiongraph.action.vertex.choose.color.palette = palette.png
icon.functiongraph.action.vertex.edit.label = id.png
icon.functiongraph.action.vertex.full.screen = fullscreen_view.png
icon.functiongraph.action.vertex.edit.format = field.header.png
icon.plugin.functiongraph.layout.experimental = package_development.png
icon.plugin.functiongraph.action.vertex.xrefs = brick_link.png
icon.plugin.functiongraph.action.vertex.maximize = fullscreen_view.png
icon.plugin.functiongraph.action.vertex.minimize = graph_view.png
icon.plugin.functiongraph.action.vertex.group = shape_handles.png
icon.plugin.functiongraph.action.vertex.group.add = shape_square_add.png
icon.plugin.functiongraph.action.vertex.regroup = edit-redo.png
icon.plugin.functiongraph.action.vertex.ungroup = shape_ungroup.png
icon.plugin.functiongraph.action.vertex.choose.color = paintbrush.png
icon.plugin.functiongraph.action.vertex.choose.color.palette = palette.png
icon.plugin.functiongraph.action.vertex.edit.label = id.png
icon.plugin.functiongraph.action.vertex.full.screen = fullscreen_view.png
icon.plugin.functiongraph.action.vertex.edit.format = field.header.png
icon.functiongraph.action.viewer.clone = icon.provider.clone
icon.functiongraph.action.viewer.layout = preferences-system.png
icon.functiongraph.action.viewer.vertex.hover.paths.to.vertex = fgin.png
icon.functiongraph.action.viewer.vertex.hover.paths.from.vertex = fgout.png
icon.functiongraph.action.viewer.vertex.hover.paths.from.to.vertex = fginout.png
icon.functiongraph.action.viewer.vertex.hover.paths.all = fgpaths.png
icon.functiongraph.action.viewer.vertex.hover.cycles = fgloop.png
icon.functiongraph.action.viewer.vertex.hover.cycles.all = fgloopall.png
icon.functiongraph.action.viewer.vertex.hover.scoped.flow.forward = fgblock.png
icon.functiongraph.action.viewer.vertex.hover.scoped.flow.reverse = fgrevblock.png
icon.functiongraph.action.viewer.vertex.hover.off = hoverOff.gif
icon.plugin.functiongraph.action.viewer.clone = icon.provider.clone
icon.plugin.functiongraph.action.viewer.layout = preferences-system.png
icon.plugin.functiongraph.action.viewer.vertex.hover.paths.to.vertex = fgin.png
icon.plugin.functiongraph.action.viewer.vertex.hover.paths.from.vertex = fgout.png
icon.plugin.functiongraph.action.viewer.vertex.hover.paths.from.to.vertex = fginout.png
icon.plugin.functiongraph.action.viewer.vertex.hover.paths.all = fgpaths.png
icon.plugin.functiongraph.action.viewer.vertex.hover.cycles = fgloop.png
icon.plugin.functiongraph.action.viewer.vertex.hover.cycles.all = fgloopall.png
icon.plugin.functiongraph.action.viewer.vertex.hover.scoped.flow.forward = fgblock.png
icon.plugin.functiongraph.action.viewer.vertex.hover.scoped.flow.reverse = fgrevblock.png
icon.plugin.functiongraph.action.viewer.vertex.hover.off = hoverOff.gif
icon.functiongraph.action.viewer.home = house.png
icon.functiongraph.action.viewer.reset = icon.refresh
icon.plugin.functiongraph.action.viewer.home = house.png
icon.plugin.functiongraph.action.viewer.reset = icon.refresh
icon.functiongraph.action.provider = function_graph.png
icon.functiongraph.action.provider.satellite = network-wireless-16.png
icon.plugin.functiongraph.action.provider = function_graph.png
icon.plugin.functiongraph.action.provider.satellite = network-wireless-16.png
[Dark Defaults]
// color.bg.functiongraph = color.bg
color.bg.plugin.functiongraph.vertex.group = rgb(226, 222, 179) // TODO confirm value
// color.fg.label.picked = color.fg
// color.fg.label.non.picked = color.fg.disabled
color.bg.functiongraph.vertex.group = rgb(226, 222, 179) // TODO confirm value
// color.bg.functiongraph.vertex.entry = color.palette.lightgreen
// color.bg.functiongraph.vertex.exit = color.palette.lightred
// color.bg.functiongraph.vertex.picked = color.palette.yellow
// color.bg.functiongraph.edge.fall.through = color.flowtype.fall.through
color.bg.functiongraph.edge.fall.through.highlight = rgb(165, 76, 80)
// color.bg.functiongraph.edge.jump.conditional = color.flowtype.jump.conditional
color.bg.functiongraph.edge.jump.conditional.highlight = rgb(95, 160, 196)
// color.bg.functiongraph.edge.jump.unconditional = color.flowtype.jump.unconditional
color.bg.functiongraph.edge.jump.unconditional.highlight = rgb(140, 162, 88)
// TODO dark version color.bg.functiongraph.paint.icon = // TODO
color.bg.plugin.functiongraph.edge.fall.through.highlight = rgb(165, 76, 80)
color.bg.plugin.functiongraph.edge.jump.conditional.highlight = rgb(95, 160, 196)
color.bg.plugin.functiongraph.edge.jump.unconditional.highlight = rgb(140, 162, 88)

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 =
@ -1022,14 +1022,14 @@ 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
@ -219,9 +219,10 @@ public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph>
// 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);
@ -238,7 +239,7 @@ public class FGComponent extends GraphComponent<FGVertex, FGEdge, FunctionGraph>
viewer.setBackground(UNDEFINED_FUNCTION_COLOR);
}
else {
viewer.setBackground(new GColor("color.bg.functiongraph"));
viewer.setBackground(new GColor("color.bg.plugin.functiongraph"));
}
}

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

@ -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);
@ -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,7 +241,7 @@ 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"));

View file

@ -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());
@ -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);
@ -713,7 +711,6 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
private class ListingHoverAdapter extends ListingHoverProvider {
public ListingHoverAdapter() {
super();
}
@Override

View file

@ -49,7 +49,8 @@ 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) {
colorIcon =
new ColorIcon3D(new GColor("color.bg.plugin.functiongraph.paint.icon"), 12, 12) {
@Override
public Color getColor() {
return controller.getMostRecentColor();
@ -59,7 +60,7 @@ public class SetVertexMostRecentColorAction extends MultiActionDockingAction {
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

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");
}

View file

@ -1,7 +1,7 @@
[Defaults]
icon.functiongraph.layout.nested.code = function_graph_code_flow.png
icon.plugin.functiongraph.layout.nested.code = function_graph_code_flow.png
[Dark Defaults]

View file

@ -24,7 +24,7 @@ import ghidra.util.task.TaskMonitor;
public class DecompilerNestedLayoutProvider extends FGLayoutProviderExtensionPoint {
private static final Icon ICON = new GIcon("icon.functiongraph.layout.nested.code");
private static final Icon ICON = new GIcon("icon.plugin.functiongraph.layout.nested.code");
static final String LAYOUT_NAME = "Nested Code Layout";
@Override

View file

@ -1,29 +1,21 @@
[Defaults]
color.bg.fcg.vertex.default = rgb(110, 197, 174) // chill green
color.bg.fcg.vertex.toobig = color.palette.lightgray
color.bg.plugin.fcg.vertex.default = rgb(110, 197, 174) // chill green
color.bg.plugin.fcg.vertex.toobig = color.palette.lightgray
color.bg.fcg.edge.primary.direct = rgb(143, 197, 143) // light pale green
color.bg.fcg.edge.primary.direct.selected = rgb(68, 171, 96) // lighter green
color.bg.fcg.edge.primary.indirect = rgb(233, 233, 233) // lightGray
color.bg.fcg.edge.primary.indirect.selected = rgb(201, 195, 195)
color.bg.plugin.fcg.edge.primary.direct = rgb(143, 197, 143) // light pale green
color.bg.plugin.fcg.edge.primary.direct.selected = rgb(68, 171, 96) // lighter green
color.bg.plugin.fcg.edge.primary.indirect = rgb(233, 233, 233) // lightGray
color.bg.plugin.fcg.edge.primary.indirect.selected = rgb(201, 195, 195)
// the satellite gets too cluttered, so wash out the edges
color.bg.fcg.edge.satellite.direct = rgba(0,0,0,0.1) // 'washed out black'
color.bg.fcg.edge.satellite.indirect = rgba(125, 125, 125, 25) // 'washed out gray'
color.bg.plugin.fcg.edge.satellite.direct = rgba(0,0,0,0.1) // 'washed out black'
color.bg.plugin.fcg.edge.satellite.indirect = rgba(125, 125, 125, 25) // 'washed out gray'
icon.fcg.layout.bow.tie = color_swatch.png
icon.plugin.fcg.layout.bow.tie = color_swatch.png
[Dark Defaults]
// TODO dark colors
// TODO color.bg.fcg.vertex.default = rgb(110, 197, 174) // chill green
// TODO color.bg.fcg.vertex.toobig = color.palette.lightGray
// TODO color.bg.fcg.edge.primary.direct = rgb(143, 197, 143) // lightGreen
// TODO color.bg.fcg.edge.primary.indirect = rgb(233, 233, 233) // lightGray
// the satellite gets too cluttered, so wash out the edges
// TODO color.bg.fcg.edge.satellite.direct = rgba(0,0,0,0.1) // 'washed out black'
// TODO color.bg.fcg.edge.satellite.indirect = rgba(125, 125, 125, 25) // 'washed out gray'
color.bg.plugin.fcg.edge.satellite.direct = rgba(143, 197, 143, 100) // light pale green
color.bg.plugin.fcg.edge.satellite.indirect = rgba(233, 233, 233, 100) // lightGray

View file

@ -45,8 +45,8 @@ import resources.ResourceManager;
public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvider {
//@formatter:off
public static final Color DEFAULT_VERTEX_SHAPE_COLOR = new GColor("color.bg.fcg.vertex.default");
private static final Color TOO_BIG_VERTEX_SHAPE_COLOR = new GColor("color.bg.fcg.vertex.toobig");
public static final Color DEFAULT_VERTEX_SHAPE_COLOR = new GColor("color.bg.plugin.fcg.vertex.default");
private static final Color TOO_BIG_VERTEX_SHAPE_COLOR = new GColor("color.bg.plugin.fcg.vertex.toobig");
//@formatter:on
public static final Icon NOT_ALLOWED_ICON = Icons.ERROR_ICON;
@ -597,10 +597,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((function == null) ? 0 : function.hashCode());
return result;
return Objects.hash(function);
}
@Override

View file

@ -32,7 +32,7 @@ public class BowTieLayoutProvider
public static final String NAME = "Bow Tie Layout";
private static final Icon DEFAULT_ICON = new GIcon("icon.fcg.layout.bow.tie");
private static final Icon DEFAULT_ICON = new GIcon("icon.plugin.fcg.layout.bow.tie");
@Override
public VisualGraphLayout<FcgVertex, FcgEdge> getLayout(FunctionCallGraph graph,

View file

@ -39,14 +39,14 @@ public class FcgComponent extends GraphComponent<FcgVertex, FcgEdge, FunctionCal
new FcgVertexPaintTransformer(FcgVertex.DEFAULT_VERTEX_SHAPE_COLOR);
private FcgEdgePaintTransformer edgePaintTransformer =
new FcgEdgePaintTransformer(new GColor("color.bg.fcg.edge.primary.direct"),
new GColor("color.bg.fcg.edge.primary.indirect"));
new FcgEdgePaintTransformer(new GColor("color.bg.plugin.fcg.edge.primary.direct"),
new GColor("color.bg.plugin.fcg.edge.primary.indirect"));
private FcgEdgePaintTransformer selectedEdgePaintTransformer =
new FcgEdgePaintTransformer(new GColor("color.bg.fcg.edge.primary.direct.selected"),
new GColor("color.bg.fcg.edge.primary.indirect.selected"));
new FcgEdgePaintTransformer(new GColor("color.bg.plugin.fcg.edge.primary.direct.selected"),
new GColor("color.bg.plugin.fcg.edge.primary.indirect.selected"));
private FcgEdgePaintTransformer satelliteEdgePaintTransformer =
new FcgEdgePaintTransformer(new GColor("color.bg.fcg.edge.satellite.direct"),
new GColor("color.bg.fcg.edge.satellite.indirect"));
new FcgEdgePaintTransformer(new GColor("color.bg.plugin.fcg.edge.satellite.direct"),
new GColor("color.bg.plugin.fcg.edge.satellite.indirect"));
FcgComponent(FunctionCallGraph g) {
setGraph(g);