GP-1981 - Theming - Base Module

This commit is contained in:
dragonmacher 2022-09-28 19:09:05 -04:00 committed by ghidragon
parent dd31ff47a2
commit 0971c0088c
228 changed files with 1848 additions and 1694 deletions

View File

@ -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) {

View File

@ -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;
}

View File

@ -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,

View File

@ -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.

View File

@ -16,6 +16,7 @@ data/ElfFunctionsThatDoNotReturn||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
data/MachOFunctionsThatDoNotReturn||GHIDRA||||END|
data/PEFunctionsThatDoNotReturn||GHIDRA||||END|
data/base.icons.theme.properties||GHIDRA||||END|
data/base.listing.theme.properties||GHIDRA||||END|
data/base.programgraph.theme.properties||GHIDRA||||END|
data/base.theme.properties||GHIDRA||||END|
@ -1101,6 +1102,7 @@ src/main/resources/images/mem_chip3.png||GHIDRA||reviewed||END|
src/main/resources/images/memory16.gif||GHIDRA||||END|
src/main/resources/images/menu16.gif||GHIDRA||||END|
src/main/resources/images/move.png||GHIDRA||||END|
src/main/resources/images/no_small.png||GHIDRA||||END|
src/main/resources/images/notF.gif||GHIDRA||||END|
src/main/resources/images/notes.gif||GHIDRA||||END|
src/main/resources/images/nuvola/16x16/cdimage.png||Nuvola Icons - LGPL 2.1|||Nuvola icon set|END|

View File

@ -0,0 +1,399 @@
[Defaults]
icon.base.delete = icon.delete
icon.base.plus = icon.add
icon.base.edit.bytes = editbytes.gif
icon.base.pinned = pin.png
icon.base.hover.off = hoverOff.gif
icon.base.hover.on = hoverOn.gif
icon.base.lock = lock.gif
icon.base.unlock = unlock.gif
icon.base.search.marker = searchm_obj.gif
icon.base.application.home = GhidraIcon16.png
icon.base.application.16 = GhidraIcon16.png
icon.base.application.24 = GhidraIcon24.png
icon.base.application.32 = GhidraIcon32.png
icon.base.application.40 = GhidraIcon40.png
icon.base.application.48 = GhidraIcon48.png
icon.base.application.64 = GhidraIcon64.png
icon.base.application.128 = GhidraIcon128.png
icon.base.application.256 = GhidraIcon256.png
icon.provider.clone = camera-photo.png
icon.plugin.datatypes.built.in = package_development.png
icon.plugin.datatypes.built.in.disabled = package_development.png [disabled]
icon.plugin.datatypes.default = defaultDt.gif
icon.plugin.datatypes.default.disabled = disabledCode.gif
icon.plugin.datatypes.enum = enum.png
icon.plugin.datatypes.pointer = fingerPointer.png
icon.plugin.datatypes.function = functionDef.png
icon.plugin.datatypes.union = cUnion.png
icon.plugin.datatypes.typedef = typedef.png
icon.plugin.datatypes.structure = cstruct.png
icon.plugin.assembler.question = question_zero.png
icon.plugin.bookmark.add = icon.check
icon.plugin.bookmark.delete = icon.base.delete
icon.plugin.bookmark.select = text_align_justify.png
icon.plugin.bookmark.type.note = notes.gif
icon.plugin.bookmark.type.info = icon.information
icon.plugin.bookmark.type.warning = icon.warning
icon.plugin.bookmark.type.error = icon.base.delete
icon.plugin.bookmark.type.analysis = applications-system.png
icon.plugin.bookmark.type.default = unknown.gif
icon.plugin.calltree.provider =
icon.plugin.calltree.function = FunctionScope.gif
icon.plugin.calltree.recursive = arrow_rotate_clockwise.png
icon.plugin.calltree.refresh = icon.refresh
icon.plugin.calltree.refresh.not.needed = icon.plugin.calltree.refresh [disabled]
icon.plugin.calltree.filter.duplicates = application_double.png
icon.plugin.calltree.filter.select.source = text_align_justify.png
icon.plugin.calltree.node.dead.end = stopNode.png
icon.plugin.calltree.node.external = package.png
icon.plugin.checksum.compute = icon.refresh
icon.plugin.checksum.select = NextSelectionBlock16.gif
icon.plugin.checksum.show.hex = hexData.png
icon.plugin.checksum.xor = xor.png
icon.plugin.checksum.carry = carry.png
icon.plugin.checksum.ones.complement = onesComplement.png
icon.plugin.checksum.twos.complement = twosComplement.png
icon.plugin.clipboard.copy = icon.copy
icon.plugin.clipboard.paste = icon.paste
icon.plugin.codebrowser.cursor.location = cursor_arrow_flipped.gif
icon.plugin.codebrowser.cursor.marker = searchm_obj.gif
icon.plugin.codebrowser.format.collapse =field.header.up.png
icon.plugin.codebrowser.format.expand = field.header.down.png
icon.plugin.codebrowser.hover.off = icon.base.hover.off
icon.plugin.codebrowser.hover.on = icon.base.hover.on
icon.plugin.codebrowser.provider = Browser.gif
icon.plugin.codebrowser.mark.and.select.armed = MarkSelection.png {media-playback-start.png[size(12,12)][move(4,4)]}
icon.plugin.codebrowser.mark.and.select.unarmed = MarkSelection.png {media-playback-stop.png[size(12,12)][move(4,4)]}
icon.plugin.composite.editor.provider = accessories-text-editor.png
icon.plugin.composite.editor.provider.structure = icon.plugin.datatypes.structure
icon.plugin.composite.editor.provider.union = cUnion.png
icon.plugin.composite.editor.apply = disk.png
icon.plugin.composite.editor.array = Array.png
icon.plugin.composite.editor.bit.field.dialog.add = icon.base.plus
icon.plugin.composite.editor.bit.field.dialog.delete = icon.base.delete
icon.plugin.composite.editor.bit.field.dialog.edit = move.png
icon.plugin.composite.editor.bit.field.editor.decrement = Minus.png
icon.plugin.composite.editor.bit.field.editor.increment = icon.base.plus
icon.plugin.composite.editor.clear = icon.clear
icon.plugin.composite.editor.create = icon.plugin.datatypes.structure
icon.plugin.composite.editor.delete = icon.base.delete
icon.plugin.composite.editor.duplicate = DuplicateData.png
icon.plugin.composite.editor.duplicate.multiple = MultiDuplicateData.png
icon.plugin.composite.editor.insert.undefined = icon.base.plus
icon.plugin.composite.editor.move.down = down.png
icon.plugin.composite.editor.move.up = up.png
icon.plugin.composite.editor.search.next = go-down.tango.16.png [size(16,16)]
icon.plugin.composite.editor.search.previous = go-up.tango.16.png [size(16,16)]
icon.plugin.composite.editor.show.type = icon.home
icon.plugin.composite.editor.unpackage = Unpackage.gif
icon.plugin.enum.editor.provider = icon.plugin.datatypes.enum
icon.plugin.enum.editor.add = icon.base.plus
icon.plugin.enum.editor.apply = icon.save
icon.plugin.enum.editor.delete = icon.base.delete
icon.plugin.enum.editor.home = icon.home
icon.plugin.console.provider = monitor.png
icon.plugin.console.clear = icon.clear
icon.plugin.console.scroll.lock = lock.png
icon.plugin.datatypes.provider = dataTypes.png
icon.plugin.datatypes.commit.single.type = smallRightArrow.png
icon.plugin.datatypes.associate.single.type = smallLeftArrow.png
icon.plugin.datatypes.conflict.mode.rename.and.add = conflictRename.png
icon.plugin.datatypes.conflict.mode.use.existing = conflictKeep.png
icon.plugin.datatypes.conflict.mode.replace.existing = conflictReplace.png
icon.plugin.datatypes.conflict.mode.replace.or.rename = conflictReplaceOrRename.png
icon.plugin.datatypes.filter.arrays.off = Array.png
icon.plugin.datatypes.filter.arrays.on = FilterArrays.png
icon.plugin.datatypes.filter.pointers.off = fingerPointer.png
icon.plugin.datatypes.filter.pointers.on = FilterPointers.png
icon.plugin.datatypes.archive.built.in.closed = closedBookBrown.png
icon.plugin.datatypes.archive.built.in.open = openBookBrown.png
icon.plugin.datatypes.archive.file.closed = closedBookGreen.png
icon.plugin.datatypes.archive.file.open = openBookGreen.png
icon.plugin.datatypes.archive.invalid =closedFolderInvalid.png
icon.plugin.datatypes.archive.program.closed = closedBookRed.png
icon.plugin.datatypes.archive.program.open = openBookRed.png
icon.plugin.datatypes.archive.project.closed = closedBookBlue.png
icon.plugin.datatypes.archive.project.open = openBookBlue.png
icon.plugin.datatypes.tree.conflict = doubleArrow.png
icon.plugin.datatypes.tree.change.local = smallRightArrow.png
icon.plugin.datatypes.tree.change.source = smallLeftArrow.png
icon.plugin.datatypes.tree.missing = redQuestionMark.png
icon.plugin.datatypes.tree.node.archive.file.checked.out = icon.check
icon.plugin.datatypes.tree.node.archive.file.checked.out.exclusive = checkex.png
icon.plugin.datatypes.tree.node.archive.file.checked.out.not.latest = checkNotLatest.gif
icon.plugin.datatypes.tree.node.archive.file.hijacked = small_hijack.gif
icon.plugin.datatypes.tree.node.archive.file.read.only = user-busy.png [size(10,10)]
icon.plugin.datatypes.util.root = BookShelf.png
icon.plugin.datatypes.util.open.root = BookShelfOpen.png
icon.plugin.datatypes.util.open.archive = openFolderArchive.png
icon.plugin.datatypes.util.open.folder = openFolder.png
icon.plugin.datatypes.util.open.folder.disabled = disabledOpenFolder.png
icon.plugin.datatypes.util.open.folder.locked = openFolderCheckedOut.png
icon.plugin.datatypes.util.closed.archive = closedFolderArchive.png
icon.plugin.datatypes.util.closed.folder = closedFolder.png
icon.plugin.datatypes.util.closed.folder.disabled = disabledClosedFolder.png
icon.plugin.datatypes.util.closed.folder.locked = closedFolderCheckedOut.png
icon.plugin.datatypes.util.favorite = emblem-favorite.png
icon.plugin.datatypes.util.favorite.disabled = emblem-favorite.png [disabled]
icon.plugin.datawindow.provider = dataW.gif
icon.plugin.functiontags.add = 2rightarrow.png [size(16,16)]
icon.plugin.functiontags.remove = 2leftarrow.png [size(16,16)]
icon.plugin.functioncompare.new = page_white_c.png {bullet_star.png [size(16,16)][move(4,-4)]}
icon.plugin.functioncompare.function.next = arrow_down.png [move(3,1)] {FunctionScope.gif [move(-5,-2)]}
icon.plugin.functioncompare.function.previous = arrow_up.png [move(3,1)] {FunctionScope.gif [move(-5,-2)]}
icon.plugin.functioncompare.function.remove = edit-delete.png [move(3,3)] {FunctionScope.gif [move(-5,-2)]}
icon.plugin.functioncompare.open.function.table = page_white_c.png {icon.add [size(10,10)][move(10,10)]}
icon.plugin.functioncompare.scroll.lock = icon.base.lock
icon.plugin.functioncompare.scroll.unlock = icon.base.unlock
icon.plugin.functionwindow.provider = functions.gif
icon.plugin.instructiontable.address = DOSA_A.png
icon.plugin.instructiontable.scalar = DOSA_S.png
icon.plugin.instructiontable.operand = DOSA_O.png
icon.plugin.instructiontable.undefined = DOSA_D.png
icon.plugin.instructiontable.manual.entry = icon.base.edit.bytes
icon.plugin.instructiontable.binary = binaryData.gif
icon.plugin.instructiontable.hex = hexData.png
icon.plugin.interpreter.provider = monitor.png
icon.plugin.locationreferences.highlight = tag_yellow.png
icon.plugin.memorymap.provider = memory16.gif
icon.plugin.memorymap.add = icon.add
icon.plugin.memorymap.move = move.png
icon.plugin.memorymap.split = verticalSplit.png
icon.plugin.memorymap.expand.up = icon.toggle.collapse
icon.plugin.memorymap.expand.down = icon.toggle.expand
icon.plugin.memorymap.merge = Merge.png
icon.plugin.memorymap.delete = icon.delete
icon.plugin.memorymap.image.base = house.png
icon.plugin.merge = Merge.png
icon.plugin.merge.changed = changed16.gif
icon.plugin.merge.conflict.collapse = icon.toggle.collapse
icon.plugin.merge.conflict.expand = icon.toggle.expand
icon.plugin.merge.conflict.lock = lock.gif
icon.plugin.merge.conflict.unlock = unlock.gif
icon.plugin.merge.status.pending = bullet_green.png
icon.plugin.merge.status.in.progress = right.png
icon.plugin.merge.status.complete = checkmark_green.gif
icon.plugin.myprogramchanges.merge = vcMerge.png
icon.plugin.myprogramchanges.checkin = vcCheckIn.png
icon.plugin.navigation.bookmark = B.gif [size(16,16)]
icon.plugin.navigation.bookmark.analysis = applications-system.png
icon.plugin.navigation.bookmark.error = icon.error
icon.plugin.navigation.bookmark.info = icon.information
icon.plugin.navigation.bookmark.note = notes.gif
icon.plugin.navigation.bookmark.warning = icon.warning
icon.plugin.navigation.bookmark.unknown = unknown.gif
icon.plugin.navigation.bytes = V.png
icon.plugin.navigation.data = D.gif
icon.plugin.navigation.function = F.gif
icon.plugin.navigation.instruction = I.gif
icon.plugin.navigation.label = L.gif
icon.plugin.navigation.undefined = U.gif
icon.plugin.navigation.highlight.range.next = NextHighlightBlock16.gif
icon.plugin.navigation.highlight.range.previous = PreviousHighlightBlock16.gif
icon.plugin.navigation.selection.range.next = NextSelectionBlock16.gif
icon.plugin.navigation.selection.range.previous = PreviousSelectionBlock16.gif
icon.plugin.navigation.location.next = icon.right
icon.plugin.navigation.location.previous = icon.left
icon.plugin.bundlemanager.disable = media-playback-stop.png
icon.plugin.bundlemanager.enable = media-playback-start.png
icon.plugin.overview.provider = x-office-document-template.png
icon.plugin.programmanager.empty.small = empty8x16.png
icon.plugin.programmanager.close = x.gif
icon.plugin.programmanager.close.highlight = pinkX.gif
icon.plugin.programmanager.list = VCRFastForward.gif
icon.plugin.programmanager.transient = link.png
icon.plugin.programmanager.busy = icon.base.edit.bytes
icon.plugin.programtree.docs = openBookBlue.png
icon.plugin.programtree.fragment = codeNotInView.gif
icon.plugin.programtree.fragment.empty = emptyFragment.gif
icon.plugin.programtree.fragment.viewed = codeInView.gif
icon.plugin.programtree.fragment.viewed.empty = emptyFragmentInView.gif
icon.plugin.programtree.fragment.closed.folder = closedFolderInView.png
icon.plugin.programtree.fragment.open.folder = openFolderInView.png
icon.plugin.programtree.fragment.viewed.closed.folder.with.description = closedDescendantsInView.png
icon.plugin.programtree.closed.folder = closedFolder.png
icon.plugin.programtree.open.folder = openFolder.png
icon.plugin.programtree.open.tree = icon.folder.open
icon.plugin.programtree.new.tree = layout_add.png
icon.plugin.programtree.drag.copy = dragMoveCursor.gif
icon.plugin.programtree.drag.move = dragCopyCursor.gif
icon.plugin.reachability.provider = function_graph_curvey.png [rotate(90)]
icon.plugin.register = registerIcon.png
icon.plugin.register.group = registerGroup.png
icon.plugin.register.provider = icon.plugin.register.group
icon.plugin.scalartable.provider = dataW.gif
icon.plugin.scriptmanager.provider = play.png
icon.plugin.scriptmanager.run = play.png
icon.plugin.scriptmanager.run.again = play_again.png
icon.plugin.scriptmanager.edit = accessories-text-editor.png
icon.plugin.scriptmanager.edit.eclipse = eclipse.png
icon.plugin.scriptmanager.keybinding = key.png
icon.plugin.scriptmanager.delete = icon.delete
icon.plugin.scriptmanager.rename = icon.rename
icon.plugin.scriptmanager.new = script_add.png
icon.plugin.scriptmanager.manage = text_list_bullets.png
icon.plugin.scriptmanager.api = red-cross.png
icon.plugin.stringtable.provider = kmessedwords.png
icon.plugin.stringtable.defined = font.png
icon.plugin.stringtable.defined.partial = dialog-warning.png
icon.plugin.stringtable.undefined = magnifier.png
icon.plugin.stringtable.words = view-filter.png
icon.plugin.stringtable.conflicts = dialog-warning_red.png
icon.plugin.symboltree.provider = sitemap_color.png
icon.plugin.symboltree.goto = icon.base.search.marker
icon.plugin.symboltree.set.external = icon.base.edit.bytes
icon.plugin.symboltree.node.root = bullet_green.png
icon.plugin.symboltree.node.class = class.png
icon.plugin.symboltree.node.code = label.png
icon.plugin.symboltree.node.code.pinned = icon.base.pinned
icon.plugin.symboltree.node.code.external = ExternalData.gif
icon.plugin.symboltree.node.function = FunctionScope.gif
icon.plugin.symboltree.node.function.external = ExternalFunction.gif
icon.plugin.symboltree.node.function.thunk = ThunkFunction.gif
icon.plugin.symboltree.node.library = package.png
icon.plugin.symboltree.node.local.variable = LocalVariable.gif
icon.plugin.symboltree.node.parameter = Parameter.gif
icon.plugin.symboltree.node.namespace = Namespace.gif
icon.plugin.symboltree.node.organization.closed = closedFolderGroup.png
icon.plugin.symboltree.node.organization.open = openFolderGroup.png
icon.plugin.symboltree.node.category.classes.closed = closedFolderClasses.png
icon.plugin.symboltree.node.category.classes.open = openFolderClasses.png
icon.plugin.symboltree.node.category.function.closed = closedFolderFunctions.png
icon.plugin.symboltree.node.category.function.open = openFolderFunctions.png
icon.plugin.symboltree.node.category.exports.closed = closedFolder.png
icon.plugin.symboltree.node.category.exports.open = openFolder.png
icon.plugin.symboltree.node.category.imports.closed = closedFolderExternals.png
icon.plugin.symboltree.node.category.imports.open = openFolderExternals.png
icon.plugin.symboltree.node.category.label.closed = closedFolderLabels.png
icon.plugin.symboltree.node.category.label.open = openFolderLabels.png
icon.plugin.symboltree.node.category.namespace.closed = closedFolderNamespaces.png
icon.plugin.symboltree.node.category.namespace.open = openFolderNamespaces.png
icon.plugin.symboltree.node.group.folder.closed = closedFolderGroup.png
icon.plugin.symboltree.node.group.folder.open = openFolderGroup.png
icon.plugin.symboltable.provider = table.png
icon.plugin.symboltable.references.to =references_to.gif
icon.plugin.symboltable.instructions.from = I.gif
icon.plugin.symboltable.data.from = D.gif
icon.plugin.symboltable.referencetable.provider = table_go.png
icon.plugin.table.service = magnifier.png
icon.plugin.table.service.marker = icon.base.search.marker
icon.plugin.table.delete.row = table_delete.png
icon.plugin.totd.provider = help-hint.png
icon.plugin.viewstrings.provider = dataW.gif
icon.plugin.debug.dbviewer.provider = zoom.png
icon.plugin.debug.domaineventviewer.provider = monitor.png
icon.plugin.debug.propertymanager.provider = document-properties.png
icon.plugin.debug.propertymanager.marker = searchm_pink.gif
icon.plugin.fsbrowser.copy = icon.copy
icon.plugin.fsbrowser.cut = icon.cut
icon.plugin.fsbrowser.delete = page_delete.png
icon.plugin.fsbrowser.font = icon.font
icon.plugin.fsbrowser.locked = icon.base.lock
icon.plugin.fsbrowser.new = page_add.png
icon.plugin.fsbrowser.paste = icon.paste
icon.plugin.fsbrowser.redo = icon.redo
icon.plugin.fsbrowser.rename = icon.rename
icon.plugin.fsbrowser.refresh = icon.refresh
icon.plugin.fsbrowser.save = icon.save
icon.plugin.fsbrowser.save.as = icon.save.as
icon.plugin.fsbrowser.undo = icon.undo
icon.plugin.fsbrowser.unlocked = icon.base.unlock
icon.plugin.fsbrowser.close = images/famfamfam_silk_icons_v013/door.png
icon.plugin.fsbrowser.collapse.all = images/famfamfam_silk_icons_v013/arrow_in.png
icon.plugin.fsbrowser.compress = images/famfamfam_silk_icons_v013/compress.png
icon.plugin.fsbrowser.create.firmware = media-flash.png
icon.plugin.fsbrowser.expand.all = images/famfamfam_silk_icons_v013/arrow_inout.png
icon.plugin.fsbrowser.extract = package_green.png
icon.plugin.fsbrowser.info = icon.information
icon.plugin.fsbrowser.open = images/famfamfam_silk_icons_v013/door_open.png
icon.plugin.fsbrowser.open.as.binary = images/famfamfam_silk_icons_v013/controller.png
icon.plugin.fsbrowser.open.in.listing = images/famfamfam_silk_icons_v013/folder_table.png
icon.plugin.fsbrowser.open.file.system = images/famfamfam_silk_icons_v013/folder_brick.png
icon.plugin.fsbrowser.photo = images/famfamfam_silk_icons_v013/photo.png
icon.plugin.fsbrowser.view.as.image = images/oxygen/16x16/games-config-background.png
icon.plugin.fsbrowser.view.as.text = format-text-bold.png
icon.plugin.fsbrowser.eclipse = eclipse.png
icon.plugin.fsbrowser.jar = images/famfamfam_silk_icons_v013/page_white_cup.png
icon.plugin.fsbrowser.import = images/famfamfam_silk_icons_v013/application_get.png
icon.plugin.fsbrowser.ios = images/famfamfam_silk_icons_v013/phone.png
icon.plugin.fsbrowser.open.all = images/famfamfam_silk_icons_v013/application_cascade.png
icon.plugin.fsbrowser.list.mounted = downArrow.png
icon.base.util.fixed.bit.size.field = icon.pulldown
icon.base.util.viewer.fieldfactory.label = icon.base.pinned [move(0,4)]
icon.base.util.viewer.fieldfactory.openclose.closed = small_plus.png
icon.base.util.viewer.fieldfactory.openclose.open = small_minus.png
icon.base.util.viewer.fieldfactory.variable = icon.warning
icon.base.util.listingcompare.provider = table_relationship.png
icon.base.util.listingcompare.cursor = cursor_arrow_flipped.gif
icon.base.util.listingcompare.diff.next = view-sort-ascending.png
icon.base.util.listingcompare.previous.next = view-sort-descending.png
icon.base.util.listingcompare.area.markers.all = text_list_bullets.png
icon.base.util.listingcompare.area.markers.unmatched = icon.navigate.in
icon.base.util.listingcompare.area.markers.diff = table_relationship.png
icon.base.util.listingcompare.hover.off = icon.base.hover.off
icon.base.util.listingcompare.hover.on = icon.base.hover.on
icon.base.util.listingdiff.diffs.not = no_small.png
icon.base.util.listingdiff.diffs.byte = binaryData.gif
icon.base.util.listingdiff.diffs.constants = class.png
icon.base.util.listingdiff.diffs.registers = registerGroup.png
icon.base.util.xml.functions.bookmark = imported_bookmark.gif
icon.base.util.datatree.version.control.archive.dt.checkout.undo = vcUndoCheckOut.png
[Dark Defaults]

