mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-1981 Theme help and module conversions
This commit is contained in:
parent
4eb3d8fd86
commit
9a0d7892da
120 changed files with 1540 additions and 2846 deletions
|
@ -46,6 +46,7 @@ public class GHelpBroker extends DefaultHelpBroker {
|
|||
|
||||
protected JEditorPane htmlEditorPane;
|
||||
private Window activationWindow;
|
||||
private boolean initialized;
|
||||
|
||||
/**
|
||||
* Construct a new GhidraHelpBroker.
|
||||
|
@ -89,6 +90,22 @@ public class GHelpBroker extends DefaultHelpBroker {
|
|||
}
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
clearHighlights();
|
||||
initialized = false;
|
||||
if (isDisplayed()) {
|
||||
setDisplayed(false);
|
||||
setDisplayed(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearHighlights() {
|
||||
TextHelpModel helpModel = (TextHelpModel) getCustomHelpModel();
|
||||
if (helpModel != null) {
|
||||
helpModel.removeAllHighlights();
|
||||
}
|
||||
}
|
||||
|
||||
protected void showNavigationAid(URL url) {
|
||||
// this base class does not have a navigation aid
|
||||
}
|
||||
|
@ -134,7 +151,7 @@ public class GHelpBroker extends DefaultHelpBroker {
|
|||
}
|
||||
|
||||
private void initializeScreenDevice() {
|
||||
if (isInitialized()) {
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -179,20 +196,21 @@ public class GHelpBroker extends DefaultHelpBroker {
|
|||
initializeUIComponents(contentPane);
|
||||
}
|
||||
|
||||
private boolean isInitialized() {
|
||||
return htmlEditorPane != null;
|
||||
}
|
||||
|
||||
private void initializeUIComponents(Container contentPane) {
|
||||
|
||||
if (isInitialized()) {
|
||||
if (initialized) {
|
||||
return;// already initialized
|
||||
}
|
||||
|
||||
Component[] components = contentPane.getComponents();
|
||||
JHelp jHelp = (JHelp) components[0];
|
||||
addCustomToolbarItems(jHelp);
|
||||
JHelpContentViewer contentViewer = jHelp.getContentViewer();
|
||||
JEditorPane activeHtmlPane = getHTMLEditorPane(contentViewer);
|
||||
if (activeHtmlPane == htmlEditorPane && initialized) {
|
||||
return; // already initialized
|
||||
}
|
||||
|
||||
addCustomToolbarItems(jHelp);
|
||||
htmlEditorPane = getHTMLEditorPane(contentViewer);
|
||||
|
||||
// just creating the search wires everything together
|
||||
|
@ -203,6 +221,7 @@ public class GHelpBroker extends DefaultHelpBroker {
|
|||
}
|
||||
|
||||
installActions(jHelp);
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
protected void installHelpSearcher(JHelp jHelp, HelpModel helpModel) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue