GP-1981 - Theming - Icon Conversions - Software Modeling, Project,

Docking
This commit is contained in:
dragonmacher 2022-09-29 18:57:18 -04:00 committed by ghidragon
parent d466dbf06b
commit 79b95702ba
150 changed files with 1116 additions and 1001 deletions

View file

@ -60,9 +60,137 @@ color.debugger.plugin.resources.breakpoint.marker.disabled = color.debugger.plug
color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective = silver color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective = silver
color.debugger.plugin.resources.breakpoint.marker.disabled.ineffective = color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective color.debugger.plugin.resources.breakpoint.marker.disabled.ineffective = color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective
icon.debugger.object.populated = object-populated.png
icon.debugger.object.unpopulated = object-unpopulated.png
icon.debugger.display.graph = breakpoint-enable.png // TODO this icon was missing 'breakpoints.png'
icon.debugger.display.graph.filtered = icon.debugger.display.graph
icon.debugger.display.xml = text-xml.png
icon.debugger.display.xml.filtered = icon.debugger.display.xml
icon.debugger.display.export.facts = closedFolder.png
icon.debugger.display.export.xml = text-xml.png
icon.debugger.display.import.facts = closedFolder.png
icon.debugger.display.import.xml = text-xml.png
icon.debugger.open.windbg.trace = text-xml.png
icon.debugger.node.object.empty = icon.debugger.object.unpopulated
icon.debugger.node.object.event = register-marker.png
icon.debugger.node.object.populated = icon.debugger.object.populated
icon.debugger.node.object.running = object-running.png
icon.debugger.node.object.terminated = object-terminated.png
icon.debugger.table.object = icon.table
icon.debugger.tree.object = icon.debugger.object.unpopulated
icon.debugger = debugger.png
icon.debugger.connect = connect.png
icon.debugger.disconnect = disconnect.png
icon.debugger.process = process.png
icon.debugger.thread = thread.png
icon.debugger.processor = memory16.gif // TODO this icon was missing 'kcmprocessor.png'
icon.debugger.launch = launch.png
icon.debugger.attach = attach.png
icon.debugger.resume = continue.png
icon.debugger.terminate = stop.png
icon.debugger.kill = kill.png
icon.debugger.detach = detach.png
icon.debugger.record = record.png
icon.debugger.step.into = stepinto.png
icon.debugger.step.over = stepover.png
icon.debugger.step.back = stepback.png
icon.debugger.step.finish = stepout.png
icon.debugger.skip.over = skipover.png
icon.debugger.snap.forward = 2rightarrow.png
icon.debugger.snap.backward = 2leftarrow.png
icon.debugger.seek.present = icon.debugger.resume
icon.debugger.breakpoint.set = breakpoint-enable.png
icon.debugger.breakpoint.clear = breakpoint-clear.png
icon.debugger.breakpoint.enable = breakpoint-enable.png
icon.debugger.breakpoint.enable.all = breakpoints-enable-all.png
icon.debugger.breakpoint.disable = breakpoint-disable.png
icon.debugger.breakpoint.disable.all = breakpoints-disable-all.png
icon.debugger.breakpoint.clear.all = breakpoints-clear-all.png
icon.debugger.breakpoint.make.effective = breakpoints-make-effective.png
icon.debugger.provider.listing = Browser.gif
icon.debugger.provider.memory.bytes = binaryData.gif
icon.debugger.provider.console = console.png
icon.debugger.provider.registers = registers.png
icon.debugger.provider.stack = stack.png
icon.debugger.provider.breakpoints = breakpoint-mixed.png
icon.debugger.provider.modules = modules.png
icon.debugger.provider.pcode = stepinto.png
icon.debugger.provider.regions = memory16.gif
icon.debugger.provider.time = time.png
icon.debugger.provider.objects = icon.debugger.object.populated
icon.debugger.provider.model = function_graph.png
icon.debugger.save = icon.save
icon.debugger.close = x.gif
icon.debugger.add = add.png
icon.debugger.delete = delete.png
icon.debugger.clear = erase16.png
icon.debugger.refresh = view-refresh.png
icon.debugger.filter = filter_off.png
icon.debugger.select.rows = table_go.png
icon.debugger.autoread = autoread.png
icon.debugger.refresh.memory = icon.debugger.refresh
icon.debugger.rename.snapshot = icon.debugger.provider.time
icon.debugger.map.identically = doubleArrow.png
icon.debugger.map.modules = modules.png
icon.debugger.map.sections = icon.debugger.map.modules
icon.debugger.map.regions = icon.debugger.map.modules
icon.debugger.block = icon.debugger.map.sections
icon.debugger.select.addresses = text_align_justify.png
icon.debugger.data.types = dataTypes.png
icon.debugger.capture.symbols = closedFolderLabels.png
icon.debugger.log.fatal = edit-bomb.png
icon.debugger.log.error = dialog-warning_red.png
icon.debugger.log.warn = dialog-warning.png
icon.debugger.sync = sync_enabled.png
icon.debugger.visibility = format-text-bold.png
icon.debugger.pin = pin.png
icon.debugger.import = imported_bookmark.gif
icon.debugger.blank = blank.png
icon.debugger.package = debugger32.png
icon.debugger.emulate = icon.debugger.process
icon.debugger.config = conf.png
icon.debugger.toggle = system-switch-user.png
icon.debugger.diff = table_relationship.png
icon.debugger.diff.previous = up.png
icon.debugger.diff.next = down.png
icon.debugger.edit.mode.read.only = write-disabled.png
icon.debugger.edit.mode.write.target = write-target.png
icon.debugger.edit.mode.write.trace = write-trace.png
icon.debugger.edit.mode.write.emulator = write-emulator.png
icon.debugger.marker.register = register-marker.png
icon.debugger.marker.event = icon.debugger.marker.register
icon.debugger.breakpoint.overlay.inconsistent = breakpoint-overlay-inconsistent.png
icon.debugger.breakpoint.marker.enabled = icon.debugger.breakpoint.enable
icon.debugger.breakpoint.marker.disabled = icon.debugger.breakpoint.disable
icon.debugger.breakpoint.marker.mixed = breakpoint-mixed.png
icon.debugger.breakpoint.marker.ineffective.enabled = breakpoint-enable-ineff.png
icon.debugger.breakpoint.marker.ineffective.disabled = breakpoint-disable-ineff.png
icon.debugger.breakpoint.marker.ineffective.mixed = breakpoint-mixed-ineff.png
icon.debugger.unique.ref.read = cursor_arrow.gif [rotate(180)]
icon.debugger.unique.ref.write = cursor_arrow.gif
icon.debugger.select.registers = select-registers.png
icon.debugger.enable.edits = editbytes.gif
icon.debugger.disassemble = editbytes.gif // TODO this icon was missing 'disassemble.png'
[Dark Defaults] [Dark Defaults]

View file