View File

@ -159,6 +159,8 @@ color.bg.plugin.windowlocation.window.selected = rgba(0, 255, 0, 200)
color.fg.plugin.windowlocation.window.text = gray
[Dark Defaults]
color.bg = rgb(40, 42, 46) // TODO this should be in a more generic module

View File

@ -22,7 +22,7 @@ import java.io.PrintStream;
import java.util.HashSet;
import java.util.Set;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import org.apache.commons.lang3.StringUtils;
@ -40,7 +40,7 @@ import ghidra.program.model.listing.Instruction;
import ghidra.program.model.mem.ByteMemBufferImpl;
import ghidra.program.model.mem.MemBuffer;
import ghidra.util.NumericUtilities;
import resources.ResourceManager;
import resources.Icons;
public class AssemblyThrasherDevScript extends GhidraScript {
public static final String BOOKMARK_FAIL = "AssemblyFailure";
@ -104,7 +104,7 @@ public class AssemblyThrasherDevScript extends GhidraScript {
clearBackgroundColor(currentProgram.getMemory().getAllInitializedAddressSet());
BookmarkManager bm = currentProgram.getBookmarkManager();
ImageIcon myIcon = ResourceManager.loadImage("images/warning.png");
Icon myIcon = Icons.WARNING_ICON;
bm.defineType(BOOKMARK_FAIL, myIcon, Palette.YELLOW, 0);
bm.removeBookmarks(BOOKMARK_FAIL);

View File

@ -26,6 +26,7 @@ import docking.options.editor.ButtonPanelFactory;
import docking.util.image.ToolIconURL;
import docking.widgets.OptionDialog;
import docking.widgets.label.*;
import generic.theme.GIcon;
import ghidra.app.context.ListingActionContext;
import ghidra.app.merge.tool.ListingMergePanel;
import ghidra.app.nav.Navigatable;
@ -36,7 +37,6 @@ import ghidra.framework.plugintool.ComponentProviderAdapter;
import ghidra.program.util.ProgramLocation;
import ghidra.util.HelpLocation;
import ghidra.util.layout.VerticalLayout;
import resources.ResourceManager;
/**
* Component that displays merge components as needed.
@ -59,7 +59,7 @@ class MergeManagerProvider extends ComponentProviderAdapter {
private JButton cancelButton;
private boolean wasCanceled;
private ImageIcon MERGE_ICON = ResourceManager.loadImage("images/Merge.png");
private Icon MERGE_ICON = new GIcon("icon.plugin.merge");
private JPanel mainPanel;
public MergeManagerProvider(MergeManagerPlugin plugin, String title) {

View File

@ -17,16 +17,17 @@ package ghidra.app.merge;
import java.awt.BorderLayout;
import java.util.HashMap;
import java.util.Map;
import javax.swing.*;
import javax.swing.border.Border;
import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors.Palette;
import ghidra.util.Msg;
import ghidra.util.layout.VerticalLayout;
import resources.ResourceManager;
/**
* The MergeProgressPanel displays the name of each merge phase along with an icon indicating
@ -34,11 +35,10 @@ import resources.ResourceManager;
*/
public class MergeProgressPanel extends JPanel {
public static ImageIcon DEFINED_ICON = ResourceManager.loadImage("images/bullet_green.png");
public static ImageIcon IN_PROGRESS_ICON = ResourceManager.loadImage("images/right.png");
public static ImageIcon COMPLETED_ICON =
ResourceManager.loadImage("images/checkmark_green.gif");
private HashMap<String, JLabel> imageMap = new HashMap<>();
public static Icon DEFINED_ICON = new GIcon("icon.plugin.merge.status.pending");
public static Icon IN_PROGRESS_ICON = new GIcon("icon.plugin.merge.status.in.progress");
public static Icon COMPLETED_ICON = new GIcon("icon.plugin.merge.status.complete");
private Map<String, JLabel> imageMap = new HashMap<>();
private static int INDENT_IN_PIXELS = 20;
/**

View File

@ -17,14 +17,12 @@ package ghidra.app.merge;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GIconLabel;
import resources.ResourceManager;
import resources.Icons;
/**
* The PhaseProgressPanel provides a title, progress bar and message for the current phase that is
@ -33,7 +31,7 @@ import resources.ResourceManager;
public class PhaseProgressPanel extends JPanel {
private final static String DEFAULT_INFO = "Merge programs in progress...";
private ImageIcon INFORM_ICON = ResourceManager.loadImage("images/information.png");
private Icon INFORM_ICON = Icons.INFO_ICON;
private JLabel titleLabel;
private JProgressBar progressBar;
@ -105,12 +103,7 @@ public class PhaseProgressPanel extends JPanel {
doSetMessage(DEFAULT_INFO);
// Sets up the timer for updating the GUI.
updateTimer = new Timer(250, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
update();
}
});
updateTimer = new Timer(250, e -> update());
}
// Method for use by the timer to update the progress bar or message.

View File

@ -30,7 +30,7 @@ import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.util.ConflictCountPanel;
import ghidra.framework.data.DomainObjectMergeManager;
import ghidra.program.model.data.*;
import resources.ResourceManager;
import resources.Icons;
/**
* Panel to select a data type in order to resolve a conflict.
@ -86,9 +86,6 @@ class DataTypeMergePanel extends JPanel {
buttonGroup.add(originalRB);
}
/**
*
*/
int getSelectedOption() {
if (latestRB.isSelected()) {
return DataTypeMergeManager.OPTION_LATEST;
@ -105,13 +102,10 @@ class DataTypeMergePanel extends JPanel {
private void create() {
buttonGroup = new ButtonGroup();
ItemListener listener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
mergeManager.clearStatusText();
mergeManager.setApplyEnabled(true);
}
ItemListener listener = e -> {
if (e.getStateChange() == ItemEvent.SELECTED) {
mergeManager.clearStatusText();
mergeManager.setApplyEnabled(true);
}
};
@ -180,7 +174,7 @@ class DataTypeMergePanel extends JPanel {
private JPanel createInfoPanel() {
Icon icon = ResourceManager.loadImage("images/information.png");
Icon icon = Icons.INFO_ICON;
JLabel imageLabel = new GIconLabel(icon);
MultiLineLabel label =

View File

@ -30,7 +30,7 @@ import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.util.ConflictCountPanel;
import ghidra.framework.data.DomainObjectMergeManager;
import ghidra.program.model.data.SourceArchive;
import resources.ResourceManager;
import resources.Icons;
/**
* Panel to select a source archive in order to resolve a conflict.
@ -104,13 +104,10 @@ class SourceArchiveMergePanel extends JPanel {
private void create() {
buttonGroup = new ButtonGroup();
ItemListener listener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
mergeManager.clearStatusText();
mergeManager.setApplyEnabled(true);
}
ItemListener listener = e -> {
if (e.getStateChange() == ItemEvent.SELECTED) {
mergeManager.clearStatusText();
mergeManager.setApplyEnabled(true);
}
};
@ -175,7 +172,7 @@ class SourceArchiveMergePanel extends JPanel {
private JPanel createInfoPanel() {
Icon icon = ResourceManager.loadImage("images/information.png");
Icon icon = Icons.INFO_ICON;
JLabel imageLabel = new GIconLabel(icon);
MultiLineLabel label = new MultiLineLabel(

View File

@ -26,6 +26,7 @@ import docking.widgets.button.GRadioButton;
import docking.widgets.fieldpanel.FieldPanel;
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
import docking.widgets.label.GIconLabel;
import generic.theme.GIcon;
import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.MergeManager;
import ghidra.app.merge.util.ConflictCountPanel;
@ -45,7 +46,6 @@ import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressSet;
import ghidra.program.model.listing.Program;
import ghidra.program.model.symbol.ExternalLocation;
import resources.ResourceManager;
import resources.icons.EmptyIcon;
/**
@ -60,8 +60,8 @@ class ExternalAddConflictPanel extends JPanel implements CodeFormatService {
public static final String MERGE_BOTH_BUTTON_NAME =
ExternalFunctionMerger.MERGE_BOTH_BUTTON_NAME;
private static Icon hideIcon = ResourceManager.loadImage("images/collapse.gif");
private static Icon showIcon = ResourceManager.loadImage("images/expand.gif");
private static final Icon HIDE_ICON = new GIcon("icons.base.listing.conflict.collapse");
private static final Icon SHOW_ICON = new GIcon("icons.base.listing.conflict.expand");
private DomainObjectMergeManager mergeManager;
private int totalConflicts;
@ -291,18 +291,18 @@ class ExternalAddConflictPanel extends JPanel implements CodeFormatService {
class ShowHeaderButton extends EmptyBorderButton {
ShowHeaderButton() {
super(showIcon);
super(SHOW_ICON);
setFocusable(false);
setToolTipText("Toggle Format Header");
addActionListener(e -> {
if (isSelected()) {
setSelected(false);
setIcon(showIcon);
setIcon(SHOW_ICON);
latestPanel.showHeader(false);
}
else {
setSelected(true);
setIcon(hideIcon);
setIcon(HIDE_ICON);
latestPanel.showHeader(true);
}
});

View File

@ -28,6 +28,7 @@ import docking.widgets.checkbox.GCheckBox;
import docking.widgets.fieldpanel.FieldPanel;
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
import docking.widgets.fieldpanel.support.BackgroundColorModel;
import generic.theme.GIcon;
import ghidra.app.merge.MergeConstants;
import ghidra.app.nav.Navigatable;
import ghidra.app.plugin.core.codebrowser.hover.*;
@ -54,12 +55,11 @@ import ghidra.util.datastruct.WeakDataStructureFactory;
import ghidra.util.datastruct.WeakSet;
import ghidra.util.exception.NotYetImplementedException;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class ListingMergePanel extends JPanel
implements MergeConstants, FocusListener, CodeFormatService {
private static Icon hideIcon = ResourceManager.loadImage("images/collapse.gif");
private static Icon showIcon = ResourceManager.loadImage("images/expand.gif");
private static final Icon HIDE_ICON = new GIcon("icons.base.listing.conflict.collapse");
private static final Icon SHOW_ICON = new GIcon("icons.base.listing.conflict.expand");
private JComponent topComp;
private JComponent bottomComp;
@ -297,9 +297,8 @@ public class ListingMergePanel extends JPanel
}
/**
* Color the background of all 4 listings to the indicated color for
* the indicated addresses.
* @param addrSet
* Color the background of all 4 listings to the indicated color for the indicated addresses.
* @param addrSet the addresses
*/
public void paintAllBackgrounds(AddressSetView addrSet) {
backgroundColorModel.setAddressSet(addrSet);
@ -509,18 +508,18 @@ public class ListingMergePanel extends JPanel
private class ShowHeaderButton extends EmptyBorderButton {
ShowHeaderButton() {
super(showIcon);
super(SHOW_ICON);
setFocusable(false);
setToolTipText("Toggle Format Header");
addActionListener(e -> {
if (isSelected()) {
setSelected(false);
setIcon(showIcon);
setIcon(SHOW_ICON);
listingPanels[RESULT].showHeader(false);
}
else {
setSelected(true);
setIcon(hideIcon);
setIcon(HIDE_ICON);
listingPanels[RESULT].showHeader(true);
}
});
@ -616,14 +615,12 @@ public class ListingMergePanel extends JPanel
}
class LockComponent extends GCheckBox {
private static final Icon lock = ResourceManager.loadImage("images/lock.gif");
private static final Icon unlock = ResourceManager.loadImage("images/unlock.gif");
LockComponent() {
super(unlock);
super(new GIcon("icon.plugin.merge.conflict.unlock"));
setToolTipText("Lock/Unlock with other views");
setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0));
setSelectedIcon(lock);
setSelectedIcon(new GIcon("icon.plugin.merge.conflict.lock"));
setSelected(true);
}
@ -635,26 +632,3 @@ class LockComponent extends GCheckBox {
setSelected(lock);
}
}
/***
// class LockComponent extends ToolbarButton {
// private static final Icon lock = ResourceManager.loadImage("images/lock.gif");
// private static final Icon unlock = ResourceManager.loadImage("images/unlock.gif");
// LockComponent() {
// super(unlock);
// setBorder(BorderFactory.createEmptyBorder(0,2,0,2));
// setSelectedIcon(lock);
// setSelected(true);
// addActionListener(new ActionListener() {
// public void actionPerformed(ActionEvent e) {
// setSelected(!isSelected());
// }
// });
// }
// boolean isLocked() {
// return isSelected();
// }
// void setLocked(boolean lock) {
// setSelected(lock);
// }
// }
***/

View File

@ -16,7 +16,6 @@
package ghidra.app.merge.tree;
import java.awt.BorderLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.*;
@ -27,7 +26,7 @@ import docking.widgets.label.GDLabel;
import docking.widgets.label.GIconLabel;
import ghidra.app.merge.MergeConstants;
import ghidra.program.model.listing.Program;
import resources.ResourceManager;
import resources.Icons;
/**
* Panel to get user input to resolve name conflicts when private name of tree
@ -129,7 +128,7 @@ class NameConflictsPanel extends JPanel {
iconPanel.setLayout(new BoxLayout(iconPanel, BoxLayout.X_AXIS));
conflictsLabel = new GDLabel("'My' name already exists in Latest Version");
ImageIcon icon = ResourceManager.loadImage("images/information.png");
Icon icon = Icons.INFO_ICON;
iconPanel.add(new GIconLabel(icon));
iconPanel.add(Box.createHorizontalStrut(5));
iconPanel.add(conflictsLabel);
@ -158,12 +157,9 @@ class NameConflictsPanel extends JPanel {
panel.add(rbPanel, BorderLayout.CENTER);
add(panel);
ItemListener itemListener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (listener != null) {
listener.stateChanged(null);
}
ItemListener itemListener = e -> {
if (listener != null) {
listener.stateChanged(null);
}
};
keepOtherRB.addItemListener(itemListener);

View File

@ -21,10 +21,11 @@ import javax.swing.*;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GIconLabel;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors;
import generic.theme.GThemeDefaults.Colors.Messages;
import ghidra.util.layout.PairLayout;
import resources.ResourceManager;
import resources.Icons;
/**
* Panel to show whether tree name and tree structure changed.
@ -41,9 +42,8 @@ class TreeChangePanel extends JPanel {
private JLabel nameIconLabel;
private JLabel structureIconLabel;
private final static ImageIcon CHANGED_ICON = ResourceManager.loadImage("images/changed16.gif");
private final static ImageIcon NO_CHANGE_ICON =
ResourceManager.loadImage("images/EmptyIcon16.gif");
private final static Icon CHANGED_ICON = new GIcon("icon.plugin.merge.changed");
private final static Icon NO_CHANGE_ICON = Icons.EMPTY_ICON;
private final static Color CHANGED_COLOR = Colors.FOREGROUND;
private final static Color NO_CHANGE_COLOR = Messages.HINT;

View File

@ -21,6 +21,7 @@ import java.awt.Point;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors.Palette;
import resources.MultiIcon;
import resources.ResourceManager;
@ -29,8 +30,7 @@ import resources.icons.TranslateIcon;
public class NavigatableIconFactory {
private static final ImageIcon SNAPSHOT_ICON =
ResourceManager.loadImage("images/camera-photo.png");
private static final Icon SNAPSHOT_ICON = new GIcon("icon.provider.clone");
public static ImageIcon createSnapshotOverlayIcon(Icon primaryIcon) {
MultiIcon newOuterIcon = new MultiIcon(primaryIcon);

View File

@ -28,6 +28,7 @@ import docking.widgets.autocomplete.*;
import docking.widgets.label.GDLabel;
import docking.widgets.textfield.TextFieldLinker;
import generic.theme.GColor;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors;
import ghidra.GhidraApplicationLayout;
import ghidra.GhidraLaunchable;
@ -43,7 +44,6 @@ import ghidra.program.model.address.Address;
import ghidra.program.model.lang.LanguageID;
import ghidra.program.model.listing.Instruction;
import ghidra.util.NumericUtilities;
import resources.ResourceManager;
/**
* A pair of text fields suitable for guided assembly
@ -336,7 +336,7 @@ public class AssemblyDualTextField {
@Override
protected void addContent(JPanel content) {
Box controls = Box.createHorizontalBox();
Icon icon = ResourceManager.loadImage("images/question_zero.png");
Icon icon = new GIcon("icon.plugin.assembler.question");
EmptyBorderToggleButton button = new EmptyBorderToggleButton(icon);
button.setToolTipText("Exhaust unspecified bits, otherwise zero them");
button.addActionListener((e) -> {

View File

@ -17,11 +17,12 @@ package ghidra.app.plugin.core.bookmark;
import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import org.apache.commons.lang3.StringUtils;
import generic.theme.GColor;
import generic.theme.GIcon;
import ghidra.app.services.*;
import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressSet;
@ -29,7 +30,6 @@ import ghidra.program.model.listing.*;
import ghidra.program.util.MarkerLocation;
import ghidra.util.HTMLUtilities;
import ghidra.util.Swing;
import resources.ResourceManager;
/**
* Handles navigation/display of bookmarks in the browser marker margins.
@ -38,13 +38,12 @@ public class BookmarkNavigator {
private static final int BIG_CHANGE = 1000;
final static ImageIcon NOTE_ICON = ResourceManager.loadImage("images/notes.gif");
final static ImageIcon INFO_ICON = ResourceManager.loadImage("images/information.png");
final static ImageIcon WARNING_ICON = ResourceManager.loadImage("images/warning.png");
final static ImageIcon ERROR_ICON = ResourceManager.loadImage("images/edit-delete.png");
final static ImageIcon ANALYSIS_ICON =
ResourceManager.loadImage("images/applications-system.png");
final static ImageIcon DEFAULT_ICON = ResourceManager.loadImage("images/unknown.gif");
final static Icon NOTE_ICON = new GIcon("icon.plugin.bookmark.type.note");
final static Icon INFO_ICON = new GIcon("icon.plugin.bookmark.type.info");
final static Icon WARNING_ICON = new GIcon("icon.plugin.bookmark.type.warning");
final static Icon ERROR_ICON = new GIcon("icon.plugin.bookmark.type.error");
final static Icon ANALYSIS_ICON = new GIcon("icon.plugin.bookmark.type.analysis");
final static Icon DEFAULT_ICON = new GIcon("icon.plugin.bookmark.type.default");
final static int NOTE_PRIORITY = MarkerService.BOOKMARK_PRIORITY;
final static int ERROR_PRIORITY = MarkerService.BOOKMARK_PRIORITY + BIG_CHANGE;
@ -81,7 +80,7 @@ public class BookmarkNavigator {
priority = DEFAULT_PRIORITY;
}
ImageIcon icon = bmt.getIcon();
Icon icon = bmt.getIcon();
if (icon == null) {
icon = DEFAULT_ICON;
}

View File

@ -26,6 +26,7 @@ import docking.Tool;
import docking.action.*;
import docking.actions.PopupActionProvider;
import docking.widgets.table.GTable;
import generic.theme.GIcon;
import ghidra.app.CorePluginPackage;
import ghidra.app.events.ProgramSelectionPluginEvent;
import ghidra.app.plugin.PluginCategoryNames;
@ -43,7 +44,8 @@ import ghidra.program.util.*;
import ghidra.util.Msg;
import ghidra.util.table.SelectionNavigationAction;
import ghidra.util.task.SwingUpdateManager;
import resources.*;
import resources.Icons;
import resources.MultiIconBuilder;
/**
* Plugin to for adding/deleting/editing bookmarks.
@ -115,7 +117,7 @@ public class BookmarkPlugin extends ProgramPlugin
tool.addAction(addAction);
MultiIconBuilder builder = new MultiIconBuilder(Icons.CONFIGURE_FILTER_ICON);
builder.addLowerRightIcon(ResourceManager.loadImage("images/check.png"));
builder.addLowerRightIcon(new GIcon("icon.plugin.bookmark.add"));
Icon filterTypesChanged = builder.build();
Icon filterTypesUnchanged = Icons.CONFIGURE_FILTER_ICON;
DockingAction filterAction = new DockingAction("Filter Bookmarks", getName()) {
@ -150,7 +152,7 @@ public class BookmarkPlugin extends ProgramPlugin
provider.delete();
}
};
Icon icon = ResourceManager.loadImage("images/edit-delete.png");
Icon icon = new GIcon("icon.plugin.bookmark.delete");
deleteAction.setKeyBindingData(new KeyBindingData(KeyEvent.VK_DELETE, 0));
deleteAction.setPopupMenuData(new MenuData(new String[] { "Delete" }, icon));
deleteAction.setDescription("Delete Selected Bookmarks");
@ -164,7 +166,7 @@ public class BookmarkPlugin extends ProgramPlugin
select(provider.getBookmarkLocations());
}
};
icon = ResourceManager.loadImage("images/text_align_justify.png");
icon = new GIcon("icon.plugin.bookmark.select");
selectionAction.setPopupMenuData(
new MenuData(new String[] { "Select Bookmark Locations" }, icon));
selectionAction.setToolBarData(new ToolBarData(icon));

View File

@ -49,10 +49,6 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
private JTextField commentTextField;
private JCheckBox selectionCB;
/**
* Creates new CreateBookmarkDialog
*
*/
CreateBookmarkDialog(BookmarkPlugin plugin, CodeUnit cu, boolean hasSelection) {
super(BookmarkType.NOTE + " Bookmark", true, true, true, false);
@ -71,6 +67,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
setHelpLocation(new HelpLocation("BookmarkPlugin", "CreateBookmarkDialog"));
}
@Override
public void dispose() {
this.plugin = null;
this.program = null;
@ -202,7 +199,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
gbc.anchor = GridBagConstraints.WEST;
mainPanel.add(commentTextField, gbc);
ImageIcon icon = BookmarkNavigator.NOTE_ICON;
Icon icon = BookmarkNavigator.NOTE_ICON;
JLabel imageLabel = new GIconLabel(icon);
imageLabel.setPreferredSize(
new Dimension(icon.getIconWidth() + 20, icon.getIconHeight() + 20));

View File

@ -23,6 +23,7 @@ import javax.swing.Icon;
import docking.ActionContext;
import docking.action.DockingAction;
import docking.action.MenuData;
import generic.theme.GIcon;
import ghidra.app.CorePluginPackage;
import ghidra.app.context.ListingActionContext;
import ghidra.app.plugin.PluginCategoryNames;
@ -37,7 +38,6 @@ import ghidra.program.model.symbol.ReferenceManager;
import ghidra.program.util.ProgramLocation;
import ghidra.util.HelpLocation;
import resources.Icons;
import resources.ResourceManager;
/**
* Assuming a function <b>foo</b>, this plugin will show all callers of <b>foo</b> and all
@ -58,9 +58,8 @@ import resources.ResourceManager;
public class CallTreePlugin extends ProgramPlugin {
static final Icon PROVIDER_ICON = Icons.ARROW_DOWN_RIGHT_ICON;
static final Icon FUNCTION_ICON = ResourceManager.loadImage("images/FunctionScope.gif");
static final Icon RECURSIVE_ICON =
ResourceManager.loadImage("images/arrow_rotate_clockwise.png");
static final Icon FUNCTION_ICON = new GIcon("icon.plugin.calltree.function");
static final Icon RECURSIVE_ICON = new GIcon("icon.plugin.calltree.recursive");
private List<CallTreeProvider> providers = new ArrayList<>();
private DockingAction showCallTreeFromMenuAction;

View File

@ -33,6 +33,7 @@ import docking.widgets.tree.*;
import docking.widgets.tree.support.GTreeSelectionEvent.EventOrigin;
import docking.widgets.tree.support.GTreeSelectionListener;
import docking.widgets.tree.tasks.GTreeExpandAllTask;
import generic.theme.GIcon;
import ghidra.app.events.ProgramLocationPluginEvent;
import ghidra.app.events.ProgramSelectionPluginEvent;
import ghidra.app.services.GoToService;
@ -51,18 +52,18 @@ import ghidra.util.exception.CancelledException;
import ghidra.util.task.SwingUpdateManager;
import ghidra.util.task.TaskMonitor;
import resources.Icons;
import resources.ResourceManager;
public class CallTreeProvider extends ComponentProviderAdapter implements DomainObjectListener {
static final String EXPAND_ACTION_NAME = "Fully Expand Selected Nodes";
static final String TITLE = "Function Call Trees";
private static final Icon EMPTY_ICON = ResourceManager.loadImage("images/EmptyIcon16.gif");
private static final Icon EMPTY_ICON = Icons.EMPTY_ICON;
private static final Icon EXPAND_ICON = Icons.EXPAND_ALL_ICON;
private static final Icon COLLAPSE_ICON = Icons.COLLAPSE_ALL_ICON;
private static Icon REFRESH_ICON = Icons.REFRESH_ICON;
private static Icon REFRESH_NOT_NEEDED_ICON = ResourceManager.getDisabledIcon(REFRESH_ICON, 60);
private static Icon REFRESH_ICON = new GIcon("icon.plugin.calltree.refresh");
private static Icon REFRESH_NOT_NEEDED_ICON =
new GIcon("icon.plugin.calltree.refresh.not.needed");
private static final String RECURSE_DEPTH_PROPERTY_NAME = "call.tree.recurse.depth";
private static final String DEFAULT_RECURSE_DEPTH = "5";
@ -365,9 +366,9 @@ public class CallTreeProvider extends ComponentProviderAdapter implements Domain
doUpdate();
}
};
filterDuplicates.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/application_double.png"),
filterOptionsToolbarGroup, "1"));
filterDuplicates
.setToolBarData(new ToolBarData(new GIcon("icon.plugin.calltree.filter.duplicates"),
filterOptionsToolbarGroup, "1"));
filterDuplicates.setSelected(true);
filterDuplicates
.setHelpLocation(new HelpLocation(plugin.getName(), "Call_Tree_Action_Filter"));
@ -503,7 +504,7 @@ public class CallTreeProvider extends ComponentProviderAdapter implements Domain
return true;
}
};
ImageIcon icon = ResourceManager.loadImage("images/text_align_justify.png");
Icon icon = new GIcon("icon.plugin.calltree.filter.select.source");
selectSourceAction.setPopupMenuData(
new MenuData(new String[] { "Select Call Source" }, icon, selectionMenuGroup));
selectSourceAction.setHelpLocation(
@ -581,8 +582,7 @@ public class CallTreeProvider extends ComponentProviderAdapter implements Domain
return currentFunction != null;
}
};
homeAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/go-home.png"), homeToolbarGroup));
homeAction.setToolBarData(new ToolBarData(Icons.HOME_ICON, homeToolbarGroup));
homeAction.setHelpLocation(new HelpLocation(plugin.getName(), "Call_Tree_Action_Home"));
tool.addLocalAction(this, homeAction);

View File

@ -15,6 +15,14 @@
*/
package ghidra.app.plugin.core.calltree;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.Icon;
import docking.widgets.tree.GTreeNode;
import generic.theme.GIcon;
import ghidra.program.model.address.Address;
import ghidra.program.model.listing.Function;
import ghidra.program.model.listing.Program;
@ -23,18 +31,9 @@ import ghidra.program.util.ProgramLocation;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.Icon;
import resources.ResourceManager;
import docking.widgets.tree.GTreeNode;
public class DeadEndNode extends CallNode {
private static final Icon ICON = ResourceManager.loadImage("images/stopNode.png");
private static final Icon ICON = new GIcon("icon.plugin.calltree.node.dead.end");
private final Reference reference;
private String name;
@ -100,6 +99,6 @@ public class DeadEndNode extends CallNode {
@Override
public List<GTreeNode> generateChildren(TaskMonitor monitor) throws CancelledException {
return new ArrayList<GTreeNode>();
return new ArrayList<>();
}
}

View File

@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.Icon;
import docking.widgets.tree.GTreeNode;
import generic.theme.GIcon;
import ghidra.program.model.address.Address;
import ghidra.program.model.listing.Function;
import ghidra.program.util.FunctionSignatureFieldLocation;
@ -29,12 +30,11 @@ import ghidra.program.util.ProgramLocation;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.TranslateIcon;
public class ExternalCallNode extends CallNode {
private static final Icon EXTERNAL_ICON = ResourceManager.loadImage("images/package.png");
private static final Icon EXTERNAL_ICON = new GIcon("icon.plugin.calltree.node.external");
private final Icon EXTERNAL_FUNCTION_ICON;
private final Icon baseIcon;
@ -77,7 +77,7 @@ public class ExternalCallNode extends CallNode {
@Override
public List<GTreeNode> generateChildren(TaskMonitor monitor) throws CancelledException {
return new ArrayList<GTreeNode>();
return new ArrayList<>();
}
@Override

View File

@ -24,6 +24,7 @@ import javax.swing.*;
import docking.ActionContext;
import docking.action.*;
import docking.widgets.label.GDLabel;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors;
import ghidra.app.context.ProgramContextAction;
import ghidra.framework.plugintool.ComponentProviderAdapter;
@ -31,8 +32,6 @@ import ghidra.util.HelpLocation;
import ghidra.util.classfinder.ClassSearcher;
import ghidra.util.table.GhidraTable;
import ghidra.util.task.TaskLauncher;
import resources.Icons;
import resources.ResourceManager;
/**
* Provider to invoke computation of various checksums and display them in a table.
@ -233,7 +232,8 @@ public class ComputeChecksumsProvider extends ComponentProviderAdapter {
};
computeAction.setHelpLocation(new HelpLocation("ComputeChecksumsPlugin", "compute"));
computeAction.setEnabled(true);
computeAction.setToolBarData(new ToolBarData(Icons.REFRESH_ICON, null));
computeAction
.setToolBarData(new ToolBarData(new GIcon("icon.plugin.checksum.compute"), null));
computeAction.setDescription("Refreshes checksums");
selectionAction = new ToggleDockingAction("On Selection", plugin.getName()) {
@ -251,7 +251,7 @@ public class ComputeChecksumsProvider extends ComponentProviderAdapter {
selectionAction.setHelpLocation(new HelpLocation("ComputeChecksumsPlugin", "On_Selection"));
selectionAction.setEnabled(plugin.hasSelection());
selectionAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/NextSelectionBlock16.gif"), null));
new ToolBarData(new GIcon("icon.plugin.checksum.select"), null));
selectionAction.setDescription("When toggled, generates checksums on " +
"selection. Otherwise checksums are generated over the entire program");
@ -269,7 +269,7 @@ public class ComputeChecksumsProvider extends ComponentProviderAdapter {
showHexAction.setHelpLocation(new HelpLocation("ComputeChecksumsPlugin", "As_Hex"));
showHexAction.setEnabled(true);
showHexAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/hexData.png"), null));
new ToolBarData(new GIcon("icon.plugin.checksum.show.hex"), null));
showHexAction.setDescription("Toggle to show the hex values instead of decimal values.");
xorAction = new ToggleDockingAction("XOR Checksum Values", plugin.getName()) {
@ -289,7 +289,7 @@ public class ComputeChecksumsProvider extends ComponentProviderAdapter {
xorAction.setHelpLocation(new HelpLocation("ComputeChecksumsPlugin", "xor"));
xorAction.setEnabled(true);
xorAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/xor.png"), null));
new ToolBarData(new GIcon("icon.plugin.checksum.xor"), null));
xorAction.setDescription("Toggle to recompute values with a xor operation.");
carryAction = new ToggleDockingAction("Carry Checksum Values", plugin.getName()) {
@ -310,7 +310,7 @@ public class ComputeChecksumsProvider extends ComponentProviderAdapter {
carryAction.setHelpLocation(new HelpLocation("ComputeChecksumsPlugin", "carry"));
carryAction.setEnabled(true);
carryAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/carry.png"), null));
new ToolBarData(new GIcon("icon.plugin.checksum.carry"), null));
carryAction.setDescription("Toggle to recompute values with a carry operation.");
onesCompAction = new ToggleDockingAction("Ones Complement", plugin.getName()) {
@ -330,7 +330,7 @@ public class ComputeChecksumsProvider extends ComponentProviderAdapter {
onesCompAction.setHelpLocation(new HelpLocation("ComputeChecksumsPlugin", "ones_comp"));
onesCompAction.setEnabled(true);
onesCompAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/onesComplement.png"), null));
new ToolBarData(new GIcon("icon.plugin.checksum.ones.complement"), null));
onesCompAction.setDescription("Toggle to recompute values with a one's complement.");
twosCompAction = new ToggleDockingAction("Twos Complement", plugin.getName()) {
@ -350,7 +350,7 @@ public class ComputeChecksumsProvider extends ComponentProviderAdapter {
twosCompAction.setHelpLocation(new HelpLocation("ComputeChecksumsPlugin", "twos_comp"));
twosCompAction.setEnabled(true);
twosCompAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/twosComplement.png"), null));
new ToolBarData(new GIcon("icon.plugin.checksum.twos.complement"), null));
twosCompAction.setDescription("Toggle to recompute values with a two's complement.");
tool.addLocalAction(this, onesCompAction);

View File

@ -29,6 +29,7 @@ import javax.swing.event.ChangeListener;
import docking.*;
import docking.action.*;
import docking.dnd.GClipboard;
import generic.theme.GIcon;
import ghidra.app.CorePluginPackage;
import ghidra.app.context.ListingActionContext;
import ghidra.app.plugin.PluginCategoryNames;
@ -43,7 +44,6 @@ import ghidra.program.model.listing.Program;
import ghidra.util.HelpLocation;
import ghidra.util.Msg;
import ghidra.util.task.*;
import resources.ResourceManager;
//@formatter:off
@PluginInfo(
@ -361,7 +361,7 @@ public class ClipboardPlugin extends ProgramPlugin implements ClipboardOwner, Cl
this.clipboardService = clipboardService;
setPopupMenuData(new MenuData(new String[] { "Copy" }, "Clipboard"));
setToolBarData(new ToolBarData(ResourceManager.loadImage("images/page_white_copy.png"),
setToolBarData(new ToolBarData(new GIcon("icon.plugin.clipboard.copy"),
"Clipboard"));
setKeyBindingData(new KeyBindingData(KeyEvent.VK_C, InputEvent.CTRL_DOWN_MASK));
setHelpLocation(new HelpLocation("ClipboardPlugin", "Copy"));
@ -395,7 +395,7 @@ public class ClipboardPlugin extends ProgramPlugin implements ClipboardOwner, Cl
setPopupMenuData(new MenuData(new String[] { "Paste" }, "Clipboard"));
setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/page_paste.png"), "Clipboard"));
new ToolBarData(new GIcon("icon.plugin.clipboard.paste"), "Clipboard"));
setKeyBindingData(new KeyBindingData(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK));
setHelpLocation(new HelpLocation("ClipboardPlugin", "Paste"));
}

View File

@ -20,7 +20,7 @@ import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -31,6 +31,7 @@ import docking.widgets.fieldpanel.field.Field;
import docking.widgets.fieldpanel.support.FieldLocation;
import docking.widgets.fieldpanel.support.FieldSelection;
import generic.theme.GColor;
import generic.theme.GIcon;
import ghidra.GhidraOptions;
import ghidra.app.events.ProgramHighlightPluginEvent;
import ghidra.app.events.ProgramSelectionPluginEvent;
@ -56,7 +57,6 @@ import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramLocation;
import ghidra.program.util.ProgramSelection;
import ghidra.util.*;
import resources.ResourceManager;
public abstract class AbstractCodeBrowserPlugin<P extends CodeViewerProvider> extends Plugin
implements CodeViewerService, CodeFormatService, OptionsChangeListener, FormatModelListener,
@ -74,8 +74,8 @@ public abstract class AbstractCodeBrowserPlugin<P extends CodeViewerProvider> ex
//@formatter:on
// - Icon -
private ImageIcon CURSOR_LOC_ICON =
ResourceManager.loadImage("images/cursor_arrow_flipped.gif");
private static final Icon CURSOR_LOC_ICON =
new GIcon("icon.plugin.codebrowser.cursor.location");
protected final P connectedProvider;
protected List<P> disconnectedProviders = new ArrayList<>();
protected FormatManager formatMgr;

View File

@ -15,10 +15,11 @@
*/
package ghidra.app.plugin.core.codebrowser;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.action.builder.ActionBuilder;
import docking.tool.ToolConstants;
import generic.theme.GIcon;
import ghidra.GhidraOptions;
import ghidra.app.CorePluginPackage;
import ghidra.app.plugin.PluginCategoryNames;
@ -38,7 +39,6 @@ import ghidra.util.datastruct.Accumulator;
import ghidra.util.exception.CancelledException;
import ghidra.util.table.*;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
/**
* Plugin for adding some basic selection actions for Code Browser Listings.
@ -129,7 +129,7 @@ public class CodeBrowserSelectionPlugin extends Plugin {
GhidraProgramTableModel<Address> model = createTableModel(program, codeUnits, selection);
String title = "Selection Table";
ImageIcon markerIcon = ResourceManager.loadImage("images/searchm_obj.gif");
Icon markerIcon = new GIcon("icon.plugin.codebrowser.cursor.marker");
TableComponentProvider<Address> tableProvider =
tableService.showTableWithMarkers(title + " " + model.getName(), "Selection",
model, PluginConstants.SEARCH_HIGHLIGHT_COLOR, markerIcon, title, null);

View File

@ -37,6 +37,7 @@ import docking.widgets.fieldpanel.FieldPanel;
import docking.widgets.fieldpanel.HoverHandler;
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
import docking.widgets.fieldpanel.support.*;
import generic.theme.GIcon;
import ghidra.app.nav.*;
import ghidra.app.plugin.core.clipboard.CodeBrowserClipboardProvider;
import ghidra.app.plugin.core.codebrowser.actions.*;
@ -56,7 +57,6 @@ import ghidra.program.model.listing.*;
import ghidra.program.util.*;
import ghidra.util.HelpLocation;
import ghidra.util.Swing;
import resources.ResourceManager;
public class CodeViewerProvider extends NavigatableComponentProviderAdapter
implements ProgramLocationListener, ProgramSelectionListener, Draggable, Droppable,
@ -67,12 +67,12 @@ public class CodeViewerProvider extends NavigatableComponentProviderAdapter
private static final String TITLE = NAME + ": ";
private static final Icon LISTING_FORMAT_EXPAND_ICON =
ResourceManager.loadImage("images/field.header.down.png");
new GIcon("icon.plugin.codebrowser.format.expand");
private static final Icon LISTING_FORMAT_COLLAPSE_ICON =
ResourceManager.loadImage("images/field.header.up.png");
new GIcon("icon.plugin.codebrowser.format.collapse");
private static final Icon HOVER_ON_ICON = ResourceManager.loadImage("images/hoverOn.gif");
private static final Icon HOVER_OFF_ICON = ResourceManager.loadImage("images/hoverOff.gif");
private static final Icon HOVER_ON_ICON = new GIcon("icon.plugin.codebrowser.hover.on");
private static final Icon HOVER_OFF_ICON = new GIcon("icon.plugin.codebrowser.hover.off");
private static final String HOVER_MODE = "Hover Mode";
private static final String DIVIDER_LOCATION = "DividerLocation";
@ -130,7 +130,7 @@ public class CodeViewerProvider extends NavigatableComponentProviderAdapter
ComponentProvider.registerProviderNameOwnerChange(OLD_NAME, owner, NAME, owner);
setConnected(isConnected);
setIcon(ResourceManager.loadImage("images/Browser.gif"));
setIcon(new GIcon("icon.plugin.codebrowser.provider"));
if (!isConnected) {
setTransient();
}

View File

@ -16,11 +16,11 @@
package ghidra.app.plugin.core.codebrowser;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import docking.ActionContext;
import docking.action.*;
import docking.tool.ToolConstants;
import generic.theme.GIcon;
import ghidra.app.context.NavigatableActionContext;
import ghidra.app.nav.Navigatable;
import ghidra.app.util.HelpTopics;
@ -28,8 +28,6 @@ import ghidra.program.model.address.Address;
import ghidra.program.util.ProgramLocation;
import ghidra.program.util.ProgramSelection;
import ghidra.util.HelpLocation;
import resources.MultiIconBuilder;
import resources.ResourceManager;
/**
* Actions for creating a selection using two distinct steps. The first time the action
@ -61,17 +59,8 @@ public class MarkAndSelectionAction extends ToggleDockingAction {
}
private void buildIcons() {
ImageIcon baseImage = ResourceManager.loadImage("images/MarkSelection.png");
ImageIcon mediaStart = ResourceManager.loadImage("images/media-playback-start.png");
ImageIcon mediaStop = ResourceManager.loadImage("images/media-playback-stop.png");
MultiIconBuilder builder = new MultiIconBuilder(baseImage);
builder.addLowerRightIcon(mediaStart, 12, 12);
unarmedIcon = builder.build();
builder = new MultiIconBuilder(baseImage);
builder.addLowerRightIcon(mediaStop, 12, 12);
armedIcon = builder.build();
unarmedIcon = new GIcon("icon.plugin.codebrowser.mark.and.select.unarmed");
armedIcon = new GIcon("icon.plugin.codebrowser.mark.and.select.armed");
}
@Override

View File

@ -15,19 +15,17 @@
*/
package ghidra.app.plugin.core.codebrowser.actions;
import ghidra.app.context.ProgramActionContext;
import ghidra.app.plugin.core.codebrowser.CodeViewerProvider;
import ghidra.util.HelpLocation;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import resources.ResourceManager;
import docking.ActionContext;
import docking.action.*;
import generic.theme.GIcon;
import ghidra.app.context.ProgramActionContext;
import ghidra.app.plugin.core.codebrowser.CodeViewerProvider;
import ghidra.util.HelpLocation;
public class CloneCodeViewerAction extends DockingAction {
@ -36,27 +34,26 @@ public class CloneCodeViewerAction extends DockingAction {
public CloneCodeViewerAction(String owner, CodeViewerProvider provider) {
super("Code Viewer Clone", owner);
this.provider = provider;
ImageIcon image = ResourceManager.loadImage("images/camera-photo.png");
setToolBarData( new ToolBarData( image, "zzzz" ) );
Icon image = new GIcon("icon.provider.clone");
setToolBarData(new ToolBarData(image, "zzzz"));
setDescription("Create a snapshot (disconnected) copy of this Listing window ");
setHelpLocation(new HelpLocation("Snapshots", "Snapshots_Start"));
setKeyBindingData( new KeyBindingData( KeyEvent.VK_T,
InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK ) );
setKeyBindingData(new KeyBindingData(KeyEvent.VK_T,
InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));
}
@Override
public boolean isEnabledForContext( ActionContext context ) {
public boolean isEnabledForContext(ActionContext context) {
if (context instanceof ProgramActionContext) {
ProgramActionContext programContext = (ProgramActionContext)context;
ProgramActionContext programContext = (ProgramActionContext) context;
return programContext.getProgram() != null;
}
return false;
}
@Override
public void actionPerformed(ActionContext context) {
provider.cloneWindow();
}
}

View File

@ -15,12 +15,12 @@
*/
package ghidra.app.plugin.core.compositeeditor;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.ActionContext;
import generic.theme.GIcon;
import ghidra.app.util.datatype.EmptyCompositeException;
import ghidra.program.model.data.InvalidDataTypeException;
import resources.ResourceManager;
/**
* ApplyAction is an action for applying editor changes.
@ -29,7 +29,7 @@ public class ApplyAction extends CompositeEditorTableAction {
public final static String ACTION_NAME = "Apply Editor Changes";
private final static String GROUP_NAME = BASIC_ACTION_GROUP;
private final static ImageIcon ICON = ResourceManager.loadImage("images/disk.png");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.apply");
private final static String[] POPUP_PATH = new String[] { "Apply Edits" };
public ApplyAction(CompositeEditorProvider provider) {

View File

@ -17,13 +17,13 @@ package ghidra.app.plugin.core.compositeeditor;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.KeyBindingData;
import generic.theme.GIcon;
import ghidra.util.exception.UsrException;
import resources.ResourceManager;
/**
* Action for use in the composite data type editor.
@ -31,7 +31,7 @@ import resources.ResourceManager;
*/
public class ArrayAction extends CompositeEditorTableAction {
private final static ImageIcon ICON = ResourceManager.loadImage("images/Array.png");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.array");
public final static String ACTION_NAME = "Create Array";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static String DESCRIPTION = "Create an array";

View File

@ -23,16 +23,18 @@ import docking.*;
import docking.action.*;
import docking.menu.DockingCheckboxMenuItemUI;
import docking.widgets.OptionDialog;
import generic.theme.GIcon;
import ghidra.app.services.DataTypeManagerService;
import ghidra.program.model.data.*;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class BitFieldEditorDialog extends DialogComponentProvider {
private static final Icon ADD_ICON = ResourceManager.loadImage("images/Plus.png");
private static final Icon EDIT_ICON = ResourceManager.loadImage("images/move.png");
private static final Icon DELETE_ICON = ResourceManager.loadImage("images/edit-delete.png");
//@formatter:off
private static final Icon ADD_ICON = new GIcon("icon.plugin.composite.editor.bit.field.dialog.add");
private static final Icon EDIT_ICON = new GIcon("icon.plugin.composite.editor.bit.field.dialog.edit");
private static final Icon DELETE_ICON = new GIcon("icon.plugin.composite.editor.bit.field.dialog.delete");
//@formatter:on
private DataTypeManagerService dtmService;
private Composite composite;

View File

@ -28,6 +28,7 @@ import docking.ActionContext;
import docking.widgets.DropDownSelectionTextField;
import docking.widgets.OptionDialog;
import docking.widgets.label.GDLabel;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors;
import ghidra.app.plugin.core.compositeeditor.BitFieldPlacementComponent.BitAttributes;
import ghidra.app.plugin.core.compositeeditor.BitFieldPlacementComponent.BitFieldAllocation;
@ -38,7 +39,6 @@ import ghidra.program.model.data.*;
import ghidra.program.model.data.Composite;
import ghidra.util.data.DataTypeParser.AllowedDataTypes;
import ghidra.util.layout.*;
import resources.ResourceManager;
/**
* <code>BitFieldEditorPanel</code> provides the ability to add or modify bitfields
@ -46,8 +46,10 @@ import resources.ResourceManager;
*/
public class BitFieldEditorPanel extends JPanel {
private static final Icon DECREMENT_ICON = ResourceManager.loadImage("images/Minus.png");
private static final Icon INCREMENT_ICON = ResourceManager.loadImage("images/Plus.png");
//@formatter:off
private static final Icon DECREMENT_ICON = new GIcon("icon.plugin.composite.editor.bit.field.editor.decrement");
private static final Icon INCREMENT_ICON = new GIcon("icon.plugin.composite.editor.bit.field.editor.increment");
//@formatter:on
private DataTypeManagerService dtmService;
private Composite composite;

View File

@ -17,20 +17,19 @@ package ghidra.app.plugin.core.compositeeditor;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.KeyBindingData;
import ghidra.util.Msg;
import generic.theme.GIcon;
import ghidra.util.exception.UsrException;
import resources.ResourceManager;
public class ClearAction extends CompositeEditorTableAction {
public final static String ACTION_NAME = "Clear Components";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static ImageIcon ICON = ResourceManager.loadImage("images/erase16.png");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.clear");
private final static String[] POPUP_PATH = new String[] { "Clear" };
private final static KeyStroke KEY_STROKE = KeyStroke.getKeyStroke(KeyEvent.VK_C, 0);
@ -47,10 +46,6 @@ public class ClearAction extends CompositeEditorTableAction {
try {
model.clearSelectedComponents();
}
catch (OutOfMemoryError memExc) {
String errMsg = "Couldn't clear components. Out of memory.";
Msg.showError(this, null, "Out of Memory", errMsg, memExc);
}
catch (UsrException ue) {
model.setStatus(ue.getMessage());
}

View File

@ -22,6 +22,7 @@ import javax.swing.*;
import docking.ActionContext;
import docking.ComponentProvider;
import docking.widgets.OptionDialog;
import generic.theme.GIcon;
import ghidra.app.context.ProgramActionContext;
import ghidra.app.services.DataTypeManagerService;
import ghidra.app.util.datatype.EmptyCompositeException;
@ -33,7 +34,6 @@ import ghidra.util.HelpLocation;
import ghidra.util.datastruct.WeakDataStructureFactory;
import ghidra.util.datastruct.WeakSet;
import ghidra.util.exception.AssertException;
import resources.ResourceManager;
/**
* Editor provider for a Composite Data Type.
@ -41,8 +41,7 @@ import resources.ResourceManager;
public abstract class CompositeEditorProvider extends ComponentProviderAdapter
implements EditorProvider, EditorActionListener {
protected static final ImageIcon EDITOR_ICON =
ResourceManager.loadImage("images/accessories-text-editor.png");
protected static final Icon EDITOR_ICON = new GIcon("icon.plugin.composite.editor.provider");
protected Plugin plugin;
protected Category category;
@ -56,9 +55,6 @@ public abstract class CompositeEditorProvider extends ComponentProviderAdapter
/**
* Construct a new stack editor provider.
* @param plugin owner of this provider
* @param program program for data type; may be null if data type
* is part of an archive
* @param stack the stack frame to be edited
*/
protected CompositeEditorProvider(Plugin plugin) {
super(plugin.getTool(), "Composite Editor", plugin.getName());
@ -283,6 +279,7 @@ public abstract class CompositeEditorProvider extends ComponentProviderAdapter
/**
* Prompts the user if the editor has unsaved changes. Saves the changes if
* the user indicates to do so.
* @param allowCancel true if allowed to cancel
* @return 0 if the user canceled; 1 if the user saved changes;
* 2 if the user did not to save changes; 3 if there was an error when
* the changes were applied.

View File

@ -17,15 +17,15 @@ package ghidra.app.plugin.core.compositeeditor;
import java.util.Arrays;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.ActionContext;
import generic.theme.GIcon;
import ghidra.util.Swing;
import ghidra.util.exception.CancelledException;
import ghidra.util.exception.UsrException;
import ghidra.util.task.TaskLauncher;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
/**
* Action for use in the structure data type editor.
@ -33,8 +33,7 @@ import resources.ResourceManager;
*/
public class CreateInternalStructureAction extends CompositeEditorTableAction {
private final static ImageIcon ICON =
ResourceManager.loadImage("images/cstruct.png");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.create");
public final static String ACTION_NAME = "Create Structure From Selection";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static String DESCRIPTION =

View File

@ -17,22 +17,22 @@ package ghidra.app.plugin.core.compositeeditor;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.KeyBindingData;
import generic.theme.GIcon;
import ghidra.util.exception.CancelledException;
import ghidra.util.exception.UsrException;
import ghidra.util.task.TaskLauncher;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class DeleteAction extends CompositeEditorTableAction {
public final static String ACTION_NAME = "Delete Components";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static ImageIcon ICON = ResourceManager.loadImage("images/edit-delete.png");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.delete");
private final static String[] popupPath = new String[] { "Delete" };
private final static KeyStroke KEY_STROKE = KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0);

View File

@ -18,21 +18,21 @@ package ghidra.app.plugin.core.compositeeditor;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.KeyBindingData;
import generic.theme.GIcon;
import ghidra.util.exception.UsrException;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
/**
* Action to duplicate the selected row
*/
public class DuplicateAction extends CompositeEditorTableAction {
private final static ImageIcon ICON = ResourceManager.loadImage("images/DuplicateData.png");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.duplicate");
public final static String ACTION_NAME = "Duplicate Component";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static String DESCRIPTION = "Duplicate the selected component";

View File

@ -18,26 +18,26 @@ package ghidra.app.plugin.core.compositeeditor;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.KeyBindingData;
import docking.widgets.dialogs.NumberInputDialog;
import generic.theme.GIcon;
import ghidra.util.HelpLocation;
import ghidra.util.exception.CancelledException;
import ghidra.util.exception.UsrException;
import ghidra.util.task.TaskLauncher;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
/**
* Action that allows the user to make multiple duplicates of the selected item
*/
public class DuplicateMultipleAction extends CompositeEditorTableAction {
private final static ImageIcon ICON =
ResourceManager.loadImage("images/MultiDuplicateData.png");
private final static Icon ICON =
new GIcon("icon.plugin.composite.editor.duplicate.multiple");
public final static String ACTION_NAME = "Duplicate Multiple of Component";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static String DESCRIPTION = "Duplicate multiple of the selected component";

View File

@ -18,14 +18,14 @@ package ghidra.app.plugin.core.compositeeditor;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.KeyBindingData;
import generic.theme.GIcon;
import ghidra.program.model.data.*;
import ghidra.util.exception.UsrException;
import resources.ResourceManager;
/**
* Action for use in the structure data type editor.
@ -33,8 +33,7 @@ import resources.ResourceManager;
*/
public class InsertUndefinedAction extends CompositeEditorTableAction {
private final static ImageIcon ICON =
ResourceManager.loadImage("images/Plus.png");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.insert.undefined");
public final static String ACTION_NAME = "Insert Undefined Byte";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static String DESCRIPTION = "Insert an undefined byte before the selection";

View File

@ -18,13 +18,13 @@ package ghidra.app.plugin.core.compositeeditor;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.KeyBindingData;
import generic.theme.GIcon;
import ghidra.util.exception.UsrException;
import resources.ResourceManager;
/**
* Action for use in the composite data type editor.
@ -32,7 +32,7 @@ import resources.ResourceManager;
*/
public class MoveDownAction extends CompositeEditorTableAction {
private final static ImageIcon ICON = ResourceManager.loadImage("images/down.png");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.move.down");
public final static String ACTION_NAME = "Move Components Down";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static String DESCRIPTION = "Move the selected components down";

View File

@ -18,13 +18,13 @@ package ghidra.app.plugin.core.compositeeditor;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.KeyBindingData;
import generic.theme.GIcon;
import ghidra.util.exception.UsrException;
import resources.ResourceManager;
/**
* Action for use in the composite data type editor.
@ -32,7 +32,7 @@ import resources.ResourceManager;
*/
public class MoveUpAction extends CompositeEditorTableAction {
private final static ImageIcon ICON = ResourceManager.loadImage("images/up.png");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.move.up");
public final static String ACTION_NAME = "Move Components Up";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static String DESCRIPTION = "Move selected components up";

View File

@ -25,14 +25,12 @@ import javax.swing.event.DocumentListener;
import docking.widgets.EmptyBorderButton;
import docking.widgets.label.GLabel;
import resources.ResourceManager;
import generic.theme.GIcon;
public class SearchControlPanel extends JPanel {
private static final Icon NEXT_ICON = ResourceManager.getScaledIcon(
ResourceManager.loadImage("images/go-down.tango.16.png"), 16, 16);
private static final Icon PREV_ICON = ResourceManager.getScaledIcon(
ResourceManager.loadImage("images/go-up.tango.16.png"), 16, 16);
private static final Icon NEXT_ICON = new GIcon("icon.plugin.composite.editor.search.next");
private static final Icon PREV_ICON = new GIcon("icon.plugin.composite.editor.search.previous");
private CompositeEditorPanel editorPanel;
private JTextField textField;

View File

@ -19,9 +19,9 @@ import javax.swing.Icon;
import docking.ActionContext;
import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.services.DataTypeManagerService;
import ghidra.program.model.data.*;
import resources.ResourceManager;
/**
* Shows the editor's data type in the UI using the {@link DataTypeManagerService}.
@ -31,14 +31,13 @@ public class ShowDataTypeInTreeAction extends CompositeEditorTableAction {
// This action should go after the row-based actions, which have this group:
// 3_COMPONENT_EDITOR_ACTION
private static final String TOOLBAR_GROUP = "4_COMPONENT_EDITOR_ACTION";
private static final Icon ICON = ResourceManager.loadImage("images/go-home.png");
private static final Icon ICON = new GIcon("icon.plugin.composite.editor.show.type");
public ShowDataTypeInTreeAction(CompositeEditorProvider provider) {
super(provider, "Show In Data Type Manager", TOOLBAR_GROUP, null /*popupPath*/,
null /*menuPath*/, ICON);
setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/go-home.png"), TOOLBAR_GROUP));
setToolBarData(new ToolBarData(ICON, TOOLBAR_GROUP));
}
@Override

View File

@ -15,19 +15,19 @@
*/
package ghidra.app.plugin.core.compositeeditor;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import generic.theme.GIcon;
import ghidra.framework.plugintool.Plugin;
import ghidra.program.model.data.Structure;
import resources.ResourceManager;
/**
* Editor for a Structure Data Type.
*/
public class StructureEditorProvider extends CompositeEditorProvider {
protected static final ImageIcon STRUCTURE_EDITOR_ICON =
ResourceManager.loadImage("images/cstruct.png");
protected static final Icon STRUCTURE_EDITOR_ICON =
new GIcon("icon.plugin.composite.editor.provider.structure");
public StructureEditorProvider(Plugin plugin, Structure structureDataType,
boolean showHexNumbers) {

View File

@ -15,19 +15,19 @@
*/
package ghidra.app.plugin.core.compositeeditor;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import generic.theme.GIcon;
import ghidra.framework.plugintool.Plugin;
import ghidra.program.model.data.Union;
import resources.ResourceManager;
/**
* Editor for a Union Data Type.
*/
public class UnionEditorProvider extends CompositeEditorProvider {
protected static final ImageIcon UNION_EDITOR_ICON =
ResourceManager.loadImage("images/cUnion.png");
protected static final Icon UNION_EDITOR_ICON =
new GIcon("icon.plugin.composite.editor.provider.union");
public UnionEditorProvider(Plugin plugin, Union unionDataType, boolean showInHex) {
super(plugin);

View File

@ -17,17 +17,17 @@ package ghidra.app.plugin.core.compositeeditor;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.KeyBindingData;
import docking.widgets.OptionDialog;
import generic.theme.GIcon;
import ghidra.util.exception.CancelledException;
import ghidra.util.exception.UsrException;
import ghidra.util.task.TaskLauncher;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
/**
* Action for use in the composite data type editor.
@ -35,7 +35,7 @@ import resources.ResourceManager;
*/
public class UnpackageAction extends CompositeEditorTableAction {
private final static ImageIcon ICON = ResourceManager.loadImage("images/Unpackage.gif");
private final static Icon ICON = new GIcon("icon.plugin.composite.editor.unpackage");
public final static String ACTION_NAME = "Unpackage Component";
private final static String GROUP_NAME = COMPONENT_ACTION_GROUP;
private final static String DESCRIPTION = "Replace the selected composite with its components";

View File

@ -25,6 +25,7 @@ import javax.swing.text.Document;
import docking.*;
import docking.action.*;
import generic.theme.GIcon;
import ghidra.app.services.*;
import ghidra.framework.main.ConsoleTextPane;
import ghidra.framework.options.OptionsChangeListener;
@ -36,7 +37,6 @@ import ghidra.program.model.listing.Program;
import ghidra.program.model.symbol.SymbolIterator;
import ghidra.program.model.symbol.SymbolTable;
import ghidra.util.*;
import resources.ResourceManager;
public class ConsoleComponentProvider extends ComponentProviderAdapter
implements ConsoleService, OptionsChangeListener {
@ -44,10 +44,6 @@ public class ConsoleComponentProvider extends ComponentProviderAdapter
private static final String OLD_NAME = "ConsolePlugin";
private static final String NAME = "Console";
private static final String CONSOLE_GIF = "images/monitor.png";
private static final String CLEAR_GIF = "images/erase16.png";
private static final String SCROLL_LOCK_GIF = "images/lock.png";
private static final Font DEFAULT_FONT = new Font("monospaced", Font.PLAIN, 12);
private static final String FONT_OPTION_LABEL = "Font";
private static final String FONT_DESCRIPTION =
@ -74,7 +70,7 @@ public class ConsoleComponentProvider extends ComponentProviderAdapter
setDefaultWindowPosition(WindowPosition.BOTTOM);
setHelpLocation(new HelpLocation(owner, owner));
setIcon(ResourceManager.loadImage(CONSOLE_GIF));
setIcon(new GIcon("icon.plugin.console.provider"));
setWindowMenuGroup("Console");
setSubTitle("Scripting");
setTitle("Console");
@ -281,7 +277,7 @@ public class ConsoleComponentProvider extends ComponentProviderAdapter
};
clearAction.setDescription("Clear Console");
// ACTIONS - auto generated
clearAction.setToolBarData(new ToolBarData(ResourceManager.loadImage(CLEAR_GIF), null));
clearAction.setToolBarData(new ToolBarData(new GIcon("icon.plugin.console.clear"), null));
clearAction.setEnabled(true);
@ -293,7 +289,8 @@ public class ConsoleComponentProvider extends ComponentProviderAdapter
};
scrollAction.setDescription("Scroll Lock");
scrollAction
.setToolBarData(new ToolBarData(ResourceManager.loadImage(SCROLL_LOCK_GIF), null));
.setToolBarData(
new ToolBarData(new GIcon("icon.plugin.console.scroll.lock"), null));
scrollAction.setEnabled(true);
scrollAction.setSelected(scrollLock);

View File

@ -44,7 +44,6 @@ import ghidra.util.HelpLocation;
import ghidra.util.Msg;
import ghidra.util.filechooser.ExtensionFileFilter;
import resources.Icons;
import resources.ResourceManager;
/**
* Dialog that shows files used for parsing C header files. The profile has a list of
@ -341,7 +340,7 @@ class ParseDialog extends DialogComponentProvider {
}
};
saveAction.setEnabled(false);
Icon icon = ResourceManager.loadImage("images/disk.png");
Icon icon = Icons.SAVE_ICON;
String saveGroup = "save";
saveAction.setMenuBarData(new MenuData(new String[] { "Save" }, icon, saveGroup));
saveAction.setToolBarData(new ToolBarData(icon, saveGroup));
@ -355,7 +354,7 @@ class ParseDialog extends DialogComponentProvider {
}
};
saveAsAction.setEnabled(true);
icon = ResourceManager.loadImage("images/disk_save_as.png");
icon = Icons.SAVE_AS_ICON;
saveAsAction.setMenuBarData(new MenuData(new String[] { "Save As..." }, icon, saveGroup));
saveAsAction.setToolBarData(new ToolBarData(icon, saveGroup));
saveAsAction.setDescription("Save profile to new name");
@ -369,7 +368,7 @@ class ParseDialog extends DialogComponentProvider {
};
clearAction.setEnabled(true);
icon = ResourceManager.loadImage("images/erase16.png");
icon = Icons.CLEAR_ICON;
String clearGroup = "clear";
clearAction
.setMenuBarData(new MenuData(new String[] { "Clear Profile" }, icon, clearGroup));
@ -399,7 +398,7 @@ class ParseDialog extends DialogComponentProvider {
}
};
deleteAction.setEnabled(false);
icon = ResourceManager.loadImage("images/edit-delete.png");
icon = Icons.DELETE_ICON;
String deleteGroup = "Xdelete";
deleteAction.setMenuBarData(new MenuData(new String[] { "Delete" }, icon, deleteGroup));
deleteAction.setToolBarData(new ToolBarData(icon, deleteGroup));

View File

@ -37,6 +37,7 @@ import docking.widgets.PopupWindow;
import docking.widgets.textpane.GHtmlTextPane;
import docking.widgets.tree.*;
import docking.widgets.tree.support.GTreeSelectionEvent.EventOrigin;
import generic.theme.GIcon;
import ghidra.app.plugin.core.datamgr.actions.*;
import ghidra.app.plugin.core.datamgr.actions.associate.*;
import ghidra.app.plugin.core.datamgr.archive.*;
@ -55,12 +56,10 @@ import ghidra.program.model.listing.DataTypeArchive;
import ghidra.program.model.listing.Program;
import ghidra.util.*;
import ghidra.util.task.SwingUpdateManager;
import resources.ResourceManager;
import util.HistoryList;
public class DataTypesProvider extends ComponentProviderAdapter {
private static final String DATA_TYPES_ICON = "images/dataTypes.png";
private static final String TITLE = "Data Type Manager";
private static final String POINTER_FILTER_STATE = "PointerFilterState";
private static final String ARRAY_FILTER_STATE = "ArrayFilterState";
@ -103,7 +102,7 @@ public class DataTypesProvider extends ComponentProviderAdapter {
this.plugin = plugin;
setTitle(TITLE);
setIcon(ResourceManager.loadImage(DATA_TYPES_ICON));
setIcon(new GIcon("icon.plugin.datatypes.provider"));
addToToolbar();
navigationHistory.setAllowDuplicates(true);

View File

@ -20,11 +20,11 @@ import javax.swing.Icon;
import docking.menu.ActionState;
import docking.menu.MultiStateDockingAction;
import docking.widgets.EventTrigger;
import generic.theme.GIcon;
import ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin;
import ghidra.program.model.data.DataTypeConflictHandler;
import ghidra.program.model.data.DataTypeConflictHandler.ConflictResolutionPolicy;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class ConflictHandlerModesAction extends
MultiStateDockingAction<DataTypeConflictHandler.ConflictResolutionPolicy> {
@ -41,10 +41,12 @@ public class ConflictHandlerModesAction extends
new HelpLocation(plugin.getName(), "conflict_mode");
setHelpLocation(conflictModesHelpLocation);
Icon renameAndAddIcon = ResourceManager.loadImage("images/conflictRename.png");
Icon useExistingIcon = ResourceManager.loadImage("images/conflictKeep.png");
Icon replaceExistingIcon = ResourceManager.loadImage("images/conflictReplace.png");
Icon replaceDefaultIcon = ResourceManager.loadImage("images/conflictReplaceOrRename.png");
//@formatter:off
Icon renameAndAddIcon = new GIcon("icon.plugin.datatypes.conflict.mode.rename.and.add");
Icon useExistingIcon = new GIcon("icon.plugin.datatypes.conflict.mode.use.existing");
Icon replaceExistingIcon = new GIcon("icon.plugin.datatypes.conflict.mode.replace.existing");
Icon replaceDefaultIcon = new GIcon("icon.plugin.datatypes.conflict.mode.replace.or.rename");
//@formatter:on
ActionState<DataTypeConflictHandler.ConflictResolutionPolicy> renameAndAddState =
new ActionState<>(

View File

@ -23,22 +23,23 @@ import javax.swing.tree.TreePath;
import docking.ActionContext;
import docking.action.ToggleDockingAction;
import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin;
import ghidra.app.plugin.core.datamgr.DataTypesActionContext;
import ghidra.app.plugin.core.datamgr.tree.DataTypeArchiveGTree;
import ghidra.util.HTMLUtilities;
import resources.ResourceManager;
public class FilterArraysAction extends ToggleDockingAction {
private static final Icon FILTER_ARRAYS_ICON =
ResourceManager.loadImage("images/FilterArrays.png");
private static final Icon ARRAY_ICON = ResourceManager.loadImage("images/Array.png");
//@formatter:off
private static final Icon FILTER_ON_ICON = new GIcon("icon.plugin.datatypes.filter.arrays.on");
private static final Icon FILTER_OFF_ICON = new GIcon("icon.plugin.datatypes.filter.arrays.off");
//@formatter:on
public FilterArraysAction(DataTypeManagerPlugin plugin) {
super("Filter Arrays", plugin.getName());
this.setToolBarData(new ToolBarData(FILTER_ARRAYS_ICON, "filters"));
this.setToolBarData(new ToolBarData(FILTER_ON_ICON, "filters"));
setDescription(HTMLUtilities.toHTML(
"Toggle whether or not Arrays are\n" + "displayed in the Data Type Manager tree."));
@ -66,7 +67,7 @@ public class FilterArraysAction extends ToggleDockingAction {
@Override
public void setSelected(boolean selected) {
getToolBarData().setIcon(selected ? FILTER_ARRAYS_ICON : ARRAY_ICON);
getToolBarData().setIcon(selected ? FILTER_ON_ICON : FILTER_OFF_ICON);
super.setSelected(selected);
}
}

View File

@ -23,21 +23,23 @@ import javax.swing.tree.TreePath;
import docking.ActionContext;
import docking.action.ToggleDockingAction;
import docking.action.ToolBarData;
import generic.theme.GIcon;
import ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin;
import ghidra.app.plugin.core.datamgr.DataTypesActionContext;
import ghidra.app.plugin.core.datamgr.tree.DataTypeArchiveGTree;
import ghidra.util.HTMLUtilities;
import resources.ResourceManager;
public class FilterPointersAction extends ToggleDockingAction {
private static final Icon FILTER_POINTERS_ICON =
ResourceManager.loadImage("images/FilterPointers.png");
private static final Icon POINTER_ICON = ResourceManager.loadImage("images/fingerPointer.png");
//@formatter:off
private static final Icon FILTER_ON_ICON = new GIcon("icon.plugin.datatypes.filter.pointers.on");
private static final Icon FILTER_OFF_ICON = new GIcon("icon.plugin.datatypes.filter.pointers.off");
//@formatter:on
public FilterPointersAction(DataTypeManagerPlugin plugin) {
super("Filter Pointers", plugin.getName());
this.setToolBarData(new ToolBarData(FILTER_POINTERS_ICON, "filters"));
this.setToolBarData(new ToolBarData(FILTER_ON_ICON, "filters"));
setDescription(HTMLUtilities.toHTML(
"Toggle whether or not Pointers are\n" + "displayed in the Data Type Manager tree."));
@ -67,7 +69,7 @@ public class FilterPointersAction extends ToggleDockingAction {
@Override
public void setSelected(boolean selected) {
getToolBarData().setIcon(selected ? FILTER_POINTERS_ICON : POINTER_ICON);
getToolBarData().setIcon(selected ? FILTER_ON_ICON : FILTER_OFF_ICON);
super.setSelected(selected);
}
}

View File

@ -15,7 +15,7 @@
*/
package ghidra.app.plugin.core.datamgr.actions.associate;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.tree.TreePath;
import docking.ActionContext;
@ -24,6 +24,7 @@ import docking.action.MenuData;
import docking.widgets.OptionDialog;
import docking.widgets.tree.GTree;
import docking.widgets.tree.GTreeNode;
import generic.theme.GIcon;
import ghidra.app.plugin.core.datamgr.*;
import ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler;
import ghidra.app.plugin.core.datamgr.tree.DataTypeNode;
@ -31,13 +32,12 @@ import ghidra.app.plugin.core.datamgr.util.DataTypeUtils;
import ghidra.program.model.data.*;
import ghidra.util.Msg;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.EmptyIcon;
import resources.icons.TranslateIcon;
public class CommitSingleDataTypeAction extends DockingAction {
private static ImageIcon COMMIT_ICON = ResourceManager.loadImage("images/smallRightArrow.png");
private static Icon COMMIT_ICON = new GIcon("icon.plugin.datatypes.commit.single.type");
private final DataTypeManagerPlugin plugin;

View File

@ -15,7 +15,7 @@
*/
package ghidra.app.plugin.core.datamgr.actions.associate;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.tree.TreePath;
import docking.ActionContext;
@ -24,19 +24,19 @@ import docking.action.MenuData;
import docking.widgets.OptionDialog;
import docking.widgets.tree.GTree;
import docking.widgets.tree.GTreeNode;
import generic.theme.GIcon;
import ghidra.app.plugin.core.datamgr.*;
import ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler;
import ghidra.app.plugin.core.datamgr.tree.DataTypeNode;
import ghidra.app.plugin.core.datamgr.util.DataTypeUtils;
import ghidra.program.model.data.*;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.EmptyIcon;
import resources.icons.TranslateIcon;
public class UpdateSingleDataTypeAction extends DockingAction {
private static ImageIcon UPDATE_ICON = ResourceManager.loadImage("images/smallLeftArrow.png");
private static Icon UPDATE_ICON = new GIcon("icon.plugin.datatypes.associate.single.type");
private final DataTypeManagerPlugin plugin;

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,13 +15,13 @@
*/
package ghidra.app.plugin.core.datamgr.archive;
import ghidra.app.merge.DataTypeManagerOwner;
import ghidra.util.exception.DuplicateFileException;
import java.awt.Component;
import java.io.IOException;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import ghidra.app.merge.DataTypeManagerOwner;
import ghidra.util.exception.DuplicateFileException;
/**
* This is an interface for data type archives.
@ -63,13 +62,15 @@ public interface Archive extends DataTypeManagerOwner, Comparable<Archive> {
/**
* Saves this archive. Some archives cannot be saved.
* @throws DuplicateFileException if there is an exception saving
* @throws IOException if there is an exception saving
*/
public void save() throws DuplicateFileException, IOException;
/**
* Saves this archive to a newly named file.
* @param component
* @throws IOException
* @param component the parent component the any dialogs shown
* @throws IOException if there is an exception saving
*/
public void saveAs(Component component) throws IOException;
@ -79,5 +80,5 @@ public interface Archive extends DataTypeManagerOwner, Comparable<Archive> {
* false indicates the node is closed.
* @return the archive's icon.
*/
public ImageIcon getIcon(boolean expanded);
public Icon getIcon(boolean expanded);
}

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,21 +15,20 @@
*/
package ghidra.app.plugin.core.datamgr.archive;
import java.awt.Component;
import java.io.IOException;
import javax.swing.Icon;
import generic.theme.GIcon;
import ghidra.program.model.data.BuiltInDataTypeManager;
import ghidra.program.model.data.DataTypeManager;
import ghidra.util.exception.DuplicateFileException;
import java.awt.Component;
import java.io.IOException;
import javax.swing.ImageIcon;
import resources.ResourceManager;
public class BuiltInArchive implements Archive {
private static ImageIcon CLOSED_ICON = ResourceManager.loadImage("images/closedBookBrown.png");
private static ImageIcon OPEN_ICON = ResourceManager.loadImage("images/openBookBrown.png");
private static Icon CLOSED_ICON = new GIcon("icon.plugin.datatypes.archive.built.in.closed");
private static Icon OPEN_ICON = new GIcon("icon.plugin.datatypes.archive.built.in.open");
private DataTypeManagerHandler archiveManager;
private BuiltInDataTypeManager dataTypeManager;
@ -39,43 +37,53 @@ public class BuiltInArchive implements Archive {
this.dataTypeManager = dataTypeManager;
}
@Override
public DataTypeManager getDataTypeManager() {
return dataTypeManager;
}
@Override
public String getName() {
return dataTypeManager.getName();
}
@Override
public int compareTo(Archive archive) {
return -1; // Built-ins are always at the top
}
@Override
public boolean isModifiable() {
return false; // Can't change the data types that are in Built-Ins.
}
@Override
public void close() {
// Not allowed to close the Built In Data Type Manager.
}
@Override
public boolean isChanged() {
return false; // Can't change.
}
@Override
public boolean isSavable() {
return false; // Can't save.
}
@Override
public void save() throws DuplicateFileException, IOException {
// Can't "Save" so do nothing.
}
@Override
public void saveAs(Component component) throws IOException {
// Can't "Save As" so do nothing.
}
public ImageIcon getIcon(boolean expanded) {
@Override
public Icon getIcon(boolean expanded) {
return expanded ? OPEN_ICON : CLOSED_ICON;
}
}

View File

@ -19,13 +19,13 @@ import java.awt.Component;
import java.io.File;
import java.io.IOException;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import generic.jar.ResourceFile;
import generic.theme.GIcon;
import ghidra.framework.store.LockException;
import ghidra.program.model.data.*;
import ghidra.util.exception.DuplicateFileException;
import resources.ResourceManager;
/**
* Manages a DataTypeFileManager and relative state. For example, whether the manager is writable
@ -33,8 +33,8 @@ import resources.ResourceManager;
*/
public class FileArchive implements Archive {
private static ImageIcon CLOSED_ICON = ResourceManager.loadImage("images/closedBookGreen.png");
private static ImageIcon OPEN_ICON = ResourceManager.loadImage("images/openBookGreen.png");
private static Icon CLOSED_ICON = new GIcon("icon.plugin.datatypes.archive.file.closed");
private static Icon OPEN_ICON = new GIcon("icon.plugin.datatypes.archive.file.open");
private ResourceFile archiveFile;
private boolean hasWriteLock;
private boolean changed;
@ -292,7 +292,7 @@ public class FileArchive implements Archive {
}
@Override
public ImageIcon getIcon(boolean expanded) {
public Icon getIcon(boolean expanded) {
return expanded ? OPEN_ICON : CLOSED_ICON;
}
}

View File

@ -18,17 +18,17 @@ package ghidra.app.plugin.core.datamgr.archive;
import java.awt.Component;
import java.io.IOException;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import generic.theme.GIcon;
import ghidra.program.model.data.*;
import ghidra.util.UniversalID;
import ghidra.util.exception.DuplicateFileException;
import resources.ResourceManager;
public class InvalidFileArchive implements Archive {
private static final ImageIcon INVALID_ARCHIVE_ICON =
ResourceManager.loadImage("images/closedFolderInvalid.png");
private static final Icon INVALID_ARCHIVE_ICON =
new GIcon("icon.plugin.datatypes.archive.invalid");
private DataTypeManagerHandler archiveManager;
private UniversalID universalID;
private ArchiveType archiveType;
@ -104,7 +104,7 @@ public class InvalidFileArchive implements Archive {
}
@Override
public ImageIcon getIcon(boolean expanded) {
public Icon getIcon(boolean expanded) {
return INVALID_ARCHIVE_ICON;
}
}

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,23 +15,22 @@
*/
package ghidra.app.plugin.core.datamgr.archive;
import java.awt.Component;
import java.io.IOException;
import javax.swing.Icon;
import generic.theme.GIcon;
import ghidra.framework.model.DomainFile;
import ghidra.program.model.data.DataTypeManager;
import ghidra.program.model.data.DataTypeManagerChangeListener;
import ghidra.program.model.listing.Program;
import ghidra.util.exception.DuplicateFileException;
import java.awt.Component;
import java.io.IOException;
import javax.swing.ImageIcon;
import resources.ResourceManager;
public class ProgramArchive implements DomainFileArchive {
private static ImageIcon CLOSED_ICON = ResourceManager.loadImage("images/closedBookRed.png");
private static ImageIcon OPEN_ICON = ResourceManager.loadImage("images/openBookRed.png");
private static Icon CLOSED_ICON = new GIcon("icon.plugin.datatypes.archive.program.closed");
private static Icon OPEN_ICON = new GIcon("icon.plugin.datatypes.archive.program.open");
private final Program program;
DataTypeManagerChangeListener categoryListener; // hold on to since it is stored in a weak set
private DataTypeManager dataTypeManager;
@ -105,7 +103,7 @@ public class ProgramArchive implements DomainFileArchive {
}
@Override
public ImageIcon getIcon(boolean expanded) {
public Icon getIcon(boolean expanded) {
return expanded ? OPEN_ICON : CLOSED_ICON;
}
}

View File

@ -15,21 +15,20 @@
*/
package ghidra.app.plugin.core.datamgr.archive;
import java.awt.Component;
import java.io.IOException;
import javax.swing.Icon;
import generic.theme.GIcon;
import ghidra.framework.model.DomainFile;
import ghidra.program.model.data.*;
import ghidra.program.model.listing.DataTypeArchive;
import java.awt.Component;
import java.io.IOException;
import javax.swing.ImageIcon;
import resources.ResourceManager;
public class ProjectArchive implements DomainFileArchive {
private static ImageIcon CLOSED_ICON = ResourceManager.loadImage("images/closedBookBlue.png");
private static ImageIcon OPEN_ICON = ResourceManager.loadImage("images/openBookBlue.png");
private static Icon CLOSED_ICON = new GIcon("icon.plugin.datatypes.archive.project.closed");
private static Icon OPEN_ICON = new GIcon("icon.plugin.datatypes.archive.project.open");
private DataTypeArchive dataTypeArchive;
private DomainFile originalDomainFile;
DataTypeManagerChangeListener categoryListener; // hold on to since it is stored in a weak set
@ -115,7 +114,7 @@ public class ProjectArchive implements DomainFileArchive {
}
@Override
public ImageIcon getIcon(boolean expanded) {
public Icon getIcon(boolean expanded) {
return expanded ? OPEN_ICON : CLOSED_ICON;
}
@ -140,7 +139,8 @@ public class ProjectArchive implements DomainFileArchive {
}
@Override
public void categoryRenamed(DataTypeManager dtm, CategoryPath oldPath, CategoryPath newPath) {
public void categoryRenamed(DataTypeManager dtm, CategoryPath oldPath,
CategoryPath newPath) {
if (!oldPath.equals(newPath)) {
fireStateChanged();
}
@ -167,7 +167,8 @@ public class ProjectArchive implements DomainFileArchive {
}
@Override
public void dataTypeRenamed(DataTypeManager dtm, DataTypePath oldPath, DataTypePath newPath) {
public void dataTypeRenamed(DataTypeManager dtm, DataTypePath oldPath,
DataTypePath newPath) {
fireStateChanged();
}

View File

@ -19,7 +19,7 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.util.*;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -31,6 +31,7 @@ import docking.ActionContext;
import docking.ComponentProvider;
import docking.action.*;
import docking.widgets.OptionDialog;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors;
import ghidra.app.plugin.core.compositeeditor.EditorListener;
import ghidra.app.plugin.core.compositeeditor.EditorProvider;
@ -46,7 +47,6 @@ import ghidra.util.*;
import ghidra.util.datastruct.WeakDataStructureFactory;
import ghidra.util.datastruct.WeakSet;
import ghidra.util.exception.DuplicateNameException;
import resources.ResourceManager;
import util.CollectionUtils;
/**
@ -55,11 +55,10 @@ import util.CollectionUtils;
public class EnumEditorProvider extends ComponentProviderAdapter
implements ChangeListener, EditorProvider {
static final ImageIcon EDITOR_ICON = ResourceManager.loadImage("images/enum.png");
private final static ImageIcon APPLY_ICON = ResourceManager.loadImage("images/disk.png");
private final static ImageIcon ADD_ICON = ResourceManager.loadImage("images/Plus.png");
private final static ImageIcon DELETE_ICON =
ResourceManager.loadImage("images/edit-delete.png");
static final Icon EDITOR_ICON = new GIcon("icon.plugin.enum.editor.provider");
private final static Icon APPLY_ICON = new GIcon("icon.plugin.enum.editor.apply");
private final static Icon ADD_ICON = new GIcon("icon.plugin.enum.editor.add");
private final static Icon DELETE_ICON = new GIcon("icon.plugin.enum.editor.delete");
private final static String HELP_TOPIC = "DataTypeEditors";
private final static int CANCEL = 0;
@ -303,7 +302,7 @@ public class EnumEditorProvider extends ComponentProviderAdapter
showEnumAction.setEnabled(true);
String thirdGroup = "FThirdGroup";
showEnumAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/go-home.png"), thirdGroup));
new ToolBarData(new GIcon("icon.plugin.enum.editor.home"), thirdGroup));
tool.addLocalAction(this, applyAction);
tool.addLocalAction(this, addAction);

View File

@ -27,6 +27,7 @@ import javax.swing.tree.TreePath;
import docking.widgets.tree.*;
import docking.widgets.tree.internal.DefaultGTreeDataTransformer;
import docking.widgets.tree.support.GTreeRenderer;
import generic.theme.GIcon;
import ghidra.app.plugin.core.datamgr.*;
import ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler;
import ghidra.app.plugin.core.datamgr.archive.FileArchive;
@ -39,16 +40,13 @@ import ghidra.program.model.listing.Program;
import ghidra.util.UniversalID;
import ghidra.util.task.TaskMonitor;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.TranslateIcon;
public class DataTypeArchiveGTree extends GTree {
private static ImageIcon LOCAL_DELTA_ICON =
ResourceManager.loadImage("images/smallRightArrow.png");
private static ImageIcon SOURCE_DELTA_ICON =
ResourceManager.loadImage("images/smallLeftArrow.png");
private static ImageIcon CONFLICT_ICON = ResourceManager.loadImage("images/doubleArrow.png");
private static ImageIcon MISSING_ICON = ResourceManager.loadImage("images/redQuestionMark.png");
private static Icon LOCAL_DELTA_ICON = new GIcon("icon.plugin.datatypes.tree.change.local");
private static Icon SOURCE_DELTA_ICON = new GIcon("icon.plugin.datatypes.tree.change.source");
private static Icon CONFLICT_ICON = new GIcon("icon.plugin.datatypes.tree.conflict");
private static Icon MISSING_ICON = new GIcon("icon.plugin.datatypes.tree.missing");
private DataTypeManagerPlugin plugin;
private GTreeNode armedNode;

View File

@ -16,27 +16,25 @@
package ghidra.app.plugin.core.datamgr.tree;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import generic.theme.GIcon;
import ghidra.app.plugin.core.datamgr.archive.DomainFileArchive;
import ghidra.framework.model.DomainFile;
import ghidra.framework.model.DomainObject;
import ghidra.program.model.listing.Program;
import ghidra.util.HTMLUtilities;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.TranslateIcon;
public class DomainFileArchiveNode extends ArchiveNode {
private static ImageIcon CHECKED_OUT_ICON = ResourceManager.loadImage("images/check.png");
private static ImageIcon CHECKED_OUT_EXCLUSIVE_ICON =
ResourceManager.loadImage("images/checkex.png");
private static ImageIcon HIJACKED_ICON = ResourceManager.loadImage("images/small_hijack.gif");
private static ImageIcon READ_ONLY_ICON =
ResourceManager.loadImage("images/user-busy.png", 10, 10);
private static ImageIcon NOT_LATEST_CHECKED_OUT_ICON =
ResourceManager.loadImage("images/checkNotLatest.gif");
//@formatter:off
private static Icon CHECKED_OUT_ICON = new GIcon("icon.plugin.datatypes.tree.node.archive.file.checked.out");
private static Icon CHECKED_OUT_EXCLUSIVE_ICON = new GIcon("icon.plugin.datatypes.tree.node.archive.file.checked.out.exclusive");
private static Icon HIJACKED_ICON = new GIcon("icon.plugin.datatypes.tree.node.archive.file.hijacked");
private static Icon READ_ONLY_ICON = new GIcon("icon.plugin.datatypes.tree.node.archive.file.read.only");
private static Icon NOT_LATEST_CHECKED_OUT_ICON = new GIcon("icon.plugin.datatypes.tree.node.archive.file.checked.out.not.latest");
//@formatter:on
private boolean isChanged;
private boolean isReadOnly;
@ -116,7 +114,7 @@ public class DomainFileArchiveNode extends ArchiveNode {
@Override
public Icon getIcon(boolean expanded) {
ImageIcon baseIcon = archive.getIcon(expanded);
Icon baseIcon = archive.getIcon(expanded);
BackgroundIcon bgIcon = new BackgroundIcon(24, 16, isVersioned);
MultiIcon multiIcon = new MultiIcon(bgIcon);
multiIcon.addIcon(baseIcon);

View File

@ -16,19 +16,18 @@
package ghidra.app.plugin.core.datamgr.tree;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import generic.jar.ResourceFile;
import generic.theme.GIcon;
import ghidra.app.plugin.core.datamgr.archive.FileArchive;
import ghidra.util.HTMLUtilities;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.TranslateIcon;
public class FileArchiveNode extends ArchiveNode {
private static ImageIcon CHECKED_OUT_EXCLUSIVE_ICON =
ResourceManager.loadImage("images/checkex.png");
private static Icon CHECKED_OUT_EXCLUSIVE_ICON =
new GIcon("icon.plugin.datatypes.tree.node.archive.file.checked.out.exclusive");
FileArchive fileArchive; // casted reference for easy access
@ -42,7 +41,7 @@ public class FileArchiveNode extends ArchiveNode {
BackgroundIcon bgIcon = new BackgroundIcon(24, 16, false);
MultiIcon multiIcon = new MultiIcon(bgIcon);
boolean hasWriteLock = fileArchive.hasWriteLock();
ImageIcon baseIcon = fileArchive.getIcon(expanded);
Icon baseIcon = fileArchive.getIcon(expanded);
multiIcon.addIcon(baseIcon);
if (hasWriteLock) {
multiIcon.addIcon(new TranslateIcon(CHECKED_OUT_EXCLUSIVE_ICON, 8, -4));

View File

@ -16,7 +16,8 @@
package ghidra.app.plugin.core.datamgr.util;
import java.awt.BorderLayout;
import java.awt.event.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.*;
@ -24,8 +25,8 @@ import docking.DialogComponentProvider;
import docking.widgets.button.GRadioButton;
import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel;
import generic.theme.GIcon;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
/**
* Dialog to get user input on how to handle data type conflicts.
@ -43,12 +44,12 @@ public class ConflictDialog extends DialogComponentProvider {
private JButton applyToAllButton;
private int selectedOption = RENAME;
private ImageIcon INFORM_ICON = ResourceManager.loadImage("images/warning.png");
private Icon INFORM_ICON = new GIcon("icon.warning");
/**
* Constructor
* @param dtName data type name
* @param categoryName category path
* @param categoryPath category path
* @param newDTName new name to resolve conflict
*/
public ConflictDialog(String dtName, String categoryPath, String newDTName) {
@ -58,27 +59,18 @@ public class ConflictDialog extends DialogComponentProvider {
addOKButton();
applyToAllButton = new JButton("Apply to All");
applyToAllButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
applyToAll = true;
close();
}
applyToAllButton.addActionListener(e -> {
applyToAll = true;
close();
});
addButton(applyToAllButton);
}
/* (non-Javadoc)
* @see ghidra.util.bean.GhidraDialog#okCallback()
*/
@Override
protected void okCallback() {
close();
}
/* (non-Javadoc)
* @see ghidra.util.bean.GhidraDialog#cancelCallback()
*/
@Override
protected void cancelCallback() {
close();
@ -101,20 +93,17 @@ public class ConflictDialog extends DialogComponentProvider {
mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
ItemListener listener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
Object source = e.getSource();
if (source == replaceRB) {
selectedOption = REPLACE;
}
else if (source == useExistingRB) {
selectedOption = USE_EXISTING;
}
else {
selectedOption = RENAME;
}
ItemListener listener = e -> {
if (e.getStateChange() == ItemEvent.SELECTED) {
Object source = e.getSource();
if (source == replaceRB) {
selectedOption = REPLACE;
}
else if (source == useExistingRB) {
selectedOption = USE_EXISTING;
}
else {
selectedOption = RENAME;
}
}
};

View File

@ -20,9 +20,9 @@ import java.util.*;
import java.util.List;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import generic.theme.GColor;
import generic.theme.GIcon;
import ghidra.app.services.DataTypeQueryService;
import ghidra.program.model.data.*;
import ghidra.program.model.data.Enum;
@ -43,27 +43,6 @@ public class DataTypeUtils {
private static Map<Icon, MultiIcon> highlightIconMap = new HashMap<>();
private static String OPEN_FOLDER = "images/openFolder.png";
private static String CLOSED_FOLDER = "images/closedFolder.png";
private static String DISABLED_OPEN_FOLDER = "images/disabledOpenFolder.png";
private static String DISABLED_CLOSED_FOLDER = "images/disabledClosedFolder.png";
private static String DEFAULT_ICON = "images/defaultDt.gif";
private static String DISABLED_DEFAULT_ICON = "images/disabledCode.gif";
private static String LOCKED_OPEN_FOLDER = "images/openFolderCheckedOut.png";
private static String LOCKED_CLOSED_FOLDER = "images/closedFolderCheckedOut.png";
private static String OPEN_ARCHIVE_FOLDER = "images/openFolderArchive.png";
private static String CLOSED_ARCHIVE_FOLDER = "images/closedFolderArchive.png";
private static String ROOT_ICON = "images/BookShelf.png";
private static String OPEN_ROOT_ICON = "images/BookShelfOpen.png";
private static String FAVORITE_ICON = "images/emblem-favorite.png";
private static String BUILT_IN_ICON = "images/package_development.png";
private static String STRUCTURE_ICON = "images/cstruct.png";
private static String UNION_ICON = "images/cUnion.png";
private static String TYPEDEF_ICON = "images/typedef.png";
private static String FUNCTION_ICON = "images/functionDef.png";
private static String ENUM_ICON = "images/enum.png";
private static String POINTER_ICON = "images/fingerPointer.png";
private static Icon defaultIcon;
private static Icon disabledIcon;
private static Icon favoriteIcon;
@ -93,29 +72,29 @@ public class DataTypeUtils {
return;
}
imagesLoaded = true;
defaultIcon = ResourceManager.loadImage(DEFAULT_ICON);
disabledIcon = ResourceManager.loadImage(DISABLED_DEFAULT_ICON);
defaultIcon = new GIcon("icon.plugin.datatypes.default");
disabledIcon = new GIcon("icon.plugin.datatypes.default.disabled");
favoriteIcon = ResourceManager.loadImage(FAVORITE_ICON);
disabledFavoriteIcon = ResourceManager.getDisabledIcon((ImageIcon) favoriteIcon);
favoriteIcon = new GIcon("icon.plugin.datatypes.util.favorite");
disabledFavoriteIcon = new GIcon("icon.plugin.datatypes.util.favorite.disabled");
builtInIcon = ResourceManager.loadImage(BUILT_IN_ICON);
disabledBuiltInIcon = ResourceManager.getDisabledIcon((ImageIcon) builtInIcon);
builtInIcon = new GIcon("icon.plugin.datatypes.built.in");
disabledBuiltInIcon = new GIcon("icon.plugin.datatypes.built.in.disabled");
rootIcon = ResourceManager.loadImage(ROOT_ICON);
openRootIcon = ResourceManager.loadImage(OPEN_ROOT_ICON);
rootIcon = new GIcon("icon.plugin.datatypes.util.root");
openRootIcon = new GIcon("icon.plugin.datatypes.util.open.root");
openFolderIcon = ResourceManager.loadImage(OPEN_FOLDER);
disabledOpenFolderIcon = ResourceManager.loadImage(DISABLED_OPEN_FOLDER);
openFolderIcon = new GIcon("icon.plugin.datatypes.util.open.folder");
disabledOpenFolderIcon = new GIcon("icon.plugin.datatypes.util.open.folder.disabled");
closedFolderIcon = ResourceManager.loadImage(CLOSED_FOLDER);
disabledClosedFolderIcon = ResourceManager.loadImage(DISABLED_CLOSED_FOLDER);
closedFolderIcon = new GIcon("icon.plugin.datatypes.util.closed.folder");
disabledClosedFolderIcon = new GIcon("icon.plugin.datatypes.util.closed.folder.disabled");
lockedOpenFolderIcon = ResourceManager.loadImage(LOCKED_OPEN_FOLDER);
lockedClosedFolderIcon = ResourceManager.loadImage(LOCKED_CLOSED_FOLDER);
lockedOpenFolderIcon = new GIcon("icon.plugin.datatypes.util.open.folder.locked");
lockedClosedFolderIcon = new GIcon("icon.plugin.datatypes.util.closed.folder.locked");
openArchiveFolderIcon = ResourceManager.loadImage(OPEN_ARCHIVE_FOLDER);
closedArchiveFolderIcon = ResourceManager.loadImage(CLOSED_ARCHIVE_FOLDER);
openArchiveFolderIcon = new GIcon("icon.plugin.datatypes.util.open.archive");
closedArchiveFolderIcon = new GIcon("icon.plugin.datatypes.util.closed.archive");
createDataTypeIcons();
@ -124,29 +103,29 @@ public class DataTypeUtils {
private static void createDataTypeIcons() {
List<DataTypeIconWrapper> list = new ArrayList<>();
Icon enumIcon = ResourceManager.loadImage(ENUM_ICON);
Icon enumIcon = new GIcon("icon.plugin.datatypes.enum");
list.add(new DataTypeIconWrapper(Enum.class, enumIcon,
ResourceManager.getDisabledIcon((ImageIcon) enumIcon)));
ResourceManager.getDisabledIcon(enumIcon)));
Icon functionIcon = ResourceManager.loadImage(FUNCTION_ICON);
Icon functionIcon = new GIcon("icon.plugin.datatypes.function");
list.add(new DataTypeIconWrapper(FunctionDefinition.class, functionIcon,
ResourceManager.getDisabledIcon((ImageIcon) functionIcon)));
ResourceManager.getDisabledIcon(functionIcon)));
Icon pointerIcon = ResourceManager.loadImage(POINTER_ICON);
Icon pointerIcon = new GIcon("icon.plugin.datatypes.pointer");
list.add(new DataTypeIconWrapper(Pointer.class, pointerIcon,
ResourceManager.getDisabledIcon((ImageIcon) pointerIcon)));
ResourceManager.getDisabledIcon(pointerIcon)));
Icon typedefIcon = ResourceManager.loadImage(TYPEDEF_ICON);
Icon typedefIcon = new GIcon("icon.plugin.datatypes.typedef");
list.add(new DataTypeIconWrapper(TypeDef.class, typedefIcon,
ResourceManager.getDisabledIcon((ImageIcon) typedefIcon)));
ResourceManager.getDisabledIcon(typedefIcon)));
Icon unionIcon = ResourceManager.loadImage(UNION_ICON);
Icon unionIcon = new GIcon("icon.plugin.datatypes.union");
list.add(new DataTypeIconWrapper(Union.class, unionIcon,
ResourceManager.getDisabledIcon((ImageIcon) unionIcon)));
ResourceManager.getDisabledIcon(unionIcon)));
Icon structureIcon = ResourceManager.loadImage(STRUCTURE_ICON);
Icon structureIcon = new GIcon("icon.plugin.datatypes.structure");
list.add(new DataTypeIconWrapper(Structure.class, structureIcon,
ResourceManager.getDisabledIcon((ImageIcon) structureIcon)));
ResourceManager.getDisabledIcon(structureIcon)));
dataTypeIconWrappers = list.toArray(new DataTypeIconWrapper[list.size()]);
}

View File

@ -29,6 +29,7 @@ import docking.action.*;
import docking.dnd.DropTgtAdapter;
import docking.dnd.Droppable;
import docking.widgets.table.AbstractSortedTableModel;
import generic.theme.GIcon;
import ghidra.app.CorePluginPackage;
import ghidra.app.plugin.PluginCategoryNames;
import ghidra.app.plugin.ProgramPlugin;
@ -48,7 +49,7 @@ import ghidra.util.data.DataTypeParser.AllowedDataTypes;
import ghidra.util.table.GhidraTable;
import ghidra.util.task.SwingUpdateManager;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
import resources.Icons;
import util.CollectionUtils;
//@formatter:off
@ -301,7 +302,7 @@ public class DataTypePreviewPlugin extends ProgramPlugin {
}
};
addAction.setPopupMenuData(new MenuData(new String[] { "Add" }));
addAction.setToolBarData(new ToolBarData(ResourceManager.loadImage("images/Plus.png")));
addAction.setToolBarData(new ToolBarData(Icons.ADD_ICON));
addAction.setKeyBindingData(new KeyBindingData(KeyEvent.VK_PLUS, 0));
addAction.setDescription("Add Datatypes");
@ -316,8 +317,7 @@ public class DataTypePreviewPlugin extends ProgramPlugin {
}
};
deleteAction.setPopupMenuData(new MenuData(new String[] { "Delete" }));
deleteAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/edit-delete.png")));
deleteAction.setToolBarData(new ToolBarData(new GIcon("icon.delete")));
deleteAction.setKeyBindingData(new KeyBindingData(KeyEvent.VK_DELETE, 0));
deleteAction.setDescription("Delete Selected Datatypes");

View File

@ -23,6 +23,7 @@ import javax.swing.*;
import javax.swing.table.JTableHeader;
import docking.ActionContext;
import generic.theme.GIcon;
import ghidra.app.services.GoToService;
import ghidra.framework.plugintool.ComponentProviderAdapter;
import ghidra.program.model.address.Address;
@ -30,14 +31,13 @@ import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramSelection;
import ghidra.util.HelpLocation;
import ghidra.util.table.*;
import resources.ResourceManager;
/**
* Provider for the equates table.
*/
class DataWindowProvider extends ComponentProviderAdapter {
public static final ImageIcon ICON = ResourceManager.loadImage("images/dataW.gif");
public static final Icon ICON = new GIcon("icon.plugin.datawindow.provider");
private DataWindowPlugin plugin;

View File

@ -35,12 +35,13 @@ import docking.actions.KeyBindingUtils;
import docking.options.editor.FontEditor;
import docking.widgets.OptionDialog;
import docking.widgets.filechooser.GhidraFileChooser;
import generic.theme.GIcon;
import ghidra.framework.options.SaveState;
import ghidra.framework.plugintool.ComponentProviderAdapter;
import ghidra.util.HelpLocation;
import ghidra.util.Msg;
import ghidra.util.datastruct.FixedSizeStack;
import resources.ResourceManager;
import resources.Icons;
public class TextEditorComponentProvider extends ComponentProviderAdapter {
private static final String TITLE = "Text Editor";
@ -200,7 +201,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
};
undoAction.setDescription("Undo");
undoAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/undo.png"), "UndoRedo"));
new ToolBarData(new GIcon("icon.undo"), "UndoRedo"));
undoAction.setEnabled(false);
plugin.getTool().addLocalAction(this, undoAction);
@ -218,7 +219,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
};
redoAction.setDescription("Redo");
redoAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/redo.png"), "UndoRedo"));
new ToolBarData(new GIcon("icon.redo"), "UndoRedo"));
redoAction.setEnabled(false);
plugin.getTool().addLocalAction(this, redoAction);
@ -236,7 +237,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
};
saveAction.setDescription("Save");
saveAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/disk.png"), "Save"));
new ToolBarData(Icons.SAVE_ICON, "Save"));
saveAction.setEnabled(false);
plugin.getTool().addLocalAction(this, saveAction);
@ -254,7 +255,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
};
saveAsAction.setDescription("Save As...");
saveAsAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/disk_save_as.png"), "Save"));
new ToolBarData(Icons.SAVE_AS_ICON, "Save"));
saveAsAction.setEnabled(true);
plugin.getTool().addLocalAction(this, saveAsAction);
@ -265,7 +266,7 @@ public class TextEditorComponentProvider extends ComponentProviderAdapter {
}
};
fontAction.setToolBarData(
new ToolBarData(ResourceManager.loadImage("images/text_lowercase.png"), "ZZFont"));
new ToolBarData(new GIcon("icon.font"), "ZZFont"));
fontAction.setDescription("Select Font");
fontAction.setEnabled(true);
plugin.getTool().addLocalAction(this, fontAction);

View File

@ -40,12 +40,10 @@ import ghidra.program.model.symbol.Equate;
import ghidra.util.HelpLocation;
import ghidra.util.UniversalID;
import ghidra.util.table.*;
import resources.ResourceManager;
import resources.Icons;
public class EquateTableProvider extends ComponentProviderAdapter {
private final static String DELETE_IMAGE = "images/edit-delete.png";
private EquateTablePlugin plugin;
private GhidraTable equatesTable;
private EquateTableModel equatesModel;
@ -160,8 +158,8 @@ public class EquateTableProvider extends ComponentProviderAdapter {
@Override
public void keyReleased(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN ||
e.getKeyCode() == KeyEvent.VK_PAGE_UP ||
e.getKeyCode() == KeyEvent.VK_PAGE_DOWN) {
e.getKeyCode() == KeyEvent.VK_PAGE_UP ||
e.getKeyCode() == KeyEvent.VK_PAGE_DOWN) {
handleEquateTableSelection();
}
}
@ -191,7 +189,7 @@ public class EquateTableProvider extends ComponentProviderAdapter {
Equate equate = (Equate) table.getValueAt(row, column);
UniversalID id =
new UniversalID(Long.parseLong(equate.getName().split(":")[1]));
new UniversalID(Long.parseLong(equate.getName().split(":")[1]));
Enum enoom = (Enum) dtm.findDataTypeForID(id);
if (enoom != null) {
dtms.edit(enoom);
@ -254,7 +252,7 @@ public class EquateTableProvider extends ComponentProviderAdapter {
JPanel workPanel = new JPanel(new BorderLayout());
JSplitPane splitPane =
new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, equatesPanel, referencesPanel);
new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, equatesPanel, referencesPanel);
splitPane.setResizeWeight(0.5);
workPanel.add(splitPane, BorderLayout.CENTER);
@ -269,7 +267,7 @@ public class EquateTableProvider extends ComponentProviderAdapter {
private void createAction() {
ImageIcon deleteImage = ResourceManager.loadImage(DELETE_IMAGE);
Icon deleteImage = Icons.DELETE_ICON;
deleteAction = new DockingAction("Delete Equate", plugin.getName()) {
@Override
public void actionPerformed(ActionContext context) {
@ -291,7 +289,7 @@ public class EquateTableProvider extends ComponentProviderAdapter {
deleteAction.setHelpLocation(new HelpLocation("EquatePlugin", "Delete Equate"));
SelectionNavigationAction selectionNavigationAction =
new SelectionNavigationAction(plugin, referencesTable);
new SelectionNavigationAction(plugin, referencesTable);
selectionNavigationAction.setHelpLocation(
new HelpLocation(HelpTopics.SEARCH, "Selection_Navigation"));

View File

@ -16,9 +16,6 @@
package ghidra.app.plugin.core.fallthrough;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;
import javax.swing.*;
import javax.swing.border.TitledBorder;
@ -31,14 +28,10 @@ import docking.widgets.label.GDLabel;
import ghidra.app.util.AddressInput;
import ghidra.program.model.address.Address;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
import resources.Icons;
/**
* Dialog to prompt for overriding a fallthrough address on an
* instruction.
*
*
*
* Dialog to prompt for overriding a fallthrough address on an instruction.
*/
class FallThroughDialog extends DialogComponentProvider implements ChangeListener {
@ -65,25 +58,16 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
model.setChangeListener(this);
}
/**
* @see ghidra.util.bean.GhidraDialog#applyCallback()
*/
@Override
protected void applyCallback() {
model.execute();
}
/**
* @see ghidra.util.bean.GhidraDialog#cancelCallback()
*/
@Override
protected void cancelCallback() {
close();
}
/**
* @see ghidra.util.bean.GhidraDialog#okCallback()
*/
@Override
protected void okCallback() {
if (model.execute()) {
@ -91,9 +75,6 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
}
}
/**
* @see javax.swing.event.ChangeListener#stateChanged(javax.swing.event.ChangeEvent)
*/
public void updateState() {
Address addr = model.getAddress();
if (addr == null) {
@ -140,18 +121,15 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
return;
}
Runnable r = new Runnable() {
@Override
public void run() {
Address addr = addrField.getAddress();
if (addr != null || addrField.getValue().length() == 0) {
model.setCurrentFallthrough(addr);
}
else {
setStatusText("Invalid Address");
setOkEnabled(false);
setApplyEnabled(false);
}
Runnable r = () -> {
Address addr = addrField.getAddress();
if (addr != null || addrField.getValue().length() == 0) {
model.setCurrentFallthrough(addr);
}
else {
setStatusText("Invalid Address");
setOkEnabled(false);
setApplyEnabled(false);
}
};
SwingUtilities.invokeLater(r);
@ -162,18 +140,8 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
addrField = new AddressInput();
addrField.setAddressFactory(model.getProgram().getAddressFactory());
addrField.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
addressChanged();
}
});
addrField.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
model.setCurrentFallthrough(addrField.getAddress());
}
});
addrField.addChangeListener(e -> addressChanged());
addrField.addActionListener(e -> model.setCurrentFallthrough(addrField.getAddress()));
panel.add(createHomePanel(), BorderLayout.NORTH);
panel.add(createAddressPanel(), BorderLayout.CENTER);
return panel;
@ -201,13 +169,8 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
instLabel = new GDLabel("jmp DAT_01001000");
instLabel.setFont(monoFont);
homeButton = createButton("images/go-home.png", "Home");
homeButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
plugin.goTo(model.getAddress());
}
});
homeButton = createButton("Home");
homeButton.addActionListener(e -> plugin.goTo(model.getAddress()));
JPanel innerPanel = new JPanel();
BoxLayout bl = new BoxLayout(innerPanel, BoxLayout.X_AXIS);
@ -232,21 +195,11 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
ButtonGroup group = new ButtonGroup();
defaultRB = new GRadioButton("Default", true);
defaultRB.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ev) {
model.defaultSelected();
}
});
defaultRB.addActionListener(ev -> model.defaultSelected());
defaultRB.setToolTipText("Use default fallthrough address");
userRB = new GRadioButton("User", false);
userRB.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ev) {
model.userSelected();
}
});
userRB.addActionListener(ev -> model.userSelected());
userRB.setToolTipText("Override default fallthrough address");
group.add(defaultRB);
@ -260,18 +213,13 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
return outerPanel;
}
private JButton createButton(String filename, String altText) {
private JButton createButton(String altText) {
JButton button = new JButton();
URL imageURL = ResourceManager.getResource(filename);
if (imageURL != null) {
ImageIcon icon = new ImageIcon(imageURL);
button = new JButton(icon);
Insets noInsets = new Insets(0, 0, 0, 0);
button.setMargin(noInsets);
}
else {
button = new JButton(altText);
}
Icon icon = Icons.HOME_ICON;
button = new JButton(icon);
Insets noInsets = new Insets(0, 0, 0, 0);
button.setMargin(noInsets);
button.setToolTipText("Go back to home address");
return button;
}

View File

@ -36,6 +36,7 @@ import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GLabel;
import docking.widgets.table.*;
import generic.theme.GColor;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors;
import generic.theme.GThemeDefaults.Colors.*;
import generic.util.WindowUtilities;
@ -50,16 +51,12 @@ import ghidra.program.model.symbol.ExternalLocation;
import ghidra.util.*;
import ghidra.util.layout.PairLayout;
import ghidra.util.layout.VerticalLayout;
import resources.ResourceManager;
import resources.Icons;
public class FunctionEditorDialog extends DialogComponentProvider implements ModelChangeListener {
private static final Color FG_COLOR_THUNK =
new GColor("color.fg.plugin.function.editor.dialog.thunk");
private static Icon ADD_ICON = ResourceManager.loadImage("images/Plus.png");
private static Icon REMOVE_ICON = ResourceManager.loadImage("images/edit-delete.png");
private static Icon UP_ICON = ResourceManager.loadImage("images/up.png");
private static Icon DOWN_ICON = ResourceManager.loadImage("images/down.png");
private FunctionEditorModel model;
private DocumentListener nameFieldDocumentListener;
private GTable parameterTable;
@ -446,10 +443,10 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
private Component buildButtonPanel() {
JPanel panel = new JPanel(new VerticalLayout(5));
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
addButton = new JButton(ADD_ICON);
removeButton = new JButton(REMOVE_ICON);
upButton = new JButton(UP_ICON);
downButton = new JButton(DOWN_ICON);
addButton = new JButton(Icons.ADD_ICON);
removeButton = new JButton(Icons.DELETE_ICON);
upButton = new JButton(new GIcon("icon.up"));
downButton = new JButton(new GIcon("icon.down"));
addButton.setToolTipText("Add parameter");
removeButton.setToolTipText("Delete selected parameters");
upButton.setToolTipText("Move selected parameter up");

View File

@ -20,8 +20,8 @@ import java.awt.event.ActionListener;
import javax.swing.*;
import generic.theme.GIcon;
import resources.Icons;
import resources.ResourceManager;
/**
* Provides buttons to be used with the {@link FunctionTagProvider}.
@ -35,9 +35,6 @@ import resources.ResourceManager;
*/
public class FunctionTagButtonPanel extends JPanel {
private Icon ADD_IMG = ResourceManager.loadImage("images/2rightarrow.png");
private Icon REMOVE_IMG = ResourceManager.loadImage("images/2leftarrow.png");
private SourceTagsPanel sourcePanel;
private TargetTagsPanel targetPanel;
private JButton addBtn;
@ -101,25 +98,24 @@ public class FunctionTagButtonPanel extends JPanel {
deleteBtn.setEnabled(hasSelection && !isImmutable);
}
/******************************************************************************
* PRIVATE METHODS
******************************************************************************/
private void createButtonPanel() {
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
addBtn = createButton("addBtn", ADD_IMG, "Add selected tags to the function",
addBtn = createButton("addBtn", new GIcon("icon.plugin.functiontags.add"),
"Add selected tags to the function",
e -> {
sourcePanel.addSelectedTags();
});
add(addBtn, gbc);
gbc.gridy = 1;
removeBtn = createButton("removeBtn", REMOVE_IMG, "Remove selected tags from the function",
e -> targetPanel.removeSelectedTags());
removeBtn =
createButton("removeBtn", new GIcon("icon.plugin.functiontags.remove"),
"Remove selected tags from the function",
e -> targetPanel.removeSelectedTags());
add(removeBtn, gbc);
gbc.gridy = 2;
@ -147,7 +143,6 @@ public class FunctionTagButtonPanel extends JPanel {
JButton button = new JButton(name);
button.setName(name);
button.setToolTipText(tooltip);
icon = ResourceManager.getScaledIcon(icon, 16, 16);
button.setIcon(icon);
button.setText("");
button.addActionListener(action);

View File

@ -31,6 +31,7 @@ import docking.ComponentProvider;
import docking.action.*;
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
import docking.widgets.tabbedpane.DockingTabRenderer;
import generic.theme.GIcon;
import ghidra.app.util.viewer.listingpanel.ListingCodeComparisonPanel;
import ghidra.app.util.viewer.util.CodeComparisonPanel;
import ghidra.framework.options.SaveState;
@ -44,7 +45,6 @@ import ghidra.util.Msg;
import ghidra.util.classfinder.ClassSearcher;
import help.Help;
import help.HelpService;
import resources.ResourceManager;
/**
* A panel for displaying {@link Function functions}, {@link Data data}, or
@ -66,9 +66,10 @@ public class FunctionComparisonPanel extends JPanel implements ChangeListener {
private static final HelpService help = Help.getHelpService();
private static final String HELP_TOPIC = "FunctionComparison";
private static final Icon SYNC_SCROLLING_ICON = ResourceManager.loadImage("images/lock.gif");
private static final Icon SYNC_SCROLLING_ICON =
new GIcon("icon.plugin.functioncompare.scroll.lock");
private static final Icon UNSYNC_SCROLLING_ICON =
ResourceManager.loadImage("images/unlock.gif");
new GIcon("icon.plugin.functioncompare.scroll.unlock");
private static final String SCROLLING_GROUP = "A9_SCROLLING";
private static final String DUAL_SCROLLING_ACTION_GROUP = "DualScrolling";
private static final String DUAL_SCROLLING_HELP_TOPIC = "FunctionComparison";

View File

@ -19,18 +19,14 @@ import java.awt.event.InputEvent;
import java.util.Set;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import docking.ActionContext;
import docking.action.*;
import generic.theme.GIcon;
import ghidra.app.services.FunctionComparisonService;
import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.listing.Function;
import ghidra.util.HelpLocation;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.ScaledImageIcon;
import resources.icons.TranslateIcon;
/**
* Creates a new comparison between a set of functions, launching a new
@ -45,13 +41,7 @@ public abstract class CompareFunctionsAction extends DockingAction {
protected FunctionComparisonService comparisonService;
private static final ImageIcon COMPARISON_ICON =
ResourceManager.loadImage("images/page_white_c.png");
private static final Icon NEW_ICON = ResourceManager.loadImage("images/bullet_star.png");
private static final Icon SCALED_NEW_ICON = new ScaledImageIcon(NEW_ICON, 16, 16);
private static final Icon TRANSLATED_NEW_ICON = new TranslateIcon(SCALED_NEW_ICON, 4, -4);
private static final Icon CREATE_NEW_COMPARISON_ICON =
new MultiIcon(COMPARISON_ICON, TRANSLATED_NEW_ICON);
private static final Icon COMPARISON_ICON = new GIcon("icon.plugin.functioncompare.new");
private static final String CREATE_COMPARISON_GROUP = "A9_CreateComparison";
static final String POPUP_MENU_NAME = "Compare Selected Functions";
@ -85,7 +75,7 @@ public abstract class CompareFunctionsAction extends DockingAction {
* @return the icon
*/
protected Icon getToolBarIcon() {
return CREATE_NEW_COMPARISON_ICON;
return COMPARISON_ICON;
}
/**

View File

@ -24,13 +24,11 @@ import javax.swing.JComboBox;
import docking.ActionContext;
import docking.ComponentProvider;
import docking.action.*;
import generic.theme.GIcon;
import ghidra.app.plugin.core.functioncompare.MultiFunctionComparisonPanel;
import ghidra.app.plugin.core.functioncompare.MultiFunctionComparisonProvider;
import ghidra.program.model.listing.Function;
import ghidra.util.HelpLocation;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.TranslateIcon;
/**
* Displays the next available function in the function comparison panel. If
@ -39,11 +37,8 @@ import resources.icons.TranslateIcon;
public class NextFunctionAction extends DockingAction {
private static final String FUNCTION_NAVIGATE_GROUP = "A9_FunctionNavigate";
private static final Icon NEXT_ICON =
new TranslateIcon(ResourceManager.loadImage("images/arrow_down.png"), 3, 1);
private static final Icon FUNCTION_ICON =
new TranslateIcon(ResourceManager.loadImage("images/FunctionScope.gif"), -5, -2);
private static final Icon NEXT_FUNCTION_ICON = new MultiIcon(NEXT_ICON, FUNCTION_ICON);
private static final Icon NEXT_FUNCTION_ICON =
new GIcon("icon.plugin.functioncompare.function.next");
/**
* Constructor

View File

@ -20,11 +20,11 @@ import java.util.*;
import java.util.stream.Collectors;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import docking.ActionContext;
import docking.action.*;
import docking.widgets.dialogs.TableSelectionDialog;
import generic.theme.GIcon;
import ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider;
import ghidra.app.plugin.core.functioncompare.MultiFunctionComparisonPanel;
import ghidra.app.plugin.core.functionwindow.FunctionRowObject;
@ -35,10 +35,6 @@ import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.listing.Function;
import ghidra.program.model.listing.Program;
import ghidra.util.HelpLocation;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.ScaledImageIcon;
import resources.icons.TranslateIcon;
import util.CollectionUtils;
/**
@ -49,14 +45,9 @@ import util.CollectionUtils;
*/
public class OpenFunctionTableAction extends DockingAction {
private static final Icon ADD_ICON = ResourceManager.loadImage("images/Plus.png");
private static final Icon SCALED_ADD_ICON = new ScaledImageIcon(ADD_ICON, 10, 10);
private static final ImageIcon COMPARISON_ICON =
ResourceManager.loadImage("images/page_white_c.png");
private static final Icon TRANSLATED_ADD_ICON = new TranslateIcon(SCALED_ADD_ICON, 8, 1);
private static final String ADD_COMPARISON_GROUP = "A9_AddToComparison";
private static final Icon ADD_TO_COMPARISON_ICON =
new MultiIcon(COMPARISON_ICON, TRANSLATED_ADD_ICON);
new GIcon("icon.plugin.functioncompare.open.function.table");
protected PluginTool tool;
protected ProgramManager programManagerService;

View File

@ -24,13 +24,11 @@ import javax.swing.JComboBox;
import docking.ActionContext;
import docking.ComponentProvider;
import docking.action.*;
import generic.theme.GIcon;
import ghidra.app.plugin.core.functioncompare.MultiFunctionComparisonPanel;
import ghidra.app.plugin.core.functioncompare.MultiFunctionComparisonProvider;
import ghidra.program.model.listing.Function;
import ghidra.util.HelpLocation;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.TranslateIcon;
/**
* Displays the previous function in the function comparison panel. If
@ -39,11 +37,8 @@ import resources.icons.TranslateIcon;
public class PreviousFunctionAction extends DockingAction {
private static final String FUNCTION_NAVIGATE_GROUP = "A9_FunctionNavigate";
private static final Icon PREVIOUS_ICON =
new TranslateIcon(ResourceManager.loadImage("images/arrow_up.png"), 3, 1);
private static final Icon FUNCTION_ICON =
new TranslateIcon(ResourceManager.loadImage("images/FunctionScope.gif"), -5, -2);
private static final Icon PREVIOUS_FUNCTION_ICON = new MultiIcon(PREVIOUS_ICON, FUNCTION_ICON);
private static final Icon PREVIOUS_FUNCTION_ICON =
new GIcon("icon.plugin.functioncompare.function.previous");
/**
* Constructor

View File

@ -25,13 +25,11 @@ import javax.swing.JComboBox;
import docking.ActionContext;
import docking.action.*;
import generic.theme.GIcon;
import ghidra.app.plugin.core.functioncompare.MultiFunctionComparisonPanel;
import ghidra.app.plugin.core.functioncompare.MultiFunctionComparisonProvider;
import ghidra.program.model.listing.Function;
import ghidra.util.HelpLocation;
import resources.MultiIcon;
import resources.ResourceManager;
import resources.icons.TranslateIcon;
/**
* Removes the currently-selected function from the comparison panel. If no
@ -39,12 +37,9 @@ import resources.icons.TranslateIcon;
*/
public class RemoveFunctionsAction extends DockingAction {
private static final Icon FUNCTION_ICON =
new TranslateIcon(ResourceManager.loadImage("images/FunctionScope.gif"), -5, -2);
private static final Icon REMOVE_ICON =
new TranslateIcon(ResourceManager.loadImage("images/edit-delete.png"), 3, 3);
private static final String REMOVE_FUNCTION_GROUP = "A9_RemoveFunctions";
private static final Icon REMOVE_FUNCTION_ICON = new MultiIcon(REMOVE_ICON, FUNCTION_ICON);
private static final Icon REMOVE_FUNCTION_ICON =
new GIcon("icon.plugin.functioncompare.function.remove");
/**
* Constructor

View File

@ -25,6 +25,7 @@ import javax.swing.*;
import javax.swing.table.*;
import docking.ActionContext;
import generic.theme.GIcon;
import ghidra.app.services.GoToService;
import ghidra.framework.plugintool.ComponentProviderAdapter;
import ghidra.program.model.address.Address;
@ -32,14 +33,13 @@ import ghidra.program.model.listing.*;
import ghidra.program.util.ProgramSelection;
import ghidra.util.HelpLocation;
import ghidra.util.table.*;
import resources.ResourceManager;
/**
* Provider that displays all functions in the selected program
*/
public class FunctionWindowProvider extends ComponentProviderAdapter {
public static final ImageIcon icon = ResourceManager.loadImage("images/functions.gif");
public static final Icon ICON = new GIcon("icon.plugin.functionwindow.provider");
private FunctionWindowPlugin plugin;
private GhidraTable functionTable;
@ -58,7 +58,7 @@ public class FunctionWindowProvider extends ComponentProviderAdapter {
super(plugin.getTool(), "Functions Window", plugin.getName());
setTitle("Functions");
this.plugin = plugin;
setIcon(icon);
setIcon(ICON);
setHelpLocation(new HelpLocation(plugin.getName(), plugin.getName()));
tool = plugin.getTool();
mainPanel = createWorkPanel();

View File

@ -22,6 +22,7 @@ import javax.swing.*;
import docking.DockingWindowManager;
import docking.widgets.EmptyBorderButton;
import generic.theme.GIcon;
import generic.theme.GThemeDefaults.Colors.Messages;
import ghidra.app.plugin.core.instructionsearch.InstructionSearchPlugin;
import ghidra.app.plugin.core.instructionsearch.model.*;
@ -32,6 +33,7 @@ import ghidra.util.HelpLocation;
import ghidra.util.Msg;
import ghidra.util.exception.InvalidInputException;
import ghidra.util.task.*;
import resources.Icons;
import resources.ResourceManager;
/**
@ -47,15 +49,6 @@ public class InstructionTable extends AbstractInstructionTable {
// Defines the width/height for all icons on the toolbar
private static final int ICON_SIZE = 16;
private static final String GO_HOME_ICON_OVERLAY = "images/go-home.png";
private static final String ADDRESS_ICON_OVERLAY = "images/DOSA_A.png";
private static final String SCALAR_ICON_OVERLAY = "images/DOSA_S.png";
private static final String OPERAND_ICON_OVERLAY = "images/DOSA_O.png";
private static final String UNDEFINED_ICON_OVERLAY = "images/DOSA_D.png";
private static final String CLEAR_ICON_OVERLAY = "images/edit-clear.png";
private static final String RELOAD_ICON_OVERLAY = "images/reload.png";
private static final String MANUAL_ENTRY_ICON_OVERLAY = "images/editbytes.gif";
// Need to keep track of the column in case the user clicks on the column header and we
// need to display the context menu.
private int selectedColumn = -1;
@ -287,21 +280,21 @@ public class InstructionTable extends AbstractInstructionTable {
}
private void createGoToAddressBtn(JToolBar buttonToolbar) {
Icon icon = ResourceManager.loadImage(GO_HOME_ICON_OVERLAY);
Icon icon = Icons.HOME_ICON;
Action action = new NavAction("navigation", icon,
"Navigate to the address defined by this instruction set");
createToolbarButton(buttonToolbar, icon, action, "nav button");
}
private void createMaskClearAllBtn(JToolBar buttonToolbar) {
Icon icon = ResourceManager.loadImage(CLEAR_ICON_OVERLAY);
Icon icon = Icons.CLEAR_ICON;
Icon scaledIcon = ResourceManager.getScaledIcon(icon, ICON_SIZE, ICON_SIZE);
Action action = new ClearMasksAction("undefined", scaledIcon, "Unmask all");
createToolbarButton(buttonToolbar, icon, action, "unmask all button");
}
private void createReloadBtn(JToolBar buttonToolbar) {
Icon icon = ResourceManager.loadImage(RELOAD_ICON_OVERLAY);
Icon icon = Icons.REFRESH_ICON;
Icon scaledIcon = ResourceManager.getScaledIcon(icon, ICON_SIZE, ICON_SIZE);
Action action =
new ReloadAction("undefined", scaledIcon, "Load selected instructions from listing");
@ -309,14 +302,14 @@ public class InstructionTable extends AbstractInstructionTable {
}
private void createManualEditBtn(JToolBar buttonToolbar) {
Icon icon = ResourceManager.loadImage(MANUAL_ENTRY_ICON_OVERLAY);
Icon icon = new GIcon("icon.plugin.instructiontable.manual.entry");
Icon scaledIcon = ResourceManager.getScaledIcon(icon, ICON_SIZE, ICON_SIZE);
Action action = new ManualEntryAction("undefined", scaledIcon, "Enter bytes manually");
createToolbarButton(buttonToolbar, icon, action, "manual entry");
}
private void createMaskDataBtn(JToolBar buttonToolbar) {
Icon icon = ResourceManager.loadImage(UNDEFINED_ICON_OVERLAY);
Icon icon = new GIcon("icon.plugin.instructiontable.undefined");
Icon scaledIcon = ResourceManager.getScaledIcon(icon, ICON_SIZE, ICON_SIZE);
Action action =
new MaskUndefinedAction("undefined", scaledIcon, "Mask all non-instructions (data)");
@ -324,21 +317,21 @@ public class InstructionTable extends AbstractInstructionTable {
}
private void createMaskAddressesBtn(JToolBar buttonToolbar) {
Icon icon = ResourceManager.loadImage(ADDRESS_ICON_OVERLAY);
Icon icon = new GIcon("icon.plugin.instructiontable.address");
Icon scaledIcon = ResourceManager.getScaledIcon(icon, ICON_SIZE, ICON_SIZE);
Action action = new MaskAddressesAction("addresses", scaledIcon, "Mask all addresses");
createToolbarButton(buttonToolbar, icon, action, "mask addresses button");
}
private void createMaskScalarsBtn(JToolBar buttonToolbar) {
Icon icon = ResourceManager.loadImage(SCALAR_ICON_OVERLAY);
Icon icon = new GIcon("icon.plugin.instructiontable.scalar");
Icon scaledIcon = ResourceManager.getScaledIcon(icon, ICON_SIZE, ICON_SIZE);
Action action = new MaskScalarsAction("scalars", scaledIcon, "Mask all scalars");
createToolbarButton(buttonToolbar, icon, action, "mask scalars button");
}
private void createMaskOperandsBtn(JToolBar buttonToolbar) {
Icon icon = ResourceManager.loadImage(OPERAND_ICON_OVERLAY);
Icon icon = new GIcon("icon.plugin.instructiontable.operand");
Icon scaledIcon = ResourceManager.getScaledIcon(icon, ICON_SIZE, ICON_SIZE);
Action action = new MaskOperandsAction("operands", scaledIcon, "Mask all operands");
createToolbarButton(buttonToolbar, icon, action, "mask operands button");
@ -549,7 +542,6 @@ public class InstructionTable extends AbstractInstructionTable {
/**
* Creates a new {@link InstructionTableDataObject} for the given operand.
*
* @param mnemonic the mnemonic ID
* @param col the column in the table
* @param dataObjects the set of data objects to modify
*/

View File

@ -31,6 +31,7 @@ import docking.action.DockingAction;
import docking.action.MenuData;
import docking.dnd.GClipboard;
import docking.widgets.EmptyBorderButton;
import generic.theme.GIcon;
import ghidra.app.plugin.core.instructionsearch.InstructionSearchPlugin;
import ghidra.app.plugin.core.instructionsearch.model.*;
import ghidra.app.plugin.core.instructionsearch.ui.SelectionModeWidget.InputMode;
@ -39,7 +40,7 @@ import ghidra.framework.plugintool.PluginTool;
import ghidra.util.Msg;
import ghidra.util.exception.InvalidInputException;
import ghidra.util.task.*;
import resources.ResourceManager;
import resources.Icons;
/**
* Displays the preview string for all instructions in the
@ -231,12 +232,6 @@ public class PreviewTable extends AbstractInstructionTable {
new TaskLauncher(task, PreviewTable.this);
}
/*********************************************************************************************
* PROTECTED METHODS
********************************************************************************************/
/**
*
*/
@Override
protected Object[] createColumnHeaders() {
@ -246,9 +241,6 @@ public class PreviewTable extends AbstractInstructionTable {
return colsNames;
}
/**
*
*/
@Override
protected JToolBar createToolbar() {
JToolBar toolbar1 = new JToolBar();
@ -293,10 +285,6 @@ public class PreviewTable extends AbstractInstructionTable {
return dataObjects;
}
/*********************************************************************************************
* PRIVATE METHODS
********************************************************************************************/
private void buildPreviewString(int instrSize, String valueStr, String maskStr, int posptr,
int row) {
@ -328,7 +316,7 @@ public class PreviewTable extends AbstractInstructionTable {
}
private void createCopyBtn(JToolBar toolbar1) {
Icon copyIcon = ResourceManager.loadImage("images/page_white_copy.png");
Icon copyIcon = Icons.COPY_ICON;
Action copyAction = new CopyAction("copy", (ImageIcon) copyIcon,
"Copy the full search string to clipboard");
EmptyBorderButton copyBtn = new EmptyBorderButton();
@ -339,7 +327,7 @@ public class PreviewTable extends AbstractInstructionTable {
}
private EmptyBorderToggleButton createHexViewBtn(JToolBar toolbar1) {
Icon hexIcon = ResourceManager.loadImage("images/hexData.png");
Icon hexIcon = new GIcon("icon.plugin.instructiontable.hex");
Action hexAction = new HexAction("hex", (ImageIcon) hexIcon, "hex view");
EmptyBorderToggleButton hexBtn = new EmptyBorderToggleButton();
hexBtn.setAction(hexAction);
@ -351,7 +339,7 @@ public class PreviewTable extends AbstractInstructionTable {
}
private EmptyBorderToggleButton createBinaryViewBtn(JToolBar toolbar1) {
Icon binaryIcon = ResourceManager.loadImage("images/binaryData.gif");
Icon binaryIcon = new GIcon("icon.plugin.instructiontable.binary");
Action binaryAction = new BinaryAction("binary", (ImageIcon) binaryIcon, "binary view");
EmptyBorderToggleButton binaryBtn = new EmptyBorderToggleButton();
binaryBtn.setAction(binaryAction);
@ -449,19 +437,19 @@ public class PreviewTable extends AbstractInstructionTable {
createCopyNoSpacesAction(owner);
copyNoSpacesAction.setPopupMenuData(
new MenuData(new String[] { "Copy Special", "Selected instructions (no spaces)" },
ResourceManager.loadImage("images/page_white_copy.png"), actionMenuGroup,
Icons.COPY_ICON, actionMenuGroup,
MenuData.NO_MNEMONIC, Integer.toString(1)));
createCopyInstructionAction(owner);
copyInstructionAction.setPopupMenuData(
new MenuData(new String[] { "Copy Special", "Selected Instructions" },
ResourceManager.loadImage("images/page_white_copy.png"), actionMenuGroup,
Icons.COPY_ICON, actionMenuGroup,
MenuData.NO_MNEMONIC, Integer.toString(1)));
createCopyInstructionWithCommentsAction(owner);
copyInstructionWithCommentsAction.setPopupMenuData(
new MenuData(new String[] { "Copy Special", "Selected Instructions (with comments)" },
ResourceManager.loadImage("images/page_white_copy.png"), actionMenuGroup,
Icons.COPY_ICON, actionMenuGroup,
MenuData.NO_MNEMONIC, Integer.toString(1)));
dialog.addAction(copyNoSpacesAction);
@ -488,8 +476,12 @@ public class PreviewTable extends AbstractInstructionTable {
if (comment != null) {
StringBuilder builder = new StringBuilder();
builder.append(val).append("\t").append("// ").append(comment).append(
"\n");
builder.append(val)
.append("\t")
.append("// ")
.append(comment)
.append(
"\n");
val = builder.toString();
}
}

View File

@ -26,18 +26,15 @@ import docking.ActionContext;
import docking.action.DockingAction;
import docking.action.ToolBarData;
import docking.widgets.OptionDialog;
import generic.theme.GIcon;
import ghidra.framework.plugintool.ComponentProviderAdapter;
import ghidra.util.HelpLocation;
import resources.Icons;
import resources.ResourceManager;
import utility.function.Callback;
public class InterpreterComponentProvider extends ComponentProviderAdapter
implements InterpreterConsole {
private static final String CONSOLE_GIF = "images/monitor.png";
private static final String CLEAR_GIF = "images/erase16.png";
private InterpreterPanel panel;
private InterpreterConnection interpreter;
private List<Callback> firstActivationCallbacks;
@ -57,7 +54,7 @@ public class InterpreterComponentProvider extends ComponentProviderAdapter
Icon icon = interpreter.getIcon();
if (icon == null) {
icon = ResourceManager.loadImage(CONSOLE_GIF);
icon = new GIcon("icon.plugin.interpreter.provider");
}
setIcon(icon);
@ -73,7 +70,7 @@ public class InterpreterComponentProvider extends ComponentProviderAdapter
}
};
clearAction.setDescription("Clear Interpreter");
clearAction.setToolBarData(new ToolBarData(ResourceManager.loadImage(CLEAR_GIF), null));
clearAction.setToolBarData(new ToolBarData(Icons.CLEAR_ICON, null));
clearAction.setEnabled(true);
addLocalAction(clearAction);

View File

@ -31,6 +31,7 @@ import ghidra.program.model.listing.Program;
import ghidra.program.util.MarkerLocation;
import ghidra.util.datastruct.Range;
import ghidra.util.datastruct.SortedRangeList;
import resources.Icons;
import resources.ResourceManager;
class PointMarkerSet extends MarkerSetImpl {
@ -61,7 +62,7 @@ class PointMarkerSet extends MarkerSetImpl {
colorBackground,
markerColor, isPreferred);
if (icon == null) {
icon = ResourceManager.loadImage("images/warning.png");
icon = Icons.WARNING_ICON;
}
ImageIcon imageIcon = ResourceManager.getScaledIcon(icon, 16, 16, Image.SCALE_SMOOTH);
image = imageIcon.getImage();

View File

@ -29,6 +29,7 @@ import docking.action.ToolBarData;
import docking.widgets.label.GLabel;
import docking.widgets.table.*;
import docking.widgets.textfield.GValidatedTextField.MaxLengthField;
import generic.theme.GIcon;
import ghidra.app.context.ProgramActionContext;
import ghidra.framework.model.DomainFile;
import ghidra.framework.plugintool.ComponentProviderAdapter;
@ -40,7 +41,6 @@ import ghidra.program.model.mem.MemoryBlockType;
import ghidra.util.HelpLocation;
import ghidra.util.Msg;
import ghidra.util.table.GhidraTable;
import resources.ResourceManager;
/**
* Provider for the memory map Component.
@ -65,16 +65,6 @@ class MemoryMapProvider extends ComponentProviderAdapter {
private MemoryMapPlugin plugin = null;
private final static String ADD_IMAGE = "images/Plus.png";
private final static String MOVE_IMAGE = "images/move.png";
private final static String SPLIT_IMAGE = "images/verticalSplit.png";
private final static String EXPAND_UP_IMAGE = "images/collapse.gif";
private final static String EXPAND_DOWN_IMAGE = "images/expand.gif";
private final static String MERGE_IMAGE = "images/Merge.png";
private final static String DELETE_IMAGE = "images/edit-delete.png";
private final static String IMAGE_BASE = "images/house.png";
final static String MEMORY_IMAGE = "images/memory16.gif";
private Program program;
private MemoryMapManager memManager;
@ -84,7 +74,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
setHelpLocation(new HelpLocation(plugin.getName(), getName()));
memManager = plugin.getMemoryMapManager();
setIcon(ResourceManager.loadImage(MEMORY_IMAGE));
setIcon(new GIcon("icon.plugin.memorymap.provider"));
addToToolbar();
mainPanel = buildMainPanel();
addToTool();
@ -185,7 +175,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
}
private void addLocalActions() {
ImageIcon addImage = ResourceManager.loadImage(ADD_IMAGE);
Icon addImage = new GIcon("icon.plugin.memorymap.add");
addAction = new MemoryMapAction("Add Block", addImage) {
@Override
@ -200,7 +190,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
addAction.setDescription("Add a new block to memory");
tool.addLocalAction(this, addAction);
ImageIcon moveImage = ResourceManager.loadImage(MOVE_IMAGE);
Icon moveImage = new GIcon("icon.plugin.memorymap.move");
moveAction = new MemoryMapAction("Move Block", moveImage) {
@Override
public void actionPerformed(ActionContext context) {
@ -213,7 +203,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
moveAction.setDescription("Move a block to another address");
tool.addLocalAction(this, moveAction);
ImageIcon splitImage = ResourceManager.loadImage(SPLIT_IMAGE);
Icon splitImage = new GIcon("icon.plugin.memorymap.split");
splitAction = new MemoryMapAction("Split Block", splitImage) {
@Override
@ -228,7 +218,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
splitAction.setDescription("Split a block");
tool.addLocalAction(this, splitAction);
ImageIcon expandUpImage = ResourceManager.loadImage(EXPAND_UP_IMAGE);
Icon expandUpImage = new GIcon("icon.plugin.memorymap.expand.up");
expandUpAction = new MemoryMapAction("Expand Block Up", expandUpImage) {
@Override
@ -242,7 +232,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
expandUpAction.setDescription("Expand block by setting new start address");
tool.addLocalAction(this, expandUpAction);
ImageIcon expandDownImage = ResourceManager.loadImage(EXPAND_DOWN_IMAGE);
Icon expandDownImage = new GIcon("icon.plugin.memorymap.expand.down");
expandDownAction = new MemoryMapAction("Expand Block Down", expandDownImage) {
@Override
@ -256,7 +246,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
expandDownAction.setDescription("Expand block by setting new end address");
tool.addLocalAction(this, expandDownAction);
ImageIcon mergeImage = ResourceManager.loadImage(MERGE_IMAGE);
Icon mergeImage = new GIcon("icon.plugin.memorymap.merge");
mergeAction = new MemoryMapAction("Merge Blocks", mergeImage) {
@Override
public void actionPerformed(ActionContext context) {
@ -269,7 +259,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
mergeAction.setDescription("Merge blocks into a single block");
tool.addLocalAction(this, mergeAction);
ImageIcon deleteImage = ResourceManager.loadImage(DELETE_IMAGE);
Icon deleteImage = new GIcon("icon.plugin.memorymap.delete");
deleteAction = new MemoryMapAction("Delete Block", deleteImage) {
@Override
public void actionPerformed(ActionContext context) {
@ -282,7 +272,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
deleteAction.setDescription("Delete a block");
tool.addLocalAction(this, deleteAction);
ImageIcon setBaseIcon = ResourceManager.loadImage(IMAGE_BASE);
Icon setBaseIcon = new GIcon("icon.plugin.memorymap.image.base");
setBaseAction = new MemoryMapAction("Set Image Base", setBaseIcon) {
@Override
public void actionPerformed(ActionContext context) {
@ -687,7 +677,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
}
private abstract class MemoryMapAction extends DockingAction {
MemoryMapAction(String name, ImageIcon icon) {
MemoryMapAction(String name, Icon icon) {
super(name, plugin.getName());
this.setToolBarData(new ToolBarData(icon, null));
}

View File

@ -24,12 +24,13 @@ package ghidra.app.plugin.core.misc;
import java.awt.Color;
import java.io.IOException;
import javax.swing.ImageIcon;
import javax.swing.Icon;
import docking.ActionContext;
import docking.action.DockingAction;
import docking.action.ToolBarData;
import generic.theme.GColor;
import generic.theme.GIcon;
import ghidra.app.CorePluginPackage;
import ghidra.app.plugin.PluginCategoryNames;
import ghidra.app.plugin.ProgramPlugin;
@ -51,7 +52,6 @@ import ghidra.util.task.SwingUpdateManager;
import ghidra.util.task.TaskMonitor;
import ghidra.util.worker.Job;
import ghidra.util.worker.Worker;
import resources.ResourceManager;
/**
* Manages the markers to display areas where changes have occurred
@ -120,7 +120,7 @@ public class MyProgramChangesDisplayPlugin extends ProgramPlugin implements Doma
private void createActions() {
ImageIcon icon = ResourceManager.loadImage("images/vcMerge.png");
Icon icon = new GIcon("icon.plugin.myprogramchanges.merge");
mergeAction = new DockingAction("Update", getName()) {
@Override
public void actionPerformed(ActionContext context) {
@ -137,7 +137,7 @@ public class MyProgramChangesDisplayPlugin extends ProgramPlugin implements Doma
mergeAction.setDescription("Update checked out file with latest version");
mergeAction.setHelpLocation(new HelpLocation("VersionControl", mergeAction.getName()));
icon = ResourceManager.loadImage("images/vcCheckIn.png");
icon = new GIcon("icon.plugin.myprogramchanges.checkin");
checkInAction = new DockingAction("CheckIn", getName()) {
@Override
public void actionPerformed(ActionContext context) {

View File

@ -42,7 +42,7 @@ import resources.*;
public abstract class AbstractNextPreviousAction extends NavigatableContextAction {
private static final Icon INVERTED_OVERLAY_ICON =
ImageUtils.makeTransparent(ResourceManager.loadImage("images/dialog-cancel.png"), .5f);
ImageUtils.makeTransparent(Icons.NOT_ALLOWED_ICON, .5f);
private boolean isForward = true;
private PluginTool tool;

View File

@ -20,6 +20,7 @@ import java.awt.event.KeyEvent;
import docking.DockingUtils;
import docking.action.*;
import docking.tool.ToolConstants;
import generic.theme.GIcon;
import ghidra.app.context.ProgramLocationActionContext;
import ghidra.app.nav.NextRangeAction;
import ghidra.app.plugin.PluginCategoryNames;
@ -27,19 +28,20 @@ import ghidra.app.util.HelpTopics;
import ghidra.framework.plugintool.PluginTool;
import ghidra.program.util.ProgramSelection;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
public class NextHighlightedRangeAction extends NextRangeAction {
private static final GIcon ICON = new GIcon("icon.plugin.navigation.highlight.range.next");
public NextHighlightedRangeAction(PluginTool tool, String owner, NavigationOptions navOptions) {
super(tool, "Next Highlighted Range", owner, navOptions);
setMenuBarData(new MenuData(new String[] { ToolConstants.MENU_NAVIGATION,
"Next Highlight Range" }, ResourceManager.loadImage("images/NextHighlightBlock16.gif"),
"Next Highlight Range" }, ICON,
PluginCategoryNames.NAVIGATION, MenuData.NO_MNEMONIC,
NextPrevHighlightRangePlugin.ACTION_SUB_GROUP));
setToolBarData(new ToolBarData(
ResourceManager.loadImage("images/NextHighlightBlock16.gif"),
ICON,
ToolConstants.TOOLBAR_GROUP_THREE, NextPrevHighlightRangePlugin.ACTION_SUB_GROUP));
setKeyBindingData(
new KeyBindingData(KeyEvent.VK_0, DockingUtils.CONTROL_KEY_MODIFIER_MASK));

View File

@ -21,12 +21,12 @@ import java.util.ArrayList;
import java.util.List;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import docking.ActionContext;
import docking.action.*;
import docking.menu.MultiActionDockingAction;
import docking.tool.ToolConstants;
import generic.theme.GIcon;
import ghidra.app.CorePluginPackage;
import ghidra.app.context.NavigatableActionContext;
import ghidra.app.context.ProgramActionContext;
@ -46,7 +46,6 @@ import ghidra.program.model.listing.*;
import ghidra.program.model.symbol.Symbol;
import ghidra.program.model.symbol.SymbolTable;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
/**
* <CODE>NextPrevAddressPlugin</CODE> allows the user to go back and forth in
@ -65,8 +64,8 @@ import resources.ResourceManager;
public class NextPrevAddressPlugin extends Plugin {
private static final String HISTORY_MENU_GROUP = "1_Menu_History_Group";
private static ImageIcon previousIcon = ResourceManager.loadImage("images/left.png");
private static ImageIcon nextIcon = ResourceManager.loadImage("images/right.png");
private static Icon PREVIOUS_ICON = new GIcon("icon.plugin.navigation.location.previous");
private static Icon NEXT_ICON = new GIcon("icon.plugin.navigation.location.next");
private static final String PREVIOUS_ACTION_NAME = "Previous Location in History";
private static final String NEXT_ACTION_NAME = "Next Location in History";
@ -301,7 +300,7 @@ public class NextPrevAddressPlugin extends Plugin {
super(name, owner);
this.isNext = isNext;
setToolBarData(new ToolBarData(isNext ? nextIcon : previousIcon,
setToolBarData(new ToolBarData(isNext ? NEXT_ICON : PREVIOUS_ICON,
ToolConstants.TOOLBAR_GROUP_TWO));
setHelpLocation(new HelpLocation(HelpTopics.NAVIGATION, name));
int keycode = isNext ? KeyEvent.VK_RIGHT : KeyEvent.VK_LEFT;

View File

@ -23,6 +23,7 @@ import javax.swing.Icon;
import docking.ActionContext;
import docking.action.*;
import docking.tool.ToolConstants;
import generic.theme.GIcon;
import generic.util.image.ImageUtils;
import ghidra.app.CorePluginPackage;
import ghidra.app.context.NavigatableActionContext;
@ -33,7 +34,7 @@ import ghidra.app.util.HelpTopics;
import ghidra.framework.plugintool.*;
import ghidra.framework.plugintool.util.PluginStatus;
import ghidra.util.HelpLocation;
import resources.ResourceManager;
import resources.Icons;
/**
* The NextPrevCodeUnitPlugin generates a GoTo event based on where the cursor
@ -135,9 +136,9 @@ public class NextPrevCodeUnitPlugin extends Plugin {
private class InvertStateAction extends ToggleDockingAction {
private final Icon INVERTED_ICON_OFF = ImageUtils.makeTransparent(
ResourceManager.loadImage("images/dialog-cancel.png"));
Icons.NOT_ALLOWED_ICON);
private final Icon INVERTED_ICON_ON = ImageUtils.makeTransparent(
ResourceManager.loadImage("images/dialog-cancel.png"), .8f);
Icons.NOT_ALLOWED_ICON, .8f);
private boolean isInverted = false;
public InvertStateAction(String subGroup) {
@ -146,10 +147,7 @@ public class NextPrevCodeUnitPlugin extends Plugin {
setToolBarData(new ToolBarData(INVERTED_ICON_OFF,
ToolConstants.TOOLBAR_GROUP_FOUR, subGroup));
// TODO add help entry
setHelpLocation(new HelpLocation(HelpTopics.NAVIGATION, getName()));
// TODO setDescriptoin("...");
setSelected(false);
addToWindowWhen(NavigatableActionContext.class);
@ -169,8 +167,8 @@ public class NextPrevCodeUnitPlugin extends Plugin {
}
private class ToggleDirectionAction extends NavigatableContextAction {
private final Icon FORWARD_ICON = ResourceManager.loadImage("images/down.png");
private final Icon BACKWARD_ICON = ResourceManager.loadImage("images/up.png");
private final Icon FORWARD_ICON = new GIcon("icon.down");
private final Icon BACKWARD_ICON = new GIcon("icon.up");
private boolean isForward = true;
ToggleDirectionAction(String subGroup) {

View File

@ -18,7 +18,8 @@ package ghidra.app.plugin.core.navigation;
import java.awt.event.*;
import java.util.Iterator;
import javax.swing.*;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import docking.ActionContext;
import docking.action.*;
@ -26,6 +27,7 @@ import docking.menu.ActionState;
import docking.menu.MultiStateDockingAction;
import docking.tool.ToolConstants;
import docking.widgets.EventTrigger;
import generic.theme.GIcon;
import generic.util.image.ImageUtils;
import ghidra.app.context.ListingActionContext;
import ghidra.app.context.NavigatableActionContext;
@ -45,26 +47,21 @@ public class NextPreviousBookmarkAction extends MultiStateDockingAction<String>
public static final String ALL_BOOKMARK_TYPES = "All Bookmark Types";
private static final Icon INVERTED_OVERLAY_ICON =
ImageUtils.makeTransparent(ResourceManager.loadImage("images/dialog-cancel.png"), .5f);
ImageUtils.makeTransparent(Icons.NOT_ALLOWED_ICON, .5f);
private PluginTool tool;
private boolean isForward = true;
private boolean isInverted;
private static final Icon BOOKMARK_ICON = ResourceManager.getScaledIcon(
ResourceManager.loadImage("images/B.gif"), 16, 16);
private static final Icon BOOKMARK_ANALYSIS_ICON =
ResourceManager.loadImage("images/applications-system.png");
private static final ImageIcon BOOKMARK_ERROR_ICON =
ResourceManager.loadImage("images/edit-delete.png");
private static final Icon BOOKMARK_INFO_ICON =
ResourceManager.loadImage("images/information.png");
private static final Icon BOOKMARK_NOTE_ICON =
ResourceManager.loadImage("images/notes.gif");
private static final Icon BOOKMARK_WARNING_ICON =
ResourceManager.loadImage("images/warning.png");
private static final Icon BOOKMARK_UNKNOWN_ICON =
ResourceManager.loadImage("images/unknown.gif");
//@formatter:off
private static final Icon BOOKMARK_ICON = new GIcon("icon.plugin.navigation.bookmark");
private static final Icon BOOKMARK_ANALYSIS_ICON = new GIcon("icon.plugin.navigation.bookmark.analysis");
private static final Icon BOOKMARK_ERROR_ICON = new GIcon("icon.plugin.navigation.bookmark.error");
private static final Icon BOOKMARK_INFO_ICON = new GIcon("icon.plugin.navigation.bookmark.info");
private static final Icon BOOKMARK_NOTE_ICON = new GIcon("icon.plugin.navigation.bookmark.note");
private static final Icon BOOKMARK_WARNING_ICON = new GIcon("icon.plugin.navigation.bookmark.warning");
private static final Icon BOOKMARK_UNKNOWN_ICON = new GIcon("icon.plugin.navigation.bookmark.unknown");
//@formatter:on
public NextPreviousBookmarkAction(PluginTool tool, String owner, String subGroup) {
super("Next Bookmark", owner);

View File

@ -21,15 +21,17 @@ import java.awt.event.KeyEvent;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import generic.theme.GIcon;
import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.address.Address;
import ghidra.program.model.listing.*;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class NextPreviousDefinedDataAction extends AbstractNextPreviousAction {
private static final Icon ICON = new GIcon("icon.plugin.navigation.data");
public NextPreviousDefinedDataAction(PluginTool tool, String owner, String subGroup) {
super(tool, "Next Data", owner, subGroup);
}
@ -41,7 +43,7 @@ public class NextPreviousDefinedDataAction extends AbstractNextPreviousAction {
@Override
protected Icon getIcon() {
return ResourceManager.loadImage("images/D.gif");
return ICON;
}
@Override

View File

@ -21,6 +21,7 @@ import java.awt.event.KeyEvent;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import generic.theme.GIcon;
import ghidra.app.nav.Navigatable;
import ghidra.app.services.GoToService;
import ghidra.framework.plugintool.PluginTool;
@ -30,17 +31,18 @@ import ghidra.program.model.listing.*;
import ghidra.program.util.FunctionSignatureFieldLocation;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class NextPreviousFunctionAction extends AbstractNextPreviousAction {
private static final Icon ICON = new GIcon("icon.plugin.navigation.function");
public NextPreviousFunctionAction(PluginTool tool, String owner, String subGroup) {
super(tool, "Next Function", owner, subGroup);
}
@Override
protected Icon getIcon() {
return ResourceManager.loadImage("images/F.gif");
return ICON;
}
@Override

View File

@ -21,22 +21,24 @@ import java.awt.event.KeyEvent;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import generic.theme.GIcon;
import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.address.Address;
import ghidra.program.model.listing.*;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class NextPreviousInstructionAction extends AbstractNextPreviousAction {
private static final Icon ICON = new GIcon("icon.plugin.navigation.instruction");
public NextPreviousInstructionAction(PluginTool tool, String owner, String subGroup) {
super(tool, "Next Instruction", owner, subGroup);
}
@Override
protected Icon getIcon() {
return ResourceManager.loadImage("images/I.gif");
return ICON;
}
@Override

View File

@ -21,6 +21,7 @@ import java.awt.event.KeyEvent;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import generic.theme.GIcon;
import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressIterator;
@ -28,17 +29,18 @@ import ghidra.program.model.listing.*;
import ghidra.program.model.symbol.*;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import resources.ResourceManager;
public class NextPreviousLabelAction extends AbstractNextPreviousAction {
private static final Icon ICON = new GIcon("icon.plugin.navigation.label");
public NextPreviousLabelAction(PluginTool tool, String owner, String subGroup) {
super(tool, "Next Label", owner, subGroup);
}
@Override
protected Icon getIcon() {
return ResourceManager.loadImage("images/L.gif");
return ICON;
}
@Override

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