GP-2910 - Fixed missing theme definitions; removed unused theme

definitions; fixed module theme dependencies
This commit is contained in:
dragonmacher
2022-12-14 17:53:29 -05:00
parent 1a99e2518d
commit 63d6063fa0
31 changed files with 178 additions and 139 deletions

View File

@@ -189,7 +189,7 @@ public class SampleTableProvider extends ComponentProviderAdapter implements Opt
return SwingUtilities.isDescendingFrom((Component) sourceObject, filterTable);
}
};
icon = new GIcon("icons.sample.plugin.action.save");
icon = new GIcon("icon.sample.plugin.action.save");
saveTableDataAction.setToolBarData(new ToolBarData(icon));
saveTableDataAction.setPopupMenuData(new MenuData(new String[] { "Save Data" }));

View File

@@ -4,8 +4,8 @@ icon.sample.provider.graph = color_swatch.png
icon.sample.provider.hello.world = information.png
icon.sample.action.hello.world = information.png
icon.sample.kitchen.sink.action.hellow.world = left.png
icon.sample.kitchen.sink.action.hellow.program = right.png
icon.sample.kitchen.sink.action.hello.world = left.png
icon.sample.kitchen.sink.action.hello.program = right.png
icon.sample.action.show.graph = applications-development.png

View File

@@ -15,12 +15,12 @@
*/
package ghidra.examples;
import java.awt.Event;
import java.awt.event.KeyEvent;
import javax.swing.*;
import docking.ActionContext;
import docking.DockingUtils;
import docking.action.*;
import generic.theme.GIcon;
import ghidra.app.ExamplesPluginPackage;
@@ -73,11 +73,7 @@ public class KitchenSinkPlugin extends ProgramPlugin {
private void setupServices() {
registerServiceProvided(HelloWorldService.class,
new HelloWorldService() {
public void sayHello() {
announce("Hello");
}
});
(HelloWorldService) () -> announce("Hello"));
}
private void setupActions() {
@@ -95,7 +91,8 @@ public class KitchenSinkPlugin extends ProgramPlugin {
new MenuData(new String[] { "Misc", "Hello World" }, prevImage, helloGroup));
action.setPopupMenuData(
new MenuData(new String[] { "Hello World" }, prevImage, helloGroup));
action.setKeyBindingData(new KeyBindingData(KeyStroke.getKeyStroke('H', Event.CTRL_MASK)));
action.setKeyBindingData(new KeyBindingData(
KeyStroke.getKeyStroke('H', DockingUtils.CONTROL_KEY_MODIFIER_MASK)));
action.setToolBarData(new ToolBarData(prevImage, helloGroup));
action.setDescription("Hello World");
action.setHelpLocation(new HelpLocation("SampleHelpTopic", "KS_Hello_World"));
@@ -114,7 +111,8 @@ public class KitchenSinkPlugin extends ProgramPlugin {
action.setMenuBarData(
new MenuData(new String[] { "Misc", "Hello Program" }, nextImage, helloGroup));
action.setKeyBindingData(
new KeyBindingData(KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.CTRL_MASK)));
new KeyBindingData(
KeyStroke.getKeyStroke(KeyEvent.VK_P, DockingUtils.CONTROL_KEY_MODIFIER_MASK)));
action.setToolBarData(new ToolBarData(nextImage, helloGroup));
action.setDescription("Hello Program");
action.setHelpLocation(new HelpLocation("SampleHelpTopic", "KS_Hello_Program"));