Merge remote-tracking branch 'origin/GP-1981_Dark_Theme'

This commit is contained in:
ghidragon
2022-11-15 16:01:11 -05:00
1127 changed files with 27145 additions and 12828 deletions
@@ -6,6 +6,7 @@
##MODULE IP: Tango Icons - Public Domain
Module.manifest||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
data/debugger.theme.properties||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
src/main/help/help/shared/arrow.gif||GHIDRA||||END|
src/main/help/help/shared/close16.gif||GHIDRA||||END|
@@ -0,0 +1,199 @@
[Defaults]
color.bg.debugger.diff.marker = moccasin
color.bg.debugger.listing.blended = color.bg
color.bg.debugger.memory.state = color.bg
color.debugger.plugin.plugin.memview.arrow = red
color.debugger.plugin.memview.box = blue
color.debugger.plugin.memview.box.type.instructions = rgb(128, 000, 000)
color.debugger.plugin.memview.box.type.process = rgb(200, 200, 255)
color.debugger.plugin.memview.box.type.thread = rgb(200, 255, 255)
color.debugger.plugin.memview.box.type.module = lime
color.debugger.plugin.memview.box.type.region = yellow
color.debugger.plugin.memview.box.type.image = magenta
color.debugger.plugin.memview.box.type.virtual.alloc = lightgray
color.debugger.plugin.memview.box.type.heap.create = blue
color.debugger.plugin.memview.box.type.heap.alloc = rgb(000, 100, 050)
color.debugger.plugin.memview.box.type.pool = rgb(100, 000, 150)
color.debugger.plugin.memview.box.type.stack = cyan
color.debugger.plugin.memview.box.type.perfinfo = lightgray
color.debugger.plugin.memview.box.type.read.memory = darkgray
color.debugger.plugin.memview.box.type.write.memory = blue
color.debugger.plugin.memview.box.type.breakpoint = red
color.bg.debugger.plugin.objects.default = color.bg
color.fg.debugger.plugin.objects.default = color.fg
color.fg.debugger.plugin.objects.invisible = lightgray
color.fg.debugger.plugin.objects.invalidated = lightgray
color.fg.debugger.plugin.objects.modified = red
color.fg.debugger.plugin.objects.subscribed = black
color.fg.debugger.plugin.objects.error = color.fg.error
color.fg.debugger.plugin.objects.intrinsic = blue
color.fg.debugger.plugin.objects.target = magenta
color.fg.debugger.plugin.objects.accessor = lightgray
color.fg.debugger.plugin.objects.link = green
color.bg.debugger.plugin.resources.stale = lightgray
color.bg.debugger.plugin.resources.error = lightpink
color.debugger.plugin.resources.register.marker = lightcoral
color.debugger.plugin.resources.register.stale = gray
color.debugger.plugin.resources.register.stale.selected = lightgray
color.debugger.plugin.resources.register.changed = red
color.debugger.plugin.resources.register.changed.selected = lightcoral
color.debugger.plugin.resources.watch.stale = gray
color.debugger.plugin.resources.watch.stale.selected = lightgray
color.debugger.plugin.resources.watch.changed = red
color.debugger.plugin.resources.watch.changed.selected = lightcoral
color.debugger.plugin.resources.value.changed = red
color.debugger.plugin.resources.value.changed.selected = lightcoral
color.debugger.plugin.resources.pcode.counter = lightgreen
color.debugger.plugin.resources.breakpoint.marker.enabled = lightsteelblue
color.debugger.plugin.resources.breakpoint.marker.disabled = color.debugger.plugin.resources.breakpoint.marker.enabled
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
icon.debugger.object.populated = object-populated.png
icon.debugger.object.unpopulated = object-unpopulated.png
font.debugger.object.tree.renderer = Tahoma-plain-11
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 = resume.png
icon.debugger.interrupt = interrupt.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.step.last = steplast.png
icon.debugger.skip.over = skipover.png
icon.debugger.snap.forward = 2rightarrow.png
icon.debugger.snap.backward = 2leftarrow.png
icon.debugger.seek.present = seek-present.png
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]
@@ -28,7 +28,7 @@ body { margin-bottom: 50px; margin-left: 10px; margin-right: 10px; margin-top: 1
li { font-family:times new roman; font-size:14pt; }
h1 { color:#000080; font-family:times new roman; font-size:36pt; font-style:italic; font-weight:bold; text-align:center; }
h2 { margin: 10px; margin-top: 20px; color:#984c4c; font-family:times new roman; font-size:18pt; font-weight:bold; }
h3 { margin-left: 10px; margin-top: 20px; color:#0000ff; font-family:times new roman; `font-size:14pt; font-weight:bold; }
h3 { margin-left: 10px; margin-top: 20px; color:#0000ff; font-family:times new roman; font-size:14pt; font-weight:bold; }
h4 { margin-left: 10px; margin-top: 20px; font-family:times new roman; font-size:14pt; font-style:italic; }
/*
@@ -30,6 +30,8 @@ import docking.action.ToggleDockingAction;
import docking.action.builder.*;
import docking.widgets.table.*;
import docking.widgets.tree.GTreeNode;
import generic.theme.GColor;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.DebuggerPluginPackage;
import ghidra.app.plugin.core.debug.gui.breakpoint.DebuggerBreakpointsPlugin;
import ghidra.app.plugin.core.debug.gui.console.DebuggerConsolePlugin;
@@ -54,131 +56,129 @@ import ghidra.framework.plugintool.Plugin;
import ghidra.framework.plugintool.util.PluginUtils;
import ghidra.program.database.ProgramContentHandler;
import ghidra.trace.model.Trace;
import ghidra.util.*;
import ghidra.util.HelpLocation;
import ghidra.util.Msg;
import ghidra.util.exception.CancelledException;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.RotateIcon;
public interface DebuggerResources {
String OPTIONS_CATEGORY_DEBUGGER = "Debugger";
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");
ImageIcon ICON_DISCONNECT = ResourceManager.loadImage("images/disconnect.png");
Icon ICON_CONNECTION = new GIcon("icon.debugger.connect");
Icon ICON_DISCONNECT = new GIcon("icon.debugger.disconnect");
ImageIcon ICON_PROCESS = ResourceManager.loadImage("images/process.png");
ImageIcon ICON_TRACE = Trace.TRACE_ICON;
ImageIcon ICON_THREAD = ResourceManager.loadImage("images/thread.png");
ImageIcon ICON_PROGRAM = ProgramContentHandler.PROGRAM_ICON;
ImageIcon ICON_PROCESSOR = ResourceManager.loadImage("images/kcmprocessor.png");
Icon ICON_PROCESS = new GIcon("icon.debugger.process");
Icon ICON_TRACE = Trace.TRACE_ICON;
Icon ICON_THREAD = new GIcon("icon.debugger.thread");
Icon ICON_PROGRAM = ProgramContentHandler.PROGRAM_ICON;
Icon ICON_PROCESSOR = new GIcon("icon.debugger.processor");
ImageIcon ICON_LAUNCH = ResourceManager.loadImage("images/launch.png");
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");
Icon ICON_LAUNCH = new GIcon("icon.debugger.launch");
Icon ICON_ATTACH = new GIcon("icon.debugger.attach");
Icon ICON_RESUME = new GIcon("icon.debugger.resume");
Icon ICON_INTERRUPT = new GIcon("icon.debugger.interrupt");
Icon ICON_KILL = new GIcon("icon.debugger.kill");
Icon ICON_DETACH = new GIcon("icon.debugger.detach");
Icon ICON_RECORD = new GIcon("icon.debugger.record");
ImageIcon ICON_STEP_INTO = ResourceManager.loadImage("images/stepinto.png");
ImageIcon ICON_STEP_OVER = ResourceManager.loadImage("images/stepover.png");
ImageIcon ICON_SKIP_OVER = ResourceManager.loadImage("images/skipover.png");
ImageIcon ICON_STEP_FINISH = ResourceManager.loadImage("images/stepout.png");
ImageIcon ICON_STEP_BACK = ResourceManager.loadImage("images/stepback.png");
ImageIcon ICON_STEP_LAST = ResourceManager.loadImage("images/steplast.png");
// TODO: Draw new icons?
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");
Icon ICON_STEP_INTO = new GIcon("icon.debugger.step.into");
Icon ICON_STEP_OVER = new GIcon("icon.debugger.step.over");
Icon ICON_SKIP_OVER = new GIcon("icon.debugger.step.back");
Icon ICON_STEP_FINISH = new GIcon("icon.debugger.step.finish");
Icon ICON_STEP_BACK = new GIcon("icon.debugger.skip.over");
Icon ICON_STEP_LAST = new GIcon("icon.debugger.step.last");
ImageIcon ICON_SET_BREAKPOINT = ResourceManager.loadImage("images/breakpoint-enable.png");
ImageIcon ICON_CLEAR_BREAKPOINT = ResourceManager.loadImage("images/breakpoint-clear.png");
ImageIcon ICON_ENABLE_BREAKPOINT = ResourceManager.loadImage("images/breakpoint-enable.png");
ImageIcon ICON_ENABLE_ALL_BREAKPOINTS =
ResourceManager.loadImage("images/breakpoints-enable-all.png");
ImageIcon ICON_DISABLE_BREAKPOINT = ResourceManager.loadImage("images/breakpoint-disable.png");
ImageIcon ICON_DISABLE_ALL_BREAKPOINTS =
ResourceManager.loadImage("images/breakpoints-disable-all.png");
ImageIcon ICON_CLEAR_ALL_BREAKPOINTS =
ResourceManager.loadImage("images/breakpoints-clear-all.png");
ImageIcon ICON_MAKE_BREAKPOINTS_EFFECTIVE =
ResourceManager.loadImage("images/breakpoints-make-effective.png");
Icon ICON_SNAP_FORWARD = new GIcon("icon.debugger.snap.forward");
Icon ICON_SNAP_BACKWARD = new GIcon("icon.debugger.snap.backward");
Icon ICON_SEEK_PRESENT = new GIcon("icon.debugger.seek.present");
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
ImageIcon ICON_LISTING = ResourceManager.loadImage("images/Browser.gif");
ImageIcon ICON_MEMORY_BYTES = ResourceManager.loadImage("images/binaryData.gif");
ImageIcon ICON_CONSOLE = ResourceManager.loadImage("images/console.png");
ImageIcon ICON_REGISTERS = ResourceManager.loadImage("images/registers.png");
ImageIcon ICON_STACK = ResourceManager.loadImage("images/stack.png");
ImageIcon ICON_BREAKPOINTS = ResourceManager.loadImage("images/breakpoint-mixed.png");
ImageIcon ICON_MODULES = ResourceManager.loadImage("images/modules.png");
ImageIcon ICON_MAPPINGS = ICON_PROGRAM; // TODO: A better icon
ImageIcon ICON_PCODE = ResourceManager.loadImage("images/stepinto.png"); // TODO
//ResourceManager.loadImage("images/mappings.png");
ImageIcon ICON_REGIONS = ResourceManager.loadImage("images/memory16.gif");
ImageIcon ICON_TIME = ResourceManager.loadImage("images/time.png");
Icon ICON_LISTING = new GIcon("icon.debugger.provider.listing");
Icon ICON_MEMORY_BYTES = new GIcon("icon.debugger.provider.memory.bytes");
Icon ICON_CONSOLE = new GIcon("icon.debugger.provider.console");
Icon ICON_REGISTERS = new GIcon("icon.debugger.provider.registers");
Icon ICON_STACK = new GIcon("icon.debugger.provider.stack");
Icon ICON_BREAKPOINTS = new GIcon("icon.debugger.provider.breakpoints");
Icon ICON_MODULES = new GIcon("icon.debugger.provider.modules");
Icon ICON_MAPPINGS = ICON_PROGRAM; // TODO: A better icon
Icon ICON_PCODE = new GIcon("icon.debugger.provider.pcode"); // TODO
Icon ICON_REGIONS = new GIcon("icon.debugger.provider.regions");
Icon ICON_TIME = new GIcon("icon.debugger.provider.time");
// 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");
ImageIcon ICON_CLOSE = ResourceManager.loadImage("images/x.gif");
ImageIcon ICON_ADD = ResourceManager.loadImage("images/add.png");
ImageIcon ICON_DELETE = ResourceManager.loadImage("images/delete.png");
ImageIcon ICON_CLEAR = ResourceManager.loadImage("images/erase16.png");
ImageIcon ICON_REFRESH = ResourceManager.loadImage("images/view-refresh.png");
ImageIcon ICON_FILTER = ResourceManager.loadImage("images/filter_off.png"); // Eww.
ImageIcon ICON_SELECT_ROWS = ResourceManager.loadImage("images/table_go.png");
ImageIcon ICON_AUTOREAD = ResourceManager.loadImage("images/autoread.png");
Icon ICON_SAVE = new GIcon("icon.debugger.save");
Icon ICON_CLOSE = new GIcon("icon.debugger.close");
Icon ICON_ADD = new GIcon("icon.debugger.add");
Icon ICON_DELETE = new GIcon("icon.debugger.delete");
Icon ICON_CLEAR = new GIcon("icon.debugger.clear");
Icon ICON_REFRESH = new GIcon("icon.debugger.refresh");
Icon ICON_FILTER = new GIcon("icon.debugger.filter"); // Eww.
Icon ICON_SELECT_ROWS = new GIcon("icon.debugger.select.rows");
Icon ICON_AUTOREAD = new GIcon("icon.debugger.autoread");
ImageIcon ICON_OBJECT_POPULATED = ResourceManager.loadImage("images/object-populated.png");
ImageIcon ICON_OBJECT_UNPOPULATED = ResourceManager.loadImage("images/object-unpopulated.png");
Icon ICON_OBJECT_POPULATED = new GIcon("icon.debugger.object.populated");
Icon ICON_OBJECT_UNPOPULATED = new GIcon("icon.debugger.object.unpopulated");
// 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
ImageIcon ICON_MAP_IDENTICALLY = ResourceManager.loadImage("images/doubleArrow.png");
ImageIcon ICON_MAP_MODULES = ResourceManager.loadImage("images/modules.png");
ImageIcon ICON_MAP_SECTIONS = ICON_MAP_MODULES; // TODO
ImageIcon ICON_MAP_REGIONS = ICON_MAP_MODULES; // TODO
ImageIcon ICON_BLOCK = ICON_MAP_SECTIONS; // TODO
Icon ICON_MAP_IDENTICALLY = new GIcon("icon.debugger.map.identically");
Icon ICON_MAP_MODULES = new GIcon("icon.debugger.map.modules");
Icon ICON_MAP_SECTIONS = new GIcon("icon.debugger.map.sections"); // TODO
Icon ICON_MAP_REGIONS = new GIcon("icon.debugger.map.regions"); // TODO
Icon ICON_BLOCK = new GIcon("icon.debugger.block"); // TODO
// 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?
ImageIcon ICON_DATA_TYPES = ResourceManager.loadImage("images/dataTypes.png");
Icon ICON_DATA_TYPES = new GIcon("icon.debugger.data.types");
// 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");
ImageIcon ICON_LOG_ERROR = ResourceManager.loadImage("images/dialog-warning_red.png");
ImageIcon ICON_LOG_WARN = ResourceManager.loadImage("images/dialog-warning.png");
Icon ICON_LOG_FATAL = new GIcon("icon.debugger.log.fatal");
Icon ICON_LOG_ERROR = new GIcon("icon.debugger.log.error");
Icon ICON_LOG_WARN = new GIcon("icon.debugger.log.warn");
ImageIcon ICON_SYNC = ResourceManager.loadImage("images/sync_enabled.png");
ImageIcon ICON_VISIBILITY = ResourceManager.loadImage("images/format-text-bold.png");
Icon ICON_SYNC = new GIcon("icon.debugger.sync");
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?
ImageIcon ICON_IMPORT = ResourceManager.loadImage("images/imported_bookmark.gif");
ImageIcon ICON_BLANK = ResourceManager.loadImage("images/blank.png");
ImageIcon ICON_PACKAGE = ResourceManager.loadImage("images/debugger32.png");
ImageIcon ICON_EMULATE = ICON_PROCESS; // TODO
ImageIcon ICON_CONFIG = ResourceManager.loadImage("images/conf.png");
ImageIcon ICON_TOGGLE = ResourceManager.loadImage("images/system-switch-user.png");
Icon ICON_IMPORT = new GIcon("icon.debugger.import");
Icon ICON_BLANK = new GIcon("icon.debugger.blank");
Icon ICON_PACKAGE = new GIcon("icon.debugger.package");
Icon ICON_EMULATE = new GIcon("icon.debugger.emulate"); // TODO
Icon ICON_CONFIG = new GIcon("icon.debugger.config");
Icon ICON_TOGGLE = new GIcon("icon.debugger.toggle");
ImageIcon ICON_DIFF = ResourceManager.loadImage("images/table_relationship.png");
ImageIcon ICON_DIFF_PREV = ResourceManager.loadImage("images/up.png");
ImageIcon ICON_DIFF_NEXT = ResourceManager.loadImage("images/down.png");
Icon ICON_DIFF = new GIcon("icon.debugger.diff");
Icon ICON_DIFF_PREV = new GIcon("icon.debugger.diff.previous");
Icon ICON_DIFF_NEXT = new GIcon("icon.debugger.diff.next");
ImageIcon ICON_EDIT_MODE_READ_ONLY = ResourceManager.loadImage("images/write-disabled.png");
ImageIcon ICON_EDIT_MODE_WRITE_TARGET = ResourceManager.loadImage("images/write-target.png");
ImageIcon ICON_EDIT_MODE_WRITE_TRACE = ResourceManager.loadImage("images/write-trace.png");
ImageIcon ICON_EDIT_MODE_WRITE_EMULATOR =
ResourceManager.loadImage("images/write-emulator.png");
Icon ICON_EDIT_MODE_READ_ONLY = new GIcon("icon.debugger.edit.mode.read.only");
Icon ICON_EDIT_MODE_WRITE_TARGET = new GIcon("icon.debugger.edit.mode.write.target");
Icon ICON_EDIT_MODE_WRITE_TRACE = new GIcon("icon.debugger.edit.mode.write.trace");
Icon ICON_EDIT_MODE_WRITE_EMULATOR =
new GIcon("icon.debugger.edit.mode.write.emulator");
String NAME_EDIT_MODE_READ_ONLY = "Control Target w/ Edits Disabled";
String NAME_EDIT_MODE_WRITE_TARGET = "Control Target";
@@ -190,82 +190,82 @@ public interface DebuggerResources {
String HELP_ANCHOR_PLUGIN = "plugin";
String TITLE_PROVIDER_BREAKPOINTS = "Breakpoints";
ImageIcon ICON_PROVIDER_BREAKPOINTS = ICON_BREAKPOINTS;
Icon ICON_PROVIDER_BREAKPOINTS = ICON_BREAKPOINTS;
HelpLocation HELP_PROVIDER_BREAKPOINTS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerBreakpointsPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_CONSOLE = "Debug Console";
ImageIcon ICON_PROVIDER_CONSOLE = ICON_CONSOLE;
Icon ICON_PROVIDER_CONSOLE = ICON_CONSOLE;
HelpLocation HELP_PROVIDER_CONSOLE = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerConsolePlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_LISTING = "Dynamic";
ImageIcon ICON_PROVIDER_LISTING = ICON_LISTING;
Icon ICON_PROVIDER_LISTING = ICON_LISTING;
HelpLocation HELP_PROVIDER_LISTING = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerListingPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_MAPPINGS = "Static Mappings";
ImageIcon ICON_PROVIDER_MAPPINGS = ICON_MAPPINGS;
Icon ICON_PROVIDER_MAPPINGS = ICON_MAPPINGS;
HelpLocation HELP_PROVIDER_MAPPINGS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerStaticMappingPlugin.class), HELP_ANCHOR_PLUGIN);
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(
PluginUtils.getPluginNameFromClass(DebuggerMemoryBytesPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_MODULES = "Modules";
ImageIcon ICON_PROVIDER_MODULES = ICON_MODULES;
Icon ICON_PROVIDER_MODULES = ICON_MODULES;
HelpLocation HELP_PROVIDER_MODULES = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerModulesPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_PCODE = "Pcode Stepper";
ImageIcon ICON_PROVIDER_PCODE = ICON_PCODE;
Icon ICON_PROVIDER_PCODE = ICON_PCODE;
HelpLocation HELP_PROVIDER_PCODE = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerPcodeStepperPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_REGIONS = "Regions";
ImageIcon ICON_PROVIDER_REGIONS = ICON_REGIONS;
Icon ICON_PROVIDER_REGIONS = ICON_REGIONS;
HelpLocation HELP_PROVIDER_REGIONS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerRegionsPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_REGISTERS = "Registers";
ImageIcon ICON_PROVIDER_REGISTERS = ICON_REGISTERS;
Icon ICON_PROVIDER_REGISTERS = ICON_REGISTERS;
HelpLocation HELP_PROVIDER_REGISTERS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerRegistersPlugin.class), HELP_ANCHOR_PLUGIN);
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(
PluginUtils.getPluginNameFromClass(DebuggerTargetsPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_STACK = "Stack";
ImageIcon ICON_PROVIDER_STACK = ICON_STACK;
Icon ICON_PROVIDER_STACK = ICON_STACK;
HelpLocation HELP_PROVIDER_STACK = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerStackPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_THREADS = "Threads";
ImageIcon ICON_PROVIDER_THREADS = ICON_DEBUGGER;
Icon ICON_PROVIDER_THREADS = ICON_DEBUGGER;
HelpLocation HELP_PROVIDER_THREADS = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerThreadsPlugin.class), HELP_ANCHOR_PLUGIN);
String TITLE_PROVIDER_TIME = "Time";
ImageIcon ICON_PROVIDER_TIME = ICON_TIME;
Icon ICON_PROVIDER_TIME = ICON_TIME;
HelpLocation HELP_PROVIDER_TIME = new HelpLocation(
PluginUtils.getPluginNameFromClass(DebuggerTimePlugin.class), HELP_ANCHOR_PLUGIN);
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(
PluginUtils.getPluginNameFromClass(DebuggerObjectsPlugin.class), HELP_ANCHOR_PLUGIN);
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(
PluginUtils.getPluginNameFromClass(DebuggerModelPlugin.class), HELP_ANCHOR_PLUGIN);
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(
PluginUtils.getPluginNameFromClass(DebuggerWatchesPlugin.class), HELP_ANCHOR_PLUGIN);
@@ -274,44 +274,51 @@ public interface DebuggerResources {
String BOOKMARK_CATEGORY_MEMORY_READ_ERROR = "Debugger Memory Read Error";
String OPTION_NAME_COLORS_STALE_MEMORY = "Colors.Stale Memory";
Color DEFAULT_COLOR_BACKGROUND_STALE = Color.LIGHT_GRAY;
Color DEFAULT_COLOR_BACKGROUND_STALE = new GColor("color.bg.debugger.plugin.resources.stale");
String OPTION_NAME_COLORS_ERROR_MEMORY = "Colors.Error Memory";
Color DEFAULT_COLOR_BACKGROUND_ERROR = new Color(1.0f, 0.75f, 0.75f);
Color DEFAULT_COLOR_BACKGROUND_ERROR = new GColor("color.bg.debugger.plugin.resources.error");
int PRIORITY_REGISTER_MARKER = 10;
String OPTION_NAME_COLORS_TRACKING_MARKERS = "Colors.Tracking Markers";
Color DEFAULT_COLOR_REGISTER_MARKERS = new Color(0.75f, 0.875f, 0.75f);
ImageIcon ICON_REGISTER_MARKER = ResourceManager.loadImage("images/register-marker.png");
Color DEFAULT_COLOR_REGISTER_MARKERS =
new GColor("color.debugger.plugin.resources.register.marker");
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.
//@formatter:off
String OPTION_NAME_COLORS_REGISTER_STALE = "Colors.Stale Registers";
Color DEFAULT_COLOR_REGISTER_STALE = Color.GRAY;
Color DEFAULT_COLOR_REGISTER_STALE = new GColor("color.debugger.plugin.resources.register.stale");
String OPTION_NAME_COLORS_REGISTER_STALE_SEL = "Colors.Stale Registers (selected)";
Color DEFAULT_COLOR_REGISTER_STALE_SEL = Color.LIGHT_GRAY;
Color DEFAULT_COLOR_REGISTER_STALE_SEL = new GColor("color.debugger.plugin.resources.register.stale.selected");
String OPTION_NAME_COLORS_REGISTER_CHANGED = "Colors.Changed Registers";
Color DEFAULT_COLOR_REGISTER_CHANGED = Color.RED;
Color DEFAULT_COLOR_REGISTER_CHANGED = new GColor("color.debugger.plugin.resources.register.changed");
String OPTION_NAME_COLORS_REGISTER_CHANGED_SEL = "Colors.Changed Registers (selected)";
Color DEFAULT_COLOR_REGISTER_CHANGED_SEL = ColorUtils.blend(Color.RED, Color.WHITE, 0.5f);
Color DEFAULT_COLOR_REGISTER_CHANGED_SEL = new GColor("color.debugger.plugin.resources.register.changed.selected");
//@formatter:on
//@formatter:off
String OPTION_NAME_COLORS_WATCH_STALE = "Colors.Stale Watches";
Color DEFAULT_COLOR_WATCH_STALE = Color.GRAY;
Color DEFAULT_COLOR_WATCH_STALE = new GColor("color.debugger.plugin.resources.watch.stale");
String OPTION_NAME_COLORS_WATCH_STALE_SEL = "Colors.Stale Watches (selected)";
Color DEFAULT_COLOR_WATCH_STALE_SEL = Color.LIGHT_GRAY;
Color DEFAULT_COLOR_WATCH_STALE_SEL = new GColor("color.debugger.plugin.resources.watch.stale.selected");
String OPTION_NAME_COLORS_WATCH_CHANGED = "Colors.Changed Watches";
Color DEFAULT_COLOR_WATCH_CHANGED = Color.RED;
Color DEFAULT_COLOR_WATCH_CHANGED = new GColor("color.debugger.plugin.resources.watch.changed");
String OPTION_NAME_COLORS_WATCH_CHANGED_SEL = "Colors.Changed Watches (selected)";
Color DEFAULT_COLOR_WATCH_CHANGED_SEL = ColorUtils.blend(Color.RED, Color.WHITE, 0.5f);
Color DEFAULT_COLOR_WATCH_CHANGED_SEL = new GColor("color.debugger.plugin.resources.watch.changed.selected");
//@formatter:on
//@formatter:off
String OPTION_NAME_COLORS_VALUE_CHANGED = "Colors.Changed Values";
Color DEFAULT_COLOR_VALUE_CHANGED = Color.RED;
Color DEFAULT_COLOR_VALUE_CHANGED = new GColor("color.debugger.plugin.resources.value.changed");
String OPTION_NAME_COLORS_VALUE_CHANGED_SEL = "Colors.Changed Values (selected)";
Color DEFAULT_COLOR_VALUE_CHANGED_SEL = ColorUtils.blend(Color.RED, Color.WHITE, 0.5f);
Color DEFAULT_COLOR_VALUE_CHANGED_SEL = new GColor("color.debugger.plugin.resources.value.changed.selected");
//@formatter:on
String OPTION_NAME_COLORS_PCODE_COUNTER = "Colors.Pcode Counter";
Color DEFAULT_COLOR_PCODE_COUNTER = new Color(0.75f, 0.875f, 0.75f);
Color DEFAULT_COLOR_PCODE_COUNTER = new GColor("color.debugger.plugin.resources.pcode.counter");
String NAME_BREAKPOINT_MARKER_ENABLED = "Enabled Breakpoint";
String NAME_BREAKPOINT_MARKER_DISABLED = "Disabled Breakpoint";
@@ -323,19 +330,19 @@ public interface DebuggerResources {
String NAME_BREAKPOINT_MARKER_INCON_DIS = "Inconsistent Disabled Breakpoint";
String NAME_BREAKPOINT_MARKER_INCON_MIX = "Inconsistent Mixed Breakpoint";
ImageIcon ICON_BREAKPOINT_OVERLAY_INCONSISTENT =
ResourceManager.loadImage("images/breakpoint-overlay-inconsistent.png");
ImageIcon ICON_BREAKPOINT_MARKER_ENABLED = ICON_ENABLE_BREAKPOINT;
ImageIcon ICON_BREAKPOINT_MARKER_DISABLED = ICON_DISABLE_BREAKPOINT;
ImageIcon ICON_BREAKPOINT_MARKER_MIXED =
ResourceManager.loadImage("images/breakpoint-mixed.png");
Icon ICON_BREAKPOINT_OVERLAY_INCONSISTENT =
new GIcon("icon.debugger.breakpoint.overlay.inconsistent");
Icon ICON_BREAKPOINT_MARKER_ENABLED = new GIcon("icon.debugger.breakpoint.marker.enabled");
Icon ICON_BREAKPOINT_MARKER_DISABLED = new GIcon("icon.debugger.breakpoint.marker.disabled");
Icon ICON_BREAKPOINT_MARKER_MIXED =
new GIcon("icon.debugger.breakpoint.marker.mixed");
ImageIcon ICON_BREAKPOINT_MARKER_INEFF_EN =
ResourceManager.loadImage("images/breakpoint-enable-ineff.png");
ImageIcon ICON_BREAKPOINT_MARKER_INEFF_DIS =
ResourceManager.loadImage("images/breakpoint-disable-ineff.png");
ImageIcon ICON_BREAKPOINT_MARKER_INEFF_MIX =
ResourceManager.loadImage("images/breakpoint-mixed-ineff.png");
Icon ICON_BREAKPOINT_MARKER_INEFF_EN =
new GIcon("icon.debugger.breakpoint.marker.ineffective.enabled");
Icon ICON_BREAKPOINT_MARKER_INEFF_DIS =
new GIcon("icon.debugger.breakpoint.marker.ineffective.disabled");
Icon ICON_BREAKPOINT_MARKER_INEFF_MIX =
new GIcon("icon.debugger.breakpoint.marker.ineffective.disabled");
Icon ICON_BREAKPOINT_MARKER_INCON_EN =
new MultiIcon(ICON_BREAKPOINT_MARKER_ENABLED, ICON_BREAKPOINT_OVERLAY_INCONSISTENT);
@@ -344,22 +351,20 @@ public interface DebuggerResources {
Icon ICON_BREAKPOINT_MARKER_INCON_MIX =
new MultiIcon(ICON_BREAKPOINT_MARKER_MIXED, ICON_BREAKPOINT_OVERLAY_INCONSISTENT);
Icon ICON_UNIQUE_REF_READ =
new RotateIcon(ResourceManager.loadImage("images/cursor_arrow.gif"), 180); // TODO
ImageIcon ICON_UNIQUE_REF_WRITE = ResourceManager.loadImage("images/cursor_arrow.gif"); // TODO
Icon ICON_UNIQUE_REF_READ = new GIcon("icon.debugger.unique.ref.read"); // TODO
Icon ICON_UNIQUE_REF_WRITE = new GIcon("icon.debugger.unique.ref.write"); // TODO
Icon ICON_UNIQUE_REF_RW = new MultiIcon(ICON_UNIQUE_REF_READ, ICON_UNIQUE_REF_WRITE); // TODO
//@formatter:off
String OPTION_NAME_COLORS_ENABLED_BREAKPOINT_MARKERS = "Colors.Enabled Breakpoint Markers";
Color DEFAULT_COLOR_ENABLED_BREAKPOINT_MARKERS = new Color(0.75f, 0.75f, 0.875f);
Color DEFAULT_COLOR_ENABLED_BREAKPOINT_MARKERS = new GColor("color.debugger.plugin.resources.breakpoint.marker.enabled");
String OPTION_NAME_COLORS_DISABLED_BREAKPOINT_MARKERS = "Colors.Disabled Breakpoint Markers";
Color DEFAULT_COLOR_DISABLED_BREAKPOINT_MARKERS = DEFAULT_COLOR_ENABLED_BREAKPOINT_MARKERS;
String OPTION_NAME_COLORS_INEFF_EN_BREAKPOINT_MARKERS =
"Colors.Ineffective Enabled Breakpoint Markers";
Color DEFAULT_COLOR_INEFF_EN_BREAKPOINT_MARKERS = new Color(0.75f, 0.75f, 0.75f);
String OPTION_NAME_COLORS_INEFF_DIS_BREAKPOINT_MARKERS =
"Colors.Ineffective Disabled Breakpoint Markers";
Color DEFAULT_COLOR_INEFF_DIS_BREAKPOINT_MARKERS =
DEFAULT_COLOR_INEFF_EN_BREAKPOINT_MARKERS;
Color DEFAULT_COLOR_DISABLED_BREAKPOINT_MARKERS = new GColor("color.debugger.plugin.resources.breakpoint.marker.disabled");
String OPTION_NAME_COLORS_INEFF_EN_BREAKPOINT_MARKERS = "Colors.Ineffective Enabled Breakpoint Markers";
Color DEFAULT_COLOR_INEFF_EN_BREAKPOINT_MARKERS = new GColor("color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective");
String OPTION_NAME_COLORS_INEFF_DIS_BREAKPOINT_MARKERS = "Colors.Ineffective Disabled Breakpoint Markers";
Color DEFAULT_COLOR_INEFF_DIS_BREAKPOINT_MARKERS = new GColor("color.debugger.plugin.resources.breakpoint.marker.disabled.ineffective");
//@formatter:on
String OPTION_NAME_COLORS_ENABLED_BREAKPOINT_COLORING_BACKGROUND =
"Colors.Enabled Breakpoint Markers Have Background";
@@ -1037,7 +1042,7 @@ public interface DebuggerResources {
String NAME = "Select Registers";
String DESCRIPTION = "Select registers to display/modify";
String GROUP = "aa";
Icon ICON = ResourceManager.loadImage("images/select-registers.png");
Icon ICON = new GIcon("icon.debugger.select.registers");
String HELP_ANCHOR = "select_registers";
static ActionBuilder builder(Plugin owner) {
@@ -1053,7 +1058,7 @@ public interface DebuggerResources {
String NAME = "Clone Window";
String DESCRIPTION = "Create a disconnected copy of this window";
String GROUP = "zzzz";
Icon ICON = ResourceManager.loadImage("images/camera-photo.png");
Icon ICON = new GIcon("icon.provider.clone");
String HELP_ANCHOR = "clone_window";
static ActionBuilder builder(Plugin owner) {
@@ -1069,7 +1074,7 @@ public interface DebuggerResources {
String NAME = "Enable Edits";
String DESCRIPTION = "Enable editing of recorded or live values";
String GROUP = "yyyy2";
Icon ICON = ResourceManager.loadImage("images/editbytes.gif");
Icon ICON = new GIcon("icon.debugger.enable.edits");
String HELP_ANCHOR = "enable_edits";
static ToggleActionBuilder builder(Plugin owner) {
@@ -1084,7 +1089,7 @@ public interface DebuggerResources {
interface DisassembleAsAction {
String NAME = "Disassemble as";
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";
static ActionBuilder builder(Plugin owner) {
@@ -28,6 +28,7 @@ import javax.swing.event.ChangeListener;
import docking.ActionContext;
import docking.action.DockingAction;
import docking.action.ToggleDockingAction;
import generic.theme.GColor;
import ghidra.app.plugin.PluginCategoryNames;
import ghidra.app.plugin.core.codebrowser.MarkerServiceBackgroundColorModel;
import ghidra.app.plugin.core.debug.*;
@@ -57,28 +58,19 @@ import ghidra.trace.model.program.TraceProgramView;
import ghidra.trace.model.time.schedule.TraceSchedule;
import ghidra.util.Msg;
@PluginInfo(
shortDescription = "Compare memory state between times in a trace",
description = "Provides a side-by-side diff view between snapshots (points in time) in a " +
"trace. The comparison is limited to raw bytes.",
category = PluginCategoryNames.DEBUGGER,
packageName = DebuggerPluginPackage.NAME,
status = PluginStatus.RELEASED,
eventsConsumed = {
@PluginInfo(shortDescription = "Compare memory state between times in a trace", description = "Provides a side-by-side diff view between snapshots (points in time) in a " +
"trace. The comparison is limited to raw bytes.", category = PluginCategoryNames.DEBUGGER, packageName = DebuggerPluginPackage.NAME, status = PluginStatus.RELEASED, eventsConsumed = {
TraceClosedPluginEvent.class,
},
eventsProduced = {},
servicesRequired = {
}, eventsProduced = {}, servicesRequired = {
DebuggerListingService.class,
},
servicesProvided = {})
}, servicesProvided = {})
public class DebuggerTraceViewDiffPlugin extends AbstractDebuggerPlugin {
protected static final String MARKER_NAME = "Trace Diff";
protected static final String MARKER_DESCRIPTION = "Difference between snapshots in this trace";
public static final String DIFF_COLOR_CATEGORY = "Listing Fields";
public static final String DIFF_COLOR_NAME = "Selection Colors.Difference Color";
public static final Color DEFAULT_DIFF_COLOR = new Color(255, 230, 180); // light orange
public static final Color DEFAULT_DIFF_COLOR = new GColor("color.bg.debugger.diff.marker");
protected class ListingCoordinationListener implements CoordinatedListingPanelListener {
@Override
@@ -22,7 +22,7 @@ import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.ActionContext;
import docking.action.DockingAction;
@@ -152,7 +152,7 @@ public abstract class AbstractDebuggerWrappedConsoleConnection<T extends TargetO
}
@Override
public ImageIcon getIcon() {
public Icon getIcon() {
return DebuggerResources.ICON_CONSOLE;
}
@@ -36,7 +36,7 @@ class CursorBackgroundColorModel implements ListingBackgroundColorModel {
private AddressIndexMap addressIndexMap;
@AutoOptionConsumed(category = {}, name = GhidraOptions.HIGHLIGHT_CURSOR_LINE_COLOR)
private Color cursorColor = GhidraOptions.DEFAULT_CURSOR_LINE_COLOR;
private Color cursorLineColor = GhidraOptions.DEFAULT_CURSOR_LINE_COLOR;
@AutoOptionConsumed(category = {}, name = GhidraOptions.HIGHLIGHT_CURSOR_LINE)
private boolean doHighlight = true;
@SuppressWarnings("unused")
@@ -61,7 +61,7 @@ class CursorBackgroundColorModel implements ListingBackgroundColorModel {
if (!Objects.equals(cursorAddress, address)) {
return defaultBackgroundColor;
}
return cursorColor;
return cursorLineColor;
}
@Override
@@ -19,6 +19,7 @@ import java.awt.Color;
import java.math.BigInteger;
import java.util.Map.Entry;
import generic.theme.GColor;
import ghidra.app.plugin.core.debug.gui.DebuggerResources;
import ghidra.app.util.viewer.listingpanel.ListingBackgroundColorModel;
import ghidra.app.util.viewer.listingpanel.ListingPanel;
@@ -34,7 +35,7 @@ import ghidra.trace.model.program.TraceProgramView;
import ghidra.util.ColorUtils;
public class MemoryStateListingBackgroundColorModel implements ListingBackgroundColorModel {
private Color defaultBackgroundColor = Color.WHITE;
private Color defaultBackgroundColor = new GColor("color.bg.debugger.memory.state");
private AddressIndexMap addressIndexMap;
private TraceProgramView view;
@@ -21,11 +21,14 @@ import java.util.ArrayList;
import java.util.List;
import docking.widgets.fieldpanel.support.BackgroundColorModel;
import generic.theme.GColor;
import ghidra.app.util.viewer.listingpanel.ListingBackgroundColorModel;
import ghidra.app.util.viewer.listingpanel.ListingPanel;
import ghidra.util.ColorUtils.ColorBlender;
public class MultiBlendedListingBackgroundColorModel implements ListingBackgroundColorModel {
private static final Color BG_COLOR_EMPTY = new GColor("color.bg.debugger.listing.blended");
private final List<BackgroundColorModel> models = new ArrayList<>();
private final ColorBlender blender = new ColorBlender();
@@ -60,7 +63,7 @@ public class MultiBlendedListingBackgroundColorModel implements ListingBackgroun
@Override
public Color getDefaultBackgroundColor() {
if (models.isEmpty()) {
return Color.WHITE;
return BG_COLOR_EMPTY;
}
return models.get(0).getDefaultBackgroundColor();
}
@@ -20,6 +20,8 @@ import java.awt.Graphics;
import java.util.HashMap;
import java.util.Map;
import generic.theme.GColor;
import generic.theme.GThemeDefaults.Colors.Java;
import ghidra.program.model.address.AddressRange;
import ghidra.trace.model.Lifespan;
@@ -34,7 +36,7 @@ public class MemoryBox {
protected long stopAddr = -1;
protected long startTime;
protected long stopTime = -1;
protected Color color = Color.BLUE;
protected Color color = new GColor("color.bg.debugger.memview.box");
protected int pixAstart;
protected int pixAend;
@@ -108,8 +110,9 @@ public class MemoryBox {
}
public int getAddressPixelWidth() {
if (pixAend - pixAstart <= 0)
if (pixAend - pixAstart <= 0) {
return 1;
}
return pixAend - pixAstart;
}
@@ -121,8 +124,9 @@ public class MemoryBox {
if (pixTend < pixTstart) {
pixTend = boundT;
}
if (pixTend - pixTstart == 0)
if (pixTend - pixTstart == 0) {
return 1;
}
return pixTend - pixTstart;
}
@@ -147,7 +151,7 @@ public class MemoryBox {
int w = vertical ? getTimePixelWidth() : getAddressPixelWidth();
int y = vertical ? getAddressPixelStart() : getTimePixelStart();
int h = vertical ? getAddressPixelWidth() : getTimePixelWidth();
g.setColor(Color.BLACK);
g.setColor(Java.BORDER);
g.fillRect(x - 1, y - 1, w + 2, h + 2);
g.setColor(color);
g.fillRect(x, y, w, h);
@@ -158,7 +162,7 @@ public class MemoryBox {
int w = vertical ? sz : getAddressPixelWidth();
int y = vertical ? getAddressPixelStart() : 0;
int h = vertical ? getAddressPixelWidth() : sz;
g.setColor(Color.BLACK);
g.setColor(Java.BORDER);
g.fillRect(x - 1, y - 1, w + 2, h + 2);
g.setColor(color);
g.fillRect(x, y, w, h);
@@ -169,7 +173,7 @@ public class MemoryBox {
int w = vertical ? 1 : sz;
int y = vertical ? 0 : getTimePixelStart();
int h = vertical ? sz : 1;
g.setColor(Color.BLACK);
g.setColor(Java.BORDER);
g.fillRect(x - 1, y - 1, w + 2, h + 2);
g.setColor(color);
g.fillRect(x, y, w, h);
@@ -227,10 +231,12 @@ public class MemoryBox {
}
public boolean inPixelRange(long pos) {
if (pos < pixTstart)
if (pos < pixTstart) {
return false;
if (pixTend <= 0)
}
if (pixTend <= 0) {
return true;
}
return pos <= pixTend;
}
@@ -17,6 +17,8 @@ package ghidra.app.plugin.core.debug.gui.memview;
import java.awt.Color;
import generic.theme.GColor;
public enum MemviewBoxType {
INSTRUCTIONS,
PROCESS,
@@ -35,21 +37,21 @@ public enum MemviewBoxType {
BREAKPOINT;
Color[] colors = { //
new Color(128, 000, 000), // INSTRUCTIONS
new Color(200, 200, 255), // PROCESS
new Color(200, 255, 255), // THREAD
Color.GREEN, //new Color(000, 150, 200), // MODULE
Color.YELLOW, //new Color(000, 150, 200), // REGION
Color.MAGENTA, //new Color(050, 100, 255), // IMAGE
Color.LIGHT_GRAY, // VIRTUAL_ALLOC
Color.BLUE, // HEAP_CREATE
new Color(000, 100, 050), // HEAP_ALLOC
new Color(100, 000, 150), // POOL
Color.CYAN, // STACK
Color.LIGHT_GRAY, // PERFINFO
Color.DARK_GRAY, // READ_MEMORY
Color.BLUE, // WRITE_MEMORY
Color.RED, // WRITE_MEMORY
new GColor("color.debugger.plugin.memview.box.type.instructions"),
new GColor("color.debugger.plugin.memview.box.type.process"),
new GColor("color.debugger.plugin.memview.box.type.thread"),
new GColor("color.debugger.plugin.memview.box.type.module"),
new GColor("color.debugger.plugin.memview.box.type.region"),
new GColor("color.debugger.plugin.memview.box.type.image"),
new GColor("color.debugger.plugin.memview.box.type.virtual.alloc"),
new GColor("color.debugger.plugin.memview.box.type.heap.create"),
new GColor("color.debugger.plugin.memview.box.type.heap.alloc"),
new GColor("color.debugger.plugin.memview.box.type.pool"),
new GColor("color.debugger.plugin.memview.box.type.stack"),
new GColor("color.debugger.plugin.memview.box.type.perfinfo"),
new GColor("color.debugger.plugin.memview.box.type.read.memory"),
new GColor("color.debugger.plugin.memview.box.type.write.memory"),
new GColor("color.debugger.plugin.memview.box.type.breakpoint"),
};
public Color getColor() {
@@ -22,16 +22,20 @@ import java.util.List;
import javax.swing.*;
import generic.theme.GColor;
import generic.theme.GThemeDefaults.Colors.Java;
import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressRange;
public class MemviewPanel extends JPanel implements MouseListener, MouseMotionListener {
private static final long serialVersionUID = 1L;
private Color ARROW_COLOR = new GColor("color.debugger.memview.arrow");
private MemviewProvider provider;
private MemviewMap amap;
private MemviewMap tmap;
private List<MemoryBox> boxList = new ArrayList<MemoryBox>();
private List<MemoryBox> boxList = new ArrayList<>();
private int pressedX;
private int pressedY;
@@ -60,7 +64,7 @@ public class MemviewPanel extends JPanel implements MouseListener, MouseMotionLi
this.provider = provider;
setPreferredSize(new Dimension(barWidth, barHeight));
setSize(getPreferredSize());
setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
setBorder(BorderFactory.createLineBorder(Java.BORDER, 1));
setFocusable(true);
addMouseListener(this);
@@ -129,7 +133,7 @@ public class MemviewPanel extends JPanel implements MouseListener, MouseMotionLi
g.translate(currentPixelAddr, currentPixelTime);
}
g.setColor(Color.RED);
g.setColor(ARROW_COLOR);
g.fillPolygon(locXs, locYs, locXs.length);
if (vertical) {
@@ -149,7 +153,7 @@ public class MemviewPanel extends JPanel implements MouseListener, MouseMotionLi
int y = currentRectangle.y;
int w = currentRectangle.width;
int h = currentRectangle.height;
g.setColor(Color.RED);
g.setColor(ARROW_COLOR);
g.fillRect(x - 1, y - 1, 1, h + 2);
g.fillRect(x - 1, y - 1, w + 2, 1);
g.fillRect(x + w + 1, y - 1, 1, h + 2);
@@ -180,17 +184,19 @@ public class MemviewPanel extends JPanel implements MouseListener, MouseMotionLi
}
void updateBoxes() {
if (!this.isShowing())
if (!this.isShowing()) {
return;
}
boxList = new ArrayList<MemoryBox>();
boxList = new ArrayList<>();
Collection<MemoryBox> boxes = getBoxes();
if (boxes == null) {
return;
}
for (MemoryBox box : boxes) {
if (box == null)
if (box == null) {
continue;
}
int bound = vertical ? getHeight() - 1 : getWidth() - 1;
box.setAddressBounds(amap, bound);
@@ -374,26 +380,26 @@ public class MemviewPanel extends JPanel implements MouseListener, MouseMotionLi
Set<MemoryBox> mboxes = addr2box.get(box.getStartAddress());
if (mboxes == null) {
mboxes = new HashSet<MemoryBox>();
mboxes = new HashSet<>();
}
mboxes.add(box);
addr2box.put(box.getStartAddress(), mboxes);
mboxes = addr2box.get(box.getStopAddress());
if (mboxes == null) {
mboxes = new HashSet<MemoryBox>();
mboxes = new HashSet<>();
}
mboxes.add(box);
addr2box.put(box.getStopAddress(), mboxes);
mboxes = time2box.get(box.getStartTime());
if (mboxes == null) {
mboxes = new HashSet<MemoryBox>();
mboxes = new HashSet<>();
}
mboxes.add(box);
time2box.put(box.getStartTime(), mboxes);
mboxes = time2box.get(box.getStopTime());
if (mboxes == null) {
mboxes = new HashSet<MemoryBox>();
mboxes = new HashSet<>();
}
mboxes.add(box);
time2box.put(box.getStopTime(), mboxes);
@@ -415,7 +421,7 @@ public class MemviewPanel extends JPanel implements MouseListener, MouseMotionLi
public void addBoxes(List<MemoryBox> boxes) {
if (blist == null) {
blist = new ArrayList<MemoryBox>();
blist = new ArrayList<>();
}
for (MemoryBox b : boxes) {
if (bmap.containsKey(b.getId())) {
@@ -429,7 +435,7 @@ public class MemviewPanel extends JPanel implements MouseListener, MouseMotionLi
}
public void reset() {
blist = new ArrayList<MemoryBox>();
blist = new ArrayList<>();
bmap.clear();
parseBoxes(blist);
}
@@ -451,14 +457,16 @@ public class MemviewPanel extends JPanel implements MouseListener, MouseMotionLi
}
public long getAddr(int x, int y) {
if (amap == null)
if (amap == null) {
return 0;
}
return vertical ? amap.getOffset(y) : amap.getOffset(x);
}
public long getTick(int x, int y) {
if (tmap == null)
if (tmap == null) {
return 0;
}
return vertical ? tmap.getOffset(x) : tmap.getOffset(y);
}
@@ -21,10 +21,9 @@ import java.awt.event.MouseEvent;
import java.util.*;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import docking.widgets.filter.FilterListener;
import generic.theme.GIcon;
import ghidra.app.services.DebuggerListingService;
import ghidra.program.model.address.Address;
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.GhidraTableFilterPanel;
import ghidra.util.task.SwingUpdateManager;
import resources.ResourceManager;
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 GhidraTable table;
@@ -61,19 +59,16 @@ public class MemviewTable {
component.add(filterPanel, BorderLayout.SOUTH);
table.setAutoscrolls(true);
table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()) {
return;
}
int modelRow = filterPanel.getModelRow(table.getSelectedRow());
MemoryBox box = model.getBoxAt(modelRow);
if (box != null) {
Set<MemoryBox> boxes = new HashSet<MemoryBox>();
boxes.add(box);
provider.selectPanelPosition(boxes);
}
table.getSelectionModel().addListSelectionListener(e -> {
if (e.getValueIsAdjusting()) {
return;
}
int modelRow = filterPanel.getModelRow(table.getSelectedRow());
MemoryBox box = model.getBoxAt(modelRow);
if (box != null) {
Set<MemoryBox> boxes = new HashSet<>();
boxes.add(box);
provider.selectPanelPosition(boxes);
}
});
table.addMouseListener(new MouseAdapter() {
@@ -15,18 +15,18 @@
*/
package ghidra.app.plugin.core.debug.gui.memview.actions;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.ActionContext;
import docking.action.DockingAction;
import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
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;
@@ -15,18 +15,18 @@
*/
package ghidra.app.plugin.core.debug.gui.memview.actions;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.ActionContext;
import docking.action.DockingAction;
import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
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;
@@ -15,18 +15,18 @@
*/
package ghidra.app.plugin.core.debug.gui.memview.actions;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.ActionContext;
import docking.action.DockingAction;
import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
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;
@@ -15,18 +15,18 @@
*/
package ghidra.app.plugin.core.debug.gui.memview.actions;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.ActionContext;
import docking.action.DockingAction;
import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.debug.gui.memview.MemviewProvider;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
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;
@@ -29,6 +29,7 @@ import docking.action.DockingAction;
import docking.action.ToggleDockingAction;
import docking.widgets.table.RangeCursorTableHeaderRenderer.SeekListener;
import docking.widgets.tree.support.GTreeSelectionEvent.EventOrigin;
import generic.theme.GColor;
import ghidra.app.plugin.core.debug.DebuggerCoordinates;
import ghidra.app.plugin.core.debug.DebuggerPluginPackage;
import ghidra.app.plugin.core.debug.gui.DebuggerResources;
@@ -77,16 +78,10 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
@SuppressWarnings("unused")
private final AutoService.Wiring autoServiceWiring;
@AutoOptionDefined(
description = "Text color for values that have just changed",
name = DebuggerResources.OPTION_NAME_COLORS_VALUE_CHANGED,
help = @HelpInfo(anchor = "colors"))
@AutoOptionDefined(description = "Text color for values that have just changed", name = DebuggerResources.OPTION_NAME_COLORS_VALUE_CHANGED, help = @HelpInfo(anchor = "colors"))
private Color diffColor = DebuggerResources.DEFAULT_COLOR_VALUE_CHANGED;
@AutoOptionDefined(
description = "Select text color for values that have just changed",
name = DebuggerResources.OPTION_NAME_COLORS_VALUE_CHANGED_SEL,
help = @HelpInfo(anchor = "colors"))
@AutoOptionDefined(description = "Select text color for values that have just changed", name = DebuggerResources.OPTION_NAME_COLORS_VALUE_CHANGED_SEL, help = @HelpInfo(anchor = "colors"))
private Color diffColorSel = DebuggerResources.DEFAULT_COLOR_VALUE_CHANGED_SEL;
@SuppressWarnings("unused")
@@ -143,7 +138,8 @@ public class DebuggerModelProvider extends ComponentProvider implements Saveable
setTitle("[" + DebuggerResources.TITLE_PROVIDER_MODEL + "]");
setWindowGroup("Debugger.Core.disconnected");
setIntraGroupPosition(WindowPosition.STACK);
mainPanel.setBorder(BorderFactory.createLineBorder(Color.ORANGE, 2));
mainPanel.setBorder(BorderFactory
.createLineBorder(new GColor("color.border.provider.disconnected"), 2));
setTransient();
}
else {
@@ -43,6 +43,8 @@ import docking.widgets.OptionDialog;
import docking.widgets.table.DefaultEnumeratedColumnTableModel;
import docking.widgets.tree.GTree;
import generic.jar.ResourceFile;
import generic.theme.GColor;
import generic.theme.GThemeDefaults.Colors;
import ghidra.app.plugin.core.debug.DebuggerCoordinates;
import ghidra.app.plugin.core.debug.DebuggerPluginPackage;
import ghidra.app.plugin.core.debug.gui.DebuggerResources;
@@ -123,76 +125,76 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
public static final String OPTION_NAME_DEFAULT_BACKGROUND_COLOR = "Object Colors.Background";
@AutoOptionDefined( //
name = OPTION_NAME_DEFAULT_FOREGROUND_COLOR, //
description = "The default foreground color of items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_DEFAULT_FOREGROUND_COLOR, //
description = "The default foreground color of items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
)
Color defaultForegroundColor = Color.BLACK;
Color defaultForegroundColor = new GColor("color.fg.debugger.plugin.objects.default");
@AutoOptionDefined( //
name = OPTION_NAME_DEFAULT_BACKGROUND_COLOR, //
description = "The default background color of items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_DEFAULT_BACKGROUND_COLOR, //
description = "The default background color of items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
)
Color defaultBackgroundColor = Color.WHITE;
Color defaultBackgroundColor = new GColor("color.bg.debugger.plugin.objects.default");
@AutoOptionDefined( //
name = OPTION_NAME_INVISIBLE_FOREGROUND_COLOR, //
description = "The foreground color for items normally not visible (toggleable)", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_INVISIBLE_FOREGROUND_COLOR, //
description = "The foreground color for items normally not visible (toggleable)", //
help = @HelpInfo(anchor = "colors") //
)
Color invisibleForegroundColor = Color.LIGHT_GRAY;
Color invisibleForegroundColor = new GColor("color.fg.debugger.plugin.objects.invisible");
@AutoOptionDefined( //
name = OPTION_NAME_INVALIDATED_FOREGROUND_COLOR, //
description = "The foreground color for items no longer valid", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_INVALIDATED_FOREGROUND_COLOR, //
description = "The foreground color for items no longer valid", //
help = @HelpInfo(anchor = "colors") //
)
Color invalidatedForegroundColor = Color.LIGHT_GRAY;
Color invalidatedForegroundColor = new GColor("color.fg.debugger.plugin.objects.invalidated");
@AutoOptionDefined( //
name = OPTION_NAME_MODIFIED_FOREGROUND_COLOR, //
description = "The foreground color for modified items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_MODIFIED_FOREGROUND_COLOR, //
description = "The foreground color for modified items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
)
Color modifiedForegroundColor = Color.RED;
Color modifiedForegroundColor = new GColor("color.fg.debugger.plugin.objects.modified");
@AutoOptionDefined( //
name = OPTION_NAME_SUBSCRIBED_FOREGROUND_COLOR, //
description = "The foreground color for subscribed items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_SUBSCRIBED_FOREGROUND_COLOR, //
description = "The foreground color for subscribed items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
)
Color subscribedForegroundColor = Color.BLACK;
Color subscribedForegroundColor = new GColor("color.fg.debugger.plugin.objects.subscribed");
@AutoOptionDefined( //
name = OPTION_NAME_ERROR_FOREGROUND_COLOR, //
description = "The foreground color for items in error", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_ERROR_FOREGROUND_COLOR, //
description = "The foreground color for items in error", //
help = @HelpInfo(anchor = "colors") //
)
Color errorForegroundColor = Color.RED;
Color errorForegroundColor = new GColor("color.fg.debugger.plugin.objects.error");
@AutoOptionDefined( //
name = OPTION_NAME_INTRINSIC_FOREGROUND_COLOR, //
description = "The foreground color for intrinsic items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_INTRINSIC_FOREGROUND_COLOR, //
description = "The foreground color for intrinsic items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
)
Color intrinsicForegroundColor = Color.BLUE;
Color intrinsicForegroundColor = new GColor("color.fg.debugger.plugin.objects.intrinsic");
@AutoOptionDefined( //
name = OPTION_NAME_TARGET_FOREGROUND_COLOR, //
description = "The foreground color for target object items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_TARGET_FOREGROUND_COLOR, //
description = "The foreground color for target object items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
)
Color targetForegroundColor = Color.MAGENTA;
Color targetForegroundColor = new GColor("color.fg.debugger.plugin.objects.target");
@AutoOptionDefined( //
name = OPTION_NAME_ACCESSOR_FOREGROUND_COLOR, //
description = "The foreground color for property accessor items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_ACCESSOR_FOREGROUND_COLOR, //
description = "The foreground color for property accessor items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
)
Color accessorForegroundColor = Color.LIGHT_GRAY;
Color accessorForegroundColor = new GColor("color.fg.debugger.plugin.objects.accessor");
@AutoOptionDefined( //
name = OPTION_NAME_LINK_FOREGROUND_COLOR, //
description = "The foreground color for links to items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
name = OPTION_NAME_LINK_FOREGROUND_COLOR, //
description = "The foreground color for links to items in the objects tree", //
help = @HelpInfo(anchor = "colors") //
)
Color linkForegroundColor = Color.GREEN.darker();
Color linkForegroundColor = new GColor("color.fg.debugger.plugin.objects.link");
@AutoOptionDefined( //
name = "Default Extended Step", //
description = "The default string for the extended step command" //
name = "Default Extended Step", //
description = "The default string for the extended step command" //
//help = @HelpInfo(anchor = "colors") //
)
String extendedStep = "";
@@ -281,7 +283,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
this.asTree = asTree;
setIcon(asTree ? ObjectTree.ICON_TREE : ObjectTable.ICON_TABLE);
targetMap = new LinkedMap<String, ObjectContainer>();
targetMap = new LinkedMap<>();
refSet = new HashSet<>();
getRoot().propagateProvider(this);
@@ -658,7 +660,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
}
}
model.addAll(list);
return new ObjectTable<ObjectAttributeRow>(container, ObjectAttributeRow.class, model);
return new ObjectTable<>(container, ObjectAttributeRow.class, model);
}
private ObjectTable<ObjectElementRow> buildTableFromElements(ObjectContainer container) {
@@ -678,7 +680,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
new ObjectEnumeratedColumnTableModel<>(name, cols);
model.addAll(list);
ObjectTable<ObjectElementRow> table =
new ObjectTable<ObjectElementRow>(container, ObjectElementRow.class, model);
new ObjectTable<>(container, ObjectElementRow.class, model);
for (Object obj : map.values()) {
if (obj instanceof TargetObject) {
TargetObject ref = (TargetObject) obj;
@@ -744,7 +746,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
static List<ObjectContainer> getContainersFromObjects(Map<String, ?> objectMap,
TargetObject parent, boolean usingAttributes) {
List<ObjectContainer> result = new ArrayList<ObjectContainer>();
List<ObjectContainer> result = new ArrayList<>();
if (parent == null || parent instanceof DummyTargetObject) {
return result;
}
@@ -826,7 +828,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
public ObjectContainer getParent(ObjectContainer container) {
List<String> path = container.getTargetObject().getPath();
List<String> ppath = new ArrayList<String>();
List<String> ppath = new ArrayList<>();
for (String link : path) {
ppath.add(link);
}
@@ -2028,7 +2030,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
case OPTION_NAME_TARGET_FOREGROUND_COLOR:
return targetForegroundColor;
default:
return Color.BLACK;
return Colors.FOREGROUND;
}
}
@@ -19,10 +19,11 @@ import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.*;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.action.KeyBindingData;
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.ObjectContainer;
import ghidra.app.services.GraphDisplayBroker;
@@ -33,13 +34,12 @@ import ghidra.util.Msg;
import ghidra.util.exception.CancelledException;
import ghidra.util.exception.GraphException;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class DisplayAsGraphAction extends DisplayAsAction {
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) {
super("DisplayGraph", tool, owner, provider);
@@ -18,12 +18,13 @@ package ghidra.app.plugin.core.debug.gui.objects.actions;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import org.jdom.Element;
import docking.action.KeyBindingData;
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.ObjectContainer;
import ghidra.app.services.ConsoleService;
@@ -31,12 +32,11 @@ import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation;
import ghidra.util.Msg;
import ghidra.util.xml.XmlUtilities;
import resources.ResourceManager;
public class DisplayAsXMLAction extends DisplayAsAction {
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) {
super("DisplayXml", tool, owner, provider);
@@ -20,10 +20,11 @@ import java.awt.event.KeyEvent;
import java.util.List;
import java.util.Set;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.action.KeyBindingData;
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.ObjectContainer;
import ghidra.app.services.GraphDisplayBroker;
@@ -34,13 +35,12 @@ import ghidra.util.Msg;
import ghidra.util.exception.CancelledException;
import ghidra.util.exception.GraphException;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class DisplayFilteredGraphAction extends DisplayFilteredAction {
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,
DebuggerObjectsProvider provider) {
@@ -19,13 +19,14 @@ import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.List;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import org.apache.commons.lang3.StringUtils;
import org.jdom.Element;
import docking.action.KeyBindingData;
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.ObjectContainer;
import ghidra.app.services.ConsoleService;
@@ -33,12 +34,11 @@ import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation;
import ghidra.util.Msg;
import ghidra.util.xml.XmlUtilities;
import resources.ResourceManager;
public class DisplayFilteredXMLAction extends DisplayFilteredAction {
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,
DebuggerObjectsProvider provider) {
@@ -21,17 +21,17 @@ import java.io.*;
import java.util.HashMap;
import java.util.Map;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.action.KeyBindingData;
import docking.action.MenuData;
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.ObjectContainer;
import ghidra.dbg.target.TargetObject;
import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class ExportAsFactsAction extends ImportExportAsAction {
@@ -39,8 +39,8 @@ public class ExportAsFactsAction extends ImportExportAsAction {
public static String JOIN = ".";
public static String SPLIT = "\\.";
public static String fileExt2 = ".facts";
protected ImageIcon ICON_FACTS = ResourceManager.loadImage("images/closedFolder.png");
private Map<String, PrintWriter> files = new HashMap<String, PrintWriter>();
protected static final Icon ICON_FACTS = new GIcon("icon.debugger.display.export.facts");
private Map<String, PrintWriter> files = new HashMap<>();
public ExportAsFactsAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
super("ExportAsFacts", tool, owner, provider);
@@ -20,7 +20,7 @@ import java.awt.event.KeyEvent;
import java.io.File;
import java.io.IOException;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import org.apache.commons.lang3.StringUtils;
import org.jdom.Document;
@@ -29,16 +29,16 @@ import org.jdom.Element;
import docking.action.KeyBindingData;
import docking.action.MenuData;
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.ObjectContainer;
import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation;
import ghidra.util.xml.XmlUtilities;
import resources.ResourceManager;
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) {
super("ExportAsXML", tool, owner, provider);
@@ -20,26 +20,26 @@ import java.awt.event.KeyEvent;
import java.io.*;
import java.util.*;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.SwingUtilities;
import docking.ActionContext;
import docking.action.KeyBindingData;
import docking.action.MenuData;
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.ObjectContainer;
import ghidra.app.plugin.core.debug.gui.objects.components.DummyTargetObject;
import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation;
import ghidra.util.Msg;
import resources.ResourceManager;
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 =
new LinkedHashMap<String, Map<String, String>>();
new LinkedHashMap<>();
public ImportFromFactsAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
super("ImportFromFacts", tool, owner, provider);
@@ -75,7 +75,7 @@ public class ImportFromFactsAction extends ImportExportAsAction {
for (File f : dir.listFiles()) {
BufferedReader reader =
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();
name = name.substring(0, name.indexOf(ExportAsFactsAction.fileExt2));
maps.put(name, map);
@@ -21,7 +21,7 @@ import java.io.*;
import java.util.ArrayList;
import java.util.List;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.SwingUtilities;
import org.jdom.Attribute;
@@ -32,6 +32,7 @@ import docking.ActionContext;
import docking.action.KeyBindingData;
import docking.action.MenuData;
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.ObjectContainer;
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.Msg;
import ghidra.util.xml.XmlUtilities;
import resources.ResourceManager;
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) {
super("ImportFromXML", tool, owner, provider);
@@ -21,13 +21,14 @@ import java.io.File;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.SwingUtilities;
import docking.ActionContext;
import docking.action.KeyBindingData;
import docking.action.MenuData;
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.ObjectContainer;
import ghidra.async.AsyncUtils;
@@ -38,11 +39,10 @@ import ghidra.dbg.target.TargetLauncher.TargetCmdLineLauncher;
import ghidra.dbg.target.TargetObject;
import ghidra.framework.plugintool.PluginTool;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
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;
public OpenWinDbgTraceAction(PluginTool tool, String owner, DebuggerObjectsProvider provider) {
@@ -66,23 +66,20 @@ public class OpenWinDbgTraceAction extends ImportExportAsAction {
if (f == null) {
return;
}
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
String[] args = new String[2];
args[0] = ".opendump";
args[1] = f.getAbsolutePath();
AtomicReference<TargetLauncher> launcher = new AtomicReference<>();
AsyncUtils.sequence(TypeSpec.VOID).then(seq -> {
TargetObject obj = provider.getObjectFromContext(context);
DebugModelConventions.findSuitable(TargetLauncher.class, obj).handle(seq::next);
}, launcher).then(seq -> {
launcher.get()
.launch(Map.of(TargetCmdLineLauncher.CMDLINE_ARGS_NAME, args))
.handle(seq::next);
seq.exit();
}).finish();
}
SwingUtilities.invokeLater(() -> {
String[] args = new String[2];
args[0] = ".opendump";
args[1] = f.getAbsolutePath();
AtomicReference<TargetLauncher> launcher = new AtomicReference<>();
AsyncUtils.sequence(TypeSpec.VOID).then(seq -> {
TargetObject obj = provider.getObjectFromContext(context);
DebugModelConventions.findSuitable(TargetLauncher.class, obj).handle(seq::next);
}, launcher).then(seq -> {
launcher.get()
.launch(Map.of(TargetCmdLineLauncher.CMDLINE_ARGS_NAME, args))
.handle(seq::next);
seq.exit();
}).finish();
});
}
@@ -19,9 +19,9 @@ import java.util.*;
import java.util.concurrent.*;
import javax.swing.Icon;
import javax.swing.ImageIcon;
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.ObjectContainer;
import ghidra.dbg.target.*;
@@ -29,17 +29,14 @@ import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
import ghidra.util.Msg;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class ObjectNode extends GTreeSlowLoadingNode { //extends GTreeNode
static final ImageIcon ICON_POPULATED =
ResourceManager.loadImage("images/object-populated.png");
static final ImageIcon ICON_EMPTY = ResourceManager.loadImage("images/object-unpopulated.png");
static final ImageIcon ICON_RUNNING = ResourceManager.loadImage("images/object-running.png");
static final ImageIcon ICON_TERMINATED =
ResourceManager.loadImage("images/object-terminated.png");
static final ImageIcon ICON_EVENT = ResourceManager.loadImage("images/register-marker.png");
static final Icon ICON_POPULATED = new GIcon("icon.debugger.node.object.populated");
static final Icon ICON_EMPTY = new GIcon("icon.debugger.node.object.empty");
static final Icon ICON_RUNNING = new GIcon("icon.debugger.node.object.running");
static final Icon ICON_TERMINATED = new GIcon("icon.debugger.node.object.terminated");
static final Icon ICON_EVENT = new GIcon("icon.debugger.node.object.event");
private ObjectContainer container;
private String name;
@@ -212,26 +209,20 @@ public class ObjectNode extends GTreeSlowLoadingNode { //extends GTreeNode
public void callUpdate() {
// NB: this has to be in its own thread
CompletableFuture.runAsync(new Runnable() {
@Override
public void run() {
List<GTreeNode> updateNodes = tree.update(container);
if (isRestructured()) {
setChildren(updateNodes);
}
CompletableFuture.runAsync(() -> {
List<GTreeNode> updateNodes = tree.update(container);
if (isRestructured()) {
setChildren(updateNodes);
}
});
}
public void callModified() {
// NB: this has to be in its own thread
CompletableFuture.runAsync(new Runnable() {
@Override
public void run() {
List<GTreeNode> updateNodes = tree.update(container);
for (GTreeNode n : updateNodes) {
n.fireNodeChanged();
}
CompletableFuture.runAsync(() -> {
List<GTreeNode> updateNodes = tree.update(container);
for (GTreeNode n : updateNodes) {
n.fireNodeChanged();
}
});
}
@@ -20,21 +20,19 @@ import java.awt.event.MouseEvent;
import java.util.*;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import docking.widgets.table.AbstractSortedTableModel;
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.ObjectContainer;
import ghidra.dbg.target.TargetObject;
import ghidra.util.Swing;
import ghidra.util.table.GhidraTable;
import resources.ResourceManager;
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 Class<R> clazz;
@@ -50,15 +48,12 @@ public class ObjectTable<R> implements ObjectPane {
this.clazz = clazz;
this.model = model;
table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()) {
return;
}
DebuggerObjectsProvider provider = container.getProvider();
provider.getTool().contextChanged(provider);
table.getSelectionModel().addListSelectionListener(e -> {
if (e.getValueIsAdjusting()) {
return;
}
DebuggerObjectsProvider provider = container.getProvider();
provider.getTool().contextChanged(provider);
});
table.addMouseListener(new MouseAdapter() {
@Override
@@ -21,7 +21,7 @@ import java.awt.event.MouseEvent;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.event.TreeExpansionEvent;
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.EventOrigin;
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.ObjectContainer;
import ghidra.async.AsyncUtils;
@@ -40,14 +41,13 @@ import ghidra.async.TypeSpec;
import ghidra.dbg.DebugModelConventions;
import ghidra.dbg.target.TargetAccessConditioned;
import ghidra.dbg.target.TargetObject;
import ghidra.util.*;
import ghidra.util.Msg;
import ghidra.util.Swing;
import ghidra.util.task.SwingUpdateManager;
import resources.ResourceManager;
public class ObjectTree implements ObjectPane {
public static final ImageIcon ICON_TREE =
ResourceManager.loadImage("images/object-unpopulated.png");
public static final Icon ICON_TREE = new GIcon("icon.debugger.tree.object");
private ObjectNode root;
private GTree tree;
@@ -118,16 +118,12 @@ public class ObjectTree implements ObjectPane {
}
});
tree.setCellRenderer(new ObjectTreeCellRenderer(root.getProvider()));
tree.setDataTransformer(new FilterTransformer<GTreeNode>() {
@Override
public List<String> transform(GTreeNode t) {
if (t instanceof ObjectNode) {
ObjectNode node = (ObjectNode) t;
return List.of(node.getContainer().getDecoratedName());
}
return null;
tree.setDataTransformer(t -> {
if (t instanceof ObjectNode) {
ObjectNode node = (ObjectNode) t;
return List.of(node.getContainer().getDecoratedName());
}
return null;
});
tree.addTreeExpansionListener(new TreeExpansionListener() {
@@ -329,7 +325,7 @@ public class ObjectTree implements ObjectPane {
}
Set<ObjectContainer> currentChildren = container.getCurrentChildren();
List<GTreeNode> childList = new ArrayList<GTreeNode>();
List<GTreeNode> childList = new ArrayList<>();
node.setRestructured(false);
for (ObjectContainer c : currentChildren) {
@@ -15,32 +15,27 @@
*/
package ghidra.app.plugin.core.debug.gui.objects.components;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.*;
import java.util.Map;
import javax.swing.JTree;
import javax.swing.tree.TreePath;
import docking.widgets.tree.support.GTreeRenderer;
import generic.theme.GThemeDefaults.Colors.Tables;
import generic.theme.Gui;
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
import ghidra.dbg.target.TargetExecutionStateful;
import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
import ghidra.dbg.target.TargetObject;
import ghidra.util.SystemUtilities;
// TODO: In the new scheme, I'm not sure this is applicable anymore.
class ObjectTreeCellRenderer extends GTreeRenderer {
private static final String FONT_ID = "font.debugger.object.tree.renderer";
private final DebuggerObjectsProvider provider;
private Font defaultFont = SystemUtilities.adjustForFontSizeOverride(new Font("Tahoma", Font.PLAIN, 11));
private Font unsubscribedFont = SystemUtilities.adjustForFontSizeOverride(new Font("Tahoma", Font.ITALIC, 11));
/**
* @param provider
*/
public ObjectTreeCellRenderer(DebuggerObjectsProvider provider) {
this.provider = provider;
}
@@ -90,7 +85,7 @@ class ObjectTreeCellRenderer extends GTreeRenderer {
if (container.isSubscribed()) {
Color color = provider
.getColor(DebuggerObjectsProvider.OPTION_NAME_SUBSCRIBED_FOREGROUND_COLOR);
if (!color.equals(Color.BLACK)) {
if (!color.equals(Tables.FG_UNSELECTED)) {
component.setForeground(color);
}
}
@@ -100,11 +95,15 @@ class ObjectTreeCellRenderer extends GTreeRenderer {
if (last instanceof ObjectNode) {
ObjectContainer selection = ((ObjectNode) last).getContainer();
if (container.equals(selection)) {
component.setForeground(Color.WHITE);
component.setForeground(Tables.FG_SELECTED);
}
}
}
component.setFont(container.isSubscribed() ? defaultFont : unsubscribedFont);
Font font = Gui.getFont(FONT_ID);
if (container.isSubscribed()) {
font = font.deriveFont(Font.ITALIC);
}
component.setFont(font);
}
return component;
}
@@ -38,6 +38,7 @@ import docking.actions.PopupActionProvider;
import docking.widgets.table.*;
import docking.widgets.table.ColumnSortState.SortDirection;
import docking.widgets.table.DefaultEnumeratedColumnTableModel.EnumeratedTableColumn;
import generic.theme.GColor;
import ghidra.app.plugin.core.data.DataSettingsDialog;
import ghidra.app.plugin.core.debug.DebuggerCoordinates;
import ghidra.app.plugin.core.debug.DebuggerPluginPackage;
@@ -472,25 +473,21 @@ public class DebuggerRegistersProvider extends ComponentProviderAdapter
@SuppressWarnings("unused")
private final AutoService.Wiring autoServiceWiring;
@AutoOptionDefined(
name = DebuggerResources.OPTION_NAME_COLORS_REGISTER_STALE, //
description = "Text color for registers whose value is not known", //
help = @HelpInfo(anchor = "colors"))
@AutoOptionDefined(name = DebuggerResources.OPTION_NAME_COLORS_REGISTER_STALE, //
description = "Text color for registers whose value is not known", //
help = @HelpInfo(anchor = "colors"))
protected Color registerStaleColor = DebuggerResources.DEFAULT_COLOR_REGISTER_STALE;
@AutoOptionDefined(
name = DebuggerResources.OPTION_NAME_COLORS_REGISTER_STALE_SEL, //
description = "Selected text color for registers whose value is not known", //
help = @HelpInfo(anchor = "colors"))
@AutoOptionDefined(name = DebuggerResources.OPTION_NAME_COLORS_REGISTER_STALE_SEL, //
description = "Selected text color for registers whose value is not known", //
help = @HelpInfo(anchor = "colors"))
protected Color registerStaleSelColor = DebuggerResources.DEFAULT_COLOR_REGISTER_STALE_SEL;
@AutoOptionDefined(
name = DebuggerResources.OPTION_NAME_COLORS_REGISTER_CHANGED, //
description = "Text color for registers whose value just changed", //
help = @HelpInfo(anchor = "colors"))
@AutoOptionDefined(name = DebuggerResources.OPTION_NAME_COLORS_REGISTER_CHANGED, //
description = "Text color for registers whose value just changed", //
help = @HelpInfo(anchor = "colors"))
protected Color registerChangesColor = DebuggerResources.DEFAULT_COLOR_REGISTER_CHANGED;
@AutoOptionDefined(
name = DebuggerResources.OPTION_NAME_COLORS_REGISTER_CHANGED_SEL, //
description = "Selected text color for registers whose value just changed", //
help = @HelpInfo(anchor = "colors"))
@AutoOptionDefined(name = DebuggerResources.OPTION_NAME_COLORS_REGISTER_CHANGED_SEL, //
description = "Selected text color for registers whose value just changed", //
help = @HelpInfo(anchor = "colors"))
protected Color registerChangesSelColor = DebuggerResources.DEFAULT_COLOR_REGISTER_CHANGED_SEL;
@SuppressWarnings("unused")
@@ -550,7 +547,8 @@ public class DebuggerRegistersProvider extends ComponentProviderAdapter
setTitle("[" + DebuggerResources.TITLE_PROVIDER_REGISTERS + "]");
setWindowGroup("Debugger.Core.disconnected");
setIntraGroupPosition(WindowPosition.STACK);
mainPanel.setBorder(BorderFactory.createLineBorder(Color.ORANGE, 2));
mainPanel.setBorder(BorderFactory
.createLineBorder(new GColor("color.border.provider.disconnected"), 2));
setTransient();
}
else {
@@ -441,7 +441,7 @@ public abstract class AbstractGhidraHeadedDebuggerGUITest
assertNotNull("Cannot get cursor bounds", cursor);
Color actual = new Color(image.getRGB(locFP.x + cursor.x - 1,
locFP.y + cursor.y + cursor.height * 3 / 2 + yAdjust));
assertEquals(expected, actual);
assertEquals(expected.getRGB(), actual.getRGB());
});
}
@@ -640,7 +640,9 @@ public class DebuggerBreakpointsProviderTest extends AbstractGhidraHeadedDebugge
}
assertEquals(2, filtLocs.size());
breakpointsProvider.setSelectedBreakpoints(Set.of(data.get(0).getLogicalBreakpoint()));
LogicalBreakpointRow bpRow = data.get(0);
runSwing(() -> breakpointsProvider
.setSelectedBreakpoints(Set.of(bpRow.getLogicalBreakpoint())));
waitForSwing();
filtLocs = breakpointsProvider.locationFilterPanel.getTableFilterModel().getModelData();
@@ -17,7 +17,6 @@ package ghidra.app.plugin.core.debug.gui.copying;
import static org.junit.Assert.*;
import java.awt.Color;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.util.*;
@@ -26,6 +25,7 @@ import javax.swing.JCheckBox;
import org.junit.Test;
import generic.theme.GThemeDefaults.Colors.Palette;
import ghidra.app.plugin.assembler.Assembler;
import ghidra.app.plugin.assembler.Assemblers;
import ghidra.app.plugin.core.debug.gui.AbstractGhidraHeadedDebuggerGUITest;
@@ -615,7 +615,7 @@ public class DebuggerCopyPlanTests extends AbstractGhidraHeadedDebuggerGUITest {
TraceMemoryFlag.READ, TraceMemoryFlag.EXECUTE);
BookmarkManager bookmarks = view.getBookmarkManager();
bookmarks.defineType("TestType", DebuggerResources.ICON_DEBUGGER, Color.BLUE, 1);
bookmarks.defineType("TestType", DebuggerResources.ICON_DEBUGGER, Palette.BLUE, 1);
bookmarks.setBookmark(tb.addr(0x55550123), "TestType", "TestCategory", "Test Comment");
}
@@ -644,7 +644,7 @@ public class DebuggerCopyPlanTests extends AbstractGhidraHeadedDebuggerGUITest {
assertEquals("Test Comment", bm.getComment());
assertEquals(DebuggerResources.ICON_DEBUGGER, type.getIcon());
assertEquals(Color.BLUE, type.getMarkerColor());
assertEquals(Palette.BLUE, type.getMarkerColor());
assertEquals(1, type.getMarkerPriority());
}
@@ -17,7 +17,6 @@ package ghidra.app.plugin.core.debug.gui.listing;
import static org.junit.Assert.*;
import java.awt.Color;
import java.io.IOException;
import java.math.BigInteger;
import java.nio.ByteBuffer;
@@ -31,6 +30,7 @@ import docking.menu.ActionState;
import docking.menu.MultiStateDockingAction;
import docking.widgets.EventTrigger;
import generic.test.category.NightlyCategory;
import generic.theme.GThemeDefaults.Colors;
import ghidra.app.plugin.core.codebrowser.CodeBrowserPlugin;
import ghidra.app.plugin.core.codebrowser.CodeViewerProvider;
import ghidra.app.plugin.core.debug.DebuggerCoordinates;
@@ -637,7 +637,7 @@ public class DebuggerListingProviderTest extends AbstractGhidraHeadedDebuggerGUI
// While we're here, ensure static view didn't track anywhere
assertEquals(cur, codePlugin.getCurrentLocation().getAddress());
assertListingBackgroundAt(Color.WHITE, codePlugin.getListingPanel(),
assertListingBackgroundAt(Colors.BACKGROUND, codePlugin.getListingPanel(),
ss.getAddress(0x00601234), 0);
}
@@ -774,7 +774,7 @@ public class DebuggerListingProviderTest extends AbstractGhidraHeadedDebuggerGUI
assertListingBackgroundAt(DebuggerResources.DEFAULT_COLOR_BACKGROUND_STALE,
listingProvider.getListingPanel(), tb.addr(0x00401233), 0);
assertListingBackgroundAt(Color.WHITE, listingProvider.getListingPanel(),
assertListingBackgroundAt(Colors.BACKGROUND, listingProvider.getListingPanel(),
tb.addr(0x00401234), 0);
assertListingBackgroundAt(DebuggerResources.DEFAULT_COLOR_BACKGROUND_ERROR,
listingProvider.getListingPanel(), tb.addr(0x00401235), 0);
@@ -15,7 +15,7 @@
*/
package ghidra.app.plugin.core.debug.gui.memory;
import static ghidra.lifecycle.Unfinished.TODO;
import static ghidra.lifecycle.Unfinished.*;
import static org.junit.Assert.*;
import java.awt.*;
@@ -434,7 +434,7 @@ public class DebuggerMemoryBytesProviderTest extends AbstractGhidraHeadedDebugge
}
Rectangle cursor = component.getCursorBounds();
Color actual = new Color(image.getRGB(cursor.x + 8, cursor.y));
assertEquals(expected, actual);
assertEquals(expected.getRGB(), actual.getRGB());
});
}
@@ -73,6 +73,7 @@ public class AgentWindow extends JFrame implements WindowListener, LogListener {
@Override
public void messageLogged(String message, boolean isError) {
Swing.runIfSwingOrRunLater(() -> {
MutableAttributeSet attributes = new SimpleAttributeSet();
if (isError) {
@@ -21,7 +21,7 @@ import java.util.*;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import db.DBHandle;
import ghidra.program.model.address.*;
@@ -236,7 +236,7 @@ public class DBTraceBookmarkManager extends AbstractDBTraceSpaceBasedManager<DBT
}
@Override
public synchronized DBTraceBookmarkType defineBookmarkType(String typeName, ImageIcon icon,
public synchronized DBTraceBookmarkType defineBookmarkType(String typeName, Icon icon,
Color color, int priority) {
DBTraceBookmarkType type;
synchronized (this) {
@@ -18,6 +18,7 @@ package ghidra.trace.database.bookmark;
import java.awt.Color;
import java.util.*;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import ghidra.trace.model.bookmark.TraceBookmark;
@@ -33,14 +34,14 @@ public class DBTraceBookmarkType implements TraceBookmarkType {
protected final DBTraceBookmarkManager manager;
protected final String name;
protected ImageIcon icon;
protected Icon icon;
protected Color color;
protected int priority;
protected final int id = nextId();
protected final Collection<TraceBookmark> bookmarkView;
public DBTraceBookmarkType(DBTraceBookmarkManager manager, String name, ImageIcon icon,
public DBTraceBookmarkType(DBTraceBookmarkManager manager, String name, Icon icon,
Color color, int priority) {
this.manager = manager;
this.name = name;
@@ -62,7 +63,7 @@ public class DBTraceBookmarkType implements TraceBookmarkType {
}
@Override
public ImageIcon getIcon() {
public Icon getIcon() {
return icon;
}
@@ -19,7 +19,7 @@ import java.awt.Color;
import java.util.*;
import java.util.function.Predicate;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import org.apache.commons.collections4.IteratorUtils;
@@ -52,7 +52,7 @@ public class DBTraceProgramViewBookmarkManager implements TraceProgramViewBookma
}
@Override
public BookmarkType defineType(String type, ImageIcon icon, Color color, int priority) {
public BookmarkType defineType(String type, Icon icon, Color color, int priority) {
return bookmarkManager.defineBookmarkType(type, icon, color, priority);
}
@@ -284,11 +284,11 @@ public class DBTraceProgramViewBookmarkManager implements TraceProgramViewBookma
* {@link IteratorUtils#filteredIterator(Iterator, org.apache.commons.collections4.Predicate)}.
*
* This one understands that the predicate will be testing things of the (possibly
* more-specific) type of elements in the original iterator, not thatof the returned iterator.
* more-specific) type of elements in the original iterator, not that of the returned iterator.
*
* @param it
* @param predicate
* @return
* @param it the iterator
* @param predicate the predicate
* @return the iterator
*/
@SuppressWarnings("unchecked")
protected static <T, U extends T> Iterator<T> filteredIterator(Iterator<U> it,
@@ -18,7 +18,7 @@ package ghidra.trace.model.bookmark;
import java.awt.Color;
import java.util.Collection;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import ghidra.program.model.address.AddressSpace;
import ghidra.trace.model.stack.TraceStackFrame;
@@ -45,7 +45,7 @@ public interface TraceBookmarkManager extends TraceBookmarkOperations {
* the same location
* @return the newly-defined type
*/
TraceBookmarkType defineBookmarkType(String name, ImageIcon icon, Color color, int priority);
TraceBookmarkType defineBookmarkType(String name, Icon icon, Color color, int priority);
/**
* Get the defined bookmark types.
@@ -17,7 +17,6 @@ package ghidra.trace.database;
import static org.junit.Assert.*;
import java.awt.Color;
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
@@ -29,6 +28,7 @@ import java.nio.file.Path;
import java.util.Collection;
import db.DBHandle;
import generic.theme.GThemeDefaults.Colors.Messages;
import ghidra.app.plugin.processors.sleigh.SleighLanguage;
import ghidra.pcode.exec.*;
import ghidra.pcode.exec.trace.TraceSleighUtils;
@@ -168,7 +168,7 @@ public class ToyDBTraceBuilder implements AutoCloseable {
/**
* Get the named register
*
* @param the platform
* @param platform the platform
* @param name the name
* @return the register or null if it doesn't exist
*/
@@ -190,7 +190,7 @@ public class ToyDBTraceBuilder implements AutoCloseable {
/**
* Create an address in the given language's default space
*
* @param lang the langauge
* @param lang the language
* @param offset the offset
* @return the address
*/
@@ -252,7 +252,7 @@ public class ToyDBTraceBuilder implements AutoCloseable {
}
/**
* Create an address range: shortcut for {@link new AddressRangeImpl(start, end)}
* Create an address range: shortcut for {@link AddressRangeImpl}
*
* @param start the start address
* @param end the end address
@@ -444,7 +444,7 @@ public class ToyDBTraceBuilder implements AutoCloseable {
*/
public DBTraceBookmarkType getOrAddBookmarkType(String name) {
DBTraceBookmarkManager manager = trace.getBookmarkManager();
return manager.defineBookmarkType(name, null, Color.red, 1);
return manager.defineBookmarkType(name, null, Messages.ERROR, 1);
}
/**
@@ -477,7 +477,7 @@ public class ToyDBTraceBuilder implements AutoCloseable {
*
* @param snap the starting snap
* @param threadName the name of the thread
* @param registerName the name of the regsiter
* @param registerName the name of the register
* @param typeName the name of its type
* @param category the category
* @param comment an optional comment
@@ -549,11 +549,12 @@ public class ToyDBTraceBuilder implements AutoCloseable {
public DBTraceInstruction addInstruction(long snap, Address start,
TracePlatform platform) throws CodeUnitInsertionException {
DBTraceCodeManager code = trace.getCodeManager();
Language language = platform.getLanguage();
Disassembler dis = Disassembler.getDisassembler(language, language.getAddressFactory(),
new ConsoleTaskMonitor(), msg -> Msg.info(this, "Listener: " + msg));
Language platformLanguage = platform.getLanguage();
Disassembler dis =
Disassembler.getDisassembler(platformLanguage, platformLanguage.getAddressFactory(),
new ConsoleTaskMonitor(), msg -> Msg.info(this, "Listener: " + msg));
RegisterValue defaultContextValue = trace.getRegisterContextManager()
.getDefaultContext(language)
.getDefaultContext(platformLanguage)
.getDefaultDisassemblyContext();
MemBuffer memBuf = platform.getMappedMemBuffer(snap, platform.mapHostToGuest(start));
@@ -725,10 +726,10 @@ public class ToyDBTraceBuilder implements AutoCloseable {
}
/**
* Get the language with the given ID, as in {@link LangaugeID}
* Get the language with the given ID, as in {@link LanguageID}
*
* @param id the ID
* @return the langauge
* @return the language
* @throws LanguageNotFoundException if the language does not exist
*/
public Language getLanguage(String id) throws LanguageNotFoundException {
@@ -742,7 +743,7 @@ public class ToyDBTraceBuilder implements AutoCloseable {
* @param compID the compiler ID as in {@link CompilerSpecID}
* @return the compiler spec
* @throws CompilerSpecNotFoundException if the compiler spec does not exist
* @throws LanguageNotFoundException if the langauge does not exist
* @throws LanguageNotFoundException if the language does not exist
*/
public CompilerSpec getCompiler(String langID, String compID)
throws CompilerSpecNotFoundException, LanguageNotFoundException {
@@ -27,6 +27,7 @@ import org.apache.commons.lang3.StringUtils;
import com.google.common.collect.ImmutableList;
import generic.ComparableTupleRecord;
import generic.theme.GColor;
import ghidra.framework.options.annotation.*;
import ghidra.framework.plugintool.Plugin;
import ghidra.framework.plugintool.PluginTool;
@@ -165,6 +166,7 @@ public interface AutoOptions {
catch (IllegalArgumentException | IllegalAccessException e) {
throw new AssertionError(e);
}
OptionType type = annotation.type();
if (type == OptionType.NO_TYPE) {
type = OptionType.getOptionType(defaultValue);
@@ -175,6 +177,7 @@ public interface AutoOptions {
"Could not determine option type from default value: " + f + " = " +
defaultValue);
}
String description = annotation.description();
Class<? extends PropertyEditor> editorClass = annotation.editor();
final PropertyEditor editor;
@@ -191,9 +194,28 @@ public interface AutoOptions {
"editor class must have accessible default constructor", e);
}
}
options.registerOption(key.getName(), type, defaultValue, help, description, editor);
// TODO: Wish Ghidra would do this upon any option registration
options.putObject(key.getName(), defaultValue, type);
if (defaultValue instanceof GColor gColor) {
options.registerThemeColorBinding(key.getName(), gColor.getId(), help, description);
}
/*
else if ( is font option ) {
// Note: there is no font value to check against for fonts in the new Theme system.
// If annotation fonts are needed, then they should be bound by String id. Likely,
// annotation fonts are not needed now that have themes. We also probably no
// longer need annotation colors either.
options.registerThemeFontBinding(description, fontId, help, description);
}
*/
else {
options.registerOption(key.getName(), type, defaultValue, help, description,
editor);
// TODO: Wish Ghidra would do this upon any option registration
options.putObject(key.getName(), defaultValue, type);
}
}
}
@@ -1,60 +0,0 @@
/* ###
* IP: GHIDRA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ghidra.util;
import java.awt.Color;
import java.util.HashMap;
import java.util.Map;
import javax.swing.*;
import javax.swing.border.Border;
public class UIManagerWrapper {
private static Map<String, Color> colorMap = new HashMap<>();
private static Map<String, Border> borderMap = new HashMap<>();
static {
colorMap.put("Table[Enabled+Selected].textForeground", new Color(255, 255, 255));
colorMap.put("Table[Enabled+Selected].textBackground", new Color(57, 105, 138));
colorMap.put("Table.textForeground", new Color(35, 35, 36));
colorMap.put("Table.alternateRowColor", new Color(237, 243, 254));
colorMap.put("Table:\"Table.cellRenderer\".background", new Color(255, 255, 255));
borderMap.put("Table.focusCellHighlightBorder",
BorderFactory.createEmptyBorder(2, 5, 2, 5));
borderMap.put("Table.cellNoFocusBorder", BorderFactory.createEmptyBorder(2, 5, 2, 5));
}
public static Color getColor(String text) {
UIDefaults uiDefaults = UIManager.getDefaults();
Color color = uiDefaults.getColor(text);
if (color == null) {
color = colorMap.get(text);
}
return color;
}
public static Border getBorder(String text) {
UIDefaults uiDefaults = UIManager.getDefaults();
Border border = uiDefaults.getBorder(text);
if (border == null) {
border = borderMap.get(text);
}
return border;
}
}
@@ -17,7 +17,6 @@ package ghidra.util.database.spatial;
import static org.junit.Assert.*;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@@ -41,6 +40,8 @@ import com.google.common.collect.Iterators;
import db.DBHandle;
import db.DBRecord;
import generic.theme.GThemeDefaults.Colors.Palette;
import ghidra.util.ColorUtils;
import ghidra.util.LockHold;
import ghidra.util.database.*;
import ghidra.util.database.annot.*;
@@ -565,13 +566,13 @@ public class RStarTreeMapTest {
public void selectColor(Graphics g, NodeType type) {
if (type.isLeaf()) {
g.setColor(new Color(1, 0, 0, 0.5f).darker());
g.setColor(ColorUtils.getColor(179, 0, 0, 128));
}
else if (type.isLeafParent()) {
g.setColor(new Color(0, 1, 0, 0.5f).darker());
g.setColor(ColorUtils.getColor(0, 179, 0, 128));
}
else {
g.setColor(new Color(0, 0, 1, 0.5f).darker());
g.setColor(ColorUtils.getColor(0, 0, 179, 128));
}
}
@@ -581,14 +582,14 @@ public class RStarTreeMapTest {
return;
}
drawPath(g, getParentOf(nr));
g.setColor(Color.BLACK);
g.setColor(Palette.BLACK);
drawRect(g, nr.getShape(), false);
}
public void drawPath(Graphics g, DBIntRectStringDataRecord dr) {
System.out.println("Selected: " + dr);
drawPath(g, getParentOf(dr));
g.setColor(Color.BLACK);
g.setColor(Palette.BLACK);
drawRect(g, dr.getBounds(), false);
}
@@ -609,7 +610,7 @@ public class RStarTreeMapTest {
@Override
protected VisitResult visitData(DBIntRectNodeRecord parent,
DBIntRectStringDataRecord d, boolean included) {
g.setColor(new Color(0, 0, 0, 0.5f));
g.setColor(ColorUtils.getColor(0, 0, 0, 128));
drawRect(g, d.getShape(), true);
return VisitResult.NEXT;
}
@@ -875,7 +876,6 @@ public class RStarTreeMapTest {
List<Pair<IntRect, String>> entries = generateRandom(rect(0, 100, 0, 100), 10, 10, 1000);
Consumer<List<Pair<IntRect, String>>> inserter = list -> {
try (UndoableTransaction tid = UndoableTransaction.start(obj, "AddRandom")) {
int i = 0;
for (Entry<IntRect, String> ent : list) {
obj.map.put(ent.getKey(), ent.getValue());
// Note, underlying tree is not synchronized, but map is
@@ -3,6 +3,7 @@
##MODULE IP: Oxygen Icons - LGPL 3.0
Module.manifest||GHIDRA||reviewed||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
data/sampletableplugin.theme.properties||GHIDRA||||END|
extension.properties||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
src/main/help/help/shared/arrow.gif||GHIDRA||reviewed||END|
@@ -0,0 +1,3 @@
[Defaults]
icon.sample.plugin.action.show.options = table.png
icon.sample.plugin.action.save = disk.png
@@ -28,7 +28,7 @@ body { margin-bottom: 50px; margin-left: 10px; margin-right: 10px; margin-top: 1
li { font-family:times new roman; font-size:14pt; }
h1 { color:#000080; font-family:times new roman; font-size:36pt; font-style:italic; font-weight:bold; text-align:center; }
h2 { margin: 10px; margin-top: 20px; color:#984c4c; font-family:times new roman; font-size:18pt; font-weight:bold; }
h3 { margin-left: 10px; margin-top: 20px; color:#0000ff; font-family:times new roman; `font-size:14pt; font-weight:bold; }
h3 { margin-left: 10px; margin-top: 20px; color:#0000ff; font-family:times new roman; font-size:14pt; font-weight:bold; }
h4 { margin-left: 10px; margin-top: 20px; font-family:times new roman; font-size:14pt; font-style:italic; }
/*

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