GP-1981 - Updated help to allow authors to use theme image ids; updated

help to only allow modules that live on the classpath. Dpdating themd
documentation. Fixing gradle help build
This commit is contained in:
ghidragon 2022-10-20 14:09:21 -04:00
parent c86b884daf
commit 45c52e3cb9
105 changed files with 1660 additions and 569 deletions

View file

@ -74,7 +74,6 @@ public class ByteViewerPanel extends JPanel
private ByteViewerComponent currentView;
private Color editColor;
private Color currentCursorColor;
private Color cursorColor;
private Color currentCursorLineColor;
private Color highlightColor;
private int highlightButton;
@ -218,7 +217,6 @@ public class ByteViewerPanel extends JPanel
}
void setCursorColor(Color c) {
cursorColor = c;
for (int i = 0; i < viewList.size(); i++) {
ByteViewerComponent comp = viewList.get(i);
comp.setNonFocusCursorColor(c);
@ -418,7 +416,7 @@ public class ByteViewerPanel extends JPanel
ByteViewerComponent c = newByteViewerComponent(model);
c.setEditColor(editColor);
c.setNonFocusCursorColor(cursorColor);
c.setNonFocusCursorColor(ByteViewerComponentProvider.CURSOR_NOT_FOCUSED_COLOR);
c.setCurrentCursorColor(currentCursorColor);
c.setCurrentCursorLineColor(currentCursorLineColor);
c.setEditMode(editMode);

View file

@ -157,8 +157,6 @@ public class ByteViewerConnectedToolBehaviorTest extends AbstractGhidraHeadedInt
});
assertTrue(action.isSelected());
final ByteViewerComponent c = panelOne.getCurrentComponent();
assertEquals(ByteViewerComponentProvider.CURSOR_NON_ACTIVE_COLOR,
c.getFocusedCursorColor());
runSwing(() -> {
KeyEvent ev = new KeyEvent(c, 0, new Date().getTime(), 0, KeyEvent.VK_1, '1');
c.keyPressed(ev, loc.getIndex(), loc.getFieldNum(), loc.getRow(), loc.getCol(),
@ -168,7 +166,7 @@ public class ByteViewerConnectedToolBehaviorTest extends AbstractGhidraHeadedInt
ByteViewerComponent c2 = panel2.getCurrentComponent();
ByteField f2 = c2.getField(BigInteger.ZERO, 0);
assertEquals(ByteViewerComponentProvider.CURSOR_NON_ACTIVE_COLOR, f2.getForeground());
assertEquals(ByteViewerComponentProvider.CHANGED_VALUE_COLOR, f2.getForeground());
}
@Test
@ -189,8 +187,6 @@ public class ByteViewerConnectedToolBehaviorTest extends AbstractGhidraHeadedInt
});
assertTrue(action.isSelected());
final ByteViewerComponent c = panelOne.getCurrentComponent();
assertEquals(ByteViewerComponentProvider.CURSOR_NON_ACTIVE_COLOR,
c.getFocusedCursorColor());
runSwing(() -> {
KeyEvent ev = new KeyEvent(c, 0, new Date().getTime(), 0, KeyEvent.VK_1, '1');
c.keyPressed(ev, loc.getIndex(), loc.getFieldNum(), loc.getRow(), loc.getCol(),
@ -200,7 +196,7 @@ public class ByteViewerConnectedToolBehaviorTest extends AbstractGhidraHeadedInt
ByteViewerComponent c2 = panel2.getCurrentComponent();
ByteField f2 = c2.getField(BigInteger.ZERO, 0);
assertEquals(ByteViewerComponentProvider.CURSOR_NON_ACTIVE_COLOR, f2.getForeground());
assertEquals(ByteViewerComponentProvider.CHANGED_VALUE_COLOR, f2.getForeground());
undo(program);

View file

@ -1219,7 +1219,7 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
putColor(opt, ByteViewerComponentProvider.CURSOR_ACTIVE_COLOR_OPTION_NAME, Palette.GREEN);
ByteViewerComponent c = panel.getCurrentComponent();
assertEquals(Palette.GREEN, c.getFocusedCursorColor());
assertColorsEqual(Palette.GREEN, c.getFocusedCursorColor());
}
@Test
@ -1236,11 +1236,11 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
Options opt = tool.getOptions("ByteViewer");
// change the color for Current View Cursor Color
putColor(opt, ByteViewerComponentProvider.CURSOR_NON_ACTIVE_COLOR_OPTION_NAME,
putColor(opt, ByteViewerComponentProvider.CURSOR_NOT_FOCUSED_COLOR_OPTION_NAME,
Palette.GREEN);
ByteViewerComponent c = findComponent(panel, "Octal");
assertEquals(Palette.GREEN, c.getNonFocusCursorColor());
assertColorsEqual(Palette.GREEN, c.getNonFocusCursorColor());
}
@Test
@ -1260,7 +1260,7 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
Palette.CYAN);
ByteViewerComponent c = findComponent(panel, "Octal");
assertEquals(Palette.CYAN, c.getNonFocusCursorColor());
assertColorsEqual(Palette.CYAN, c.getNonFocusCursorColor());
}
private void putFont(final Options options, final String optionName, final Font font) {
@ -1305,7 +1305,7 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
program.flushEvents();
ByteViewerComponent c = panel.getCurrentComponent();
ByteField field = c.getField(loc.getIndex(), loc.getFieldNum());
assertEquals(Palette.GREEN, field.getForeground());
assertColorsEqual(Palette.GREEN, field.getForeground());
}
@Test
@ -1348,7 +1348,7 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
ByteViewerComponent c = panel.getCurrentComponent();
FieldLocation loc = getFieldLocation(getAddr(0x0f001000));
ByteField field = c.getField(loc.getIndex().subtract(BigInteger.ONE), 0);
assertEquals(Palette.GREEN, field.getForeground());
assertColorsEqual(Palette.GREEN, field.getForeground());
}
@Test

View file

@ -436,7 +436,7 @@ public class ByteViewerPluginFormatsTest extends AbstractGhidraHeadedIntegration
intComp.setCursorPosition(l.getIndex(), l.getFieldNum(), 0, 0);
});
// color should indicate the edit
assertEquals(ByteViewerComponentProvider.CURSOR_NON_ACTIVE_COLOR,
assertEquals(ByteViewerComponentProvider.CHANGED_VALUE_COLOR,
((ByteField) intComp.getCurrentField()).getForeground());
}