@ -31,6 +31,7 @@ import docking.action.builder.*;
import docking.widgets.table.*; import docking.widgets.table.*;
import docking.widgets.tree.GTreeNode; import docking.widgets.tree.GTreeNode;
import generic.theme.GColor; import generic.theme.GColor;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.DebuggerPluginPackage; import ghidra.app.plugin.core.debug.DebuggerPluginPackage;
import ghidra.app.plugin.core.debug.gui.breakpoint.DebuggerBreakpointsPlugin; import ghidra.app.plugin.core.debug.gui.breakpoint.DebuggerBreakpointsPlugin;
import ghidra.app.plugin.core.debug.gui.console.DebuggerConsolePlugin; import ghidra.app.plugin.core.debug.gui.console.DebuggerConsolePlugin;
@ -60,127 +61,128 @@ import ghidra.util.Msg;
import ghidra.util.exception.CancelledException; import ghidra.util.exception.CancelledException;
import resources.MultiIcon; import resources.MultiIcon;
import resources.ResourceManager; import resources.ResourceManager;
import resources.icons.RotateIcon;
public interface DebuggerResources { public interface DebuggerResources {
String OPTIONS_CATEGORY_DEBUGGER = "Debugger"; String OPTIONS_CATEGORY_DEBUGGER = "Debugger";
String OPTIONS_CATEGORY_WORKFLOW = "Workflow"; String OPTIONS_CATEGORY_WORKFLOW = "Workflow";
ImageIcon ICON_DEBUGGER = ResourceManager.loadImage("images/debugger.png"); Icon ICON_DEBUGGER = new GIcon("icon.debugger");
ImageIcon ICON_CONNECTION = ResourceManager.loadImage("images/connect.png"); Icon ICON_CONNECTION = new GIcon("icon.debugger.connect");
ImageIcon ICON_DISCONNECT = ResourceManager.loadImage("images/disconnect.png"); Icon ICON_DISCONNECT = new GIcon("icon.debugger.disconnect");
ImageIcon ICON_PROCESS = ResourceManager.loadImage("images/process.png"); Icon ICON_PROCESS = new GIcon("icon.debugger.process");
ImageIcon ICON_TRACE = Trace.TRACE_ICON; Icon ICON_TRACE = Trace.TRACE_ICON;
ImageIcon ICON_THREAD = ResourceManager.loadImage("images/thread.png"); Icon ICON_THREAD = new GIcon("icon.debugger.thread");
ImageIcon ICON_PROGRAM = ProgramContentHandler.PROGRAM_ICON; Icon ICON_PROGRAM = ProgramContentHandler.PROGRAM_ICON;
ImageIcon ICON_PROCESSOR = ResourceManager.loadImage("images/kcmprocessor.png"); Icon ICON_PROCESSOR = new GIcon("icon.debugger.processor");
ImageIcon ICON_LAUNCH = ResourceManager.loadImage("images/launch.png"); Icon ICON_INTERRUPT = ResourceManager.loadImage("images/interrupt.png"); // TODO do gColor
ImageIcon ICON_ATTACH = ResourceManager.loadImage("images/attach.png");
ImageIcon ICON_RESUME = ResourceManager.loadImage("images/resume.png");
ImageIcon ICON_INTERRUPT = ResourceManager.loadImage("images/interrupt.png");
ImageIcon ICON_KILL = ResourceManager.loadImage("images/kill.png");
ImageIcon ICON_DETACH = ResourceManager.loadImage("images/detach.png");
ImageIcon ICON_RECORD = ResourceManager.loadImage("images/record.png");
ImageIcon ICON_STEP_INTO = ResourceManager.loadImage("images/stepinto.png"); Icon ICON_LAUNCH = new GIcon("icon.debugger.launch");
ImageIcon ICON_STEP_OVER = ResourceManager.loadImage("images/stepover.png"); Icon ICON_ATTACH = new GIcon("icon.debugger.attach");
ImageIcon ICON_SKIP_OVER = ResourceManager.loadImage("images/skipover.png"); Icon ICON_RESUME = new GIcon("icon.debugger.resume");
ImageIcon ICON_STEP_FINISH = ResourceManager.loadImage("images/stepout.png"); Icon ICON_TERMINATE = new GIcon("icon.debugger.terminate"); // TODO was this deleted
ImageIcon ICON_STEP_BACK = ResourceManager.loadImage("images/stepback.png"); Icon ICON_KILL = new GIcon("icon.debugger.kill");
ImageIcon ICON_STEP_LAST = ResourceManager.loadImage("images/steplast.png"); Icon ICON_DETACH = new GIcon("icon.debugger.detach");
// TODO: Draw new icons? Icon ICON_RECORD = new GIcon("icon.debugger.record");
ImageIcon ICON_SNAP_FORWARD = ResourceManager.loadImage("images/2rightarrow.png");
ImageIcon ICON_SNAP_BACKWARD = ResourceManager.loadImage("images/2leftarrow.png");
ImageIcon ICON_SEEK_PRESENT = ResourceManager.loadImage("images/seek-present.png");
ImageIcon ICON_SET_BREAKPOINT = ResourceManager.loadImage("images/breakpoint-enable.png"); Icon ICON_STEP_LAST = ResourceManager.loadImage("images/steplast.png"); // TODO GColor
ImageIcon ICON_CLEAR_BREAKPOINT = ResourceManager.loadImage("images/breakpoint-clear.png");
ImageIcon ICON_ENABLE_BREAKPOINT = ResourceManager.loadImage("images/breakpoint-enable.png"); Icon ICON_STEP_INTO = new GIcon("icon.debugger.step.into");
ImageIcon ICON_ENABLE_ALL_BREAKPOINTS = Icon ICON_STEP_OVER = new GIcon("icon.debugger.step.over");
ResourceManager.loadImage("images/breakpoints-enable-all.png"); Icon ICON_SKIP_OVER = new GIcon("icon.debugger.step.back");
ImageIcon ICON_DISABLE_BREAKPOINT = ResourceManager.loadImage("images/breakpoint-disable.png"); Icon ICON_STEP_FINISH = new GIcon("icon.debugger.step.finish");
ImageIcon ICON_DISABLE_ALL_BREAKPOINTS = Icon ICON_STEP_BACK = new GIcon("icon.debugger.skip.over");
ResourceManager.loadImage("images/breakpoints-disable-all.png");
ImageIcon ICON_CLEAR_ALL_BREAKPOINTS = Icon ICON_SNAP_FORWARD = new GIcon("icon.debugger.snap.forward");
ResourceManager.loadImage("images/breakpoints-clear-all.png"); Icon ICON_SNAP_BACKWARD = new GIcon("icon.debugger.snap.backward");
ImageIcon ICON_MAKE_BREAKPOINTS_EFFECTIVE = Icon ICON_SEEK_PRESENT = new GIcon("icon.debugger.seek.present");
ResourceManager.loadImage("images/breakpoints-make-effective.png");
Icon ICON_SET_BREAKPOINT = new GIcon("icon.debugger.breakpoint.set");
Icon ICON_CLEAR_BREAKPOINT = new GIcon("icon.debugger.breakpoint.clear");
Icon ICON_ENABLE_BREAKPOINT = new GIcon("icon.debugger.breakpoint.enable");
Icon ICON_ENABLE_ALL_BREAKPOINTS =
new GIcon("icon.debugger.breakpoint.enable.all");
Icon ICON_DISABLE_BREAKPOINT = new GIcon("icon.debugger.breakpoint.disable");
Icon ICON_DISABLE_ALL_BREAKPOINTS =
new GIcon("icon.debugger.breakpoint.disable.all");
Icon ICON_CLEAR_ALL_BREAKPOINTS =
new GIcon("icon.debugger.breakpoint.clear.all");
Icon ICON_MAKE_BREAKPOINTS_EFFECTIVE =
new GIcon("icon.debugger.breakpoint.make.effective");
// TODO: Some overlay to indicate dynamic, or new icon altogether // TODO: Some overlay to indicate dynamic, or new icon altogether
ImageIcon ICON_LISTING = ResourceManager.loadImage("images/Browser.gif"); Icon ICON_LISTING = new GIcon("icon.debugger.provider.listing");
ImageIcon ICON_MEMORY_BYTES = ResourceManager.loadImage("images/binaryData.gif"); Icon ICON_MEMORY_BYTES = new GIcon("icon.debugger.provider.memory.bytes");
ImageIcon ICON_CONSOLE = ResourceManager.loadImage("images/console.png"); Icon ICON_CONSOLE = new GIcon("icon.debugger.provider.console");
ImageIcon ICON_REGISTERS = ResourceManager.loadImage("images/registers.png"); Icon ICON_REGISTERS = new GIcon("icon.debugger.provider.registers");
ImageIcon ICON_STACK = ResourceManager.loadImage("images/stack.png"); Icon ICON_STACK = new GIcon("icon.debugger.provider.stack");
ImageIcon ICON_BREAKPOINTS = ResourceManager.loadImage("images/breakpoint-mixed.png"); Icon ICON_BREAKPOINTS = new GIcon("icon.debugger.provider.breakpoints");
ImageIcon ICON_MODULES = ResourceManager.loadImage("images/modules.png"); Icon ICON_MODULES = new GIcon("icon.debugger.provider.modules");
ImageIcon ICON_MAPPINGS = ICON_PROGRAM; // TODO: A better icon Icon ICON_MAPPINGS = ICON_PROGRAM; // TODO: A better icon
ImageIcon ICON_PCODE = ResourceManager.loadImage("images/stepinto.png"); // TODO Icon ICON_PCODE = new GIcon("icon.debugger.provider.pcode"); // TODO
//ResourceManager.loadImage("images/mappings.png"); Icon ICON_REGIONS = new GIcon("icon.debugger.provider.regions");
ImageIcon ICON_REGIONS = ResourceManager.loadImage("images/memory16.gif"); Icon ICON_TIME = new GIcon("icon.debugger.provider.time");
ImageIcon ICON_TIME = ResourceManager.loadImage("images/time.png");
// TODO: Draw a real icon. object-populated duplicates breakpoint-enabled // TODO: Draw a real icon. object-populated duplicates breakpoint-enabled
ImageIcon ICON_OBJECTS = ResourceManager.loadImage("images/object-populated.png"); Icon ICON_OBJECTS = new GIcon("icon.debugger.provider.objects");
ImageIcon ICON_SAVE = ResourceManager.loadImage("images/disk.png"); Icon ICON_SAVE = new GIcon("icon.debugger.save");
ImageIcon ICON_CLOSE = ResourceManager.loadImage("images/x.gif"); Icon ICON_CLOSE = new GIcon("icon.debugger.close");
ImageIcon ICON_ADD = ResourceManager.loadImage("images/add.png"); Icon ICON_ADD = new GIcon("icon.debugger.add");
ImageIcon ICON_DELETE = ResourceManager.loadImage("images/delete.png"); Icon ICON_DELETE = new GIcon("icon.debugger.delete");
ImageIcon ICON_CLEAR = ResourceManager.loadImage("images/erase16.png"); Icon ICON_CLEAR = new GIcon("icon.debugger.clear");
ImageIcon ICON_REFRESH = ResourceManager.loadImage("images/view-refresh.png"); Icon ICON_REFRESH = new GIcon("icon.debugger.refresh");
ImageIcon ICON_FILTER = ResourceManager.loadImage("images/filter_off.png"); // Eww. Icon ICON_FILTER = new GIcon("icon.debugger.filter"); // Eww.
ImageIcon ICON_SELECT_ROWS = ResourceManager.loadImage("images/table_go.png"); Icon ICON_SELECT_ROWS = new GIcon("icon.debugger.select.rows");
ImageIcon ICON_AUTOREAD = ResourceManager.loadImage("images/autoread.png"); Icon ICON_AUTOREAD = new GIcon("icon.debugger.autoread");
ImageIcon ICON_OBJECT_POPULATED = ResourceManager.loadImage("images/object-populated.png"); Icon ICON_OBJECT_POPULATED = new GIcon("icon.debugger.object.populated");
ImageIcon ICON_OBJECT_UNPOPULATED = ResourceManager.loadImage("images/object-unpopulated.png"); Icon ICON_OBJECT_UNPOPULATED = new GIcon("icon.debugger.object.unpopulated");
// TODO: Draw a real icon. // TODO: Draw a real icon.
ImageIcon ICON_REFRESH_MEMORY = ICON_REFRESH; Icon ICON_REFRESH_MEMORY = new GIcon("icon.debugger.refresh.memory");
ImageIcon ICON_RENAME_SNAPSHOT = ICON_TIME; Icon ICON_RENAME_SNAPSHOT = new GIcon("icon.debugger.rename.snapshot");
// TODO: Draw an icon // TODO: Draw an icon
ImageIcon ICON_MAP_IDENTICALLY = ResourceManager.loadImage("images/doubleArrow.png"); Icon ICON_MAP_IDENTICALLY = new GIcon("icon.debugger.map.identically");
ImageIcon ICON_MAP_MODULES = ResourceManager.loadImage("images/modules.png"); Icon ICON_MAP_MODULES = new GIcon("icon.debugger.map.modules");
ImageIcon ICON_MAP_SECTIONS = ICON_MAP_MODULES; // TODO Icon ICON_MAP_SECTIONS = new GIcon("icon.debugger.map.sections"); // TODO
ImageIcon ICON_MAP_REGIONS = ICON_MAP_MODULES; // TODO Icon ICON_MAP_REGIONS = new GIcon("icon.debugger.map.regions"); // TODO
ImageIcon ICON_BLOCK = ICON_MAP_SECTIONS; // TODO Icon ICON_BLOCK = new GIcon("icon.debugger.block"); // TODO
// TODO: Draw an icon // TODO: Draw an icon
ImageIcon ICON_SELECT_ADDRESSES = ResourceManager.loadImage("images/text_align_justify.png"); Icon ICON_SELECT_ADDRESSES = new GIcon("icon.debugger.select.addresses");
// TODO: Draw an icon? // TODO: Draw an icon?
ImageIcon ICON_DATA_TYPES = ResourceManager.loadImage("images/dataTypes.png"); Icon ICON_DATA_TYPES = new GIcon("icon.debugger.data.types");
// TODO: Draw an icon? // TODO: Draw an icon?
ImageIcon ICON_CAPTURE_SYMBOLS = ResourceManager.loadImage("images/closedFolderLabels.png"); Icon ICON_CAPTURE_SYMBOLS = new GIcon("icon.debugger.capture.symbols");
ImageIcon ICON_LOG_FATAL = ResourceManager.loadImage("images/edit-bomb.png"); Icon ICON_LOG_FATAL = new GIcon("icon.debugger.log.fatal");
ImageIcon ICON_LOG_ERROR = ResourceManager.loadImage("images/dialog-warning_red.png"); Icon ICON_LOG_ERROR = new GIcon("icon.debugger.log.error");
ImageIcon ICON_LOG_WARN = ResourceManager.loadImage("images/dialog-warning.png"); Icon ICON_LOG_WARN = new GIcon("icon.debugger.log.warn");
ImageIcon ICON_SYNC = ResourceManager.loadImage("images/sync_enabled.png"); Icon ICON_SYNC = new GIcon("icon.debugger.sync");
ImageIcon ICON_VISIBILITY = ResourceManager.loadImage("images/format-text-bold.png"); Icon ICON_VISIBILITY = new GIcon("icon.debugger.visibility");
ImageIcon ICON_PIN = ResourceManager.loadImage("images/pin.png"); Icon ICON_PIN = new GIcon("icon.debugger.pin");
// TODO: Find better icon? // TODO: Find better icon?
ImageIcon ICON_IMPORT = ResourceManager.loadImage("images/imported_bookmark.gif"); Icon ICON_IMPORT = new GIcon("icon.debugger.import");
ImageIcon ICON_BLANK = ResourceManager.loadImage("images/blank.png"); Icon ICON_BLANK = new GIcon("icon.debugger.blank");
ImageIcon ICON_PACKAGE = ResourceManager.loadImage("images/debugger32.png"); Icon ICON_PACKAGE = new GIcon("icon.debugger.package");
ImageIcon ICON_EMULATE = ICON_PROCESS; // TODO Icon ICON_EMULATE = new GIcon("icon.debugger.emulate"); // TODO
ImageIcon ICON_CONFIG = ResourceManager.loadImage("images/conf.png"); Icon ICON_CONFIG = new GIcon("icon.debugger.config");
ImageIcon ICON_TOGGLE = ResourceManager.loadImage("images/system-switch-user.png"); Icon ICON_TOGGLE = new GIcon("icon.debugger.toggle");
ImageIcon ICON_DIFF = ResourceManager.loadImage("images/table_relationship.png"); Icon ICON_DIFF = new GIcon("icon.debugger.diff");
ImageIcon ICON_DIFF_PREV = ResourceManager.loadImage("images/up.png"); Icon ICON_DIFF_PREV = new GIcon("icon.debugger.diff.previous");
ImageIcon ICON_DIFF_NEXT = ResourceManager.loadImage("images/down.png"); Icon ICON_DIFF_NEXT = new GIcon("icon.debugger.diff.next");
ImageIcon ICON_EDIT_MODE_READ_ONLY = ResourceManager.loadImage("images/write-disabled.png"); Icon ICON_EDIT_MODE_READ_ONLY = new GIcon("icon.debugger.edit.mode.read.only");
ImageIcon ICON_EDIT_MODE_WRITE_TARGET = ResourceManager.loadImage("images/write-target.png"); Icon ICON_EDIT_MODE_WRITE_TARGET = new GIcon("icon.debugger.edit.mode.write.target");
ImageIcon ICON_EDIT_MODE_WRITE_TRACE = ResourceManager.loadImage("images/write-trace.png"); Icon ICON_EDIT_MODE_WRITE_TRACE = new GIcon("icon.debugger.edit.mode.write.trace");
ImageIcon ICON_EDIT_MODE_WRITE_EMULATOR = Icon ICON_EDIT_MODE_WRITE_EMULATOR =
ResourceManager.loadImage("images/write-emulator.png"); new GIcon("icon.debugger.edit.mode.write.emulator");
String NAME_EDIT_MODE_READ_ONLY = "Control Target w/ Edits Disabled"; String NAME_EDIT_MODE_READ_ONLY = "Control Target w/ Edits Disabled";
String NAME_EDIT_MODE_WRITE_TARGET = "Control Target"; String NAME_EDIT_MODE_WRITE_TARGET = "Control Target";
@ -192,82 +194,82 @@ public interface DebuggerResources {
String HELP_ANCHOR_PLUGIN = "plugin"; String HELP_ANCHOR_PLUGIN = "plugin";
String TITLE_PROVIDER_BREAKPOINTS = "Breakpoints"; String TITLE_PROVIDER_BREAKPOINTS = "Breakpoints";
ImageIcon ICON_PROVIDER_BREAKPOINTS = ICON_BREAKPOINTS; Icon ICON_PROVIDER_BREAKPOINTS = ICON_BREAKPOINTS;
HelpLocation HELP_PROVIDER_BREAKPOINTS = new HelpLocation( HelpLocation HELP_PROVIDER_BREAKPOINTS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerBreakpointsPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerBreakpointsPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_CONSOLE = "Debug Console"; String TITLE_PROVIDER_CONSOLE = "Debug Console";
ImageIcon ICON_PROVIDER_CONSOLE = ICON_CONSOLE; Icon ICON_PROVIDER_CONSOLE = ICON_CONSOLE;
HelpLocation HELP_PROVIDER_CONSOLE = new HelpLocation( HelpLocation HELP_PROVIDER_CONSOLE = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerConsolePlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerConsolePlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_LISTING = "Dynamic"; String TITLE_PROVIDER_LISTING = "Dynamic";
ImageIcon ICON_PROVIDER_LISTING = ICON_LISTING; Icon ICON_PROVIDER_LISTING = ICON_LISTING;
HelpLocation HELP_PROVIDER_LISTING = new HelpLocation( HelpLocation HELP_PROVIDER_LISTING = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerListingPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerListingPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_MAPPINGS = "Static Mappings"; String TITLE_PROVIDER_MAPPINGS = "Static Mappings";
ImageIcon ICON_PROVIDER_MAPPINGS = ICON_MAPPINGS; Icon ICON_PROVIDER_MAPPINGS = ICON_MAPPINGS;
HelpLocation HELP_PROVIDER_MAPPINGS = new HelpLocation( HelpLocation HELP_PROVIDER_MAPPINGS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerStaticMappingPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerStaticMappingPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_MEMORY_BYTES = "Memory"; String TITLE_PROVIDER_MEMORY_BYTES = "Memory";
ImageIcon ICON_PROVIDER_MEMORY_BYTES = ICON_MEMORY_BYTES; Icon ICON_PROVIDER_MEMORY_BYTES = ICON_MEMORY_BYTES;
HelpLocation HELP_PROVIDER_MEMORY_BYTES = new HelpLocation( HelpLocation HELP_PROVIDER_MEMORY_BYTES = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerMemoryBytesPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerMemoryBytesPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_MODULES = "Modules"; String TITLE_PROVIDER_MODULES = "Modules";
ImageIcon ICON_PROVIDER_MODULES = ICON_MODULES; Icon ICON_PROVIDER_MODULES = ICON_MODULES;
HelpLocation HELP_PROVIDER_MODULES = new HelpLocation( HelpLocation HELP_PROVIDER_MODULES = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerModulesPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerModulesPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_PCODE = "Pcode Stepper"; String TITLE_PROVIDER_PCODE = "Pcode Stepper";
ImageIcon ICON_PROVIDER_PCODE = ICON_PCODE; Icon ICON_PROVIDER_PCODE = ICON_PCODE;
HelpLocation HELP_PROVIDER_PCODE = new HelpLocation( HelpLocation HELP_PROVIDER_PCODE = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerPcodeStepperPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerPcodeStepperPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_REGIONS = "Regions"; String TITLE_PROVIDER_REGIONS = "Regions";
ImageIcon ICON_PROVIDER_REGIONS = ICON_REGIONS; Icon ICON_PROVIDER_REGIONS = ICON_REGIONS;
HelpLocation HELP_PROVIDER_REGIONS = new HelpLocation( HelpLocation HELP_PROVIDER_REGIONS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerRegionsPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerRegionsPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_REGISTERS = "Registers"; String TITLE_PROVIDER_REGISTERS = "Registers";
ImageIcon ICON_PROVIDER_REGISTERS = ICON_REGISTERS; Icon ICON_PROVIDER_REGISTERS = ICON_REGISTERS;
HelpLocation HELP_PROVIDER_REGISTERS = new HelpLocation( HelpLocation HELP_PROVIDER_REGISTERS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerRegistersPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerRegistersPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_TARGETS = "Debugger Targets"; String TITLE_PROVIDER_TARGETS = "Debugger Targets";
ImageIcon ICON_PROVIDER_TARGETS = ICON_CONNECTION; // TODO: Same icon as action Icon ICON_PROVIDER_TARGETS = ICON_CONNECTION; // TODO: Same icon as action
HelpLocation HELP_PROVIDER_TARGETS = new HelpLocation( HelpLocation HELP_PROVIDER_TARGETS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerTargetsPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerTargetsPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_STACK = "Stack"; String TITLE_PROVIDER_STACK = "Stack";
ImageIcon ICON_PROVIDER_STACK = ICON_STACK; Icon ICON_PROVIDER_STACK = ICON_STACK;
HelpLocation HELP_PROVIDER_STACK = new HelpLocation( HelpLocation HELP_PROVIDER_STACK = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerStackPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerStackPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_THREADS = "Threads"; String TITLE_PROVIDER_THREADS = "Threads";
ImageIcon ICON_PROVIDER_THREADS = ICON_DEBUGGER; Icon ICON_PROVIDER_THREADS = ICON_DEBUGGER;
HelpLocation HELP_PROVIDER_THREADS = new HelpLocation( HelpLocation HELP_PROVIDER_THREADS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerThreadsPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerThreadsPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_TIME = "Time"; String TITLE_PROVIDER_TIME = "Time";
ImageIcon ICON_PROVIDER_TIME = ICON_TIME; Icon ICON_PROVIDER_TIME = ICON_TIME;
HelpLocation HELP_PROVIDER_TIME = new HelpLocation( HelpLocation HELP_PROVIDER_TIME = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerTimePlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerTimePlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_OBJECTS = "Objects"; String TITLE_PROVIDER_OBJECTS = "Objects";
ImageIcon ICON_PROVIDER_OBJECTS = ResourceManager.loadImage("images/time.png"); Icon ICON_PROVIDER_OBJECTS = new GIcon("icon.debugger.provider.objects");
HelpLocation HELP_PROVIDER_OBJECTS = new HelpLocation( HelpLocation HELP_PROVIDER_OBJECTS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerObjectsPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerObjectsPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_MODEL = "Model"; // TODO: An icon String TITLE_PROVIDER_MODEL = "Model"; // TODO: An icon
ImageIcon ICON_PROVIDER_MODEL = ResourceManager.loadImage("images/function_graph.png"); Icon ICON_PROVIDER_MODEL = new GIcon("icon.debugger.provider.model");
HelpLocation HELP_PROVIDER_MODEL = new HelpLocation( HelpLocation HELP_PROVIDER_MODEL = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerModelPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerModelPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_WATCHES = "Watches"; String TITLE_PROVIDER_WATCHES = "Watches";
ImageIcon ICON_PROVIDER_WATCHES = ICON_AUTOREAD; // TODO: Another icon? Icon ICON_PROVIDER_WATCHES = ICON_AUTOREAD; // TODO: Another icon?
HelpLocation HELP_PROVIDER_WATCHES = new HelpLocation( HelpLocation HELP_PROVIDER_WATCHES = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerWatchesPlugin.class), HELP_ANCHOR_PLUGIN); PluginUtils.getPluginNameFromClass(DebuggerWatchesPlugin.class), HELP_ANCHOR_PLUGIN);
@ -285,9 +287,9 @@ public interface DebuggerResources {
String OPTION_NAME_COLORS_TRACKING_MARKERS = "Colors.Tracking Markers"; String OPTION_NAME_COLORS_TRACKING_MARKERS = "Colors.Tracking Markers";
Color DEFAULT_COLOR_REGISTER_MARKERS = Color DEFAULT_COLOR_REGISTER_MARKERS =
new GColor("color.debugger.plugin.resources.register.marker"); new GColor("color.debugger.plugin.resources.register.marker");
ImageIcon ICON_REGISTER_MARKER = ResourceManager.loadImage("images/register-marker.png"); Icon ICON_REGISTER_MARKER = new GIcon("icon.debugger.marker.register");
ImageIcon ICON_EVENT_MARKER = ICON_REGISTER_MARKER; // TODO: Another icon? Icon ICON_EVENT_MARKER = new GIcon("icon.debugger.marker.event"); // TODO: Another icon?
// At least rename to "marker-arrow", and then have both ref it. // At least rename to "marker-arrow", and then have both ref it.
//@formatter:off //@formatter:off
@ -332,19 +334,19 @@ public interface DebuggerResources {
String NAME_BREAKPOINT_MARKER_INCON_DIS = "Inconsistent Disabled Breakpoint"; String NAME_BREAKPOINT_MARKER_INCON_DIS = "Inconsistent Disabled Breakpoint";
String NAME_BREAKPOINT_MARKER_INCON_MIX = "Inconsistent Mixed Breakpoint"; String NAME_BREAKPOINT_MARKER_INCON_MIX = "Inconsistent Mixed Breakpoint";
ImageIcon ICON_BREAKPOINT_OVERLAY_INCONSISTENT = Icon ICON_BREAKPOINT_OVERLAY_INCONSISTENT =
ResourceManager.loadImage("images/breakpoint-overlay-inconsistent.png"); new GIcon("icon.debugger.breakpoint.overlay.inconsistent");
ImageIcon ICON_BREAKPOINT_MARKER_ENABLED = ICON_ENABLE_BREAKPOINT; Icon ICON_BREAKPOINT_MARKER_ENABLED = new GIcon("icon.debugger.breakpoint.marker.enabled");
ImageIcon ICON_BREAKPOINT_MARKER_DISABLED = ICON_DISABLE_BREAKPOINT; Icon ICON_BREAKPOINT_MARKER_DISABLED = new GIcon("icon.debugger.breakpoint.marker.disabled");
ImageIcon ICON_BREAKPOINT_MARKER_MIXED = Icon ICON_BREAKPOINT_MARKER_MIXED =
ResourceManager.loadImage("images/breakpoint-mixed.png"); new GIcon("icon.debugger.breakpoint.marker.mixed");
ImageIcon ICON_BREAKPOINT_MARKER_INEFF_EN = Icon ICON_BREAKPOINT_MARKER_INEFF_EN =
ResourceManager.loadImage("images/breakpoint-enable-ineff.png"); new GIcon("icon.debugger.breakpoint.marker.ineffective.enabled");
ImageIcon ICON_BREAKPOINT_MARKER_INEFF_DIS = Icon ICON_BREAKPOINT_MARKER_INEFF_DIS =
ResourceManager.loadImage("images/breakpoint-disable-ineff.png"); new GIcon("icon.debugger.breakpoint.marker.ineffective.disabled");
ImageIcon ICON_BREAKPOINT_MARKER_INEFF_MIX = Icon ICON_BREAKPOINT_MARKER_INEFF_MIX =
ResourceManager.loadImage("images/breakpoint-mixed-ineff.png"); new GIcon("icon.debugger.breakpoint.marker.ineffective.disabled");
Icon ICON_BREAKPOINT_MARKER_INCON_EN = Icon ICON_BREAKPOINT_MARKER_INCON_EN =
new MultiIcon(ICON_BREAKPOINT_MARKER_ENABLED, ICON_BREAKPOINT_OVERLAY_INCONSISTENT); new MultiIcon(ICON_BREAKPOINT_MARKER_ENABLED, ICON_BREAKPOINT_OVERLAY_INCONSISTENT);
@ -353,9 +355,8 @@ public interface DebuggerResources {
Icon ICON_BREAKPOINT_MARKER_INCON_MIX = Icon ICON_BREAKPOINT_MARKER_INCON_MIX =
new MultiIcon(ICON_BREAKPOINT_MARKER_MIXED, ICON_BREAKPOINT_OVERLAY_INCONSISTENT); new MultiIcon(ICON_BREAKPOINT_MARKER_MIXED, ICON_BREAKPOINT_OVERLAY_INCONSISTENT);
Icon ICON_UNIQUE_REF_READ = Icon ICON_UNIQUE_REF_READ = new GIcon("icon.debugger.unique.ref.read"); // TODO
new RotateIcon(ResourceManager.loadImage("images/cursor_arrow.gif"), 180); // TODO Icon ICON_UNIQUE_REF_WRITE = new GIcon("icon.debugger.unique.ref.write"); // TODO
ImageIcon ICON_UNIQUE_REF_WRITE = ResourceManager.loadImage("images/cursor_arrow.gif"); // TODO
Icon ICON_UNIQUE_REF_RW = new MultiIcon(ICON_UNIQUE_REF_READ, ICON_UNIQUE_REF_WRITE); // TODO Icon ICON_UNIQUE_REF_RW = new MultiIcon(ICON_UNIQUE_REF_READ, ICON_UNIQUE_REF_WRITE); // TODO
//@formatter:off //@formatter:off
@ -1045,7 +1046,7 @@ public interface DebuggerResources {
String NAME = "Select Registers"; String NAME = "Select Registers";
String DESCRIPTION = "Select registers to display/modify"; String DESCRIPTION = "Select registers to display/modify";
String GROUP = "aa"; String GROUP = "aa";
Icon ICON = ResourceManager.loadImage("images/select-registers.png"); Icon ICON = new GIcon("icon.debugger.select.registers");
String HELP_ANCHOR = "select_registers"; String HELP_ANCHOR = "select_registers";
static ActionBuilder builder(Plugin owner) { static ActionBuilder builder(Plugin owner) {
@ -1061,7 +1062,7 @@ public interface DebuggerResources {
String NAME = "Clone Window"; String NAME = "Clone Window";
String DESCRIPTION = "Create a disconnected copy of this window"; String DESCRIPTION = "Create a disconnected copy of this window";
String GROUP = "zzzz"; String GROUP = "zzzz";
Icon ICON = ResourceManager.loadImage("images/camera-photo.png"); Icon ICON = new GIcon("icon.provider.clone");
String HELP_ANCHOR = "clone_window"; String HELP_ANCHOR = "clone_window";
static ActionBuilder builder(Plugin owner) { static ActionBuilder builder(Plugin owner) {
@ -1077,7 +1078,7 @@ public interface DebuggerResources {
String NAME = "Enable Edits"; String NAME = "Enable Edits";
String DESCRIPTION = "Enable editing of recorded or live values"; String DESCRIPTION = "Enable editing of recorded or live values";
String GROUP = "yyyy2"; String GROUP = "yyyy2";
Icon ICON = ResourceManager.loadImage("images/editbytes.gif"); Icon ICON = new GIcon("icon.debugger.enable.edits");
String HELP_ANCHOR = "enable_edits"; String HELP_ANCHOR = "enable_edits";
static ToggleActionBuilder builder(Plugin owner) { static ToggleActionBuilder builder(Plugin owner) {
@ -1092,7 +1093,7 @@ public interface DebuggerResources {
interface DisassembleAsAction { interface DisassembleAsAction {
String NAME = "Disassemble as"; String NAME = "Disassemble as";
String DESCRIPTION = "Disassemble using an alternative language"; String DESCRIPTION = "Disassemble using an alternative language";
Icon ICON = ResourceManager.loadImage("images/disassemble.png"); Icon ICON = new GIcon("icon.debugger.disassemble");
String HELP_ANCHOR = "disassemble_as"; String HELP_ANCHOR = "disassemble_as";
static ActionBuilder builder(Plugin owner) { static ActionBuilder builder(Plugin owner) {

View file

@ -22,7 +22,7 @@ import java.util.List;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.DockingAction; import docking.action.DockingAction;
@ -152,7 +152,7 @@ public abstract class AbstractDebuggerWrappedConsoleConnection<T extends TargetO
} }
@Override @Override
public ImageIcon getIcon() { public Icon getIcon() {
return DebuggerResources.ICON_CONSOLE; return DebuggerResources.ICON_CONSOLE;
} }

View file

@ -21,10 +21,9 @@ import java.awt.event.MouseEvent;
import java.util.*; import java.util.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import docking.widgets.filter.FilterListener; import docking.widgets.filter.FilterListener;
import generic.theme.GIcon;
import ghidra.app.services.DebuggerListingService; import ghidra.app.services.DebuggerListingService;
import ghidra.program.model.address.Address; import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressRangeImpl; import ghidra.program.model.address.AddressRangeImpl;
@ -32,11 +31,10 @@ import ghidra.program.model.listing.Program;
import ghidra.util.table.GhidraTable; import ghidra.util.table.GhidraTable;
import ghidra.util.table.GhidraTableFilterPanel; import ghidra.util.table.GhidraTableFilterPanel;
import ghidra.util.task.SwingUpdateManager; import ghidra.util.task.SwingUpdateManager;
import resources.ResourceManager;
public class MemviewTable { public class MemviewTable {
public static final ImageIcon ICON_TABLE = ResourceManager.loadImage("images/table.png"); public static final Icon ICON_TABLE = new GIcon("icon.table");
private MemviewMapModel model; private MemviewMapModel model;
private GhidraTable table; private GhidraTable table;
@ -61,19 +59,16 @@ public class MemviewTable {
component.add(filterPanel, BorderLayout.SOUTH); component.add(filterPanel, BorderLayout.SOUTH);
table.setAutoscrolls(true); table.setAutoscrolls(true);
table.getSelectionModel().addListSelectionListener(new ListSelectionListener() { table.getSelectionModel().addListSelectionListener(e -> {
@Override if (e.getValueIsAdjusting()) {
public void valueChanged(ListSelectionEvent e) { return;
if (e.getValueIsAdjusting()) { }
return; int modelRow = filterPanel.getModelRow(table.getSelectedRow());
} MemoryBox box = model.getBoxAt(modelRow);
int modelRow = filterPanel.getModelRow(table.getSelectedRow()); if (box != null) {
MemoryBox box = model.getBoxAt(modelRow); Set<MemoryBox> boxes = new HashSet<>();
if (box != null) { boxes.add(box);
Set<MemoryBox> boxes = new HashSet<MemoryBox>(); provider.selectPanelPosition(boxes);
boxes.add(box);
provider.selectPanelPosition(boxes);
}
} }
}); });
table.addMouseListener(new MouseAdapter() { table.addMouseListener(new MouseAdapter() {

View file

@ -15,18 +15,18 @@
*/ */
package ghidra.app.plugin.core.debug.gui.memview.actions; package ghidra.app.plugin.core.debug.gui.memview.actions;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider; import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class ZoomInAAction extends DockingAction { public class ZoomInAAction extends DockingAction {
private final ImageIcon ICON = ResourceManager.loadImage("images/zoom_in.png"); private static final Icon ICON = new GIcon("icon.widget.imagepanel.zoom.in");
private MemviewProvider provider; private MemviewProvider provider;

View file

@ -15,18 +15,18 @@
*/ */
package ghidra.app.plugin.core.debug.gui.memview.actions; package ghidra.app.plugin.core.debug.gui.memview.actions;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider; import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class ZoomInTAction extends DockingAction { public class ZoomInTAction extends DockingAction {
private final ImageIcon ICON = ResourceManager.loadImage("images/zoom_in.png"); private static final Icon ICON = new GIcon("icon.widget.imagepanel.zoom.in");
private MemviewProvider provider; private MemviewProvider provider;

View file

@ -15,18 +15,18 @@
*/ */
package ghidra.app.plugin.core.debug.gui.memview.actions; package ghidra.app.plugin.core.debug.gui.memview.actions;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider; import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class ZoomOutAAction extends DockingAction { public class ZoomOutAAction extends DockingAction {
private final ImageIcon ICON = ResourceManager.loadImage("images/zoom_out.png"); private static final Icon ICON = new GIcon("icon.widget.imagepanel.zoom.out");
private MemviewProvider provider; private MemviewProvider provider;

View file

@ -15,18 +15,18 @@
*/ */
package ghidra.app.plugin.core.debug.gui.memview.actions; package ghidra.app.plugin.core.debug.gui.memview.actions;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider; import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class ZoomOutTAction extends DockingAction { public class ZoomOutTAction extends DockingAction {
private final ImageIcon ICON = ResourceManager.loadImage("images/zoom_out.png"); private static final Icon ICON = new GIcon("icon.widget.imagepanel.zoom.out");
private MemviewProvider provider; private MemviewProvider provider;

View file

@ -19,10 +19,11 @@ import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.util.*; import java.util.*;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.action.KeyBindingData; import docking.action.KeyBindingData;
import docking.action.MenuData; import docking.action.MenuData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.app.services.GraphDisplayBroker; import ghidra.app.services.GraphDisplayBroker;
@ -33,13 +34,12 @@ import ghidra.util.Msg;
import ghidra.util.exception.CancelledException; import ghidra.util.exception.CancelledException;
import ghidra.util.exception.GraphException; import ghidra.util.exception.GraphException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class DisplayAsGraphAction extends DisplayAsAction { public class DisplayAsGraphAction extends DisplayAsAction {
protected GraphDisplayBroker graphBroker; protected GraphDisplayBroker graphBroker;
protected static ImageIcon ICON_GRAPH = ResourceManager.loadImage("images/breakpoints.png"); protected static final Icon ICON_GRAPH = new GIcon("icon.debugger.display.graph");
public DisplayAsGraphAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) { public DisplayAsGraphAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
super("DisplayGraph", tool, owner, provider); super("DisplayGraph", tool, owner, provider);

View file

@ -18,12 +18,13 @@ package ghidra.app.plugin.core.debug.gui.objects.actions;
import java.awt.event.InputEvent; import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import javax.swing.ImageIcon; import javax.swing.Icon;
import org.jdom.Element; import org.jdom.Element;
import docking.action.KeyBindingData; import docking.action.KeyBindingData;
import docking.action.MenuData; import docking.action.MenuData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.app.services.ConsoleService; import ghidra.app.services.ConsoleService;
@ -31,12 +32,11 @@ import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.Msg; import ghidra.util.Msg;
import ghidra.util.xml.XmlUtilities; import ghidra.util.xml.XmlUtilities;
import resources.ResourceManager;
public class DisplayAsXMLAction extends DisplayAsAction { public class DisplayAsXMLAction extends DisplayAsAction {
protected ConsoleService consoleService; protected ConsoleService consoleService;
protected ImageIcon ICON_XML = ResourceManager.loadImage("images/text-xml.png");; protected static final Icon ICON_XML = new GIcon("icon.debugger.display.xml");
public DisplayAsXMLAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) { public DisplayAsXMLAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
super("DisplayXml", tool, owner, provider); super("DisplayXml", tool, owner, provider);

View file

@ -20,10 +20,11 @@ import java.awt.event.KeyEvent;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.action.KeyBindingData; import docking.action.KeyBindingData;
import docking.action.MenuData; import docking.action.MenuData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.app.services.GraphDisplayBroker; import ghidra.app.services.GraphDisplayBroker;
@ -34,13 +35,12 @@ import ghidra.util.Msg;
import ghidra.util.exception.CancelledException; import ghidra.util.exception.CancelledException;
import ghidra.util.exception.GraphException; import ghidra.util.exception.GraphException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class DisplayFilteredGraphAction extends DisplayFilteredAction { public class DisplayFilteredGraphAction extends DisplayFilteredAction {
protected GraphDisplayBroker graphBroker; protected GraphDisplayBroker graphBroker;
protected static ImageIcon ICON_GRAPH = ResourceManager.loadImage("images/breakpoints.png"); protected static final Icon ICON_GRAPH = new GIcon("icon.debugger.display.xml.filtered");
public DisplayFilteredGraphAction(PluginTool tool, String owner, public DisplayFilteredGraphAction(PluginTool tool, String owner,
DebuggerObjectsProvider provider) { DebuggerObjectsProvider provider) {

View file

@ -19,13 +19,14 @@ import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.util.List; import java.util.List;
import javax.swing.ImageIcon; import javax.swing.Icon;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jdom.Element; import org.jdom.Element;
import docking.action.KeyBindingData; import docking.action.KeyBindingData;
import docking.action.MenuData; import docking.action.MenuData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.app.services.ConsoleService; import ghidra.app.services.ConsoleService;
@ -33,12 +34,11 @@ import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.Msg; import ghidra.util.Msg;
import ghidra.util.xml.XmlUtilities; import ghidra.util.xml.XmlUtilities;
import resources.ResourceManager;
public class DisplayFilteredXMLAction extends DisplayFilteredAction { public class DisplayFilteredXMLAction extends DisplayFilteredAction {
protected ConsoleService consoleService; protected ConsoleService consoleService;
protected ImageIcon ICON_XML = ResourceManager.loadImage("images/text-xml.png");; protected static final Icon ICON_XML = new GIcon("icon.debugger.display.xml.filtered");
public DisplayFilteredXMLAction(PluginTool tool, String owner, public DisplayFilteredXMLAction(PluginTool tool, String owner,
DebuggerObjectsProvider provider) { DebuggerObjectsProvider provider) {

View file

@ -21,17 +21,17 @@ import java.io.*;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.action.KeyBindingData; import docking.action.KeyBindingData;
import docking.action.MenuData; import docking.action.MenuData;
import docking.widgets.filechooser.GhidraFileChooserMode; import docking.widgets.filechooser.GhidraFileChooserMode;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.dbg.target.TargetObject; import ghidra.dbg.target.TargetObject;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class ExportAsFactsAction extends ImportExportAsAction { public class ExportAsFactsAction extends ImportExportAsAction {
@ -39,8 +39,8 @@ public class ExportAsFactsAction extends ImportExportAsAction {
public static String JOIN = "."; public static String JOIN = ".";
public static String SPLIT = "\\."; public static String SPLIT = "\\.";
public static String fileExt2 = ".facts"; public static String fileExt2 = ".facts";
protected ImageIcon ICON_FACTS = ResourceManager.loadImage("images/closedFolder.png"); protected static final Icon ICON_FACTS = new GIcon("icon.debugger.display.export.facts");
private Map<String, PrintWriter> files = new HashMap<String, PrintWriter>(); private Map<String, PrintWriter> files = new HashMap<>();
public ExportAsFactsAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) { public ExportAsFactsAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
super("ExportAsFacts", tool, owner, provider); super("ExportAsFacts", tool, owner, provider);

View file

@ -20,7 +20,7 @@ import java.awt.event.KeyEvent;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import javax.swing.ImageIcon; import javax.swing.Icon;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jdom.Document; import org.jdom.Document;
@ -29,16 +29,16 @@ import org.jdom.Element;
import docking.action.KeyBindingData; import docking.action.KeyBindingData;
import docking.action.MenuData; import docking.action.MenuData;
import docking.widgets.filechooser.GhidraFileChooserMode; import docking.widgets.filechooser.GhidraFileChooserMode;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.xml.XmlUtilities; import ghidra.util.xml.XmlUtilities;
import resources.ResourceManager;
public class ExportAsXMLAction extends ImportExportAsAction { public class ExportAsXMLAction extends ImportExportAsAction {
protected ImageIcon ICON_XML = ResourceManager.loadImage("images/text-xml.png"); protected static final Icon ICON_XML = new GIcon("icon.debugger.display.export.xml");
public ExportAsXMLAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) { public ExportAsXMLAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
super("ExportAsXML", tool, owner, provider); super("ExportAsXML", tool, owner, provider);

View file

@ -20,26 +20,26 @@ import java.awt.event.KeyEvent;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import javax.swing.ImageIcon; import javax.swing.Icon;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import docking.ActionContext; import docking.ActionContext;
import docking.action.KeyBindingData; import docking.action.KeyBindingData;
import docking.action.MenuData; import docking.action.MenuData;
import docking.widgets.filechooser.GhidraFileChooserMode; import docking.widgets.filechooser.GhidraFileChooserMode;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.app.plugin.core.debug.gui.objects.components.DummyTargetObject; import ghidra.app.plugin.core.debug.gui.objects.components.DummyTargetObject;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.Msg; import ghidra.util.Msg;
import resources.ResourceManager;
public class ImportFromFactsAction extends ImportExportAsAction { public class ImportFromFactsAction extends ImportExportAsAction {
protected ImageIcon ICON_FACTS = ResourceManager.loadImage("images/closedFolder.png"); protected static final Icon ICON_FACTS = new GIcon("icon.debugger.display.import.facts");
private Map<String, Map<String, String>> maps = private Map<String, Map<String, String>> maps =
new LinkedHashMap<String, Map<String, String>>(); new LinkedHashMap<>();
public ImportFromFactsAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) { public ImportFromFactsAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
super("ImportFromFacts", tool, owner, provider); super("ImportFromFacts", tool, owner, provider);
@ -75,7 +75,7 @@ public class ImportFromFactsAction extends ImportExportAsAction {
for (File f : dir.listFiles()) { for (File f : dir.listFiles()) {
BufferedReader reader = BufferedReader reader =
new BufferedReader(new InputStreamReader(new FileInputStream(f))); new BufferedReader(new InputStreamReader(new FileInputStream(f)));
Map<String, String> map = new LinkedHashMap<String, String>(); Map<String, String> map = new LinkedHashMap<>();
String name = f.getName(); String name = f.getName();
name = name.substring(0, name.indexOf(ExportAsFactsAction.fileExt2)); name = name.substring(0, name.indexOf(ExportAsFactsAction.fileExt2));
maps.put(name, map); maps.put(name, map);

View file

@ -21,7 +21,7 @@ import java.io.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.swing.ImageIcon; import javax.swing.Icon;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import org.jdom.Attribute; import org.jdom.Attribute;
@ -32,6 +32,7 @@ import docking.ActionContext;
import docking.action.KeyBindingData; import docking.action.KeyBindingData;
import docking.action.MenuData; import docking.action.MenuData;
import docking.widgets.filechooser.GhidraFileChooserMode; import docking.widgets.filechooser.GhidraFileChooserMode;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.app.plugin.core.debug.gui.objects.components.DummyTargetObject; import ghidra.app.plugin.core.debug.gui.objects.components.DummyTargetObject;
@ -40,11 +41,10 @@ import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.Msg; import ghidra.util.Msg;
import ghidra.util.xml.XmlUtilities; import ghidra.util.xml.XmlUtilities;
import resources.ResourceManager;
public class ImportFromXMLAction extends ImportExportAsAction { public class ImportFromXMLAction extends ImportExportAsAction {
protected ImageIcon ICON_XML = ResourceManager.loadImage("images/text-xml.png"); protected static final Icon ICON_XML = new GIcon("icon.debugger.display.import.xml");
public ImportFromXMLAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) { public ImportFromXMLAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
super("ImportFromXML", tool, owner, provider); super("ImportFromXML", tool, owner, provider);

View file

@ -21,13 +21,14 @@ import java.io.File;
import java.util.Map; import java.util.Map;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import javax.swing.ImageIcon; import javax.swing.Icon;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import docking.ActionContext; import docking.ActionContext;
import docking.action.KeyBindingData; import docking.action.KeyBindingData;
import docking.action.MenuData; import docking.action.MenuData;
import docking.widgets.filechooser.GhidraFileChooserMode; import docking.widgets.filechooser.GhidraFileChooserMode;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.async.AsyncUtils; import ghidra.async.AsyncUtils;
@ -38,11 +39,10 @@ import ghidra.dbg.target.TargetLauncher.TargetCmdLineLauncher;
import ghidra.dbg.target.TargetObject; import ghidra.dbg.target.TargetObject;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class OpenWinDbgTraceAction extends ImportExportAsAction { public class OpenWinDbgTraceAction extends ImportExportAsAction {
protected ImageIcon ICON_TRACE = ResourceManager.loadImage("images/text-xml.png"); protected static final Icon ICON_TRACE = new GIcon("icon.debugger.open.windbg.trace");
private ActionContext context; private ActionContext context;
public OpenWinDbgTraceAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) { public OpenWinDbgTraceAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
@ -66,23 +66,20 @@ public class OpenWinDbgTraceAction extends ImportExportAsAction {
if (f == null) { if (f == null) {
return; return;
} }
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(() -> {
@Override String[] args = new String[2];
public void run() { args[0] = ".opendump";
String[] args = new String[2]; args[1] = f.getAbsolutePath();
args[0] = ".opendump"; AtomicReference<TargetLauncher> launcher = new AtomicReference<>();
args[1] = f.getAbsolutePath(); AsyncUtils.sequence(TypeSpec.VOID).then(seq -> {
AtomicReference<TargetLauncher> launcher = new AtomicReference<>(); TargetObject obj = provider.getObjectFromContext(context);
AsyncUtils.sequence(TypeSpec.VOID).then(seq -> { DebugModelConventions.findSuitable(TargetLauncher.class, obj).handle(seq::next);
TargetObject obj = provider.getObjectFromContext(context); }, launcher).then(seq -> {
DebugModelConventions.findSuitable(TargetLauncher.class, obj).handle(seq::next); launcher.get()
}, launcher).then(seq -> { .launch(Map.of(TargetCmdLineLauncher.CMDLINE_ARGS_NAME, args))
launcher.get() .handle(seq::next);
.launch(Map.of(TargetCmdLineLauncher.CMDLINE_ARGS_NAME, args)) seq.exit();
.handle(seq::next); }).finish();
seq.exit();
}).finish();
}
}); });
} }

View file

@ -19,9 +19,9 @@ import java.util.*;
import java.util.concurrent.*; import java.util.concurrent.*;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.ImageIcon;
import docking.widgets.tree.*; import docking.widgets.tree.*;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.dbg.target.*; import ghidra.dbg.target.*;
@ -29,17 +29,14 @@ import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
import ghidra.util.Msg; import ghidra.util.Msg;
import ghidra.util.exception.CancelledException; import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class ObjectNode extends GTreeSlowLoadingNode { //extends GTreeNode public class ObjectNode extends GTreeSlowLoadingNode { //extends GTreeNode
static final ImageIcon ICON_POPULATED = static final Icon ICON_POPULATED = new GIcon("icon.debugger.node.object.populated");
ResourceManager.loadImage("images/object-populated.png"); static final Icon ICON_EMPTY = new GIcon("icon.debugger.node.object.empty");
static final ImageIcon ICON_EMPTY = ResourceManager.loadImage("images/object-unpopulated.png"); static final Icon ICON_RUNNING = new GIcon("icon.debugger.node.object.running");
static final ImageIcon ICON_RUNNING = ResourceManager.loadImage("images/object-running.png"); static final Icon ICON_TERMINATED = new GIcon("icon.debugger.node.object.terminated");
static final ImageIcon ICON_TERMINATED = static final Icon ICON_EVENT = new GIcon("icon.debugger.node.object.event");
ResourceManager.loadImage("images/object-terminated.png");
static final ImageIcon ICON_EVENT = ResourceManager.loadImage("images/register-marker.png");
private ObjectContainer container; private ObjectContainer container;
private String name; private String name;
@ -212,26 +209,20 @@ public class ObjectNode extends GTreeSlowLoadingNode { //extends GTreeNode
public void callUpdate() { public void callUpdate() {
// NB: this has to be in its own thread // NB: this has to be in its own thread
CompletableFuture.runAsync(new Runnable() { CompletableFuture.runAsync(() -> {
@Override List<GTreeNode> updateNodes = tree.update(container);
public void run() { if (isRestructured()) {
List<GTreeNode> updateNodes = tree.update(container); setChildren(updateNodes);
if (isRestructured()) {
setChildren(updateNodes);
}
} }
}); });
} }
public void callModified() { public void callModified() {
// NB: this has to be in its own thread // NB: this has to be in its own thread
CompletableFuture.runAsync(new Runnable() { CompletableFuture.runAsync(() -> {
@Override List<GTreeNode> updateNodes = tree.update(container);
public void run() { for (GTreeNode n : updateNodes) {
List<GTreeNode> updateNodes = tree.update(container); n.fireNodeChanged();
for (GTreeNode n : updateNodes) {
n.fireNodeChanged();
}
} }
}); });
} }

View file

@ -20,21 +20,19 @@ import java.awt.event.MouseEvent;
import java.util.*; import java.util.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import docking.widgets.table.AbstractSortedTableModel; import docking.widgets.table.AbstractSortedTableModel;
import docking.widgets.table.EnumeratedColumnTableModel; import docking.widgets.table.EnumeratedColumnTableModel;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.dbg.target.TargetObject; import ghidra.dbg.target.TargetObject;
import ghidra.util.Swing; import ghidra.util.Swing;
import ghidra.util.table.GhidraTable; import ghidra.util.table.GhidraTable;
import resources.ResourceManager;
public class ObjectTable<R> implements ObjectPane { public class ObjectTable<R> implements ObjectPane {
public static final ImageIcon ICON_TABLE = ResourceManager.loadImage("images/table.png"); public static final Icon ICON_TABLE = new GIcon("icon.debugger.table.object");
private ObjectContainer container; private ObjectContainer container;
private Class<R> clazz; private Class<R> clazz;
@ -50,15 +48,12 @@ public class ObjectTable<R> implements ObjectPane {
this.clazz = clazz; this.clazz = clazz;
this.model = model; this.model = model;
table.getSelectionModel().addListSelectionListener(new ListSelectionListener() { table.getSelectionModel().addListSelectionListener(e -> {
@Override if (e.getValueIsAdjusting()) {
public void valueChanged(ListSelectionEvent e) { return;
if (e.getValueIsAdjusting()) {
return;
}
DebuggerObjectsProvider provider = container.getProvider();
provider.getTool().contextChanged(provider);
} }
DebuggerObjectsProvider provider = container.getProvider();
provider.getTool().contextChanged(provider);
}); });
table.addMouseListener(new MouseAdapter() { table.addMouseListener(new MouseAdapter() {
@Override @Override

View file

@ -21,7 +21,7 @@ import java.awt.event.MouseEvent;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import javax.swing.ImageIcon; import javax.swing.Icon;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.event.TreeExpansionEvent; import javax.swing.event.TreeExpansionEvent;
import javax.swing.event.TreeExpansionListener; import javax.swing.event.TreeExpansionListener;
@ -33,6 +33,7 @@ import docking.widgets.tree.GTreeNode;
import docking.widgets.tree.support.GTreeSelectionEvent; import docking.widgets.tree.support.GTreeSelectionEvent;
import docking.widgets.tree.support.GTreeSelectionEvent.EventOrigin; import docking.widgets.tree.support.GTreeSelectionEvent.EventOrigin;
import docking.widgets.tree.support.GTreeSelectionListener; import docking.widgets.tree.support.GTreeSelectionListener;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider; import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer; import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.async.AsyncUtils; import ghidra.async.AsyncUtils;
@ -40,14 +41,13 @@ import ghidra.async.TypeSpec;
import ghidra.dbg.DebugModelConventions; import ghidra.dbg.DebugModelConventions;
import ghidra.dbg.target.TargetAccessConditioned; import ghidra.dbg.target.TargetAccessConditioned;
import ghidra.dbg.target.TargetObject; import ghidra.dbg.target.TargetObject;
import ghidra.util.*; import ghidra.util.Msg;
import ghidra.util.Swing;
import ghidra.util.task.SwingUpdateManager; import ghidra.util.task.SwingUpdateManager;
import resources.ResourceManager;
public class ObjectTree implements ObjectPane { public class ObjectTree implements ObjectPane {
public static final ImageIcon ICON_TREE = public static final Icon ICON_TREE = new GIcon("icon.debugger.tree.object");
ResourceManager.loadImage("images/object-unpopulated.png");
private ObjectNode root; private ObjectNode root;
private GTree tree; private GTree tree;
@ -118,16 +118,12 @@ public class ObjectTree implements ObjectPane {
} }
}); });
tree.setCellRenderer(new ObjectTreeCellRenderer(root.getProvider())); tree.setCellRenderer(new ObjectTreeCellRenderer(root.getProvider()));
tree.setDataTransformer(new FilterTransformer<GTreeNode>() { tree.setDataTransformer(t -> {
if (t instanceof ObjectNode) {
@Override ObjectNode node = (ObjectNode) t;
public List<String> transform(GTreeNode t) { return List.of(node.getContainer().getDecoratedName());
if (t instanceof ObjectNode) {
ObjectNode node = (ObjectNode) t;
return List.of(node.getContainer().getDecoratedName());
}
return null;
} }
return null;
}); });
tree.addTreeExpansionListener(new TreeExpansionListener() { tree.addTreeExpansionListener(new TreeExpansionListener() {
@ -329,7 +325,7 @@ public class ObjectTree implements ObjectPane {
} }
Set<ObjectContainer> currentChildren = container.getCurrentChildren(); Set<ObjectContainer> currentChildren = container.getCurrentChildren();
List<GTreeNode> childList = new ArrayList<GTreeNode>(); List<GTreeNode> childList = new ArrayList<>();
node.setRestructured(false); node.setRestructured(false);
for (ObjectContainer c : currentChildren) { for (ObjectContainer c : currentChildren) {

View file

@ -1002,7 +1002,6 @@ src/main/resources/images/cloudbar.jpg||GHIDRA||reviewed||END|
src/main/resources/images/cloudbarReversed.jpg||GHIDRA||reviewed||END| src/main/resources/images/cloudbarReversed.jpg||GHIDRA||reviewed||END|
src/main/resources/images/codeInView.gif||GHIDRA||||END| src/main/resources/images/codeInView.gif||GHIDRA||||END|
src/main/resources/images/codeNotInView.gif||GHIDRA||||END| src/main/resources/images/codeNotInView.gif||GHIDRA||||END|
src/main/resources/images/collapse.gif||GHIDRA||||END|
src/main/resources/images/conflictKeep.png||GHIDRA||||END| src/main/resources/images/conflictKeep.png||GHIDRA||||END|
src/main/resources/images/conflictRename.png||GHIDRA||||END| src/main/resources/images/conflictRename.png||GHIDRA||||END|
src/main/resources/images/conflictReplace.png||GHIDRA||||END| src/main/resources/images/conflictReplace.png||GHIDRA||||END|
@ -1033,7 +1032,6 @@ src/main/resources/images/emptyFragment.gif||GHIDRA||||END|
src/main/resources/images/emptyFragmentInView.gif||GHIDRA||||END| src/main/resources/images/emptyFragmentInView.gif||GHIDRA||||END|
src/main/resources/images/enum.png||GHIDRA||||END| src/main/resources/images/enum.png||GHIDRA||||END|
src/main/resources/images/erase16.png||GHIDRA||||END| src/main/resources/images/erase16.png||GHIDRA||||END|
src/main/resources/images/expand.gif||GHIDRA||||END|
src/main/resources/images/famfamfam_silk_icons_v013/application_cascade.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/famfamfam_silk_icons_v013/application_cascade.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/famfamfam_silk_icons_v013/application_get.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/famfamfam_silk_icons_v013/application_get.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/famfamfam_silk_icons_v013/application_key.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/famfamfam_silk_icons_v013/application_key.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
@ -1052,7 +1050,6 @@ src/main/resources/images/famfamfam_silk_icons_v013/cup.png||FAMFAMFAM Icons - C
src/main/resources/images/famfamfam_silk_icons_v013/database.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/famfamfam_silk_icons_v013/database.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/famfamfam_silk_icons_v013/door.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/famfamfam_silk_icons_v013/door.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/famfamfam_silk_icons_v013/door_open.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/famfamfam_silk_icons_v013/door_open.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/famfamfam_silk_icons_v013/drive.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/famfamfam_silk_icons_v013/folder_brick.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/famfamfam_silk_icons_v013/folder_brick.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/famfamfam_silk_icons_v013/folder_table.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/famfamfam_silk_icons_v013/folder_table.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/famfamfam_silk_icons_v013/html.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/famfamfam_silk_icons_v013/html.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
@ -1092,9 +1089,7 @@ src/main/resources/images/ledgreen.png||Nuvola Icons - LGPL 2.1|||Nuvola icon se
src/main/resources/images/ledred.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END| src/main/resources/images/ledred.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END|
src/main/resources/images/ledyellow.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END| src/main/resources/images/ledyellow.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END|
src/main/resources/images/link.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END| src/main/resources/images/link.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END|
src/main/resources/images/list-remove.png||Oxygen Icons - LGPL 3.0||||END|
src/main/resources/images/lock.gif||GHIDRA||||END| src/main/resources/images/lock.gif||GHIDRA||||END|
src/main/resources/images/lock.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/magnifier.png||FAMFAMFAM Icons - CC 2.5||||END| src/main/resources/images/magnifier.png||FAMFAMFAM Icons - CC 2.5||||END|
src/main/resources/images/media-flash.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/media-flash.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/media-playback-stop.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/media-playback-stop.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
@ -1136,7 +1131,6 @@ src/main/resources/images/oxygen/16x16/text-x-bibtex.png||Oxygen Icons - LGPL 3.
src/main/resources/images/oxygen/16x16/text-x-c++src.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/oxygen/16x16/text-x-c++src.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/oxygen/16x16/text-x-chdr.png||Oxygen Icons - LGPL 3.0||||END| src/main/resources/images/oxygen/16x16/text-x-chdr.png||Oxygen Icons - LGPL 3.0||||END|
src/main/resources/images/oxygen/16x16/text-x-csharp.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/oxygen/16x16/text-x-csharp.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/oxygen/16x16/text-x-csrc.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/oxygen/16x16/text-x-pascal.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/oxygen/16x16/text-x-pascal.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/oxygen/16x16/text-xml.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/oxygen/16x16/text-xml.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/oxygen/48x48/multimedia-player-apple-ipod.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/oxygen/48x48/multimedia-player-apple-ipod.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
@ -1150,8 +1144,6 @@ src/main/resources/images/pencil16.png||GHIDRA||||END|
src/main/resources/images/phone.png||Oxygen Icons - LGPL 3.0||||END| src/main/resources/images/phone.png||Oxygen Icons - LGPL 3.0||||END|
src/main/resources/images/pin.png||GHIDRA||||END| src/main/resources/images/pin.png||GHIDRA||||END|
src/main/resources/images/pinkX.gif||GHIDRA||||END| src/main/resources/images/pinkX.gif||GHIDRA||||END|
src/main/resources/images/plasma.png||Oxygen Icons - LGPL 3.0||||END|
src/main/resources/images/play.png||GHIDRA||||END|
src/main/resources/images/play_again.png||GHIDRA||||END| src/main/resources/images/play_again.png||GHIDRA||||END|
src/main/resources/images/preferences-system.png||Tango Icons - Public Domain|||tango|END| src/main/resources/images/preferences-system.png||Tango Icons - Public Domain|||tango|END|
src/main/resources/images/question_zero.png||GHIDRA||||END| src/main/resources/images/question_zero.png||GHIDRA||||END|
@ -1176,6 +1168,7 @@ src/main/resources/images/table_delete.png||FAMFAMFAM Icons - CC 2.5|||famfamfam
src/main/resources/images/table_go.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/table_go.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/table_row_delete.png||FAMFAMFAM Icons - CC 2.5|||silk|END| src/main/resources/images/table_row_delete.png||FAMFAMFAM Icons - CC 2.5|||silk|END|
src/main/resources/images/tag_yellow.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/tag_yellow.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/text-x-csrc.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/text_list_bullets.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/text_list_bullets.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/text_lowercase.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/text_lowercase.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/textfield.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/textfield.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
@ -1200,9 +1193,6 @@ src/main/resources/images/wizard.png||Nuvola Icons - LGPL 2.1|||nuvola|END|
src/main/resources/images/x-office-document-template.png||Tango Icons - Public Domain|||tango icon set|END| src/main/resources/images/x-office-document-template.png||Tango Icons - Public Domain|||tango icon set|END|
src/main/resources/images/x.gif||GHIDRA||||END| src/main/resources/images/x.gif||GHIDRA||||END|
src/main/resources/images/xor.png||GHIDRA||||END| src/main/resources/images/xor.png||GHIDRA||||END|
src/main/resources/images/zoom.png||FAMFAMFAM Icons - CC 2.5|||silk|END|
src/main/resources/images/zoom_in.png||FAMFAMFAM Icons - CC 2.5|||silk|END|
src/main/resources/images/zoom_out.png||FAMFAMFAM Icons - CC 2.5|||silk|END|
src/main/resources/pcodetest/chunk1.hinc||GHIDRA||||END| src/main/resources/pcodetest/chunk1.hinc||GHIDRA||||END|
src/main/resources/pcodetest/chunk2.hinc||GHIDRA||||END| src/main/resources/pcodetest/chunk2.hinc||GHIDRA||||END|
src/main/resources/pcodetest/chunk3.hinc||GHIDRA||||END| src/main/resources/pcodetest/chunk3.hinc||GHIDRA||||END|

View file

@ -9,6 +9,7 @@ icon.base.hover.off = hoverOff.gif
icon.base.hover.on = hoverOn.gif icon.base.hover.on = hoverOn.gif
icon.base.lock = lock.gif icon.base.lock = lock.gif
icon.base.unlock = unlock.gif icon.base.unlock = unlock.gif
icon.base.source.c = text-x-csrc.png
icon.base.search.marker = searchm_obj.gif icon.base.search.marker = searchm_obj.gif
@ -107,7 +108,7 @@ icon.plugin.enum.editor.apply = icon.save
icon.plugin.enum.editor.delete = icon.base.delete icon.plugin.enum.editor.delete = icon.base.delete
icon.plugin.enum.editor.home = icon.home icon.plugin.enum.editor.home = icon.home
icon.plugin.console.provider = monitor.png icon.plugin.console.provider = icon.console
icon.plugin.console.clear = icon.clear icon.plugin.console.clear = icon.clear
icon.plugin.console.scroll.lock = lock.png icon.plugin.console.scroll.lock = lock.png
@ -178,7 +179,7 @@ icon.plugin.instructiontable.manual.entry = icon.base.edit.bytes
icon.plugin.instructiontable.binary = binaryData.gif icon.plugin.instructiontable.binary = binaryData.gif
icon.plugin.instructiontable.hex = hexData.png icon.plugin.instructiontable.hex = hexData.png
icon.plugin.interpreter.provider = monitor.png icon.plugin.interpreter.provider = icon.console
icon.plugin.locationreferences.highlight = tag_yellow.png icon.plugin.locationreferences.highlight = tag_yellow.png
@ -260,8 +261,8 @@ icon.plugin.register.provider = icon.plugin.register.group
icon.plugin.scalartable.provider = dataW.gif icon.plugin.scalartable.provider = dataW.gif
icon.plugin.scriptmanager.provider = play.png icon.plugin.scriptmanager.provider = icon.run
icon.plugin.scriptmanager.run = play.png icon.plugin.scriptmanager.run = icon.run
icon.plugin.scriptmanager.run.again = play_again.png icon.plugin.scriptmanager.run.again = play_again.png
icon.plugin.scriptmanager.edit = accessories-text-editor.png icon.plugin.scriptmanager.edit = accessories-text-editor.png
icon.plugin.scriptmanager.edit.eclipse = eclipse.png icon.plugin.scriptmanager.edit.eclipse = eclipse.png
@ -275,7 +276,7 @@ icon.plugin.scriptmanager.api = red-cross.png
icon.plugin.stringtable.provider = kmessedwords.png icon.plugin.stringtable.provider = kmessedwords.png
icon.plugin.stringtable.defined = font.png icon.plugin.stringtable.defined = font.png
icon.plugin.stringtable.defined.partial = dialog-warning.png icon.plugin.stringtable.defined.partial = dialog-warning.png
icon.plugin.stringtable.undefined = magnifier.png icon.plugin.stringtable.undefined = icon.search
icon.plugin.stringtable.words = view-filter.png icon.plugin.stringtable.words = view-filter.png
icon.plugin.stringtable.conflicts = dialog-warning_red.png icon.plugin.stringtable.conflicts = dialog-warning_red.png
@ -317,7 +318,7 @@ icon.plugin.symboltable.instructions.from = I.gif
icon.plugin.symboltable.data.from = D.gif icon.plugin.symboltable.data.from = D.gif
icon.plugin.symboltable.referencetable.provider = table_go.png icon.plugin.symboltable.referencetable.provider = table_go.png
icon.plugin.table.service = magnifier.png icon.plugin.table.service = icon.search
icon.plugin.table.service.marker = icon.base.search.marker icon.plugin.table.service.marker = icon.base.search.marker
icon.plugin.table.delete.row = table_delete.png icon.plugin.table.delete.row = table_delete.png
@ -326,7 +327,7 @@ icon.plugin.totd.provider = help-hint.png
icon.plugin.viewstrings.provider = dataW.gif icon.plugin.viewstrings.provider = dataW.gif
icon.plugin.debug.dbviewer.provider = zoom.png icon.plugin.debug.dbviewer.provider = zoom.png
icon.plugin.debug.domaineventviewer.provider = monitor.png icon.plugin.debug.domaineventviewer.provider = icon.console
icon.plugin.debug.propertymanager.provider = document-properties.png icon.plugin.debug.propertymanager.provider = document-properties.png
icon.plugin.debug.propertymanager.marker = searchm_pink.gif icon.plugin.debug.propertymanager.marker = searchm_pink.gif

View file

@ -2,7 +2,7 @@
<!-- Only single level file exts supported right now --> <!-- Only single level file exts supported right now -->
<file_extension extension="" icon="images/famfamfam_silk_icons_v013/page_white.png" /> <file_extension extension="" icon="images/famfamfam_silk_icons_v013/page_white.png" />
<file_extension extension=".apk" icon="images/famfamfam_silk_icons_v013/package.png" /> <file_extension extension=".apk" icon="images/famfamfam_silk_icons_v013/package.png" />
<file_extension extension=".c" icon="images/oxygen/16x16/text-x-csrc.png" /> <file_extension extension=".c" icon="images/text-x-csrc.png" />
<file_extension extension=".cpp" icon="images/oxygen/16x16/text-x-c++src.png" /> <file_extension extension=".cpp" icon="images/oxygen/16x16/text-x-c++src.png" />
<file_extension extension=".class" icon="images/famfamfam_silk_icons_v013/cup.png" /> <file_extension extension=".class" icon="images/famfamfam_silk_icons_v013/cup.png" />
<file_extension extension=".cs" icon="images/oxygen/16x16/text-x-csharp.png" /> <file_extension extension=".cs" icon="images/oxygen/16x16/text-x-csharp.png" />

View file

@ -28,11 +28,12 @@ import javax.swing.table.AbstractTableModel;
import org.jdom.Element; import org.jdom.Element;
import docking.DropDownMenuIcon;
import docking.widgets.checkbox.GCheckBox; import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel; import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel; import docking.widgets.label.GLabel;
import generic.theme.GIcon; import generic.theme.GColor;
import generic.theme.GThemeDefaults.Colors; import generic.theme.GThemeDefaults.Colors;
import generic.theme.GThemeDefaults.Colors.Java; import generic.theme.GThemeDefaults.Colors.Java;
import ghidra.app.util.AddressInput; import ghidra.app.util.AddressInput;
@ -47,7 +48,8 @@ import ghidra.util.layout.PairLayout;
class EditMemoryReferencePanel extends EditReferencePanel { class EditMemoryReferencePanel extends EditReferencePanel {
private static final Icon PULLDOWN_ICON = new GIcon("icon.pulldown"); private static final Color BUTTON_COLOR = new GColor("color.fg.button");
private static final Icon MENU_ICON = new DropDownMenuIcon(16, 4, 4, BUTTON_COLOR);
private static final RefType[] MEM_REF_TYPES = RefTypeFactory.getMemoryRefTypes(); private static final RefType[] MEM_REF_TYPES = RefTypeFactory.getMemoryRefTypes();
@ -102,7 +104,7 @@ class EditMemoryReferencePanel extends EditReferencePanel {
toAddressField = new AddressInput(); toAddressField = new AddressInput();
addrHistoryButton = new JButton(PULLDOWN_ICON); addrHistoryButton = new JButton(MENU_ICON);
addrHistoryButton.addMouseListener(new MouseAdapter() { addrHistoryButton.addMouseListener(new MouseAdapter() {
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {

View file

@ -1,6 +1,5 @@
/* ### /* ###
* IP: GHIDRA * IP: GHIDRA
* REVIEWED: YES
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -16,16 +15,15 @@
*/ */
package ghidra.app.util.viewer.field; package ghidra.app.util.viewer.field;
import ghidra.app.util.viewer.format.FieldFormatModel;
import ghidra.app.util.viewer.proxy.EmptyProxy;
import ghidra.app.util.viewer.proxy.ProxyObj;
import java.awt.FontMetrics; import java.awt.FontMetrics;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.widgets.fieldpanel.field.SimpleImageField; import docking.widgets.fieldpanel.field.SimpleImageField;
import docking.widgets.fieldpanel.support.FieldLocation; import docking.widgets.fieldpanel.support.FieldLocation;
import ghidra.app.util.viewer.format.FieldFormatModel;
import ghidra.app.util.viewer.proxy.EmptyProxy;
import ghidra.app.util.viewer.proxy.ProxyObj;
/** /**
* Class for displaying images in fields. * Class for displaying images in fields.
@ -33,77 +31,69 @@ import docking.widgets.fieldpanel.support.FieldLocation;
public class ImageFactoryField extends SimpleImageField implements ListingField { public class ImageFactoryField extends SimpleImageField implements ListingField {
private FieldFactory factory; private FieldFactory factory;
private ProxyObj proxy; private ProxyObj<?> proxy;
/** /**
* Constructor * Constructor
* @param factory the FieldFactory that generated this field. * @param factory the FieldFactory that generated this field.
* @param icon the ImageIcon to display. * @param icon the ImageIcon to display.
* @param proxy the object that this field represents. * @param proxy the object that this field represents.
* @param metrics the FontMetrics used to render. * @param metrics the FontMetrics used to render.
* @param x the starting x position for this field. * @param x the starting x position for this field.
* @param width the width of this field. * @param width the width of this field.
*/ */
public ImageFactoryField(FieldFactory factory, public ImageFactoryField(FieldFactory factory,
ImageIcon icon, Icon icon,
ProxyObj proxy, ProxyObj<?> proxy,
FontMetrics metrics, FontMetrics metrics,
int x, int x,
int width) { int width) {
this(factory, icon, proxy, metrics, x, width, false); this(factory, icon, proxy, metrics, x, width, false);
} }
/** /**
* Constructor * Constructor
* @param factory the FieldFactory that generated this field. * @param factory the FieldFactory that generated this field.
* @param icon the ImageIcon to display. * @param icon the ImageIcon to display.
* @param proxy the object that this field represents. * @param proxy the object that this field represents.
* @param metrics the FontMetrics used to render. * @param metrics the FontMetrics used to render.
* @param x the starting x position for this field. * @param x the starting x position for this field.
* @param width the width of this field. * @param width the width of this field.
* @param center centers the image if true. * @param center centers the image if true.
*/ */
public ImageFactoryField(FieldFactory factory, public ImageFactoryField(FieldFactory factory,
ImageIcon icon, Icon icon,
ProxyObj proxy, ProxyObj<?> proxy,
FontMetrics metrics, FontMetrics metrics,
int x, int x,
int width, int width,
boolean center) { boolean center) {
super(icon, metrics, x, 0, width, center); super(icon, metrics, x, 0, width, center);
this.factory = factory; this.factory = factory;
this.proxy = proxy; this.proxy = proxy;
} }
/** @Override
* Returns the FieldFactory that generated this Field.
*/
public FieldFactory getFieldFactory() { public FieldFactory getFieldFactory() {
return factory; return factory;
} }
/** @Override
* Returns the model that contains the FieldFactory that generated this Field.
*/
public FieldFormatModel getFieldModel() { public FieldFormatModel getFieldModel() {
return factory.getFieldModel(); return factory.getFieldModel();
} }
/** @Override
* Returns the object that this field is associated with. public ProxyObj<?> getProxy() {
*/
public ProxyObj getProxy() {
if (proxy == null) { if (proxy == null) {
return EmptyProxy.EMPTY_PROXY; return EmptyProxy.EMPTY_PROXY;
} }
return proxy; return proxy;
} }
/** @Override
* @see ListingField#getClickedObject(FieldLocation) public Object getClickedObject(FieldLocation fieldLocation) {
*/ return this;
public Object getClickedObject( FieldLocation fieldLocation ) { }
return this;
}
} }

View file

@ -63,7 +63,6 @@ import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
import help.Help; import help.Help;
import help.HelpService; import help.HelpService;
import resources.ResourceManager;
/** /**
* Panel that displays two listings for comparison. * Panel that displays two listings for comparison.
@ -98,8 +97,8 @@ public class ListingCodeComparisonPanel
private static final Icon CURSOR_LOC_ICON = new GIcon("icon.base.util.listingcompare.cursor"); private static final Icon CURSOR_LOC_ICON = new GIcon("icon.base.util.listingcompare.cursor");
//@formatter:on //@formatter:on
private static final Icon HOVER_ON_ICON = new GIcon("icon.base.util.listingcompare.hover.off"); private static final Icon HOVER_ON_ICON = new GIcon("icon.base.util.listingcompare.hover.on");
private static final Icon HOVER_OFF_ICON = ResourceManager.loadImage("images/hoverOff.gif"); private static final Icon HOVER_OFF_ICON = new GIcon("icon.base.util.listingcompare.hover.off");
private static final String ALL_AREA_MARKERS = "All Area Markers"; private static final String ALL_AREA_MARKERS = "All Area Markers";
private static final String UNMATCHED_AREA_MARKERS = "Unmatched Area Markers"; private static final String UNMATCHED_AREA_MARKERS = "Unmatched Area Markers";

View file

@ -1,6 +1,7 @@
##VERSION: 2.0 ##VERSION: 2.0
##MODULE IP: Oxygen Icons - LGPL 3.0 ##MODULE IP: Oxygen Icons - LGPL 3.0
Module.manifest||GHIDRA||reviewed||END| Module.manifest||GHIDRA||reviewed||END|
data/bytepatterns.theme.properties||GHIDRA||||END|
data/test/FileBitPatternInfoReaderTestFile1.xml||GHIDRA||||END| data/test/FileBitPatternInfoReaderTestFile1.xml||GHIDRA||||END|
data/test/FileBitPatternInfoReaderTestFile2.xml||GHIDRA||||END| data/test/FileBitPatternInfoReaderTestFile2.xml||GHIDRA||||END|
ghidra_scripts/DumpFunctionPatternInfoScript.properties||GHIDRA||||END| ghidra_scripts/DumpFunctionPatternInfoScript.properties||GHIDRA||||END|

View file

@ -0,0 +1,17 @@
[Defaults]
icon.bytepatterns.send.to.clipboard = 2rightarrow.png
icon.bytepatterns.byte.sequence.analyzer.clipboard.merged = smallRightArrow.png
icon.bytepatterns.byte.sequence.analyzer.merge = xor.png
icon.bytepatterns.closed.pattern = 2rightarrow.png
icon.bytepatterns.pattern.mining.analyzer = magnifier.png
icon.bytepatterns.function.bit.patterns.disabled = ledred.png
icon.bytepatterns.function.bit.patterns.enabled = ledgreen.png
[Dark Defaults]

View file

@ -26,11 +26,11 @@ import docking.action.DockingAction;
import docking.action.MenuData; import docking.action.MenuData;
import docking.widgets.table.GFilterTable; import docking.widgets.table.GFilterTable;
import generic.theme.GColor; import generic.theme.GColor;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors; import generic.theme.GThemeDefaults.Colors;
import ghidra.bitpatterns.info.*; import ghidra.bitpatterns.info.*;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.bytesearch.DittedBitSequence; import ghidra.util.bytesearch.DittedBitSequence;
import resources.ResourceManager;
/** /**
* This is a base class for providers which allow the user to analyze sequences of bytes. * This is a base class for providers which allow the user to analyze sequences of bytes.
@ -158,7 +158,7 @@ public abstract class ByteSequenceAnalyzerProvider extends DialogComponentProvid
} }
}; };
ImageIcon icon = ResourceManager.loadImage("images/2rightarrow.png"); Icon icon = new GIcon("icon.bytepatterns.send.to.clipboard");
sendSelectedToClipboardAction.setPopupMenuData( sendSelectedToClipboardAction.setPopupMenuData(
new MenuData(new String[] { "Send Selected to Clipboard" }, icon)); new MenuData(new String[] { "Send Selected to Clipboard" }, icon));
sendSelectedToClipboardAction.setDescription( sendSelectedToClipboardAction.setDescription(
@ -196,7 +196,7 @@ public abstract class ByteSequenceAnalyzerProvider extends DialogComponentProvid
} }
}; };
ImageIcon icon = ResourceManager.loadImage("images/xor.png"); Icon icon = new GIcon("icon.bytepatterns.byte.sequence.analyzer.merge");
mergeAction.setPopupMenuData(new MenuData(new String[] { "Merge Selected Rows" }, icon)); mergeAction.setPopupMenuData(new MenuData(new String[] { "Merge Selected Rows" }, icon));
mergeAction.setDescription("Merges the currently selected rows"); mergeAction.setDescription("Merges the currently selected rows");
mergeAction.setHelpLocation( mergeAction.setHelpLocation(
@ -234,7 +234,7 @@ public abstract class ByteSequenceAnalyzerProvider extends DialogComponentProvid
} }
}; };
ImageIcon icon = ResourceManager.loadImage("images/smallRightArrow.png"); Icon icon = new GIcon("icon.bytepatterns.byte.sequence.analyzer.clipboard.merged");
sendMergedToClipboardAction.setPopupMenuData( sendMergedToClipboardAction.setPopupMenuData(
new MenuData(new String[] { "Send Merged to Clipboard" }, icon)); new MenuData(new String[] { "Send Merged to Clipboard" }, icon));
sendMergedToClipboardAction.setDescription("Sends the Merge Patterns to the Clipboard"); sendMergedToClipboardAction.setDescription("Sends the Merge Patterns to the Clipboard");
@ -248,7 +248,7 @@ public abstract class ByteSequenceAnalyzerProvider extends DialogComponentProvid
* Creates the table to byte sequences to analyze * Creates the table to byte sequences to analyze
* @param FBPplugin plugin * @param FBPplugin plugin
* @param rows row objects containing sequences to analyze * @param rows row objects containing sequences to analyze
* @return * @return the model
*/ */
abstract ByteSequenceTableModel createByteSequenceTable( abstract ByteSequenceTableModel createByteSequenceTable(
FunctionBitPatternsExplorerPlugin FBPplugin, List<ByteSequenceRowObject> rows); FunctionBitPatternsExplorerPlugin FBPplugin, List<ByteSequenceRowObject> rows);

View file

@ -19,18 +19,18 @@ import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.util.List; import java.util.List;
import javax.swing.ImageIcon; import javax.swing.Icon;
import javax.swing.JPanel; import javax.swing.JPanel;
import docking.*; import docking.*;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.MenuData; import docking.action.MenuData;
import docking.widgets.table.threaded.GThreadedTablePanel; import docking.widgets.table.threaded.GThreadedTablePanel;
import generic.theme.GIcon;
import ghidra.bitpatterns.info.ContextRegisterFilter; import ghidra.bitpatterns.info.ContextRegisterFilter;
import ghidra.bitpatterns.info.PatternType; import ghidra.bitpatterns.info.PatternType;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.bytesearch.DittedBitSequence; import ghidra.util.bytesearch.DittedBitSequence;
import resources.ResourceManager;
/** /**
* This provider is used to display tables containing patterns found by * This provider is used to display tables containing patterns found by
@ -114,7 +114,7 @@ public class ClosedPatternTableDialog extends DialogComponentProvider {
} }
}; };
ImageIcon icon = ResourceManager.loadImage("images/2rightarrow.png"); Icon icon = new GIcon("icon.bytepatterns.send.to.clipboard");
sendToClipboardAction.setPopupMenuData( sendToClipboardAction.setPopupMenuData(
new MenuData(new String[] { "Send Selected Sequences to Clipboard" }, icon)); new MenuData(new String[] { "Send Selected Sequences to Clipboard" }, icon));
sendToClipboardAction.setDescription( sendToClipboardAction.setDescription(

View file

@ -18,15 +18,15 @@ package ghidra.bitpatterns.gui;
import java.awt.Component; import java.awt.Component;
import java.util.List; import java.util.List;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.MenuData; import docking.action.MenuData;
import generic.theme.GIcon;
import ghidra.bitpatterns.info.*; import ghidra.bitpatterns.info.*;
import ghidra.closedpatternmining.SequenceMiningParams; import ghidra.closedpatternmining.SequenceMiningParams;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager;
/** /**
* *
@ -100,7 +100,7 @@ public class PatternMiningAnalyzerProvider extends ByteSequenceAnalyzerProvider
} }
}; };
ImageIcon icon = ResourceManager.loadImage("images/magnifier.png"); Icon icon = new GIcon("icon.bytepatterns.pattern.mining.analyzer");
mineClosedPatternsAction.setPopupMenuData( mineClosedPatternsAction.setPopupMenuData(
new MenuData(new String[] { "Mine Sequential Patterns" }, icon)); new MenuData(new String[] { "Mine Sequential Patterns" }, icon));
mineClosedPatternsAction.setDescription("Mine Sequential Patterns"); mineClosedPatternsAction.setDescription("Mine Sequential Patterns");

View file

@ -20,8 +20,7 @@ import java.util.*;
import javax.swing.Icon; import javax.swing.Icon;
import docking.widgets.tree.GTreeNode; import docking.widgets.tree.GTreeNode;
import docking.widgets.tree.GTreeNode; import generic.theme.GIcon;
import resources.ResourceManager;
/** /**
* *
@ -30,9 +29,11 @@ import resources.ResourceManager;
*/ */
public class FunctionBitPatternsGTreeNode extends GTreeNode { public class FunctionBitPatternsGTreeNode extends GTreeNode {
private static final Icon DISABLED_ICON = ResourceManager.loadImage("images/ledred.png"); private static final Icon DISABLED_ICON =
new GIcon("icon.bytepatterns.function.bit.patterns.disabled");
private static final Icon ENABLED_ICON = ResourceManager.loadImage("images/ledgreen.png"); private static final Icon ENABLED_ICON =
new GIcon("icon.bytepatterns.function.bit.patterns.enabled");
private String name; private String name;
private String instruction; private String instruction;

View file

@ -9,6 +9,8 @@ color.cursor.focused.byteviewer.current = color.cursor.focused
color.cursor.focused.byteviewer.noncurrent = black color.cursor.focused.byteviewer.noncurrent = black
color.cursor.unfocused.byteviewer = color.cursor.unfocused color.cursor.unfocused.byteviewer = color.cursor.unfocused
icon.plugin.byteviewer.provider = binaryData.gif
icon.plugin.byteviewer.options = wrench.png
[Dark Defaults] [Dark Defaults]

View file

@ -26,6 +26,7 @@ import javax.swing.JComponent;
import docking.action.ToggleDockingAction; import docking.action.ToggleDockingAction;
import generic.theme.GColor; import generic.theme.GColor;
import generic.theme.GIcon;
import ghidra.GhidraOptions; import ghidra.GhidraOptions;
import ghidra.GhidraOptions.CURSOR_MOUSE_BUTTON_NAMES; import ghidra.GhidraOptions.CURSOR_MOUSE_BUTTON_NAMES;
import ghidra.app.plugin.core.format.*; import ghidra.app.plugin.core.format.*;
@ -37,7 +38,6 @@ import ghidra.framework.plugintool.PluginTool;
import ghidra.util.*; import ghidra.util.*;
import ghidra.util.classfinder.ClassSearcher; import ghidra.util.classfinder.ClassSearcher;
import ghidra.util.task.SwingUpdateManager; import ghidra.util.task.SwingUpdateManager;
import resources.ResourceManager;
public abstract class ByteViewerComponentProvider extends ComponentProviderAdapter public abstract class ByteViewerComponentProvider extends ComponentProviderAdapter
implements OptionsChangeListener { implements OptionsChangeListener {
@ -116,7 +116,7 @@ public abstract class ByteViewerComponentProvider extends ComponentProviderAdapt
panel = newByteViewerPanel(); panel = newByteViewerPanel();
bytesPerLine = DEFAULT_BYTES_PER_LINE; bytesPerLine = DEFAULT_BYTES_PER_LINE;
setIcon(ResourceManager.loadImage("images/binaryData.gif")); setIcon(new GIcon("icon.plugin.byteviewer.provider"));
setOptions(); setOptions();
createActions(); createActions();

View file

@ -15,17 +15,17 @@
*/ */
package ghidra.app.plugin.core.byteviewer; package ghidra.app.plugin.core.byteviewer;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.framework.plugintool.Plugin; import ghidra.framework.plugintool.Plugin;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import resources.ResourceManager;
class OptionsAction extends DockingAction { class OptionsAction extends DockingAction {
public static final ImageIcon OPTIONS_ICON = ResourceManager.loadImage("images/wrench.png"); public static final Icon OPTIONS_ICON = new GIcon("icon.plugin.byteviewer.options");
private final ByteViewerComponentProvider provider; private final ByteViewerComponentProvider provider;

View file

@ -25,6 +25,7 @@ import javax.swing.*;
import docking.ActionContext; import docking.ActionContext;
import docking.action.*; import docking.action.*;
import docking.widgets.fieldpanel.support.ViewerPosition; import docking.widgets.fieldpanel.support.ViewerPosition;
import generic.theme.GIcon;
import ghidra.app.events.*; import ghidra.app.events.*;
import ghidra.app.nav.*; import ghidra.app.nav.*;
import ghidra.app.plugin.core.format.*; import ghidra.app.plugin.core.format.*;
@ -43,7 +44,6 @@ import ghidra.util.HelpLocation;
import ghidra.util.classfinder.ClassSearcher; import ghidra.util.classfinder.ClassSearcher;
import ghidra.util.datastruct.WeakDataStructureFactory; import ghidra.util.datastruct.WeakDataStructureFactory;
import ghidra.util.datastruct.WeakSet; import ghidra.util.datastruct.WeakSet;
import resources.ResourceManager;
public class ProgramByteViewerComponentProvider extends ByteViewerComponentProvider public class ProgramByteViewerComponentProvider extends ByteViewerComponentProvider
implements DomainObjectListener, Navigatable { implements DomainObjectListener, Navigatable {
@ -77,7 +77,7 @@ public class ProgramByteViewerComponentProvider extends ByteViewerComponentProvi
AbstractByteViewerPlugin<?> plugin, String name, boolean isConnected) { AbstractByteViewerPlugin<?> plugin, String name, boolean isConnected) {
super(tool, plugin, name, ByteViewerActionContext.class); super(tool, plugin, name, ByteViewerActionContext.class);
this.isConnected = isConnected; this.isConnected = isConnected;
setIcon(ResourceManager.loadImage("images/binaryData.gif")); setIcon(new GIcon("icon.plugin.byteviewer.provider"));
if (!isConnected) { if (!isConnected) {
setTransient(); setTransient();
} }
@ -742,7 +742,7 @@ public class ProgramByteViewerComponentProvider extends ByteViewerComponentProvi
public CloneByteViewerAction() { public CloneByteViewerAction() {
super("ByteViewer Clone", plugin.getName()); super("ByteViewer Clone", plugin.getName());
ImageIcon image = ResourceManager.loadImage("images/camera-photo.png"); Icon image = new GIcon("icon.provider.clone");
setToolBarData(new ToolBarData(image, "ZZZ")); setToolBarData(new ToolBarData(image, "ZZZ"));
setDescription("Create a snapshot (disconnected) copy of this Bytes window "); setDescription("Create a snapshot (disconnected) copy of this Bytes window ");

View file

@ -20,8 +20,8 @@ import java.awt.event.KeyEvent;
import docking.ActionContext; import docking.ActionContext;
import docking.action.*; import docking.action.*;
import generic.theme.GIcon;
import ghidra.framework.plugintool.Plugin; import ghidra.framework.plugintool.Plugin;
import resources.ResourceManager;
class ToggleEditAction extends ToggleDockingAction { class ToggleEditAction extends ToggleDockingAction {
private final ByteViewerComponentProvider provider; private final ByteViewerComponentProvider provider;
@ -29,8 +29,7 @@ class ToggleEditAction extends ToggleDockingAction {
public ToggleEditAction(ByteViewerComponentProvider provider, Plugin plugin) { public ToggleEditAction(ByteViewerComponentProvider provider, Plugin plugin) {
super("Enable/Disable Byteviewer Editing", plugin.getName()); super("Enable/Disable Byteviewer Editing", plugin.getName());
this.provider = provider; this.provider = provider;
setToolBarData(new ToolBarData( setToolBarData(new ToolBarData(new GIcon("icon.base.edit.bytes"), "Byteviewer"));
ResourceManager.loadImage("images/editbytes.gif"), "Byteviewer"));
setKeyBindingData(new KeyBindingData( setKeyBindingData(new KeyBindingData(
KeyEvent.VK_E, InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK)); KeyEvent.VK_E, InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK));

View file

@ -64,9 +64,8 @@ public class SaveToolConfigDialogTest extends AbstractGhidraHeadedIntegrationTes
private TestEnv env; private TestEnv env;
private SaveToolConfigDialog saveDialog; private SaveToolConfigDialog saveDialog;
private JTextField toolNameField; private JTextField toolNameField;
private JList iconList; private JList<?> iconList;
private JTextField iconNameField; private JTextField iconNameField;
private PluginTool newtool;
public SaveToolConfigDialogTest() { public SaveToolConfigDialogTest() {
super(); super();
@ -161,11 +160,13 @@ public class SaveToolConfigDialogTest extends AbstractGhidraHeadedIntegrationTes
ToolTemplate template = tc.getToolTemplate("MyTestTool"); ToolTemplate template = tc.getToolTemplate("MyTestTool");
tc.remove("MyTestTool"); tc.remove("MyTestTool");
ImageIcon icon = ResourceManager.getScaledIcon( Icon icon = ResourceManager.getScaledIcon(
ResourceManager.loadImage("defaultTools/images/Caution.png"), ResourceManager.loadIcon("defaultTools/images/Caution.png"),
ToolIconURL.LARGE_ICON_SIZE, ToolIconURL.LARGE_ICON_SIZE); ToolIconURL.LARGE_ICON_SIZE, ToolIconURL.LARGE_ICON_SIZE);
assertEquals(icon.getDescription(), template.getIcon().getDescription()); String expected = ResourceManager.getIconName(icon);
String actual = ResourceManager.getIconName(template.getIcon());
assertEquals(expected, actual);
} }
@Test @Test
@ -323,7 +324,7 @@ public class SaveToolConfigDialogTest extends AbstractGhidraHeadedIntegrationTes
assertNotNull(saveDialog); assertNotNull(saveDialog);
toolNameField = (JTextField) findComponentByName(saveDialog, "ToolName"); toolNameField = (JTextField) findComponentByName(saveDialog, "ToolName");
iconList = (JList) findComponentByName(saveDialog, "IconList"); iconList = (JList<?>) findComponentByName(saveDialog, "IconList");
iconNameField = (JTextField) findComponentByName(saveDialog, "IconName"); iconNameField = (JTextField) findComponentByName(saveDialog, "IconName");
} }

View file

@ -35,7 +35,7 @@ color.bg.decompiler.pcode.dfg.edge.within.block = black
color.bg.decompiler.pcode.dfg.edge.between.blocks = red color.bg.decompiler.pcode.dfg.edge.between.blocks = red
icon.decompiler.action.provider = icon.provider.clone icon.decompiler.action.provider = decompileFunction.gif
icon.decompiler.action.provider.clone = icon.provider.clone icon.decompiler.action.provider.clone = icon.provider.clone
icon.decompiler.action.export = page_edit.png icon.decompiler.action.export = page_edit.png

View file

@ -41,6 +41,7 @@ import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel; import docking.widgets.label.GLabel;
import docking.widgets.textfield.HexOrDecimalInput; import docking.widgets.textfield.HexOrDecimalInput;
import docking.widgets.textfield.HintTextField; import docking.widgets.textfield.HintTextField;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors; import generic.theme.GThemeDefaults.Colors;
import generic.theme.GThemeDefaults.Colors.Messages; import generic.theme.GThemeDefaults.Colors.Messages;
import generic.theme.TempColorUtils; import generic.theme.TempColorUtils;
@ -59,7 +60,6 @@ import ghidra.util.task.*;
import pdb.PdbPlugin; import pdb.PdbPlugin;
import pdb.symbolserver.*; import pdb.symbolserver.*;
import resources.Icons; import resources.Icons;
import resources.ResourceManager;
/** /**
* A dialog that allows the user to pick or search for a Pdb file for a program. * A dialog that allows the user to pick or search for a Pdb file for a program.
@ -67,10 +67,8 @@ import resources.ResourceManager;
public class LoadPdbDialog extends DialogComponentProvider { public class LoadPdbDialog extends DialogComponentProvider {
private static final String LAST_PDBFILE_PREFERENCE_KEY = "Pdb.LastFile"; private static final String LAST_PDBFILE_PREFERENCE_KEY = "Pdb.LastFile";
static final Icon MATCH_OK_ICON = static final Icon MATCH_OK_ICON = new GIcon("icon.checkmark.green");
ResourceManager.loadImage("images/checkmark_green.gif", 16, 16); static final Icon MATCH_BAD_ICON = Icons.ERROR_ICON;
static final Icon MATCH_BAD_ICON =
ResourceManager.loadImage("images/emblem-important.png", 16, 16);
public static final GhidraFileFilter PDB_FILES_FILTER = public static final GhidraFileFilter PDB_FILES_FILTER =
ExtensionFileFilter.forExtensions("Microsoft Program Databases", "pdb", "pd_", "pdb.xml"); ExtensionFileFilter.forExtensions("Microsoft Program Databases", "pdb", "pd_", "pdb.xml");

View file

@ -2,6 +2,15 @@
color.bg.programdiff.highlight = moccasin color.bg.programdiff.highlight = moccasin
icon.plugin.programdiff.apply = pencil16.png
icon.plugin.programdiff.apply.next = pencil_arrow16.png
icon.plugin.programdiff.ignore = eraser_arrow16.png
icon.plugin.programdiff.get.diffs = Diff16.png
icon.plugin.programdiff.select.by.program = DiffSelect16.png
icon.plugin.programdiff.open.close.program = table_relationship.png
icon.plugin.programdiff.settings = settings16.gif
icon.plugin.programdiff.cursor.location = cursor_arrow.gif
[Dark Defaults] [Dark Defaults]
color.bg.programdiff.highlight = darkRed color.bg.programdiff.highlight = darkRed

View file

@ -18,19 +18,20 @@ package ghidra.app.plugin.core.diff;
import java.awt.event.InputEvent; import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.*; import docking.action.*;
import docking.tool.ToolConstants; import docking.tool.ToolConstants;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import generic.theme.GIcon;
import ghidra.app.plugin.core.codebrowser.OtherPanelContext; import ghidra.app.plugin.core.codebrowser.OtherPanelContext;
import ghidra.app.services.CodeViewerService; import ghidra.app.services.CodeViewerService;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.HTMLUtilities; import ghidra.util.HTMLUtilities;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager; import resources.Icons;
/** /**
* Creates the actions for the program diff plugin. * Creates the actions for the program diff plugin.
@ -41,7 +42,6 @@ class DiffActionManager {
private static final String GET_DIFF_GROUP = "GetDiff"; private static final String GET_DIFF_GROUP = "GetDiff";
private static final String DIFF_INFO_GROUP = "DiffInfo"; private static final String DIFF_INFO_GROUP = "DiffInfo";
private static final String DIFF_NAVIGATE_GROUP = "DiffNavigate"; private static final String DIFF_NAVIGATE_GROUP = "DiffNavigate";
private static final String TOGGLE_VIEW_ICON_NAME = "images/table_relationship.png";
private static final String GROUP = "Diff"; private static final String GROUP = "Diff";
private ProgramDiffPlugin plugin; private ProgramDiffPlugin plugin;
private CodeViewerService codeViewerService; private CodeViewerService codeViewerService;
@ -251,7 +251,7 @@ class DiffActionManager {
plugin.applyDiff(); plugin.applyDiff();
} }
}; };
ImageIcon icon = ResourceManager.loadImage("images/pencil16.png"); Icon icon = new GIcon("icon.plugin.programdiff.apply");
applyDiffsAction.setKeyBindingData(new KeyBindingData(KeyEvent.VK_F3, 0)); applyDiffsAction.setKeyBindingData(new KeyBindingData(KeyEvent.VK_F3, 0));
applyDiffsAction.setPopupMenuData( applyDiffsAction.setPopupMenuData(
new MenuData(new String[] { "Apply Selection" }, icon, GROUP)); new MenuData(new String[] { "Apply Selection" }, icon, GROUP));
@ -265,7 +265,7 @@ class DiffActionManager {
plugin.applyDiffAndGoNext(); plugin.applyDiffAndGoNext();
} }
}; };
icon = ResourceManager.loadImage("images/pencil_arrow16.png"); icon = new GIcon("icon.plugin.programdiff.apply.next");
String[] applyDiffsPath = { "Apply Selection and Goto Next Difference" }; String[] applyDiffsPath = { "Apply Selection and Goto Next Difference" };
applyDiffsNextAction.setPopupMenuData(new MenuData(applyDiffsPath, icon, GROUP)); applyDiffsNextAction.setPopupMenuData(new MenuData(applyDiffsPath, icon, GROUP));
applyDiffsNextAction.setKeyBindingData( applyDiffsNextAction.setKeyBindingData(
@ -281,7 +281,7 @@ class DiffActionManager {
plugin.ignoreDiff(); plugin.ignoreDiff();
} }
}; };
icon = ResourceManager.loadImage("images/eraser_arrow16.png"); icon = new GIcon("icon.plugin.programdiff.ignore");
ignoreDiffsAction.setPopupMenuData(new MenuData( ignoreDiffsAction.setPopupMenuData(new MenuData(
new String[] { "Ignore Selection and Goto Next Difference" }, icon, GROUP)); new String[] { "Ignore Selection and Goto Next Difference" }, icon, GROUP));
ignoreDiffsAction.setDescription( ignoreDiffsAction.setDescription(
@ -294,9 +294,9 @@ class DiffActionManager {
plugin.nextDiff(); plugin.nextDiff();
} }
}; };
icon = ResourceManager.loadImage("images/down.png"); icon = Icons.DOWN_ICON;
nextDiffAction.setKeyBindingData( nextDiffAction.setKeyBindingData(
new KeyBindingData('N', InputEvent.CTRL_MASK | InputEvent.ALT_MASK)); new KeyBindingData('N', InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK));
nextDiffAction.setPopupMenuData( nextDiffAction.setPopupMenuData(
new MenuData(new String[] { "Next Difference" }, icon, DIFF_NAVIGATE_GROUP)); new MenuData(new String[] { "Next Difference" }, icon, DIFF_NAVIGATE_GROUP));
nextDiffAction.setToolBarData(new ToolBarData(icon, DIFF_NAVIGATE_GROUP)); nextDiffAction.setToolBarData(new ToolBarData(icon, DIFF_NAVIGATE_GROUP));
@ -308,9 +308,9 @@ class DiffActionManager {
plugin.previousDiff(); plugin.previousDiff();
} }
}; };
icon = ResourceManager.loadImage("images/up.png"); icon = Icons.UP_ICON;
previousDiffAction.setKeyBindingData( previousDiffAction.setKeyBindingData(
new KeyBindingData('P', InputEvent.CTRL_MASK | InputEvent.ALT_MASK)); new KeyBindingData('P', InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK));
previousDiffAction.setPopupMenuData( previousDiffAction.setPopupMenuData(
new MenuData(new String[] { "Previous Difference" }, icon, DIFF_NAVIGATE_GROUP)); new MenuData(new String[] { "Previous Difference" }, icon, DIFF_NAVIGATE_GROUP));
previousDiffAction.setToolBarData(new ToolBarData(icon, DIFF_NAVIGATE_GROUP)); previousDiffAction.setToolBarData(new ToolBarData(icon, DIFF_NAVIGATE_GROUP));
@ -322,7 +322,7 @@ class DiffActionManager {
plugin.showDiffDetails(); plugin.showDiffDetails();
} }
}; };
icon = ResourceManager.loadImage("images/xmag.png"); icon = new GIcon("icon.search");
diffDetailsAction.setKeyBindingData(new KeyBindingData(KeyEvent.VK_F5, 0)); diffDetailsAction.setKeyBindingData(new KeyBindingData(KeyEvent.VK_F5, 0));
diffDetailsAction.setPopupMenuData( diffDetailsAction.setPopupMenuData(
new MenuData(new String[] { "Location Details..." }, icon, DIFF_INFO_GROUP)); new MenuData(new String[] { "Location Details..." }, icon, DIFF_INFO_GROUP));
@ -349,7 +349,7 @@ class DiffActionManager {
plugin.diff(); plugin.diff();
} }
}; };
icon = ResourceManager.loadImage("images/Diff16.png"); icon = new GIcon("icon.plugin.programdiff.get.diffs");
getDiffsAction.setPopupMenuData( getDiffsAction.setPopupMenuData(
new MenuData(new String[] { "Get Differences..." }, icon, GET_DIFF_GROUP)); new MenuData(new String[] { "Get Differences..." }, icon, GET_DIFF_GROUP));
getDiffsAction.setToolBarData(new ToolBarData(icon, GET_DIFF_GROUP)); getDiffsAction.setToolBarData(new ToolBarData(icon, GET_DIFF_GROUP));
@ -372,7 +372,7 @@ class DiffActionManager {
plugin.setP1SelectionOnP2(); plugin.setP1SelectionOnP2();
} }
}; };
icon = ResourceManager.loadImage("images/DiffSelect16.png"); icon = new GIcon("icon.plugin.programdiff.select.by.program");
p1SelectToP2Action.setDescription( p1SelectToP2Action.setDescription(
"Select Program 2 highlights using selection in Program 1."); "Select Program 2 highlights using selection in Program 1.");
p1SelectToP2Action.setToolBarData(new ToolBarData(icon, SELECT_GROUP)); p1SelectToP2Action.setToolBarData(new ToolBarData(icon, SELECT_GROUP));
@ -434,10 +434,10 @@ class DiffActionManager {
return true; return true;
} }
}; };
icon = ResourceManager.loadImage(TOGGLE_VIEW_ICON_NAME); icon = new GIcon("icon.plugin.programdiff.open.close.program");
openCloseProgram2Action.setEnabled(false); openCloseProgram2Action.setEnabled(false);
openCloseProgram2Action.setKeyBindingData( openCloseProgram2Action.setKeyBindingData(
new KeyBindingData('C', InputEvent.CTRL_MASK | InputEvent.ALT_MASK)); new KeyBindingData('C', InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK));
openCloseProgram2Action.setToolBarData(new ToolBarData(icon, "zzz")); openCloseProgram2Action.setToolBarData(new ToolBarData(icon, "zzz"));
openCloseProgram2Action.setHelpLocation( openCloseProgram2Action.setHelpLocation(
new HelpLocation(HelpTopics.DIFF, OPEN_CLOSE_PROGRAM2_ACTION)); new HelpLocation(HelpTopics.DIFF, OPEN_CLOSE_PROGRAM2_ACTION));

View file

@ -28,12 +28,12 @@ import docking.WindowPosition;
import docking.widgets.VariableHeightPanel; import docking.widgets.VariableHeightPanel;
import docking.widgets.combobox.GComboBox; import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GDLabel; import docking.widgets.label.GDLabel;
import generic.theme.GIcon;
import ghidra.app.plugin.core.diff.DiffApplySettingsOptionManager.*; import ghidra.app.plugin.core.diff.DiffApplySettingsOptionManager.*;
import ghidra.framework.plugintool.ComponentProviderAdapter; import ghidra.framework.plugintool.ComponentProviderAdapter;
import ghidra.framework.plugintool.Plugin; import ghidra.framework.plugintool.Plugin;
import ghidra.program.util.ProgramMergeFilter; import ghidra.program.util.ProgramMergeFilter;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager;
/** /**
* The DiffSettingsDialog is used to change the types of differences currently * The DiffSettingsDialog is used to change the types of differences currently
@ -43,7 +43,7 @@ import resources.ResourceManager;
public class DiffApplySettingsProvider extends ComponentProviderAdapter { public class DiffApplySettingsProvider extends ComponentProviderAdapter {
public static final String APPLY_FILTER_CHANGED_ACTION = "Apply Filter Changed"; public static final String APPLY_FILTER_CHANGED_ACTION = "Apply Filter Changed";
public static final ImageIcon ICON = ResourceManager.loadImage("images/settings16.gif"); public static final Icon ICON = new GIcon("icon.plugin.programdiff.settings");
public static final String TITLE = "Diff Apply Settings"; public static final String TITLE = "Diff Apply Settings";
private ProgramDiffPlugin plugin; private ProgramDiffPlugin plugin;
@ -106,8 +106,9 @@ public class DiffApplySettingsProvider extends ComponentProviderAdapter {
} }
public void addActions() { public void addActions() {
plugin.getTool().addLocalAction(this, plugin.getTool()
new SaveApplySettingsAction(this, plugin.applySettingsMgr)); .addLocalAction(this,
new SaveApplySettingsAction(this, plugin.applySettingsMgr));
plugin.getTool().addLocalAction(this, new DiffIgnoreAllAction(this)); plugin.getTool().addLocalAction(this, new DiffIgnoreAllAction(this));
plugin.getTool().addLocalAction(this, new DiffReplaceAllAction(this)); plugin.getTool().addLocalAction(this, new DiffReplaceAllAction(this));
plugin.getTool().addLocalAction(this, new DiffMergeAllAction(this)); plugin.getTool().addLocalAction(this, new DiffMergeAllAction(this));
@ -351,10 +352,6 @@ public class DiffApplySettingsProvider extends ComponentProviderAdapter {
listenerList.remove(listener); listenerList.remove(listener);
} }
/**
* Return true if at least one of the checkboxes for the filter
* has been selected.
*/
boolean hasApplySelection() { boolean hasApplySelection() {
return ((applyProgramContext | applyBytes | applyCodeUnits | applyReferences | return ((applyProgramContext | applyBytes | applyCodeUnits | applyReferences |
applyPlateComments | applyPreComments | applyEolComments | applyRepeatableComments | applyPlateComments | applyPreComments | applyEolComments | applyRepeatableComments |
@ -366,8 +363,7 @@ public class DiffApplySettingsProvider extends ComponentProviderAdapter {
if (adjustingApplyFilter) { if (adjustingApplyFilter) {
return; return;
} }
for (int i = 0; i < listenerList.size(); i++) { for (ActionListener listener : listenerList) {
ActionListener listener = listenerList.get(i);
listener.actionPerformed(new ActionEvent(this, 0, APPLY_FILTER_CHANGED_ACTION)); listener.actionPerformed(new ActionEvent(this, 0, APPLY_FILTER_CHANGED_ACTION));
} }
} }
@ -383,9 +379,6 @@ public class DiffApplySettingsProvider extends ComponentProviderAdapter {
return applyPanel; return applyPanel;
} }
/**
* Gets the plugin associated with this provider.
*/
Plugin getPlugin() { Plugin getPlugin() {
return plugin; return plugin;
} }

View file

@ -29,6 +29,7 @@ import docking.WindowPosition;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import docking.widgets.checkbox.GCheckBox; import docking.widgets.checkbox.GCheckBox;
import generic.theme.GIcon;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
import ghidra.framework.plugintool.ComponentProviderAdapter; import ghidra.framework.plugintool.ComponentProviderAdapter;
import ghidra.framework.plugintool.Plugin; import ghidra.framework.plugintool.Plugin;
@ -40,7 +41,6 @@ import ghidra.util.HelpLocation;
import ghidra.util.Msg; import ghidra.util.Msg;
import ghidra.util.task.SwingUpdateManager; import ghidra.util.task.SwingUpdateManager;
import resources.Icons; import resources.Icons;
import resources.ResourceManager;
/** /**
* The DiffDetailsProvider is used to view the differences for an address or * The DiffDetailsProvider is used to view the differences for an address or
@ -52,7 +52,7 @@ public class DiffDetailsProvider extends ComponentProviderAdapter {
public static final String FILTER_DIFFS_CHECK_BOX = "Filter Diffs Check Box"; public static final String FILTER_DIFFS_CHECK_BOX = "Filter Diffs Check Box";
public static final String DIFF_DETAILS_TEXT_AREA = "Diff Details Text Area"; public static final String DIFF_DETAILS_TEXT_AREA = "Diff Details Text Area";
public static final String DIFF_DETAILS_PANEL = "Diff Location Details Panel"; public static final String DIFF_DETAILS_PANEL = "Diff Location Details Panel";
public static final Icon ICON = ResourceManager.loadImage("images/xmag.png"); public static final Icon ICON = new GIcon("icon.search");
public static final Icon REFRESH_ICON = Icons.REFRESH_ICON; public static final Icon REFRESH_ICON = Icons.REFRESH_ICON;
public static final String TITLE = "Diff Details"; public static final String TITLE = "Diff Details";
@ -72,9 +72,6 @@ public class DiffDetailsProvider extends ComponentProviderAdapter {
private SwingUpdateManager updateManager; private SwingUpdateManager updateManager;
private ProgramLocation currentLocation; private ProgramLocation currentLocation;
/**
* @param plugin
*/
public DiffDetailsProvider(ProgramDiffPlugin plugin) { public DiffDetailsProvider(ProgramDiffPlugin plugin) {
super(plugin.getTool(), "Diff Location Details", plugin.getName()); super(plugin.getTool(), "Diff Location Details", plugin.getName());
setTitle(TITLE); setTitle(TITLE);
@ -91,17 +88,11 @@ public class DiffDetailsProvider extends ComponentProviderAdapter {
setUpRefreshDetailsUpdateManager(); setUpRefreshDetailsUpdateManager();
} }
/**
* @param selected
*/
public void setAutoUpdate(boolean selected) { public void setAutoUpdate(boolean selected) {
autoUpdateCB.setSelected(selected); autoUpdateCB.setSelected(selected);
autoUpdate = selected; autoUpdate = selected;
} }
/**
* @param selected
*/
public void setFilterDiffs(boolean selected) { public void setFilterDiffs(boolean selected) {
filterDiffsCB.setSelected(selected); filterDiffsCB.setSelected(selected);
filterDiffs = selected; filterDiffs = selected;
@ -159,9 +150,6 @@ public class DiffDetailsProvider extends ComponentProviderAdapter {
} }
/**
* @param p1Location
*/
protected void locationChanged(ProgramLocation p1Location) { protected void locationChanged(ProgramLocation p1Location) {
if (isDisplayed && autoUpdate) { if (isDisplayed && autoUpdate) {
refreshDetails(p1Location); refreshDetails(p1Location);
@ -321,8 +309,7 @@ public class DiffDetailsProvider extends ComponentProviderAdapter {
@Override @Override
public void componentHidden() { public void componentHidden() {
for (int i = 0; i < listenerList.size(); i++) { for (ActionListener listener : listenerList) {
ActionListener listener = listenerList.get(i);
listener.actionPerformed(new ActionEvent(this, 0, DIFF_DETAILS_HIDDEN_ACTION)); listener.actionPerformed(new ActionEvent(this, 0, DIFF_DETAILS_HIDDEN_ACTION));
} }
isDisplayed = false; isDisplayed = false;

View file

@ -33,6 +33,7 @@ import docking.widgets.fieldpanel.field.Field;
import docking.widgets.fieldpanel.listener.FieldMouseListener; import docking.widgets.fieldpanel.listener.FieldMouseListener;
import docking.widgets.fieldpanel.support.FieldLocation; import docking.widgets.fieldpanel.support.FieldLocation;
import generic.theme.GColor; import generic.theme.GColor;
import generic.theme.GIcon;
import ghidra.GhidraOptions; import ghidra.GhidraOptions;
import ghidra.app.CorePluginPackage; import ghidra.app.CorePluginPackage;
import ghidra.app.events.*; import ghidra.app.events.*;
@ -63,7 +64,6 @@ import ghidra.util.exception.VersionException;
import ghidra.util.task.*; import ghidra.util.task.*;
import help.Help; import help.Help;
import help.HelpService; import help.HelpService;
import resources.ResourceManager;
/** /**
* Plugin that shows the differences between two programs, and allows the user to apply differences * Plugin that shows the differences between two programs, and allows the user to apply differences
@ -92,7 +92,8 @@ public class ProgramDiffPlugin extends ProgramPlugin
implements ProgramLocationListener, ProgramSelectionListener, DiffControllerListener, implements ProgramLocationListener, ProgramSelectionListener, DiffControllerListener,
DiffService, OptionsChangeListener, DomainObjectListener { DiffService, OptionsChangeListener, DomainObjectListener {
private ImageIcon CURSOR_LOC_ICON = ResourceManager.loadImage("images/cursor_arrow.gif"); private static final Icon CURSOR_LOC_ICON =
new GIcon("icon.plugin.programdiff.cursor.location");
private static final String SELECTION_GROUP = "Selection Colors"; private static final String SELECTION_GROUP = "Selection Colors";
private static final String DIFF_HIGHLIGHT_COLOR_NAME = private static final String DIFF_HIGHLIGHT_COLOR_NAME =
SELECTION_GROUP + Options.DELIMITER + "Difference Color"; SELECTION_GROUP + Options.DELIMITER + "Difference Color";

View file

@ -22,7 +22,7 @@ import docking.action.DockingAction;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager; import resources.Icons;
/** /**
* Action to save the current Diff Apply Settings as the new defaults to be used when new Diffs are started. * Action to save the current Diff Apply Settings as the new defaults to be used when new Diffs are started.
@ -45,7 +45,7 @@ class SaveApplySettingsAction extends DockingAction {
super(ACTION_NAME, settingsProvider.getPlugin().getName()); super(ACTION_NAME, settingsProvider.getPlugin().getName());
this.settingsProvider = settingsProvider; this.settingsProvider = settingsProvider;
this.settingsOptionMgr = settingsOptionMgr; this.settingsOptionMgr = settingsOptionMgr;
setToolBarData(new ToolBarData(ResourceManager.loadImage("images/disk.png"), GROUP_NAME)); setToolBarData(new ToolBarData(Icons.SAVE_ICON, GROUP_NAME));
setEnabled(true); setEnabled(true);
setDescription(DESCRIPTION); setDescription(DESCRIPTION);
setHelpLocation(new HelpLocation(HelpTopics.DIFF, ACTION_NAME)); setHelpLocation(new HelpLocation(HelpTopics.DIFF, ACTION_NAME));
@ -61,8 +61,10 @@ class SaveApplySettingsAction extends DockingAction {
@Override @Override
public void actionPerformed(ActionContext context) { public void actionPerformed(ActionContext context) {
settingsOptionMgr.saveDefaultApplyFilter(settingsProvider.getApplyFilter()); settingsOptionMgr.saveDefaultApplyFilter(settingsProvider.getApplyFilter());
settingsProvider.getPlugin().getTool().setStatusInfo( settingsProvider.getPlugin()
"Diff Apply Settings have been saved to the tool as the new defaults."); .getTool()
.setStatusInfo(
"Diff Apply Settings have been saved to the tool as the new defaults.");
} }
} }

View file

@ -13,7 +13,7 @@ color.fg.plugin.python.syntax.package = darkred
color.fg.plugin.python.syntax.sequence = rgb(128, 96, 64) color.fg.plugin.python.syntax.sequence = rgb(128, 96, 64)
color.fg.plugin.python.syntax.special = darkgreen color.fg.plugin.python.syntax.special = darkgreen
icon.plugin.python = python.png
[Dark Defaults] [Dark Defaults]

View file

@ -19,7 +19,7 @@ import java.awt.event.KeyEvent;
import java.io.*; import java.io.*;
import java.util.List; import java.util.List;
import javax.swing.ImageIcon; import javax.swing.Icon;
import org.python.core.PySystemState; import org.python.core.PySystemState;
@ -27,6 +27,7 @@ import docking.ActionContext;
import docking.DockingUtils; import docking.DockingUtils;
import docking.action.*; import docking.action.*;
import generic.jar.ResourceFile; import generic.jar.ResourceFile;
import generic.theme.GIcon;
import ghidra.app.CorePluginPackage; import ghidra.app.CorePluginPackage;
import ghidra.app.plugin.PluginCategoryNames; import ghidra.app.plugin.PluginCategoryNames;
import ghidra.app.plugin.ProgramPlugin; import ghidra.app.plugin.ProgramPlugin;
@ -40,7 +41,7 @@ import ghidra.framework.plugintool.PluginTool;
import ghidra.framework.plugintool.util.PluginStatus; import ghidra.framework.plugintool.util.PluginStatus;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.task.*; import ghidra.util.task.*;
import resources.ResourceManager; import resources.Icons;
/** /**
* This plugin provides the interactive Python interpreter. * This plugin provides the interactive Python interpreter.
@ -59,8 +60,6 @@ import resources.ResourceManager;
public class PythonPlugin extends ProgramPlugin public class PythonPlugin extends ProgramPlugin
implements InterpreterConnection, OptionsChangeListener { implements InterpreterConnection, OptionsChangeListener {
private final static int INPUT_THREAD_SHUTDOWN_TIMEOUT_MS = 1000;
private InterpreterConsole console; private InterpreterConsole console;
private GhidraPythonInterpreter interpreter; private GhidraPythonInterpreter interpreter;
private PythonScript interactiveScript; private PythonScript interactiveScript;
@ -72,6 +71,9 @@ public class PythonPlugin extends ProgramPlugin
private final static String INCLUDE_BUILTINS_DESCRIPTION = private final static String INCLUDE_BUILTINS_DESCRIPTION =
"Whether or not to include Python's built-in functions and properties in the pop-up code completion window."; "Whether or not to include Python's built-in functions and properties in the pop-up code completion window.";
private final static boolean INCLUDE_BUILTINS_DEFAULT = true; private final static boolean INCLUDE_BUILTINS_DEFAULT = true;
private static final Icon ICON = new GIcon("icon.plugin.python");
private boolean includeBuiltins = INCLUDE_BUILTINS_DEFAULT; private boolean includeBuiltins = INCLUDE_BUILTINS_DEFAULT;
/** /**
@ -144,7 +146,7 @@ public class PythonPlugin extends ProgramPlugin
}; };
interruptAction.setDescription("Interrupt Interpreter"); interruptAction.setDescription("Interrupt Interpreter");
interruptAction.setToolBarData( interruptAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/dialog-cancel.png"), null)); new ToolBarData(Icons.NOT_ALLOWED_ICON, null));
interruptAction.setEnabled(true); interruptAction.setEnabled(true);
interruptAction.setKeyBindingData( interruptAction.setKeyBindingData(
new KeyBindingData(KeyEvent.VK_I, DockingUtils.CONTROL_KEY_MODIFIER_MASK)); new KeyBindingData(KeyEvent.VK_I, DockingUtils.CONTROL_KEY_MODIFIER_MASK));
@ -160,7 +162,7 @@ public class PythonPlugin extends ProgramPlugin
}; };
resetAction.setDescription("Reset Interpreter"); resetAction.setDescription("Reset Interpreter");
resetAction.setToolBarData( resetAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/reload3.png"), null)); new ToolBarData(Icons.REFRESH_ICON, null));
resetAction.setEnabled(true); resetAction.setEnabled(true);
resetAction.setKeyBindingData( resetAction.setKeyBindingData(
new KeyBindingData(KeyEvent.VK_D, DockingUtils.CONTROL_KEY_MODIFIER_MASK)); new KeyBindingData(KeyEvent.VK_D, DockingUtils.CONTROL_KEY_MODIFIER_MASK));
@ -345,8 +347,8 @@ public class PythonPlugin extends ProgramPlugin
} }
@Override @Override
public ImageIcon getIcon() { public Icon getIcon() {
return ResourceManager.loadImage("images/python.png"); return ICON;
} }
/** /**

View file

@ -30,7 +30,6 @@ import ghidra.util.HTMLUtilities;
import ghidra.util.WebColors; import ghidra.util.WebColors;
import ghidra.util.table.column.AbstractGhidraColumnRenderer; import ghidra.util.table.column.AbstractGhidraColumnRenderer;
import resources.MultiIcon; import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.*; import resources.icons.*;
/** /**
@ -42,7 +41,7 @@ public class MatchMarkupStatusRenderer extends AbstractGhidraColumnRenderer<VTMa
private static final Color FG_TOOLTIP_UNEXAMINED = private static final Color FG_TOOLTIP_UNEXAMINED =
new GColor("color.bg.version.tracking.match.table.markup.status.tooltip.unexamined"); new GColor("color.bg.version.tracking.match.table.markup.status.tooltip.unexamined");
private static Icon EMPTY_ICON = ResourceManager.loadImage("EmptyIcon16.gif"); private static Icon EMPTY_ICON = new GIcon("icon.empty");
private static Icon DISABLED_ICOL = private static Icon DISABLED_ICOL =
new GIcon("icon.version.tracking.match.table.markup.status.disabled"); new GIcon("icon.version.tracking.match.table.markup.status.disabled");
private static final Icon NOT_APPLIED_ICON = private static final Icon NOT_APPLIED_ICON =

View file

@ -35,6 +35,7 @@ src/main/resources/images/bullet_delete.png||FAMFAMFAM Icons - CC 2.5||||END|
src/main/resources/images/checkmark_green.gif||GHIDRA||reviewed||END| src/main/resources/images/checkmark_green.gif||GHIDRA||reviewed||END|
src/main/resources/images/close16.gif||GHIDRA||reviewed||END| src/main/resources/images/close16.gif||GHIDRA||reviewed||END|
src/main/resources/images/closedFolder.png||Modified Nuvola Icons - LGPL 2.1||||END| src/main/resources/images/closedFolder.png||Modified Nuvola Icons - LGPL 2.1||||END|
src/main/resources/images/collapse.gif||GHIDRA||||END|
src/main/resources/images/collapse_all.png||GHIDRA||||END| src/main/resources/images/collapse_all.png||GHIDRA||||END|
src/main/resources/images/computer.png||Tango Icons - Public Domain|||tango|END| src/main/resources/images/computer.png||Tango Icons - Public Domain|||tango|END|
src/main/resources/images/desktop.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END| src/main/resources/images/desktop.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END|
@ -43,6 +44,7 @@ src/main/resources/images/dialog-warning.png||Oxygen Icons - LGPL 3.0||||END|
src/main/resources/images/disk.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/disk.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/document-properties.png||Tango Icons - Public Domain|||tango icon set|END| src/main/resources/images/document-properties.png||Tango Icons - Public Domain|||tango icon set|END|
src/main/resources/images/down.png||GHIDRA||reviewed||END| src/main/resources/images/down.png||GHIDRA||reviewed||END|
src/main/resources/images/drive.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/eatbits.gif||GHIDRA||reviewed||END| src/main/resources/images/eatbits.gif||GHIDRA||reviewed||END|
src/main/resources/images/eatbits1.png||GHIDRA||reviewed||END| src/main/resources/images/eatbits1.png||GHIDRA||reviewed||END|
src/main/resources/images/eatbits2.png||GHIDRA||reviewed||END| src/main/resources/images/eatbits2.png||GHIDRA||reviewed||END|
@ -52,13 +54,16 @@ src/main/resources/images/eatbits5.png||GHIDRA||reviewed||END|
src/main/resources/images/eatbits6.png||GHIDRA||reviewed||END| src/main/resources/images/eatbits6.png||GHIDRA||reviewed||END|
src/main/resources/images/eatbits7.png||GHIDRA||reviewed||END| src/main/resources/images/eatbits7.png||GHIDRA||reviewed||END|
src/main/resources/images/edit-clear.png||Tango Icons - Public Domain|||tango icon set|END| src/main/resources/images/edit-clear.png||Tango Icons - Public Domain|||tango icon set|END|
src/main/resources/images/edit-cut.png||Tango Icons - Public Domain|||tango icon set|END|
src/main/resources/images/edit-cut22.png||Tango Icons - Public Domain|||original name edit-cut.png in tango 22x22|END| src/main/resources/images/edit-cut22.png||Tango Icons - Public Domain|||original name edit-cut.png in tango 22x22|END|
src/main/resources/images/edit-delete.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/edit-delete.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/edit-undo.png||Tango Icons - Public Domain|||tango icon set|END| src/main/resources/images/edit-undo.png||Tango Icons - Public Domain|||tango icon set|END|
src/main/resources/images/expand.gif||GHIDRA||||END|
src/main/resources/images/filter_off.png||GHIDRA||||END| src/main/resources/images/filter_off.png||GHIDRA||||END|
src/main/resources/images/filter_on.png||GHIDRA||||END| src/main/resources/images/filter_on.png||GHIDRA||||END|
src/main/resources/images/folder-open.png||Tango Icons - Public Domain||||END| src/main/resources/images/folder-open.png||Tango Icons - Public Domain||||END|
src/main/resources/images/folder_add.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/folder_add.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/go-home.png||Tango Icons - Public Domain|||tango icon set|END|
src/main/resources/images/hourglass.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/hourglass.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/hourglass24_01.png||GHIDRA||reviewed||END| src/main/resources/images/hourglass24_01.png||GHIDRA||reviewed||END|
src/main/resources/images/hourglass24_02.png||GHIDRA||reviewed||END| src/main/resources/images/hourglass24_02.png||GHIDRA||reviewed||END|
@ -78,6 +83,7 @@ src/main/resources/images/information.png||FAMFAMFAM Icons - CC 2.5|||famfamfam
src/main/resources/images/inode-directory.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/inode-directory.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/left.alternate.png||GHIDRA||||END| src/main/resources/images/left.alternate.png||GHIDRA||||END|
src/main/resources/images/left.png||GHIDRA||reviewed||END| src/main/resources/images/left.png||GHIDRA||reviewed||END|
src/main/resources/images/list-remove.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/locationIn.gif||GHIDRA||||END| src/main/resources/images/locationIn.gif||GHIDRA||||END|
src/main/resources/images/locationOut.gif||GHIDRA||||END| src/main/resources/images/locationOut.gif||GHIDRA||||END|
src/main/resources/images/magnifier.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/magnifier.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
@ -93,6 +99,7 @@ src/main/resources/images/page_code.png||FAMFAMFAM Icons - CC 2.5||||END|
src/main/resources/images/page_excel.png||FAMFAMFAM Icons - CC 2.5||||END| src/main/resources/images/page_excel.png||FAMFAMFAM Icons - CC 2.5||||END|
src/main/resources/images/page_go.png||FAMFAMFAM Icons - CC 2.5||||END| src/main/resources/images/page_go.png||FAMFAMFAM Icons - CC 2.5||||END|
src/main/resources/images/page_green.png||FAMFAMFAM Icons - CC 2.5||||END| src/main/resources/images/page_green.png||FAMFAMFAM Icons - CC 2.5||||END|
src/main/resources/images/play.png||GHIDRA||||END|
src/main/resources/images/preferences-system-windows.png||Tango Icons - Public Domain||||END| src/main/resources/images/preferences-system-windows.png||Tango Icons - Public Domain||||END|
src/main/resources/images/redo.png||GHIDRA||||END| src/main/resources/images/redo.png||GHIDRA||||END|
src/main/resources/images/reload.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END| src/main/resources/images/reload.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END|
@ -102,6 +109,7 @@ src/main/resources/images/software-update-available.png||Tango Icons - Public Do
src/main/resources/images/sortascending.png||GHIDRA||reviewed||END| src/main/resources/images/sortascending.png||GHIDRA||reviewed||END|
src/main/resources/images/sortdescending.png||GHIDRA||reviewed||END| src/main/resources/images/sortdescending.png||GHIDRA||reviewed||END|
src/main/resources/images/table.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/table.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/tag.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/textfield_rename.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END| src/main/resources/images/textfield_rename.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/tip.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/tip.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
src/main/resources/images/trash-empty.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/images/trash-empty.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
@ -122,6 +130,9 @@ src/main/resources/images/www_128.png||Nuvola Icons - LGPL 2.1|||nuvola www.png|
src/main/resources/images/www_16.png||Nuvola Icons - LGPL 2.1|||nuvola www 16x16|END| src/main/resources/images/www_16.png||Nuvola Icons - LGPL 2.1|||nuvola www 16x16|END|
src/main/resources/images/www_32.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END| src/main/resources/images/www_32.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END|
src/main/resources/images/www_64.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END| src/main/resources/images/www_64.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END|
src/main/resources/images/zoom.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/zoom_in.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/resources/images/zoom_out.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
src/main/svg/images/StackFrameElement.svg||GHIDRA||reviewed||END| src/main/svg/images/StackFrameElement.svg||GHIDRA||reviewed||END|
src/main/svg/images/StackFrame_Red.svg||GHIDRA||reviewed||END| src/main/svg/images/StackFrame_Red.svg||GHIDRA||reviewed||END|
src/main/svg/images/cause.svg||GHIDRA||reviewed||END| src/main/svg/images/cause.svg||GHIDRA||reviewed||END|

View file

@ -93,6 +93,7 @@ color.fg.button = black
// Icons files // Icons files
icon.empty = EmptyIcon16.gif icon.empty = EmptyIcon16.gif
icon.empty.20 = EmptyIcon.gif
icon.help = help-browser.png icon.help = help-browser.png
icon.home = go-home.png icon.home = go-home.png
icon.add = Plus2.png icon.add = Plus2.png
@ -111,6 +112,7 @@ icon.navigate.out = locationOut.gif
icon.not.allowed = dialog-cancel.png icon.not.allowed = dialog-cancel.png
icon.folder.closed = closedSmallFolder.png icon.folder.closed = closedSmallFolder.png
icon.folder.open = openSmallFolder.png icon.folder.open = openSmallFolder.png
icon.folder.new = folder_add.png
icon.refresh = reload3.png icon.refresh = reload3.png
icon.sort.ascending = sortascending.png icon.sort.ascending = sortascending.png
icon.sort.descending = sortdescending.png icon.sort.descending = sortdescending.png
@ -118,7 +120,6 @@ icon.stop = process-stop.png
icon.information = information.png icon.information = information.png
icon.warning = warning.png icon.warning = warning.png
icon.warning.strong = software-update-urgent.png icon.warning.strong = software-update-urgent.png
icon.pulldown = menu16.gif
icon.left = left.png icon.left = left.png
icon.right = right.png icon.right = right.png
icon.left.alt = left.alternate.png icon.left.alt = left.alternate.png
@ -139,14 +140,84 @@ icon.font = text_lowercase.png
icon.up = up.png icon.up = up.png
icon.down = down.png icon.down = down.png
icon.copy = page_white_copy.png icon.copy = page_white_copy.png
icon.cut = edit_red.png icon.cut = edit-cut.png
icon.paste = page_paste.png icon.paste = page_paste.png
icon.rename = textfield_rename.png icon.rename = textfield_rename.png
icon.check = check.png icon.check = check.png
icon.search = magnifier.png
icon.properties = document-properties.png
icon.table = table.png
icon.drive = drive.png
icon.run = play.png
icon.spreadsheet =
icon.window = application_xp.png
icon.zoom.in = zoom_in.png
icon.zoom.out = zoom_out.png
icon.theme.import = mail-receive.png icon.theme.import = mail-receive.png
icon.theme.export = mail-folder-outbox.png icon.theme.export = mail-folder-outbox.png
icon.docking.application.home = www_16.png
icon.docking.application.16 = www_16.png
icon.docking.application.128 = www_128.png
icon.dragon.256 = GhidraIcon256.png
icon.help.navigation.aid.disabled.overlay = icon.not.allowed
icon.help.navigation.aid.enabled = software-update-available.png
icon.options.node.leaf = icon.properties
icon.filechooser.places.my.computer = computer.png
icon.filechooser.places.desktop = desktop.png
icon.filechooser.places.home = user-home.png
icon.filechooser.places.recent = inode-directory.png {edit-undo.png [move(6,10)]}
icon.filter.options.contains = page_code.png
icon.filter.options.exact = page_green.png
icon.filter.options.regex = page_excel.png
icon.filter.options.starts.with = page_go.png
icon.filter.options.not = bullet_delete.png
icon.widget.imagepanel.reset = tag.png
icon.widget.imagepanel.zoom.in = icon.zoom.in
icon.widget.imagepanel.zoom.out = icon.zoom.out
icon.widget.imagepanel.zoom.reset = zoom.png
icon.widget.filterpanel.filter.off = filter_off.png
icon.widget.filterpanel.filter.on = filter_on.png
icon.widget.pathmanager.reset = trash-empty.png
icon.widget.table.header.help = info_small.png
icon.widget.table.header.help.hovered = info_small_hover.png
icon.widget.table.header.pending = hourglass.png
icon.dialog.error.expandable.report = icon.speadsheet
icon.dialog.error.expandable.exception = program_obj.png
icon.dialog.error.expandable.frame = StackFrameElement.png
icon.dialog.error.expandable.stack = StackFrame_Red.png
icon.dialog.error.expandable.cause = emblem-important.png
icon.task.progress.1 = eatbits1.png
icon.task.progress.2 = eatbits2.png
icon.task.progress.3 = eatbits3.png
icon.task.progress.4 = eatbits4.png
icon.task.progress.5 = eatbits5.png
icon.task.progress.6 = eatbits6.png
icon.task.progress.7 = eatbits7.png
icon.task.progress.hourglass.1 = hourglass24_01.png
icon.task.progress.hourglass.2 = hourglass24_02.png
icon.task.progress.hourglass.3 = hourglass24_03.png
icon.task.progress.hourglass.4 = hourglass24_04.png
icon.task.progress.hourglass.5 = hourglass24_05.png
icon.task.progress.hourglass.6 = hourglass24_06.png
icon.task.progress.hourglass.7 = hourglass24_07.png
icon.task.progress.hourglass.8 = hourglass24_08.png
icon.task.progress.hourglass.9 = hourglass24_09.png
icon.task.progress.hourglass.10 = hourglass24_10.png
icon.task.progress.hourglass.11 = hourglass24_11.png
// Fonts // Fonts

View file

@ -23,7 +23,8 @@ import java.util.*;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.swing.*; import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import org.jdesktop.animation.timing.Animator; import org.jdesktop.animation.timing.Animator;
import org.jdesktop.animation.timing.Animator.RepeatBehavior; import org.jdesktop.animation.timing.Animator.RepeatBehavior;
@ -31,6 +32,7 @@ import org.jdesktop.animation.timing.TimingTargetAdapter;
import org.jdesktop.animation.timing.interpolation.PropertySetter; import org.jdesktop.animation.timing.interpolation.PropertySetter;
import docking.util.AnimationUtils; import docking.util.AnimationUtils;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors.Palette; import generic.theme.GThemeDefaults.Colors.Palette;
import generic.util.WindowUtilities; import generic.util.WindowUtilities;
import generic.util.image.ImageUtils; import generic.util.image.ImageUtils;
@ -42,7 +44,6 @@ import ghidra.util.bean.GGlassPane;
import ghidra.util.bean.GGlassPanePainter; import ghidra.util.bean.GGlassPanePainter;
import help.Help; import help.Help;
import help.HelpService; import help.HelpService;
import resources.ResourceManager;
/** /**
* Component for providing component titles and toolbar. Also provides Drag * Component for providing component titles and toolbar. Also provides Drag
@ -491,6 +492,7 @@ public class DockableHeader extends GenericHeader
private static class EmphasizeDockableComponentPainter implements GGlassPanePainter { private static class EmphasizeDockableComponentPainter implements GGlassPanePainter {
private static final GIcon DRAGON_ICON = new GIcon("icon.dragon.256");
private Set<ComponentPaintInfo> otherComponentInfos = new HashSet<>(); private Set<ComponentPaintInfo> otherComponentInfos = new HashSet<>();
private Image image; private Image image;
@ -568,8 +570,7 @@ public class DockableHeader extends GenericHeader
g2d.fillRect(othersBounds.x, othersBounds.y, othersBounds.width, othersBounds.height); g2d.fillRect(othersBounds.x, othersBounds.y, othersBounds.width, othersBounds.height);
ImageIcon ghidra = ResourceManager.loadImage("images/GhidraIcon256.png"); Image ghidraImage = DRAGON_ICON.getImageIcon().getImage();
Image ghidraImage = ghidra.getImage();
double scale = percentComplete * 7; double scale = percentComplete * 7;
int gw = ghidraImage.getWidth(null); int gw = ghidraImage.getWidth(null);

View file

@ -31,19 +31,18 @@ import javax.swing.tree.TreePath;
import docking.widgets.label.GHtmlLabel; import docking.widgets.label.GHtmlLabel;
import docking.widgets.tree.*; import docking.widgets.tree.*;
import docking.widgets.tree.support.GTreeDragNDropHandler; import docking.widgets.tree.support.GTreeDragNDropHandler;
import generic.theme.GIcon;
import ghidra.util.*; import ghidra.util.*;
import ghidra.util.exception.MultipleCauses; import ghidra.util.exception.MultipleCauses;
import ghidra.util.html.HTMLElement; import ghidra.util.html.HTMLElement;
import resources.ResourceManager;
import util.CollectionUtils; import util.CollectionUtils;
public class ErrLogExpandableDialog extends AbstractErrDialog { public class ErrLogExpandableDialog extends AbstractErrDialog {
public static ImageIcon IMG_REPORT = ResourceManager.loadImage("images/report.png"); public static Icon IMG_REPORT = new GIcon("icon.dialog.error.expandable.report");
public static ImageIcon IMG_EXCEPTION = ResourceManager.loadImage("images/exception.png"); public static Icon IMG_EXCEPTION = new GIcon("icon.dialog.error.expandable.exception");
public static ImageIcon IMG_FRAME_ELEMENT = public static Icon IMG_FRAME_ELEMENT = new GIcon("icon.dialog.error.expandable.frame");
ResourceManager.loadImage("images/StackFrameElement.png"); public static Icon IMG_STACK = new GIcon("icon.dialog.error.expandable.stack");
public static ImageIcon IMG_STACK = ResourceManager.loadImage("images/StackFrame_Red.png"); public static Icon IMG_CAUSE = new GIcon("icon.dialog.error.expandable.cause");
public static ImageIcon IMG_CAUSE = ResourceManager.loadImage("images/cause.png");
private static final String SEND = "Send Report..."; private static final String SEND = "Send Report...";
private static final String DETAIL = "Details >>>"; private static final String DETAIL = "Details >>>";

View file

@ -16,12 +16,11 @@
package docking; package docking;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.ImageIcon;
import docking.action.*; import docking.action.*;
import docking.actions.AutoGeneratedDockingAction; import docking.actions.AutoGeneratedDockingAction;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager; import resources.Icons;
/** /**
* Action for showing components. If the component is hidden it will be made visible. * Action for showing components. If the component is hidden it will be made visible.
@ -31,8 +30,7 @@ class ShowComponentAction extends DockingAction
implements AutoGeneratedDockingAction, Comparable<ShowComponentAction> { implements AutoGeneratedDockingAction, Comparable<ShowComponentAction> {
private static final int MAX_LENGTH = 40; private static final int MAX_LENGTH = 40;
protected static final ImageIcon EMPTY_ICON = protected static final Icon EMPTY_ICON = Icons.EMPTY_ICON;
ResourceManager.loadImage("images/EmptyIcon16.gif");
protected static final String MENU_WINDOW = "&" + DockingWindowManager.COMPONENT_MENU_NAME; protected static final String MENU_WINDOW = "&" + DockingWindowManager.COMPONENT_MENU_NAME;
protected DockingWindowManager winMgr; protected DockingWindowManager winMgr;

View file

@ -21,13 +21,13 @@ import docking.action.DockingAction;
import docking.action.MenuData; import docking.action.MenuData;
import docking.actions.AutoGeneratedDockingAction; import docking.actions.AutoGeneratedDockingAction;
import docking.tool.ToolConstants; import docking.tool.ToolConstants;
import generic.theme.GIcon;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager;
class ShowWindowAction extends DockingAction class ShowWindowAction extends DockingAction
implements AutoGeneratedDockingAction, Comparable<ShowWindowAction> { implements AutoGeneratedDockingAction, Comparable<ShowWindowAction> {
private static final Icon ICON = ResourceManager.loadImage("images/application_xp.png"); private static final Icon ICON = new GIcon("icon.window");
private static final String MENU_WINDOW = "&" + DockingWindowManager.COMPONENT_MENU_NAME; private static final String MENU_WINDOW = "&" + DockingWindowManager.COMPONENT_MENU_NAME;
private static final int MAX_LENGTH = 40; private static final int MAX_LENGTH = 40;

View file

@ -18,16 +18,16 @@ package docking;
import javax.swing.Icon; import javax.swing.Icon;
import docking.widgets.label.GIconLabel; import docking.widgets.label.GIconLabel;
import generic.theme.GIcon;
import ghidra.framework.OperatingSystem; import ghidra.framework.OperatingSystem;
import ghidra.framework.Platform; import ghidra.framework.Platform;
import resources.ResourceManager;
/** /**
* A class to handle the space requirements on the status bar that vary for different OSes. For * A class to handle the space requirements on the status bar that vary for different OSes. For
* example, the Mac requires extra space on the status bar, due to the drag icon the Mac uses. * example, the Mac requires extra space on the status bar, due to the drag icon the Mac uses.
*/ */
public class StatusBarSpacer extends GIconLabel { public class StatusBarSpacer extends GIconLabel {
private static Icon EMPTY_ICON = ResourceManager.loadImage("images/EmptyIcon.gif"); private static Icon EMPTY_ICON = new GIcon("icon.empty.20");
public StatusBarSpacer() { public StatusBarSpacer() {
super( super(

View file

@ -30,7 +30,7 @@ import docking.widgets.label.GIconLabel;
import generic.theme.GThemeDefaults.Colors.Messages; import generic.theme.GThemeDefaults.Colors.Messages;
import generic.util.action.ReservedKeyBindings; import generic.util.action.ReservedKeyBindings;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager; import resources.Icons;
/** /**
* Dialog to set the key binding on an action; it is popped up when the F4 key * Dialog to set the key binding on an action; it is popped up when the F4 key
@ -70,7 +70,7 @@ public class KeyEntryDialog extends DialogComponentProvider {
defaultPanel = new JPanel(new BorderLayout()); defaultPanel = new JPanel(new BorderLayout());
defaultPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 5)); defaultPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 5));
JLabel imageLabel = new GIconLabel(ResourceManager.loadImage("images/information.png")); JLabel imageLabel = new GIconLabel(Icons.INFO_ICON);
bgColor = imageLabel.getBackground(); bgColor = imageLabel.getBackground();
JTextPane pane = new JTextPane(); JTextPane pane = new JTextPane();
pane.setBorder(BorderFactory.createEmptyBorder(0, 5, 2, 5)); pane.setBorder(BorderFactory.createEmptyBorder(0, 5, 2, 5));

View file

@ -24,15 +24,19 @@ import javax.swing.*;
import docking.widgets.label.GIconLabel; import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel; import docking.widgets.label.GLabel;
import generic.theme.GColor; import generic.theme.GColor;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors.Palette; import generic.theme.GThemeDefaults.Colors.Palette;
import ghidra.framework.Application; import ghidra.framework.Application;
import ghidra.framework.PluggableServiceRegistry; import ghidra.framework.PluggableServiceRegistry;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.Msg; import ghidra.util.Msg;
import resources.ResourceManager;
public class ApplicationInformationDisplayFactory { public class ApplicationInformationDisplayFactory {
private static final GIcon ICON_HOME = new GIcon("icon.docking.application.home");
private static final GIcon ICON_16 = new GIcon("icon.docking.application.16");
private static final GIcon ICON_128 = new GIcon("icon.base.application.128");
static { static {
PluggableServiceRegistry.registerPluggableService( PluggableServiceRegistry.registerPluggableService(
ApplicationInformationDisplayFactory.class, new ApplicationInformationDisplayFactory()); ApplicationInformationDisplayFactory.class, new ApplicationInformationDisplayFactory());
@ -140,14 +144,14 @@ public class ApplicationInformationDisplayFactory {
return panel; return panel;
} }
protected ImageIcon getSplashScreenIcon128() { protected Icon getSplashScreenIcon128() {
return ResourceManager.loadImage("images/www_128.png"); return ICON_128;
} }
protected List<Image> doGetWindowIcons() { protected List<Image> doGetWindowIcons() {
List<Image> list = new ArrayList<>(); List<Image> list = new ArrayList<>();
list.add(ResourceManager.loadImage("images/www_128.png").getImage()); list.add(ICON_128.getImageIcon().getImage());
list.add(ResourceManager.loadImage("images/www_16.png").getImage()); list.add(ICON_16.getImageIcon().getImage());
return list; return list;
} }
@ -160,7 +164,7 @@ public class ApplicationInformationDisplayFactory {
} }
protected Icon doGetHomeIcon() { protected Icon doGetHomeIcon() {
return ResourceManager.loadImage("images/www_16.png"); return ICON_HOME;
} }
protected Runnable doGetHomeCallback() { protected Runnable doGetHomeCallback() {

View file

@ -21,6 +21,7 @@ import java.awt.event.ActionEvent;
import javax.swing.*; import javax.swing.*;
import generic.theme.GIcon;
import ghidra.framework.preferences.Preferences; import ghidra.framework.preferences.Preferences;
import resources.MultiIcon; import resources.MultiIcon;
import resources.ResourceManager; import resources.ResourceManager;
@ -29,9 +30,9 @@ import resources.icons.TranslateIcon;
public class ToggleNavigationAid extends AbstractAction { public class ToggleNavigationAid extends AbstractAction {
private static final Icon ENABLED_ICON = private static final Icon ENABLED_ICON = new GIcon("icon.help.navigation.aid.enabled");
ResourceManager.loadImage("images/software-update-available.png"); private static final Icon DISABLED_OVERLAY_ICON =
private static final Icon CANCEL_ICON = ResourceManager.loadImage("images/dialog-cancel.png"); new GIcon("icon.help.navigation.aid.disabled.overlay");
private static Icon DISABLED_ICON; private static Icon DISABLED_ICON;
private boolean showingNavigationAid = true; private boolean showingNavigationAid = true;
@ -44,7 +45,7 @@ public class ToggleNavigationAid extends AbstractAction {
"when navigating within the help system"); "when navigating within the help system");
TranslateIcon translatedIcon = TranslateIcon translatedIcon =
new CenterTranslateIcon(CANCEL_ICON, ENABLED_ICON.getIconWidth()); new CenterTranslateIcon(DISABLED_OVERLAY_ICON, ENABLED_ICON.getIconWidth());
ImageIcon disabledBaseIcon = ResourceManager.getDisabledIcon(ENABLED_ICON, 50); ImageIcon disabledBaseIcon = ResourceManager.getDisabledIcon(ENABLED_ICON, 50);
DISABLED_ICON = new MultiIcon(disabledBaseIcon, translatedIcon); DISABLED_ICON = new MultiIcon(disabledBaseIcon, translatedIcon);

View file

@ -53,7 +53,7 @@ public class MultipleActionDockingToolbarButton extends EmptyBorderButton {
public MultipleActionDockingToolbarButton(MultiActionDockingActionIf action) { public MultipleActionDockingToolbarButton(MultiActionDockingActionIf action) {
multipleAction = action; multipleAction = action;
installMouseListeners(); installMouseListeners();
setIcon(ResourceManager.loadImage("images/core.png")); setIcon(ResourceManager.getDefaultIcon());
} }
@Override @Override

View file

@ -40,7 +40,7 @@ import ghidra.util.layout.MiddleLayout;
import ghidra.util.task.SwingUpdateManager; import ghidra.util.task.SwingUpdateManager;
import help.Help; import help.Help;
import help.HelpService; import help.HelpService;
import resources.ResourceManager; import resources.Icons;
public class OptionsPanel extends JPanel { public class OptionsPanel extends JPanel {
private PropertyChangeListener changeListener; private PropertyChangeListener changeListener;
@ -251,7 +251,7 @@ public class OptionsPanel extends JPanel {
BoxLayout bl = new BoxLayout(labelPanel, BoxLayout.X_AXIS); BoxLayout bl = new BoxLayout(labelPanel, BoxLayout.X_AXIS);
labelPanel.setLayout(bl); labelPanel.setLayout(bl);
labelPanel.add(Box.createHorizontalStrut(5)); labelPanel.add(Box.createHorizontalStrut(5));
labelPanel.add(new GIconLabel(ResourceManager.loadImage("images/information.png"))); labelPanel.add(new GIconLabel(Icons.INFO_ICON));
labelPanel.add(Box.createHorizontalStrut(5)); labelPanel.add(Box.createHorizontalStrut(5));
labelPanel.add(label); labelPanel.add(label);

View file

@ -21,16 +21,13 @@ import javax.swing.Icon;
import docking.widgets.tree.GTreeLazyNode; import docking.widgets.tree.GTreeLazyNode;
import docking.widgets.tree.GTreeNode; import docking.widgets.tree.GTreeNode;
import generic.theme.GIcon;
import ghidra.framework.options.Options; import ghidra.framework.options.Options;
import resources.ResourceManager;
class OptionsTreeNode extends GTreeLazyNode { class OptionsTreeNode extends GTreeLazyNode {
private final static Icon OPEN_FOLDER_ICON = private final static Icon OPEN_FOLDER_ICON = new GIcon("icon.folder.open");
ResourceManager.loadImage("images/openSmallFolder.png"); private final static Icon CLOSED_FOLDER_ICON = new GIcon("icon.folder.closed");
private final static Icon CLOSED_FOLDER_ICON = private final static Icon PROPERTIES_ICON = new GIcon("icon.options.node.leaf");
ResourceManager.loadImage("images/closedSmallFolder.png");
private final static Icon PROPERTIES_ICON =
ResourceManager.loadImage("images/document-properties.png");
private final Options options; private final Options options;
private final String name; private final String name;
@ -46,7 +43,7 @@ class OptionsTreeNode extends GTreeLazyNode {
@Override @Override
protected List<GTreeNode> generateChildren() { protected List<GTreeNode> generateChildren() {
List<GTreeNode> childList = new ArrayList<GTreeNode>(); List<GTreeNode> childList = new ArrayList<>();
if (options.getOptionsEditor() == null) { // if hasOptionsEditor, don't show child options if (options.getOptionsEditor() == null) { // if hasOptionsEditor, don't show child options
List<Options> childOptionsList = options.getChildOptions(); List<Options> childOptionsList = options.getChildOptions();
for (Options childOptions : childOptionsList) { for (Options childOptions : childOptionsList) {
@ -108,7 +105,7 @@ class OptionsTreeNode extends GTreeLazyNode {
public List<String> getOptionNames() { public List<String> getOptionNames() {
if (options == null) { if (options == null) {
return new ArrayList<String>(); return new ArrayList<>();
} }
return options.getLeafOptionNames(); return options.getLeafOptionNames();
} }

View file

@ -25,6 +25,7 @@ import org.jdesktop.animation.timing.Animator.RepeatBehavior;
import org.jdesktop.animation.timing.TimingTargetAdapter; import org.jdesktop.animation.timing.TimingTargetAdapter;
import org.jdesktop.animation.timing.interpolation.PropertySetter; import org.jdesktop.animation.timing.interpolation.PropertySetter;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors.Java; import generic.theme.GThemeDefaults.Colors.Java;
import generic.theme.GThemeDefaults.Colors.Palette; import generic.theme.GThemeDefaults.Colors.Palette;
import generic.util.WindowUtilities; import generic.util.WindowUtilities;
@ -33,7 +34,6 @@ import ghidra.util.Msg;
import ghidra.util.bean.GGlassPane; import ghidra.util.bean.GGlassPane;
import ghidra.util.bean.GGlassPanePainter; import ghidra.util.bean.GGlassPanePainter;
import ghidra.util.exception.AssertException; import ghidra.util.exception.AssertException;
import resources.ResourceManager;
public class AnimationUtils { public class AnimationUtils {
@ -1171,6 +1171,7 @@ public class AnimationUtils {
private static class DragonImagePainter implements GGlassPanePainter { private static class DragonImagePainter implements GGlassPanePainter {
private static final GIcon ICON = new GIcon("icon.dragon.256");
private Component component; private Component component;
private double percentComplete = 0.0; private double percentComplete = 0.0;
@ -1196,9 +1197,7 @@ public class AnimationUtils {
AlphaComposite.getInstance(AlphaComposite.SrcOver.getRule(), alpha); AlphaComposite.getInstance(AlphaComposite.SrcOver.getRule(), alpha);
g2d.setComposite(alphaComposite); g2d.setComposite(alphaComposite);
ImageIcon ghidra = ResourceManager.loadImage("images/GhidraIcon256.png"); Image ghidraImage = ICON.getImageIcon().getImage();
Image ghidraImage = ghidra.getImage();
Rectangle fullBounds = component.getBounds(); Rectangle fullBounds = component.getBounds();
fullBounds = fullBounds =
SwingUtilities.convertRectangle(component.getParent(), fullBounds, glassPane); SwingUtilities.convertRectangle(component.getParent(), fullBounds, glassPane);

View file

@ -30,18 +30,21 @@ import docking.widgets.EmptyBorderButton;
import docking.widgets.checkbox.GCheckBox; import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDHtmlLabel; import docking.widgets.label.GDHtmlLabel;
import docking.widgets.label.GDLabel; import docking.widgets.label.GDLabel;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors.Palette; import generic.theme.GThemeDefaults.Colors.Palette;
import ghidra.util.HTMLUtilities; import ghidra.util.HTMLUtilities;
import ghidra.util.exception.CancelledException; import ghidra.util.exception.CancelledException;
import ghidra.util.layout.PairLayout; import ghidra.util.layout.PairLayout;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
import ghidra.util.task.TaskMonitorComponent; import ghidra.util.task.TaskMonitorComponent;
import resources.ResourceManager; import resources.Icons;
public class ConditionTestPanel extends JPanel { public class ConditionTestPanel extends JPanel {
static final Icon ERROR_ICON = ResourceManager.loadImage("images/edit-delete.png");
static final Icon WARNING_ICON = ResourceManager.loadImage("images/dialog-warning.png"); private static final GIcon RUN_ICON = new GIcon("icon.run");
static final Icon PASSED_ICON = ResourceManager.loadImage("images/checkmark_green.gif"); static final Icon ERROR_ICON = Icons.ERROR_ICON;
static final Icon WARNING_ICON = Icons.WARNING_ICON;
static final Icon PASSED_ICON = new GIcon("icon.checkmark.green");
private ConditionTestModel conditionTestModel; private ConditionTestModel conditionTestModel;
private TaskMonitorComponent taskMonitor; private TaskMonitorComponent taskMonitor;
private List<TestPanel> testPanelList = new ArrayList<>(); private List<TestPanel> testPanelList = new ArrayList<>();
@ -191,7 +194,7 @@ public class ConditionTestPanel extends JPanel {
private Component createRunAndSummaryPanel() { private Component createRunAndSummaryPanel() {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
JButton runButton = new EmptyBorderButton(ResourceManager.loadImage("images/play.png")); JButton runButton = new EmptyBorderButton(RUN_ICON);
runButton.addActionListener(e -> conditionTestModel.runTests(taskMonitor)); runButton.addActionListener(e -> conditionTestModel.runTests(taskMonitor));
JPanel buttonPanel = new JPanel(new BorderLayout()); JPanel buttonPanel = new JPanel(new BorderLayout());
buttonPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 0)); buttonPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 0));
@ -262,7 +265,7 @@ public class ConditionTestPanel extends JPanel {
ConditionTestPanel ctPanel = new ConditionTestPanel(list); ConditionTestPanel ctPanel = new ConditionTestPanel(list);
frame.getContentPane().add(ctPanel); frame.getContentPane().add(ctPanel);
frame.pack(); frame.pack();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setVisible(true); frame.setVisible(true);
} }

View file

@ -17,20 +17,20 @@ package docking.widgets.fieldpanel.field;
import java.awt.*; import java.awt.*;
import javax.swing.ImageIcon; import javax.swing.*;
import javax.swing.JComponent;
import docking.widgets.fieldpanel.internal.FieldBackgroundColorManager; import docking.widgets.fieldpanel.internal.FieldBackgroundColorManager;
import docking.widgets.fieldpanel.internal.PaintContext; import docking.widgets.fieldpanel.internal.PaintContext;
import docking.widgets.fieldpanel.support.DefaultRowColLocation; import docking.widgets.fieldpanel.support.DefaultRowColLocation;
import docking.widgets.fieldpanel.support.RowColLocation; import docking.widgets.fieldpanel.support.RowColLocation;
import resources.ResourceManager;
/** /**
* Field to display an image. * Field to display an image.
*/ */
public class SimpleImageField implements Field { public class SimpleImageField implements Field {
protected ImageIcon icon; protected ImageIcon imageIon;
protected FontMetrics metrics; protected FontMetrics metrics;
protected int startX; protected int startX;
protected int width; protected int width;
@ -47,7 +47,7 @@ public class SimpleImageField implements Field {
* @param startY the starting y coordinate of the field. * @param startY the starting y coordinate of the field.
* @param width the width of the field. * @param width the width of the field.
*/ */
public SimpleImageField(ImageIcon icon, FontMetrics metrics, int startX, int startY, public SimpleImageField(Icon icon, FontMetrics metrics, int startX, int startY,
int width) { int width) {
this(icon, metrics, startX, startY, width, false); this(icon, metrics, startX, startY, width, false);
} }
@ -61,13 +61,13 @@ public class SimpleImageField implements Field {
* @param width the width of the field. * @param width the width of the field.
* @param center flag to center the image in the field. * @param center flag to center the image in the field.
*/ */
public SimpleImageField(ImageIcon icon, FontMetrics metrics, int startX, int startY, int width, public SimpleImageField(Icon icon, FontMetrics metrics, int startX, int startY, int width,
boolean center) { boolean center) {
this.heightAbove = metrics.getMaxAscent() + metrics.getLeading(); this.heightAbove = metrics.getMaxAscent() + metrics.getLeading();
this.height = heightAbove + metrics.getMaxDescent(); this.height = heightAbove + metrics.getMaxDescent();
this.icon = icon; this.imageIon = ResourceManager.getImageIcon(icon);
this.metrics = metrics; this.metrics = metrics;
this.startX = startX; this.startX = startX;
this.width = width; this.width = width;
@ -161,7 +161,7 @@ public class SimpleImageField implements Field {
@Override @Override
public int getPreferredWidth() { public int getPreferredWidth() {
return icon.getIconWidth(); return imageIon.getIconWidth();
} }
@Override @Override
@ -189,28 +189,28 @@ public class SimpleImageField implements Field {
public void paint(JComponent c, Graphics g, PaintContext context, public void paint(JComponent c, Graphics g, PaintContext context,
Rectangle clip, FieldBackgroundColorManager map, RowColLocation cursorLoc, Rectangle clip, FieldBackgroundColorManager map, RowColLocation cursorLoc,
int rowHeight) { int rowHeight) {
if (icon == null) { if (imageIon == null) {
return; return;
} }
int tmpWidth = icon.getIconWidth(); int tmpWidth = imageIon.getIconWidth();
int tmpHeight = icon.getIconHeight(); int tmpHeight = imageIon.getIconHeight();
int xoffset = 0; int xoffset = 0;
int yoffset = 0; int yoffset = 0;
// if we are centering the image, then compute the offsets // if we are centering the image, then compute the offsets
// //
if (center) { if (center) {
if (width > icon.getIconWidth()) { if (width > imageIon.getIconWidth()) {
xoffset = width / 2 - icon.getIconWidth() / 2; xoffset = width / 2 - imageIon.getIconWidth() / 2;
} }
if (height > icon.getIconHeight()) { if (height > imageIon.getIconHeight()) {
yoffset = height / 2 - icon.getIconHeight() / 2; yoffset = height / 2 - imageIon.getIconHeight() / 2;
} }
} }
// check to make sure that we are not going to draw outside the // check to make sure that we are not going to draw outside the
// max rectagle // max rectangle
// //
if (tmpWidth > width) { if (tmpWidth > width) {
tmpWidth = width; tmpWidth = width;
@ -221,8 +221,10 @@ public class SimpleImageField implements Field {
// draw the image, scaling to fit inside specified rectangle // draw the image, scaling to fit inside specified rectangle
// //
g.drawImage(icon.getImage(), startX + xoffset, -heightAbove + yoffset, tmpWidth, tmpHeight,
icon.getImageObserver()); g.drawImage(imageIon.getImage(), startX + xoffset, -heightAbove + yoffset, tmpWidth,
tmpHeight,
null);
if (cursorLoc != null) { if (cursorLoc != null) {
g.setColor(context.getCursorColor()); g.setColor(context.getCursorColor());

View file

@ -37,9 +37,8 @@ import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel; import docking.widgets.label.GLabel;
import docking.widgets.list.GListCellRenderer; import docking.widgets.list.GListCellRenderer;
import generic.theme.GColor; import generic.theme.GColor;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors.Palette; import generic.theme.GThemeDefaults.Colors.Palette;
import ghidra.framework.OperatingSystem;
import ghidra.framework.Platform;
import ghidra.framework.preferences.Preferences; import ghidra.framework.preferences.Preferences;
import ghidra.util.*; import ghidra.util.*;
import ghidra.util.exception.AssertException; import ghidra.util.exception.AssertException;
@ -50,8 +49,7 @@ import ghidra.util.task.SwingUpdateManager;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
import ghidra.util.worker.Job; import ghidra.util.worker.Job;
import ghidra.util.worker.Worker; import ghidra.util.worker.Worker;
import resources.*; import resources.Icons;
import resources.icons.TranslateIcon;
import util.CollectionUtils; import util.CollectionUtils;
import util.HistoryList; import util.HistoryList;
@ -95,37 +93,20 @@ public class GhidraFileChooser extends DialogComponentProvider implements FileFi
private static final int PAD = 5; private static final int PAD = 5;
private static Icon refreshIcon = Icons.REFRESH_ICON; private static final Icon ICON_BACK = new GIcon("icon.left");
private static Icon backIcon = ResourceManager.loadImage("images/left.png"); private static final Icon ICON_FORWARD = new GIcon("icon.right");
private static Icon forwardIcon = ResourceManager.loadImage("images/right.png"); private static final Icon ICON_UP = new GIcon("icon.up");
private static Icon detailsIcon = ResourceManager.loadImage("images/table.png"); private static final Icon ICON_DETAILS = new GIcon("icon.table");
private static Icon optionsIcon = ResourceManager.loadImage("images/document-properties.png"); private static final Icon ICON_OPTIONS = new GIcon("icon.properties");
private static Icon newFolderIcon = null; private static final Icon ICON_NEW_FOLDER = new GIcon("icon.folder.new");
private static Icon upIcon = null;
static {
if (Platform.CURRENT_PLATFORM.getOperatingSystem() == OperatingSystem.WINDOWS ||
Platform.CURRENT_PLATFORM.getOperatingSystem() == OperatingSystem.LINUX) {
newFolderIcon = getIcon("FileChooser.newFolderIcon"); // 32 pixel side-bar icons
upIcon = getIcon("FileChooser.upFolderIcon"); private static final Icon ICON_MY_COMPUTER = new GIcon("icon.filechooser.places.my.computer");
} private static final Icon ICON_DESKTOP = new GIcon("icon.filechooser.places.desktop");
if (newFolderIcon == null) { private static final Icon ICON_HOME = new GIcon("icon.filechooser.places.home");
newFolderIcon = ResourceManager.loadImage("images/folder_add.png"); private static final Icon ICON_RECENT = new GIcon("icon.filechooser.places.recent");
}
if (upIcon == null) {
upIcon = ResourceManager.loadImage("images/up.png");
}
}
private static Icon getIcon(String iconName) { // base and overlay?
try {
return UIManager.getIcon(iconName);
}
catch (Exception e) {
// we tried; just return null
}
return null;
}
/** Instruction to display only files. */ /** Instruction to display only files. */
public static final int FILES_ONLY = 0; public static final int FILES_ONLY = 0;
@ -309,7 +290,7 @@ public class GhidraFileChooser extends DialogComponentProvider implements FileFi
} }
}; };
myComputerButton.setName("MY_COMPUTER_BUTTON"); myComputerButton.setName("MY_COMPUTER_BUTTON");
myComputerButton.setIcon(ResourceManager.loadImage("images/computer.png")); myComputerButton.setIcon(ICON_MY_COMPUTER);
myComputerButton.addActionListener(e -> updateMyComputer()); myComputerButton.addActionListener(e -> updateMyComputer());
myComputerButton.setForeground(FOREROUND_COLOR); myComputerButton.setForeground(FOREROUND_COLOR);
@ -320,7 +301,7 @@ public class GhidraFileChooser extends DialogComponentProvider implements FileFi
} }
}; };
desktopButton.setName("DESKTOP_BUTTON"); desktopButton.setName("DESKTOP_BUTTON");
desktopButton.setIcon(ResourceManager.loadImage("images/desktop.png")); desktopButton.setIcon(ICON_DESKTOP);
desktopButton.addActionListener(e -> updateDesktop()); desktopButton.addActionListener(e -> updateDesktop());
desktopButton.setForeground(FOREROUND_COLOR); desktopButton.setForeground(FOREROUND_COLOR);
desktopButton.setEnabled(fileChooserModel.getDesktopDirectory() != null); desktopButton.setEnabled(fileChooserModel.getDesktopDirectory() != null);
@ -332,7 +313,7 @@ public class GhidraFileChooser extends DialogComponentProvider implements FileFi
} }
}; };
homeButton.setName("HOME_BUTTON"); homeButton.setName("HOME_BUTTON");
homeButton.setIcon(ResourceManager.loadImage("images/user-home.png")); homeButton.setIcon(ICON_HOME);
homeButton.addActionListener(e -> updateHome()); homeButton.addActionListener(e -> updateHome());
homeButton.setForeground(FOREROUND_COLOR); homeButton.setForeground(FOREROUND_COLOR);
@ -343,12 +324,7 @@ public class GhidraFileChooser extends DialogComponentProvider implements FileFi
} }
}; };
recentButton.setName("RECENT_BUTTON"); recentButton.setName("RECENT_BUTTON");
Icon baseIcon = ResourceManager.loadImage("images/inode-directory.png"); recentButton.setIcon(ICON_RECENT);
Icon overlayIcon = ResourceManager.loadImage("images/edit-undo.png");
MultiIcon multiIcon = new MultiIcon(baseIcon);
multiIcon.addIcon(new TranslateIcon(overlayIcon, 6, 10));
recentButton.setIcon(multiIcon);
recentButton.addActionListener(e -> updateRecent()); recentButton.addActionListener(e -> updateRecent());
recentButton.setForeground(FOREROUND_COLOR); recentButton.setForeground(FOREROUND_COLOR);
@ -501,19 +477,19 @@ public class GhidraFileChooser extends DialogComponentProvider implements FileFi
} }
private JButton[] buildNavigationButtons() { private JButton[] buildNavigationButtons() {
backButton = new EmptyBorderButton(backIcon); backButton = new EmptyBorderButton(ICON_BACK);
backButton.setName("BACK_BUTTON"); backButton.setName("BACK_BUTTON");
backButton.setEnabled(false); backButton.setEnabled(false);
backButton.setToolTipText("Go to last folder visited"); backButton.setToolTipText("Go to last folder visited");
backButton.addActionListener(e -> goBack()); backButton.addActionListener(e -> goBack());
forwardButton = new EmptyBorderButton(forwardIcon); forwardButton = new EmptyBorderButton(ICON_FORWARD);
forwardButton.setName("FORWARD_BUTTON"); forwardButton.setName("FORWARD_BUTTON");
forwardButton.setEnabled(false); forwardButton.setEnabled(false);
forwardButton.setToolTipText("Go to previous folder visited"); forwardButton.setToolTipText("Go to previous folder visited");
forwardButton.addActionListener(e -> goForward()); forwardButton.addActionListener(e -> goForward());
upLevelButton = new EmptyBorderButton(upIcon); upLevelButton = new EmptyBorderButton(ICON_UP);
upLevelButton.setName(UP_BUTTON_NAME); upLevelButton.setName(UP_BUTTON_NAME);
upLevelButton.setToolTipText("Up one level"); upLevelButton.setToolTipText("Up one level");
upLevelButton.addActionListener(e -> goUpOneDirectoryLevel()); upLevelButton.addActionListener(e -> goUpOneDirectoryLevel());
@ -523,17 +499,17 @@ public class GhidraFileChooser extends DialogComponentProvider implements FileFi
private JButton[] buildNonNavigationButtons() { private JButton[] buildNonNavigationButtons() {
newFolderButton = new EmptyBorderButton(newFolderIcon); newFolderButton = new EmptyBorderButton(ICON_NEW_FOLDER);
newFolderButton.setName("NEW_BUTTON"); newFolderButton.setName("NEW_BUTTON");
newFolderButton.setToolTipText("Create new folder"); newFolderButton.setToolTipText("Create new folder");
newFolderButton.addActionListener(e -> createNewFolder()); newFolderButton.addActionListener(e -> createNewFolder());
refreshButton = new EmptyBorderButton(refreshIcon); refreshButton = new EmptyBorderButton(Icons.REFRESH_ICON);
refreshButton.setName("REFRESH_BUTTON"); refreshButton.setName("REFRESH_BUTTON");
refreshButton.setToolTipText("Rescan current directory"); refreshButton.setToolTipText("Rescan current directory");
refreshButton.addActionListener(e -> rescanCurrentDirectory()); refreshButton.addActionListener(e -> rescanCurrentDirectory());
detailsButton = new EmptyBorderToggleButton(detailsIcon); detailsButton = new EmptyBorderToggleButton(ICON_DETAILS);
detailsButton.setName("DETAILS_BUTTON"); detailsButton.setName("DETAILS_BUTTON");
detailsButton.setToolTipText("Show details"); detailsButton.setToolTipText("Show details");
detailsButton.addActionListener(e -> { detailsButton.addActionListener(e -> {
@ -541,7 +517,7 @@ public class GhidraFileChooser extends DialogComponentProvider implements FileFi
doSetShowDetails(!showDetails); doSetShowDetails(!showDetails);
}); });
optionsButton = new EmptyBorderButton(optionsIcon); optionsButton = new EmptyBorderButton(ICON_OPTIONS);
optionsButton.setName("OPTIONS_BUTTON"); optionsButton.setName("OPTIONS_BUTTON");
optionsButton.setToolTipText("File Chooser Options"); optionsButton.setToolTipText("File Chooser Options");
optionsButton.addActionListener(e -> { optionsButton.addActionListener(e -> {

View file

@ -15,19 +15,18 @@
*/ */
package docking.widgets.filechooser; package docking.widgets.filechooser;
import java.io.File;
import java.io.FileFilter;
import java.util.*; import java.util.*;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.io.File;
import java.io.FileFilter;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.filechooser.FileSystemView; import javax.swing.filechooser.FileSystemView;
import generic.theme.GIcon;
import ghidra.util.filechooser.GhidraFileChooserModel; import ghidra.util.filechooser.GhidraFileChooserModel;
import resources.ResourceManager; import resources.Icons;
import utility.function.Callback; import utility.function.Callback;
/** /**
@ -35,10 +34,8 @@ import utility.function.Callback;
* *
*/ */
public class LocalFileChooserModel implements GhidraFileChooserModel { public class LocalFileChooserModel implements GhidraFileChooserModel {
private static final ImageIcon PROBLEM_FILE_ICON = private static final Icon PROBLEM_FILE_ICON = Icons.WARNING_ICON;
ResourceManager.loadImage("images/unknown.gif"); private static final Icon PENDING_ROOT_ICON = new GIcon("icon.drive");
private static final ImageIcon PENDING_ROOT_ICON =
ResourceManager.loadImage("images/famfamfam_silk_icons_v013/drive.png");
private static final FileSystemRootInfo FS_ROOT_INFO = new FileSystemRootInfo(); private static final FileSystemRootInfo FS_ROOT_INFO = new FileSystemRootInfo();
private static final FileSystemView FS_VIEW = FileSystemView.getFileSystemView(); private static final FileSystemView FS_VIEW = FileSystemView.getFileSystemView();
@ -160,8 +157,9 @@ public class LocalFileChooserModel implements GhidraFileChooserModel {
return src.renameTo(dest); return src.renameTo(dest);
} }
//--------------------------------------------------------------------------------------------- //=================================================================================================
// Inner Classes
//=================================================================================================
/** /**
* Handles querying / caching information about file system root locations. * Handles querying / caching information about file system root locations.
* <p> * <p>

View file

@ -23,16 +23,16 @@ import javax.swing.Icon;
import org.jdom.Element; import org.jdom.Element;
import generic.theme.GIcon;
import resources.MultiIcon; import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.TranslateIcon; import resources.icons.TranslateIcon;
public class FilterOptions { public class FilterOptions {
private static final Icon CONTAINS_ICON = ResourceManager.loadImage("images/page_code.png"); private static final Icon CONTAINS_ICON = new GIcon("icon.filter.options.contains");
private static final Icon STARTS_WITH_ICON = ResourceManager.loadImage("images/page_go.png"); private static final Icon STARTS_WITH_ICON = new GIcon("icon.filter.options.starts.with");
private static final Icon EXACT_MATCH_ICON = ResourceManager.loadImage("images/page_green.png"); private static final Icon EXACT_MATCH_ICON = new GIcon("icon.filter.options.exact");
private static final Icon REG_EX_ICON = ResourceManager.loadImage("images/page_excel.png"); private static final Icon REG_EX_ICON = new GIcon("icon.filter.options.regex");
private static final Icon NOT_ICON = ResourceManager.loadImage("images/bullet_delete.png"); private static final Icon NOT_ICON = new GIcon("icon.filter.options.not");
final static Map<Character, String> DELIMITER_NAME_MAP = new HashMap<>(20); final static Map<Character, String> DELIMITER_NAME_MAP = new HashMap<>(20);
@ -325,8 +325,13 @@ public class FilterOptions {
char delim = getDelimitingCharacter(); char delim = getDelimitingCharacter();
String delimName = DELIMITER_NAME_MAP.get(delim); String delimName = DELIMITER_NAME_MAP.get(delim);
buf.append("'").append(delim).append("'").append("&nbsp; <i>(").append( buf.append("'")
delimName).append(")</i>"); .append(delim)
.append("'")
.append("&nbsp; <i>(")
.append(
delimName)
.append(")</i>");
buf.append("</td>"); buf.append("</td>");
buf.append("</tr>"); buf.append("</tr>");
} }

View file

@ -15,20 +15,20 @@
*/ */
package docking.widgets.imagepanel.actions; package docking.widgets.imagepanel.actions;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.MenuData; import docking.action.MenuData;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import docking.widgets.imagepanel.ImagePanel; import docking.widgets.imagepanel.ImagePanel;
import resources.ResourceManager; import generic.theme.GIcon;
/** /**
* An action to re-center the image on a NavigableImagePanel. * An action to re-center the image on a NavigableImagePanel.
*/ */
public class ResetTranslationAction extends ImagePanelDockingAction { public class ResetTranslationAction extends ImagePanelDockingAction {
private static final ImageIcon RECENTER_ICON = ResourceManager.loadImage("images/tag.png"); private static final Icon RECENTER_ICON = new GIcon("icon.widget.imagepanel.reset");
public ResetTranslationAction(String owner, ImagePanel imagePanel) { public ResetTranslationAction(String owner, ImagePanel imagePanel) {
super("Recenter", owner, imagePanel); super("Recenter", owner, imagePanel);

View file

@ -30,7 +30,7 @@ import docking.widgets.filechooser.GhidraFileChooserMode;
import docking.widgets.imagepanel.ImagePanel; import docking.widgets.imagepanel.ImagePanel;
import generic.util.image.ImageUtils; import generic.util.image.ImageUtils;
import ghidra.util.Msg; import ghidra.util.Msg;
import resources.ResourceManager; import resources.Icons;
/** /**
* An action to save the image from a NavigableImagePanel to a file. * An action to save the image from a NavigableImagePanel to a file.
@ -51,7 +51,7 @@ public class SaveImageAction extends ImagePanelDockingAction {
super("Export Image", owner, imagePanel); super("Export Image", owner, imagePanel);
setPopupMenuData(new MenuData(new String[] { "Export Image As..." }, "io")); setPopupMenuData(new MenuData(new String[] { "Export Image As..." }, "io"));
setToolBarData(new ToolBarData(ResourceManager.loadImage("images/disk_save_as.png"))); setToolBarData(new ToolBarData(Icons.SAVE_AS_ICON));
} }

View file

@ -15,27 +15,27 @@
*/ */
package docking.widgets.imagepanel.actions; package docking.widgets.imagepanel.actions;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.MenuData; import docking.action.MenuData;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import docking.widgets.imagepanel.ImagePanel; import docking.widgets.imagepanel.ImagePanel;
import resources.ResourceManager; import generic.theme.GIcon;
/** /**
* An action to zoom the image on a NavigableImagePanel. * An action to zoom the image on a NavigableImagePanel.
*/ */
public class ZoomInAction extends ImagePanelDockingAction { public class ZoomInAction extends ImagePanelDockingAction {
private static final ImageIcon ZOOM_IN_ICON = ResourceManager.loadImage("images/zoom_in.png"); private static final Icon ICON = new GIcon("icon.widget.imagepanel.zoom.in");
public ZoomInAction(String owner, ImagePanel imagePanel) { public ZoomInAction(String owner, ImagePanel imagePanel) {
super("Zoom In", owner, imagePanel); super("Zoom In", owner, imagePanel);
setPopupMenuData(new MenuData(new String[] { "Zoom in" }, "view")); setPopupMenuData(new MenuData(new String[] { "Zoom in" }, "view"));
setToolBarData(new ToolBarData(ZOOM_IN_ICON)); setToolBarData(new ToolBarData(ICON));
} }
@Override @Override

View file

@ -15,20 +15,20 @@
*/ */
package docking.widgets.imagepanel.actions; package docking.widgets.imagepanel.actions;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.MenuData; import docking.action.MenuData;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import docking.widgets.imagepanel.ImagePanel; import docking.widgets.imagepanel.ImagePanel;
import resources.ResourceManager; import generic.theme.GIcon;
/** /**
* An action to de-zoom the image on a NavigableImagePanel. * An action to de-zoom the image on a NavigableImagePanel.
*/ */
public class ZoomOutAction extends ImagePanelDockingAction { public class ZoomOutAction extends ImagePanelDockingAction {
private static final ImageIcon ZOOM_OUT_ICON = ResourceManager.loadImage("images/zoom_out.png"); private static final Icon ZOOM_OUT_ICON = new GIcon("icon.widget.imagepanel.zoom.out");
public ZoomOutAction(String owner, ImagePanel imagePanel) { public ZoomOutAction(String owner, ImagePanel imagePanel) {
super("Zoom Out", owner, imagePanel); super("Zoom Out", owner, imagePanel);

View file

@ -15,19 +15,19 @@
*/ */
package docking.widgets.imagepanel.actions; package docking.widgets.imagepanel.actions;
import javax.swing.ImageIcon; import javax.swing.Icon;
import docking.ActionContext; import docking.ActionContext;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import docking.widgets.imagepanel.ImagePanel; import docking.widgets.imagepanel.ImagePanel;
import resources.ResourceManager; import generic.theme.GIcon;
/** /**
* An action to reset the zoom of a NavigableImagePanel. * An action to reset the zoom of a NavigableImagePanel.
*/ */
public class ZoomResetAction extends ImagePanelDockingAction { public class ZoomResetAction extends ImagePanelDockingAction {
private static final ImageIcon ZOOM_ICON = ResourceManager.loadImage("images/zoom.png"); private static final Icon ZOOM_ICON = new GIcon("icon.widget.imagepanel.reset");
public ZoomResetAction(String owner, ImagePanel imagePanel) { public ZoomResetAction(String owner, ImagePanel imagePanel) {
super("Reset Zoom", owner, imagePanel); super("Reset Zoom", owner, imagePanel);

View file

@ -35,7 +35,7 @@ import ghidra.framework.options.SaveState;
import ghidra.framework.preferences.Preferences; import ghidra.framework.preferences.Preferences;
import ghidra.util.filechooser.GhidraFileChooserModel; import ghidra.util.filechooser.GhidraFileChooserModel;
import ghidra.util.filechooser.GhidraFileFilter; import ghidra.util.filechooser.GhidraFileFilter;
import resources.ResourceManager; import resources.Icons;
/** /**
* Component that has a table to show pathnames; the panel includes buttons to control * Component that has a table to show pathnames; the panel includes buttons to control
@ -162,26 +162,26 @@ public class PathManager {
panel = new JPanel(new BorderLayout(5, 5)); panel = new JPanel(new BorderLayout(5, 5));
if (allowOrdering) { if (allowOrdering) {
upButton = new JButton(ResourceManager.loadImage("images/up.png")); upButton = new JButton(Icons.UP_ICON);
upButton.setName("UpArrow"); upButton.setName("UpArrow");
upButton.setToolTipText("Move the selected path up in list"); upButton.setToolTipText("Move the selected path up in list");
upButton.addActionListener(e -> up()); upButton.addActionListener(e -> up());
upButton.setFocusable(false); upButton.setFocusable(false);
downButton = new JButton(ResourceManager.loadImage("images/down.png")); downButton = new JButton(Icons.DOWN_ICON);
downButton.setName("DownArrow"); downButton.setName("DownArrow");
downButton.setToolTipText("Move the selected path down in list"); downButton.setToolTipText("Move the selected path down in list");
downButton.addActionListener(e -> down()); downButton.addActionListener(e -> down());
downButton.setFocusable(false); downButton.setFocusable(false);
} }
addButton = new JButton(ResourceManager.loadImage("images/Plus.png")); addButton = new JButton(Icons.ADD_ICON);
addButton.setName("AddPath"); addButton.setName("AddPath");
addButton.setToolTipText("Display file chooser to select files to add"); addButton.setToolTipText("Display file chooser to select files to add");
addButton.addActionListener(e -> add()); addButton.addActionListener(e -> add());
addButton.setFocusable(false); addButton.setFocusable(false);
removeButton = new JButton(ResourceManager.loadImage("images/edit-delete.png")); removeButton = new JButton(Icons.DELETE_ICON);
removeButton.setName("RemovePath"); removeButton.setName("RemovePath");
removeButton.setToolTipText("Remove selected path(s) from list"); removeButton.setToolTipText("Remove selected path(s) from list");
removeButton.addActionListener(e -> remove()); removeButton.addActionListener(e -> remove());

View file

@ -27,11 +27,12 @@ import docking.widgets.OptionDialog;
import docking.widgets.filechooser.GhidraFileChooser; import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.filechooser.GhidraFileChooserMode; import docking.widgets.filechooser.GhidraFileChooserMode;
import docking.widgets.table.*; import docking.widgets.table.*;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors.Tables; import generic.theme.GThemeDefaults.Colors.Tables;
import ghidra.framework.preferences.Preferences; import ghidra.framework.preferences.Preferences;
import ghidra.util.filechooser.GhidraFileChooserModel; import ghidra.util.filechooser.GhidraFileChooserModel;
import ghidra.util.filechooser.GhidraFileFilter; import ghidra.util.filechooser.GhidraFileFilter;
import resources.ResourceManager; import resources.Icons;
import utility.function.Callback; import utility.function.Callback;
/** /**
@ -39,14 +40,10 @@ import utility.function.Callback;
* the order of the paths, and to add and remove paths. The add button brings up a * the order of the paths, and to add and remove paths. The add button brings up a
* file chooser. Call the setFileChooser() method to control how the file chooser should * file chooser. Call the setFileChooser() method to control how the file chooser should
* behave. If the table entries should not be edited, call setEditingEnabled(false). * behave. If the table entries should not be edited, call setEditingEnabled(false).
*
*
*
*/ */
public class PathnameTablePanel extends JPanel { public class PathnameTablePanel extends JPanel {
private static final long serialVersionUID = 1L;
private static final Icon RESET_ICON = ResourceManager.loadImage("images/trash-empty.png"); private static final Icon RESET_ICON = new GIcon("icon.widget.pathmanager.reset");
private JTable pathnameTable; private JTable pathnameTable;
private PathnameTableModel tableModel; private PathnameTableModel tableModel;
@ -160,19 +157,19 @@ public class PathnameTablePanel extends JPanel {
private void create() { private void create() {
upButton = new JButton(ResourceManager.loadImage("images/up.png")); upButton = new JButton(Icons.UP_ICON);
upButton.setName("UpArrow"); upButton.setName("UpArrow");
upButton.setToolTipText("Move the selected path up in list"); upButton.setToolTipText("Move the selected path up in list");
upButton.addActionListener(e -> up()); upButton.addActionListener(e -> up());
downButton = new JButton(ResourceManager.loadImage("images/down.png")); downButton = new JButton(Icons.DOWN_ICON);
downButton.setName("DownArrow"); downButton.setName("DownArrow");
downButton.setToolTipText("Move the selected path down in list"); downButton.setToolTipText("Move the selected path down in list");
downButton.addActionListener(e -> down()); downButton.addActionListener(e -> down());
addButton = new JButton(ResourceManager.loadImage("images/Plus.png")); addButton = new JButton(Icons.ADD_ICON);
addButton.setName("AddPath"); addButton.setName("AddPath");
addButton.setToolTipText("Display file chooser to select files to add"); addButton.setToolTipText("Display file chooser to select files to add");
addButton.addActionListener(e -> add()); addButton.addActionListener(e -> add());
removeButton = new JButton(ResourceManager.loadImage("images/edit-delete.png")); removeButton = new JButton(Icons.DELETE_ICON);
removeButton.setName("RemovePath"); removeButton.setName("RemovePath");
removeButton.setToolTipText("Remove selected path(s) from list"); removeButton.setToolTipText("Remove selected path(s) from list");
removeButton.addActionListener(e -> remove()); removeButton.addActionListener(e -> remove());

View file

@ -38,11 +38,12 @@ import docking.widgets.AutoLookup;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.dialogs.SettingsDialog; import docking.widgets.dialogs.SettingsDialog;
import docking.widgets.filechooser.GhidraFileChooser; import docking.widgets.filechooser.GhidraFileChooser;
import generic.theme.GIcon;
import ghidra.docking.settings.*; import ghidra.docking.settings.*;
import ghidra.framework.preferences.Preferences; import ghidra.framework.preferences.Preferences;
import ghidra.util.*; import ghidra.util.*;
import ghidra.util.exception.AssertException; import ghidra.util.exception.AssertException;
import resources.ResourceManager; import resources.Icons;
/** /**
* A sub-class of <code>JTable</code> that provides navigation and auto-lookup. * A sub-class of <code>JTable</code> that provides navigation and auto-lookup.
@ -74,6 +75,7 @@ import resources.ResourceManager;
*/ */
public class GTable extends JTable { public class GTable extends JTable {
private static final GIcon ICON_SPREADSHEET = new GIcon("icon.spreadsheet");
private static final KeyStroke COPY_KEY_STROKE = private static final KeyStroke COPY_KEY_STROKE =
KeyStroke.getKeyStroke(KeyEvent.VK_C, CONTROL_KEY_MODIFIER_MASK); KeyStroke.getKeyStroke(KeyEvent.VK_C, CONTROL_KEY_MODIFIER_MASK);
private static final KeyStroke COPY_COLUMN_KEY_STROKE = private static final KeyStroke COPY_COLUMN_KEY_STROKE =
@ -1279,7 +1281,7 @@ public class GTable extends JTable {
//@formatter:off //@formatter:off
copyAction.setPopupMenuData(new MenuData( copyAction.setPopupMenuData(new MenuData(
new String[] { "Copy", "Copy" }, new String[] { "Copy", "Copy" },
ResourceManager.loadImage("images/page_white_copy.png"), Icons.COPY_ICON,
actionMenuGroup, NO_MNEMONIC, actionMenuGroup, NO_MNEMONIC,
Integer.toString(subGroupIndex++) Integer.toString(subGroupIndex++)
) )
@ -1300,7 +1302,7 @@ public class GTable extends JTable {
copyCurrentColumnAction.setPopupMenuData(new MenuData( copyCurrentColumnAction.setPopupMenuData(new MenuData(
new String[] { "Copy", new String[] { "Copy",
"Copy Current Column" }, "Copy Current Column" },
ResourceManager.loadImage("images/page_white_copy.png"), Icons.COPY_ICON,
actionMenuGroup, actionMenuGroup,
NO_MNEMONIC, NO_MNEMONIC,
Integer.toString(subGroupIndex++) Integer.toString(subGroupIndex++)
@ -1320,7 +1322,7 @@ public class GTable extends JTable {
//@formatter:off //@formatter:off
copyColumnsAction.setPopupMenuData(new MenuData( copyColumnsAction.setPopupMenuData(new MenuData(
new String[] { "Copy", "Copy Columns..." }, new String[] { "Copy", "Copy Columns..." },
ResourceManager.loadImage("images/page_white_copy.png"), Icons.COPY_ICON,
actionMenuGroup, actionMenuGroup,
NO_MNEMONIC, NO_MNEMONIC,
Integer.toString(subGroupIndex++) Integer.toString(subGroupIndex++)
@ -1339,7 +1341,7 @@ public class GTable extends JTable {
//@formatter:off //@formatter:off
exportAction.setPopupMenuData(new MenuData( exportAction.setPopupMenuData(new MenuData(
new String[] { "Export", GTableToCSV.TITLE + "..." }, new String[] { "Export", GTableToCSV.TITLE + "..." },
ResourceManager.loadImage("images/application-vnd.oasis.opendocument.spreadsheet-template.png"), ICON_SPREADSHEET,
actionMenuGroup, actionMenuGroup,
NO_MNEMONIC, NO_MNEMONIC,
Integer.toString(subGroupIndex++) Integer.toString(subGroupIndex++)
@ -1359,7 +1361,7 @@ public class GTable extends JTable {
//@formatter:off //@formatter:off
exportColumnsAction.setPopupMenuData(new MenuData( exportColumnsAction.setPopupMenuData(new MenuData(
new String[] { "Export", "Export Columns to CSV..." }, new String[] { "Export", "Export Columns to CSV..." },
ResourceManager.loadImage("images/application-vnd.oasis.opendocument.spreadsheet-template.png"), ICON_SPREADSHEET,
actionMenuGroup, actionMenuGroup,
NO_MNEMONIC, NO_MNEMONIC,
Integer.toString(subGroupIndex++) Integer.toString(subGroupIndex++)

View file

@ -37,6 +37,7 @@ import docking.widgets.label.GDLabel;
import docking.widgets.table.columnfilter.ColumnBasedTableFilter; import docking.widgets.table.columnfilter.ColumnBasedTableFilter;
import docking.widgets.table.columnfilter.ColumnFilterSaveManager; import docking.widgets.table.columnfilter.ColumnFilterSaveManager;
import docking.widgets.table.constraint.dialog.ColumnFilterDialog; import docking.widgets.table.constraint.dialog.ColumnFilterDialog;
import generic.theme.GIcon;
import ghidra.framework.options.PreferenceState; import ghidra.framework.options.PreferenceState;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.Msg; import ghidra.util.Msg;
@ -46,7 +47,6 @@ import ghidra.util.exception.AssertException;
import ghidra.util.task.SwingUpdateManager; import ghidra.util.task.SwingUpdateManager;
import help.HelpService; import help.HelpService;
import resources.Icons; import resources.Icons;
import resources.ResourceManager;
import utilities.util.reflection.ReflectionUtilities; import utilities.util.reflection.ReflectionUtilities;
import utility.function.Callback; import utility.function.Callback;
@ -112,8 +112,8 @@ public class GTableFilterPanel<ROW_OBJECT> extends JPanel {
public static final String FILTER_TEXTFIELD_NAME = "filter.panel.textfield"; public static final String FILTER_TEXTFIELD_NAME = "filter.panel.textfield";
private static final String FILTER_STATE = "FILTER_STATE"; private static final String FILTER_STATE = "FILTER_STATE";
private static final String FILTER_EXTENSION = ".FilterExtension"; private static final String FILTER_EXTENSION = ".FilterExtension";
private static final Icon FILTER_ON_ICON = ResourceManager.loadImage("images/filter_on.png"); private static final Icon FILTER_ON_ICON = new GIcon("icon.widget.filterpanel.filter.on");
private static final Icon FILTER_OFF_ICON = ResourceManager.loadImage("images/filter_off.png"); private static final Icon FILTER_OFF_ICON = new GIcon("icon.widget.filterpanel.filter.off");
private static final Icon APPLY_FILTER_ICON = Icons.OPEN_FOLDER_ICON; private static final Icon APPLY_FILTER_ICON = Icons.OPEN_FOLDER_ICON;
private static final Icon CLEAR_FILTER_ICON = Icons.DELETE_ICON; private static final Icon CLEAR_FILTER_ICON = Icons.DELETE_ICON;

View file

@ -23,6 +23,7 @@ import javax.swing.table.*;
import docking.DockingWindowManager; import docking.DockingWindowManager;
import docking.widgets.table.columnfilter.ColumnBasedTableFilter; import docking.widgets.table.columnfilter.ColumnBasedTableFilter;
import generic.theme.GIcon;
import ghidra.util.HTMLUtilities; import ghidra.util.HTMLUtilities;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import help.HelpService; import help.HelpService;
@ -40,9 +41,9 @@ public class GTableHeader extends JTableHeader {
public static final int HELP_ICON_HEIGHT = 8; public static final int HELP_ICON_HEIGHT = 8;
private static final Icon HELP_ICON = ResourceManager.getScaledIcon( private static final Icon HELP_ICON = ResourceManager.getScaledIcon(
ResourceManager.loadImage("images/info_small.png"), HELP_ICON_HEIGHT, HELP_ICON_HEIGHT); new GIcon("icon.widget.table.header.help"), HELP_ICON_HEIGHT, HELP_ICON_HEIGHT);
private static final Icon HELP_HOVERED_ICON = private static final Icon HELP_HOVERED_ICON =
ResourceManager.getScaledIcon(ResourceManager.loadImage("images/info_small_hover.png"), ResourceManager.getScaledIcon(new GIcon("icon.widget.table.header.help.hovered"),
HELP_ICON_HEIGHT, HELP_ICON_HEIGHT); HELP_ICON_HEIGHT, HELP_ICON_HEIGHT);
private final GTable gTable; private final GTable gTable;

View file

@ -24,6 +24,7 @@ import javax.swing.border.Border;
import javax.swing.table.*; import javax.swing.table.*;
import generic.theme.GColor; import generic.theme.GColor;
import generic.theme.GIcon;
import resources.*; import resources.*;
import resources.icons.EmptyIcon; import resources.icons.EmptyIcon;
import resources.icons.TranslateIcon; import resources.icons.TranslateIcon;
@ -41,7 +42,9 @@ public class GTableHeaderRenderer extends DefaultTableCellRenderer {
private static final Icon EMPTY_ICON = new EmptyIcon(0, 0); private static final Icon EMPTY_ICON = new EmptyIcon(0, 0);
private static final Icon FILTER_ICON = private static final Icon FILTER_ICON =
ResourceManager.getScaledIcon(ResourceManager.loadImage("images/filter_off.png"), 12, 12); ResourceManager.getScaledIcon(new GIcon("icon.widget.filterpanel.filter.off"), 12, 12);
private static final Icon PENDING_ICON = new GIcon("icon.widget.table.header.pending");
private Icon primaryIcon = EMPTY_ICON; private Icon primaryIcon = EMPTY_ICON;
private Icon helpIcon = EMPTY_ICON; private Icon helpIcon = EMPTY_ICON;
@ -290,7 +293,7 @@ public class GTableHeaderRenderer extends DefaultTableCellRenderer {
} }
if (isPendingSort) { if (isPendingSort) {
icon = ResourceManager.loadImage("images/hourglass.png"); icon = PENDING_ICON;
} }
return icon; return icon;

View file

@ -39,7 +39,7 @@ import generic.util.WindowUtilities;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.Msg; import ghidra.util.Msg;
import ghidra.util.layout.VerticalLayout; import ghidra.util.layout.VerticalLayout;
import resources.ResourceManager; import resources.Icons;
import utility.function.Callback; import utility.function.Callback;
/** /**
@ -129,7 +129,7 @@ public class ColumnFilterDialog<R> extends DialogComponentProvider
}; };
saveAction.setHelpLocation(new HelpLocation("Trees", "Save_Filter")); saveAction.setHelpLocation(new HelpLocation("Trees", "Save_Filter"));
saveAction.setDescription("Save Filter"); saveAction.setDescription("Save Filter");
saveAction.setToolBarData(new ToolBarData(ResourceManager.loadImage("images/disk.png"))); saveAction.setToolBarData(new ToolBarData(Icons.SAVE_ICON));
addAction(saveAction); addAction(saveAction);
DockingAction loadAction = new DockingAction("Load", "Filter") { DockingAction loadAction = new DockingAction("Load", "Filter") {
@ -141,7 +141,7 @@ public class ColumnFilterDialog<R> extends DialogComponentProvider
loadAction.setDescription("Load Filter"); loadAction.setDescription("Load Filter");
loadAction.setHelpLocation(new HelpLocation("Trees", "Load_Filter")); loadAction.setHelpLocation(new HelpLocation("Trees", "Load_Filter"));
loadAction.setToolBarData( loadAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/openSmallFolder.png"))); new ToolBarData(Icons.OPEN_FOLDER_ICON));
addAction(loadAction); addAction(loadAction);
} }
@ -224,13 +224,13 @@ public class ColumnFilterDialog<R> extends DialogComponentProvider
JPanel innerPanel = new JPanel(new VerticalLayout(3)); JPanel innerPanel = new JPanel(new VerticalLayout(3));
JButton addAndConditionButton = JButton addAndConditionButton =
new JButton("Add AND condition", ResourceManager.loadImage("images/Plus.png")); new JButton("Add AND condition", Icons.ADD_ICON);
addAndConditionButton.addActionListener(e -> addFilterCondition(LogicOperation.AND)); addAndConditionButton.addActionListener(e -> addFilterCondition(LogicOperation.AND));
addAndConditionButton.setEnabled(true); addAndConditionButton.setEnabled(true);
JButton addOrConditionButton = JButton addOrConditionButton =
new JButton("Add OR condition", ResourceManager.loadImage("images/Plus.png")); new JButton("Add OR condition", Icons.ADD_ICON);
addOrConditionButton.setHorizontalAlignment(SwingConstants.LEFT); addOrConditionButton.setHorizontalAlignment(SwingConstants.LEFT);
addOrConditionButton.addActionListener(e -> addFilterCondition(LogicOperation.OR)); addOrConditionButton.addActionListener(e -> addFilterCondition(LogicOperation.OR));

View file

@ -28,6 +28,7 @@ import docking.widgets.label.GDLabel;
import docking.widgets.list.GListCellRenderer; import docking.widgets.list.GListCellRenderer;
import generic.theme.GThemeDefaults.Colors.Messages; import generic.theme.GThemeDefaults.Colors.Messages;
import ghidra.util.layout.VerticalLayout; import ghidra.util.layout.VerticalLayout;
import resources.Icons;
import resources.ResourceManager; import resources.ResourceManager;
/** /**
@ -55,7 +56,7 @@ class ColumnFilterPanel extends JPanel {
private Component buildButtonPanel() { private Component buildButtonPanel() {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
Icon icon = ResourceManager.loadImage("images/Plus.png"); Icon icon = Icons.ADD_ICON;
icon = ResourceManager.getScaledIcon(icon, BUTTON_ICON_SIZE, BUTTON_ICON_SIZE); icon = ResourceManager.getScaledIcon(icon, BUTTON_ICON_SIZE, BUTTON_ICON_SIZE);
JButton button = new EmptyBorderButton(icon); JButton button = new EmptyBorderButton(icon);

View file

@ -18,11 +18,10 @@ package docking.widgets.tree.internal;
import javax.swing.Icon; import javax.swing.Icon;
import docking.widgets.tree.GTreeNode; import docking.widgets.tree.GTreeNode;
import docking.widgets.tree.GTreeNode; import generic.theme.GIcon;
import resources.ResourceManager;
public class InProgressGTreeNode extends GTreeNode { public class InProgressGTreeNode extends GTreeNode {
private static final Icon ICON = ResourceManager.loadImage("images/magnifier.png"); private static final Icon ICON = new GIcon("icon.search");
public InProgressGTreeNode() { public InProgressGTreeNode() {
} }

View file

@ -18,11 +18,11 @@ package docking.widgets.tree.internal;
import javax.swing.Icon; import javax.swing.Icon;
import docking.widgets.tree.GTreeNode; import docking.widgets.tree.GTreeNode;
import resources.ResourceManager; import generic.theme.GIcon;
public class InProgressGTreeRootNode extends GTreeNode { public class InProgressGTreeRootNode extends GTreeNode {
private static final Icon ICON = ResourceManager.loadImage("images/magnifier.png"); private static final Icon ICON = new GIcon("icon.search");
@Override @Override
public String getName() { public String getName() {

View file

@ -31,7 +31,7 @@ import generic.theme.GThemeDefaults.Colors.Messages;
import ghidra.util.*; import ghidra.util.*;
import help.Help; import help.Help;
import help.HelpService; import help.HelpService;
import resources.ResourceManager; import resources.Icons;
/** /**
* A dialog that controls the panels for going to "Next" and "Previous" in some * A dialog that controls the panels for going to "Next" and "Previous" in some
@ -221,7 +221,7 @@ public class WizardManager extends DialogComponentProvider implements WizardPane
: new GDLabel(INIT_TITLE, wizardIcon, SwingConstants.TRAILING)); : new GDLabel(INIT_TITLE, wizardIcon, SwingConstants.TRAILING));
EmptyBorderButton helpButton = EmptyBorderButton helpButton =
new EmptyBorderButton(ResourceManager.loadImage("images/information.png")); new EmptyBorderButton(Icons.INFO_ICON);
helpButton.setToolTipText("Help (F1)"); helpButton.setToolTipText("Help (F1)");
helpButton.addActionListener( helpButton.addActionListener(
e -> DockingWindowManager.getHelpService().showHelp(rootPanel, false, rootPanel)); e -> DockingWindowManager.getHelpService().showHelp(rootPanel, false, rootPanel));

View file

@ -17,31 +17,34 @@ package ghidra.util.task;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension; import java.awt.Dimension;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.util.AnimatedIcon; import docking.util.AnimatedIcon;
import resources.ResourceManager; import generic.theme.GIcon;
/** /**
* Panel that displays an animation of the Ghidra dragon chomping bits. * Panel that displays an animation of the Ghidra dragon eating bits.
*/ */
public class ChompingBitsAnimationPanel extends JPanel { public class ChompingBitsAnimationPanel extends JPanel {
//@formatter:off
private static final List<Icon> ICONS = List.of(
new GIcon("icon.task.progress.1"),
new GIcon("icon.task.progress.2"),
new GIcon("icon.task.progress.3"),
new GIcon("icon.task.progress.4"),
new GIcon("icon.task.progress.5"),
new GIcon("icon.task.progress.6"),
new GIcon("icon.task.progress.7")
);
//@formatter:on
public ChompingBitsAnimationPanel() { public ChompingBitsAnimationPanel() {
setLayout(new BorderLayout()); setLayout(new BorderLayout());
List<Icon> iconList = new ArrayList<>(); AnimatedIcon icon = new AnimatedIcon(ICONS, 200, 0);
iconList.add(ResourceManager.loadImage("images/eatbits1.png"));
iconList.add(ResourceManager.loadImage("images/eatbits2.png"));
iconList.add(ResourceManager.loadImage("images/eatbits3.png"));
iconList.add(ResourceManager.loadImage("images/eatbits4.png"));
iconList.add(ResourceManager.loadImage("images/eatbits5.png"));
iconList.add(ResourceManager.loadImage("images/eatbits6.png"));
iconList.add(ResourceManager.loadImage("images/eatbits7.png"));
AnimatedIcon icon = new AnimatedIcon(iconList, 200, 0);
setSize(new Dimension(200, 100)); setSize(new Dimension(200, 100));
add(new JLabel(icon)); add(new JLabel(icon));
} }

View file

@ -16,44 +16,44 @@
package ghidra.util.task; package ghidra.util.task;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.util.AnimatedIcon; import docking.util.AnimatedIcon;
import resources.ResourceManager; import generic.theme.GIcon;
/** /**
* Panel that displays an animation of a spinning hourglass * Panel that displays an animation of a spinning hourglass
*/ */
public class HourglassAnimationPanel extends JPanel { public class HourglassAnimationPanel extends JPanel {
//@formatter:off
private static final List<Icon> ICONS = List.of(
new GIcon("icon.task.progress.hourglass.1"),
new GIcon("icon.task.progress.hourglass.2"),
new GIcon("icon.task.progress.hourglass.2"),
new GIcon("icon.task.progress.hourglass.3"),
new GIcon("icon.task.progress.hourglass.3"),
new GIcon("icon.task.progress.hourglass.4"),
new GIcon("icon.task.progress.hourglass.4"),
new GIcon("icon.task.progress.hourglass.5"),
new GIcon("icon.task.progress.hourglass.5"),
new GIcon("icon.task.progress.hourglass.6"),
new GIcon("icon.task.progress.hourglass.6"),
new GIcon("icon.task.progress.hourglass.7"),
new GIcon("icon.task.progress.hourglass.7"),
new GIcon("icon.task.progress.hourglass.8"),
new GIcon("icon.task.progress.hourglass.8"),
new GIcon("icon.task.progress.hourglass.9"),
new GIcon("icon.task.progress.hourglass.10"),
new GIcon("icon.task.progress.hourglass.11")
);
//@formatter:on
public HourglassAnimationPanel() { public HourglassAnimationPanel() {
setLayout(new BorderLayout()); setLayout(new BorderLayout());
AnimatedIcon progressIcon = new AnimatedIcon(ICONS, 150, 0);
List<Icon> iconList = new ArrayList<>();
iconList.add(ResourceManager.loadImage("images/hourglass24_01.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_02.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_02.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_03.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_03.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_04.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_04.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_05.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_05.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_06.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_06.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_07.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_07.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_08.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_08.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_09.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_10.png"));
iconList.add(ResourceManager.loadImage("images/hourglass24_11.png"));
AnimatedIcon progressIcon = new AnimatedIcon(iconList, 150, 0);
add(new JLabel(progressIcon), BorderLayout.NORTH); add(new JLabel(progressIcon), BorderLayout.NORTH);
} }
} }

View file

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 857 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 807 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 859 B

After

Width:  |  Height:  |  Size: 859 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

View file

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 332 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 562 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

View file

Before

Width:  |  Height:  |  Size: 692 B

After

Width:  |  Height:  |  Size: 692 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 725 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 708 B

Before After
Before After

View file

@ -15,8 +15,6 @@
*/ */
package resources; package resources;
import java.awt.Component;
import java.awt.Graphics;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.net.URL; import java.net.URL;
@ -24,7 +22,6 @@ import javax.swing.Icon;
import javax.swing.ImageIcon; import javax.swing.ImageIcon;
import generic.theme.GIcon; import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors;
import ghidra.util.Msg; import ghidra.util.Msg;
/** /**
@ -69,6 +66,8 @@ public class Icons {
public static final Icon LEFT_ICON = new GIcon("icon.left"); public static final Icon LEFT_ICON = new GIcon("icon.left");
public static final Icon RIGHT_ICON = new GIcon("icon.right"); public static final Icon RIGHT_ICON = new GIcon("icon.right");
public static final Icon UP_ICON = new GIcon("icon.up");
public static final Icon DOWN_ICON = new GIcon("icon.down");
/** An version of the LEFT_ICON with a different color */ /** An version of the LEFT_ICON with a different color */
public static final Icon LEFT_ALTERNATE_ICON = new GIcon("icon.left.alt"); public static final Icon LEFT_ALTERNATE_ICON = new GIcon("icon.left.alt");
@ -191,36 +190,6 @@ public class Icons {
return null; return null;
} }
// Creates a 16x16 icon with a scaled base icon and puts 3 dots below it.
private static class DotDotDotIcon implements Icon {
private Icon base;
public DotDotDotIcon(Icon base) {
this.base = ResourceManager.getScaledIcon(base, 12, 12);
}
@Override
public void paintIcon(Component c, Graphics g, int x, int y) {
base.paintIcon(c, g, x, y);
g.setColor(Colors.BACKGROUND);
g.fillRect(x + 6, y + 14, 2, 2);
g.fillRect(x + 9, y + 14, 2, 2);
g.fillRect(x + 12, y + 14, 2, 2);
}
@Override
public int getIconWidth() {
return 16;
}
@Override
public int getIconHeight() {
return 16;
}
}
private Icons() { private Icons() {
// utility class // utility class
} }

View file

@ -27,13 +27,16 @@ color.visualgraph.view.satellite.edge.hovered = color.palette.lime
# graph display # graph display
color.graphdisplay.vertex = green color.graphdisplay.vertex = green
color.graphdisplay.edge = green color.graphdisplay.edge = green
color.graphdisplay.vertex.selected = blue color.graphdisplay.vertex.selected = blue
color.graphdisplay.edge.selected = blue color.graphdisplay.edge.selected = blue
icon.graph.satellite = network-wireless-16.png
icon.graph.satellite.large = network-wireless.png
icon.graph.layout.default = color_swatch.png
[Dark Defaults] [Dark Defaults]

Some files were not shown because too many files have changed in this diff Show more