Updated module system so Help no longer depends on Docking. Docking can now have help content.
|
@ -22,8 +22,6 @@ import java.util.Hashtable;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import generic.util.WindowUtilities;
|
import generic.util.WindowUtilities;
|
||||||
import ghidra.framework.data.DomainObjectMergeManager;
|
import ghidra.framework.data.DomainObjectMergeManager;
|
||||||
import ghidra.framework.model.DomainFile;
|
import ghidra.framework.model.DomainFile;
|
||||||
|
@ -35,6 +33,8 @@ import ghidra.program.model.listing.DomainObjectChangeSet;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
import ghidra.util.exception.CancelledException;
|
import ghidra.util.exception.CancelledException;
|
||||||
import ghidra.util.task.*;
|
import ghidra.util.task.*;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Top level object that manages each step of the merge/resolve conflicts
|
* Top level object that manages each step of the merge/resolve conflicts
|
||||||
|
|
|
@ -19,8 +19,6 @@ import java.awt.*;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import generic.util.WindowUtilities;
|
import generic.util.WindowUtilities;
|
||||||
import ghidra.app.merge.datatypes.DataTypeMergeManager;
|
import ghidra.app.merge.datatypes.DataTypeMergeManager;
|
||||||
import ghidra.app.merge.listing.*;
|
import ghidra.app.merge.listing.*;
|
||||||
|
@ -43,6 +41,8 @@ import ghidra.program.model.listing.ProgramChangeSet;
|
||||||
import ghidra.program.util.ProgramLocation;
|
import ghidra.program.util.ProgramLocation;
|
||||||
import ghidra.program.util.ProgramSelection;
|
import ghidra.program.util.ProgramSelection;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Top level object that manages each step of the merge/resolve conflicts
|
* Top level object that manages each step of the merge/resolve conflicts
|
||||||
|
|
|
@ -32,8 +32,6 @@ import javax.swing.table.TableColumn;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.options.editor.GenericOptionsComponent;
|
import docking.options.editor.GenericOptionsComponent;
|
||||||
import docking.widgets.OptionDialog;
|
import docking.widgets.OptionDialog;
|
||||||
import docking.widgets.combobox.GhidraComboBox;
|
import docking.widgets.combobox.GhidraComboBox;
|
||||||
|
@ -51,6 +49,8 @@ import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
import ghidra.util.layout.VerticalLayout;
|
import ghidra.util.layout.VerticalLayout;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import utilities.util.FileUtilities;
|
import utilities.util.FileUtilities;
|
||||||
|
|
||||||
class AnalysisPanel extends JPanel implements PropertyChangeListener {
|
class AnalysisPanel extends JPanel implements PropertyChangeListener {
|
||||||
|
|
|
@ -35,8 +35,6 @@ import javax.swing.text.JTextComponent;
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.actions.KeyBindingUtils;
|
import docking.actions.KeyBindingUtils;
|
||||||
import docking.dnd.*;
|
import docking.dnd.*;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.DropDownSelectionTextField;
|
import docking.widgets.DropDownSelectionTextField;
|
||||||
import docking.widgets.OptionDialog;
|
import docking.widgets.OptionDialog;
|
||||||
import docking.widgets.fieldpanel.support.FieldRange;
|
import docking.widgets.fieldpanel.support.FieldRange;
|
||||||
|
@ -58,6 +56,8 @@ import ghidra.util.*;
|
||||||
import ghidra.util.data.DataTypeParser.AllowedDataTypes;
|
import ghidra.util.data.DataTypeParser.AllowedDataTypes;
|
||||||
import ghidra.util.exception.UsrException;
|
import ghidra.util.exception.UsrException;
|
||||||
import ghidra.util.layout.VerticalLayout;
|
import ghidra.util.layout.VerticalLayout;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Panel for editing a composite data type. Specific composite data type editors
|
* Panel for editing a composite data type. Specific composite data type editors
|
||||||
|
|
|
@ -29,8 +29,6 @@ import javax.swing.event.ChangeListener;
|
||||||
import docking.ActionContext;
|
import docking.ActionContext;
|
||||||
import docking.ComponentProvider;
|
import docking.ComponentProvider;
|
||||||
import docking.action.*;
|
import docking.action.*;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
|
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
|
||||||
import docking.widgets.tabbedpane.DockingTabRenderer;
|
import docking.widgets.tabbedpane.DockingTabRenderer;
|
||||||
import ghidra.app.util.viewer.listingpanel.ListingCodeComparisonPanel;
|
import ghidra.app.util.viewer.listingpanel.ListingCodeComparisonPanel;
|
||||||
|
@ -44,6 +42,8 @@ import ghidra.program.model.listing.*;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.classfinder.ClassSearcher;
|
import ghidra.util.classfinder.ClassSearcher;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,13 +23,13 @@ import java.util.Set;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
|
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
|
||||||
import ghidra.app.services.FunctionComparisonModel;
|
import ghidra.app.services.FunctionComparisonModel;
|
||||||
import ghidra.app.util.viewer.util.CodeComparisonPanel;
|
import ghidra.app.util.viewer.util.CodeComparisonPanel;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.program.model.listing.Function;
|
import ghidra.program.model.listing.Function;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extends the basic {@link FunctionComparisonPanel one-to-one comparison panel}
|
* Extends the basic {@link FunctionComparisonPanel one-to-one comparison panel}
|
||||||
|
|
|
@ -25,7 +25,6 @@ import java.util.List;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
import docking.action.DockingActionIf;
|
import docking.action.DockingActionIf;
|
||||||
import docking.help.Help;
|
|
||||||
import ghidra.app.nav.Navigatable;
|
import ghidra.app.nav.Navigatable;
|
||||||
import ghidra.app.services.GoToService;
|
import ghidra.app.services.GoToService;
|
||||||
import ghidra.app.util.viewer.listingpanel.OverviewProvider;
|
import ghidra.app.util.viewer.listingpanel.OverviewProvider;
|
||||||
|
@ -34,6 +33,7 @@ import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.program.model.address.Address;
|
import ghidra.program.model.address.Address;
|
||||||
import ghidra.program.model.listing.Program;
|
import ghidra.program.model.listing.Program;
|
||||||
import ghidra.util.task.SwingUpdateManager;
|
import ghidra.util.task.SwingUpdateManager;
|
||||||
|
import help.Help;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overview bar component. Uses color to indicate various address based properties for a program.
|
* Overview bar component. Uses color to indicate various address based properties for a program.
|
||||||
|
|
|
@ -23,7 +23,6 @@ import javax.swing.border.TitledBorder;
|
||||||
|
|
||||||
import docking.DialogComponentProvider;
|
import docking.DialogComponentProvider;
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.button.GRadioButton;
|
import docking.widgets.button.GRadioButton;
|
||||||
import docking.widgets.label.GLabel;
|
import docking.widgets.label.GLabel;
|
||||||
import docking.widgets.textfield.IntegerTextField;
|
import docking.widgets.textfield.IntegerTextField;
|
||||||
|
@ -31,6 +30,7 @@ import ghidra.app.plugin.core.scalartable.RangeFilterTextField.FilterType;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.program.util.ProgramSelection;
|
import ghidra.program.util.ProgramSelection;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialog allowing the user to set parameters when initiating a scalar search on a program.
|
* Dialog allowing the user to set parameters when initiating a scalar search on a program.
|
||||||
|
|
|
@ -23,7 +23,6 @@ import javax.swing.*;
|
||||||
import javax.swing.border.Border;
|
import javax.swing.border.Border;
|
||||||
|
|
||||||
import docking.*;
|
import docking.*;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.label.GLabel;
|
import docking.widgets.label.GLabel;
|
||||||
import docking.widgets.table.GTableFilterPanel;
|
import docking.widgets.table.GTableFilterPanel;
|
||||||
import docking.widgets.table.TableFilter;
|
import docking.widgets.table.TableFilter;
|
||||||
|
@ -38,6 +37,7 @@ import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.table.*;
|
import ghidra.util.table.*;
|
||||||
import ghidra.util.table.actions.DeleteTableRowAction;
|
import ghidra.util.table.actions.DeleteTableRowAction;
|
||||||
import ghidra.util.table.actions.MakeProgramSelectionAction;
|
import ghidra.util.table.actions.MakeProgramSelectionAction;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,8 +19,6 @@ import java.awt.Font;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import ghidra.app.DeveloperPluginPackage;
|
import ghidra.app.DeveloperPluginPackage;
|
||||||
import ghidra.app.events.ProgramActivatedPluginEvent;
|
import ghidra.app.events.ProgramActivatedPluginEvent;
|
||||||
import ghidra.app.plugin.PluginCategoryNames;
|
import ghidra.app.plugin.PluginCategoryNames;
|
||||||
|
@ -30,6 +28,8 @@ import ghidra.framework.plugintool.util.PluginStatus;
|
||||||
import ghidra.program.model.listing.Program;
|
import ghidra.program.model.listing.Program;
|
||||||
import ghidra.program.util.*;
|
import ghidra.program.util.*;
|
||||||
import ghidra.util.datastruct.IntObjectHashtable;
|
import ghidra.util.datastruct.IntObjectHashtable;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debug Plugin to show domain object change events.
|
* Debug Plugin to show domain object change events.
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
*/
|
*/
|
||||||
package ghidra.app.plugin.debug;
|
package ghidra.app.plugin.debug;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import ghidra.app.DeveloperPluginPackage;
|
import ghidra.app.DeveloperPluginPackage;
|
||||||
import ghidra.app.plugin.PluginCategoryNames;
|
import ghidra.app.plugin.PluginCategoryNames;
|
||||||
import ghidra.framework.plugintool.*;
|
import ghidra.framework.plugintool.*;
|
||||||
import ghidra.framework.plugintool.util.PluginStatus;
|
import ghidra.framework.plugintool.util.PluginStatus;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin to demonstrate handling of Program within a plugin and how to
|
* Plugin to demonstrate handling of Program within a plugin and how to
|
||||||
|
|
|
@ -37,6 +37,8 @@ import ghidra.framework.plugintool.util.PluginStatus;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.task.*;
|
import ghidra.util.task.*;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a file of all components and actions in the
|
* Generate a file of all components and actions in the
|
||||||
|
|
|
@ -25,13 +25,13 @@ import javax.swing.event.ChangeEvent;
|
||||||
import javax.swing.event.ChangeListener;
|
import javax.swing.event.ChangeListener;
|
||||||
|
|
||||||
import docking.action.DockingActionIf;
|
import docking.action.DockingActionIf;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.fieldpanel.FieldPanel;
|
import docking.widgets.fieldpanel.FieldPanel;
|
||||||
import docking.widgets.indexedscrollpane.IndexedScrollPane;
|
import docking.widgets.indexedscrollpane.IndexedScrollPane;
|
||||||
import ghidra.app.util.viewer.field.FieldFactory;
|
import ghidra.app.util.viewer.field.FieldFactory;
|
||||||
import ghidra.app.util.viewer.format.actions.*;
|
import ghidra.app.util.viewer.format.actions.*;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage the tabbed panel for field formats.
|
* Class to manage the tabbed panel for field formats.
|
||||||
|
|
|
@ -21,11 +21,11 @@ import java.awt.event.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.border.Border;
|
import javax.swing.border.Border;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.label.GDLabel;
|
import docking.widgets.label.GDLabel;
|
||||||
import ghidra.app.util.viewer.field.FieldFactory;
|
import ghidra.app.util.viewer.field.FieldFactory;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class manage a header for the FieldViewer.
|
* Class manage a header for the FieldViewer.
|
||||||
|
|
|
@ -26,8 +26,6 @@ import javax.swing.event.ChangeListener;
|
||||||
|
|
||||||
import docking.*;
|
import docking.*;
|
||||||
import docking.action.*;
|
import docking.action.*;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.menu.ActionState;
|
import docking.menu.ActionState;
|
||||||
import docking.menu.MultiStateDockingAction;
|
import docking.menu.MultiStateDockingAction;
|
||||||
import docking.widgets.EventTrigger;
|
import docking.widgets.EventTrigger;
|
||||||
|
@ -61,6 +59,8 @@ import ghidra.program.util.*;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
import ghidra.util.exception.CancelledException;
|
import ghidra.util.exception.CancelledException;
|
||||||
import ghidra.util.task.TaskMonitor;
|
import ghidra.util.task.TaskMonitor;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.Icons;
|
import resources.Icons;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ import docking.help.*;
|
||||||
import generic.jar.ResourceFile;
|
import generic.jar.ResourceFile;
|
||||||
import ghidra.framework.Application;
|
import ghidra.framework.Application;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,8 +23,6 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.junit.*;
|
import org.junit.*;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.fieldpanel.field.*;
|
import docking.widgets.fieldpanel.field.*;
|
||||||
import generic.test.TestUtils;
|
import generic.test.TestUtils;
|
||||||
import ghidra.GhidraOptions;
|
import ghidra.GhidraOptions;
|
||||||
|
@ -50,6 +48,8 @@ import ghidra.program.util.BytesFieldLocation;
|
||||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||||
import ghidra.test.TestEnv;
|
import ghidra.test.TestEnv;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import util.CollectionUtils;
|
import util.CollectionUtils;
|
||||||
|
|
||||||
public class CodeBrowserOptionsTest extends AbstractGhidraHeadedIntegrationTest {
|
public class CodeBrowserOptionsTest extends AbstractGhidraHeadedIntegrationTest {
|
||||||
|
|
|
@ -23,8 +23,6 @@ import java.math.BigInteger;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
import docking.DockingUtils;
|
import docking.DockingUtils;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.EventTrigger;
|
import docking.widgets.EventTrigger;
|
||||||
import docking.widgets.fieldpanel.FieldPanel;
|
import docking.widgets.fieldpanel.FieldPanel;
|
||||||
import docking.widgets.fieldpanel.Layout;
|
import docking.widgets.fieldpanel.Layout;
|
||||||
|
@ -34,6 +32,8 @@ import docking.widgets.fieldpanel.support.*;
|
||||||
import ghidra.app.plugin.core.format.*;
|
import ghidra.app.plugin.core.format.*;
|
||||||
import ghidra.program.model.address.*;
|
import ghidra.program.model.address.*;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FieldViewer to show data formatted according to the DataFormatModel that is passed in to the
|
* FieldViewer to show data formatted according to the DataFormatModel that is passed in to the
|
||||||
|
|
|
@ -23,8 +23,6 @@ import java.util.List;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.event.*;
|
import javax.swing.event.*;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.fieldpanel.*;
|
import docking.widgets.fieldpanel.*;
|
||||||
import docking.widgets.fieldpanel.field.EmptyTextField;
|
import docking.widgets.fieldpanel.field.EmptyTextField;
|
||||||
import docking.widgets.fieldpanel.field.Field;
|
import docking.widgets.fieldpanel.field.Field;
|
||||||
|
@ -42,6 +40,8 @@ import ghidra.util.Msg;
|
||||||
import ghidra.util.exception.InvalidInputException;
|
import ghidra.util.exception.InvalidInputException;
|
||||||
import ghidra.util.layout.HorizontalLayout;
|
import ghidra.util.layout.HorizontalLayout;
|
||||||
import ghidra.util.layout.PairLayout;
|
import ghidra.util.layout.PairLayout;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Top level component that contains has a scrolled pane for the panel of components that show the
|
* Top level component that contains has a scrolled pane for the panel of components that show the
|
||||||
|
|
|
@ -26,8 +26,6 @@ import javax.swing.text.*;
|
||||||
import javax.swing.tree.TreeSelectionModel;
|
import javax.swing.tree.TreeSelectionModel;
|
||||||
|
|
||||||
import docking.DockingUtils;
|
import docking.DockingUtils;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.EventTrigger;
|
import docking.widgets.EventTrigger;
|
||||||
import docking.widgets.OptionDialog;
|
import docking.widgets.OptionDialog;
|
||||||
import docking.widgets.fieldpanel.FieldPanel;
|
import docking.widgets.fieldpanel.FieldPanel;
|
||||||
|
@ -62,6 +60,8 @@ import ghidra.util.*;
|
||||||
import ghidra.util.exception.CancelledException;
|
import ghidra.util.exception.CancelledException;
|
||||||
import ghidra.util.exception.VersionException;
|
import ghidra.util.exception.VersionException;
|
||||||
import ghidra.util.task.*;
|
import ghidra.util.task.*;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,12 +21,12 @@ import javax.swing.Icon;
|
||||||
|
|
||||||
import docking.ActionContext;
|
import docking.ActionContext;
|
||||||
import docking.action.*;
|
import docking.action.*;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.tool.ToolConstants;
|
import docking.tool.ToolConstants;
|
||||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
public class HelpAction extends DockingAction {
|
public class HelpAction extends DockingAction {
|
||||||
|
|
|
@ -22,8 +22,6 @@ import java.util.Set;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
import docking.action.DockingActionIf;
|
import docking.action.DockingActionIf;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.tool.ToolConstants;
|
import docking.tool.ToolConstants;
|
||||||
import docking.wizard.WizardManager;
|
import docking.wizard.WizardManager;
|
||||||
import ghidra.GhidraOptions;
|
import ghidra.GhidraOptions;
|
||||||
|
@ -48,6 +46,8 @@ import ghidra.program.model.address.AddressSetView;
|
||||||
import ghidra.program.model.listing.Program;
|
import ghidra.program.model.listing.Program;
|
||||||
import ghidra.program.util.ProgramLocation;
|
import ghidra.program.util.ProgramLocation;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.MultiIcon;
|
import resources.MultiIcon;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
import resources.icons.*;
|
import resources.icons.*;
|
||||||
|
|
|
@ -31,7 +31,6 @@ import javax.swing.table.*;
|
||||||
import docking.*;
|
import docking.*;
|
||||||
import docking.action.*;
|
import docking.action.*;
|
||||||
import docking.actions.PopupActionProvider;
|
import docking.actions.PopupActionProvider;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.EventTrigger;
|
import docking.widgets.EventTrigger;
|
||||||
import docking.widgets.fieldpanel.FieldPanel;
|
import docking.widgets.fieldpanel.FieldPanel;
|
||||||
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
|
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
|
||||||
|
@ -63,6 +62,7 @@ import ghidra.program.util.ProgramLocation;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.table.GhidraTable;
|
import ghidra.util.table.GhidraTable;
|
||||||
import ghidra.util.table.GhidraThreadedTablePanel;
|
import ghidra.util.table.GhidraThreadedTablePanel;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -27,7 +27,6 @@ import javax.swing.*;
|
||||||
import javax.swing.border.TitledBorder;
|
import javax.swing.border.TitledBorder;
|
||||||
|
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.button.GRadioButton;
|
import docking.widgets.button.GRadioButton;
|
||||||
import docking.widgets.checkbox.GCheckBox;
|
import docking.widgets.checkbox.GCheckBox;
|
||||||
import docking.widgets.combobox.GComboBox;
|
import docking.widgets.combobox.GComboBox;
|
||||||
|
@ -42,6 +41,7 @@ import ghidra.framework.options.*;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.exception.InvalidInputException;
|
import ghidra.util.exception.InvalidInputException;
|
||||||
import ghidra.util.layout.*;
|
import ghidra.util.layout.*;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ApplyMarkupPropertyEditor provides a custom GUI layout for the options that are used when
|
* The ApplyMarkupPropertyEditor provides a custom GUI layout for the options that are used when
|
||||||
|
|
|
@ -30,7 +30,6 @@ import javax.swing.event.ListSelectionListener;
|
||||||
import javax.swing.table.*;
|
import javax.swing.table.*;
|
||||||
|
|
||||||
import docking.*;
|
import docking.*;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.table.*;
|
import docking.widgets.table.*;
|
||||||
import docking.widgets.table.threaded.ThreadedTableModel;
|
import docking.widgets.table.threaded.ThreadedTableModel;
|
||||||
import ghidra.feature.vt.api.impl.VTChangeManager;
|
import ghidra.feature.vt.api.impl.VTChangeManager;
|
||||||
|
@ -54,6 +53,7 @@ import ghidra.util.layout.HorizontalLayout;
|
||||||
import ghidra.util.table.GhidraTable;
|
import ghidra.util.table.GhidraTable;
|
||||||
import ghidra.util.table.GhidraThreadedTablePanel;
|
import ghidra.util.table.GhidraThreadedTablePanel;
|
||||||
import ghidra.util.task.SwingUpdateManager;
|
import ghidra.util.task.SwingUpdateManager;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
public class VTMatchTableProvider extends ComponentProviderAdapter
|
public class VTMatchTableProvider extends ComponentProviderAdapter
|
||||||
implements FilterDialogModel<VTMatch>, VTControllerListener {
|
implements FilterDialogModel<VTMatch>, VTControllerListener {
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
*/
|
*/
|
||||||
apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
|
apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
|
||||||
apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
|
apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
|
||||||
|
apply from: "$rootProject.projectDir/gradle/helpProject.gradle"
|
||||||
apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
|
apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
|
||||||
apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
|
apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
|
||||||
apply from: "$rootProject.projectDir/gradle/javadoc.gradle"
|
apply from: "$rootProject.projectDir/gradle/javadoc.gradle"
|
||||||
|
@ -24,11 +25,7 @@ eclipse.project.name = 'Framework Docking'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':Generic')
|
api project(':Generic')
|
||||||
api 'net.java.dev.timingframework:timingframework:1.0'
|
api project(':Help')
|
||||||
|
|
||||||
// Only include this debug version of the jh library if necessary.
|
|
||||||
//api name:'jh2.with.debug'
|
|
||||||
api 'javax.help:javahelp:2.0.05'
|
|
||||||
|
|
||||||
|
|
||||||
// include code from src/test in Generic
|
// include code from src/test in Generic
|
||||||
|
|
|
@ -10,6 +10,18 @@
|
||||||
##MODULE IP: Tango Icons - Public Domain
|
##MODULE IP: Tango Icons - Public Domain
|
||||||
Module.manifest||GHIDRA||||END|
|
Module.manifest||GHIDRA||||END|
|
||||||
data/ExtensionPoint.manifest||GHIDRA||||END|
|
data/ExtensionPoint.manifest||GHIDRA||||END|
|
||||||
|
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
|
||||||
|
src/main/help/help/shared/arrow.gif||GHIDRA||||END|
|
||||||
|
src/main/help/help/shared/close16.gif||GHIDRA||||END|
|
||||||
|
src/main/help/help/shared/menu16.gif||GHIDRA||||END|
|
||||||
|
src/main/help/help/shared/note-red.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
|
||||||
|
src/main/help/help/shared/note.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
|
||||||
|
src/main/help/help/shared/note.yellow.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
|
||||||
|
src/main/help/help/shared/redo.png||GHIDRA||||END|
|
||||||
|
src/main/help/help/shared/tip.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
|
||||||
|
src/main/help/help/shared/undo.png||GHIDRA||||END|
|
||||||
|
src/main/help/help/shared/warning.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
|
||||||
|
src/main/help/help/topics/PlacheholderTopic/Placeholder.htm||GHIDRA||||END|
|
||||||
src/main/java/docking/dnd/package.html||GHIDRA||reviewed||END|
|
src/main/java/docking/dnd/package.html||GHIDRA||reviewed||END|
|
||||||
src/main/java/docking/options/editor/package.html||GHIDRA||reviewed||END|
|
src/main/java/docking/options/editor/package.html||GHIDRA||reviewed||END|
|
||||||
src/main/java/docking/widgets/fieldpanel/package.html||GHIDRA||reviewed||END|
|
src/main/java/docking/widgets/fieldpanel/package.html||GHIDRA||reviewed||END|
|
||||||
|
|
54
Ghidra/Framework/Docking/src/main/help/help/TOC_Source.xml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<?xml version='1.0' encoding='ISO-8859-1' ?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This is an XML file intended to be parsed by the Ghidra help system. It is loosely based
|
||||||
|
upon the JavaHelp table of contents document format. The Ghidra help system uses a
|
||||||
|
TOC_Source.xml file to allow a module with help to define how its contents appear in the
|
||||||
|
Ghidra help viewer's table of contents. The main document (in the Base module)
|
||||||
|
defines a basic structure for the
|
||||||
|
Ghidra table of contents system. Other TOC_Source.xml files may use this structure to insert
|
||||||
|
their files directly into this structure (and optionally define a substructure).
|
||||||
|
|
||||||
|
|
||||||
|
In this document, a tag can be either a <tocdef> or a <tocref>. The former is a definition
|
||||||
|
of an XML item that may have a link and may contain other <tocdef> and <tocref> children.
|
||||||
|
<tocdef> items may be referred to in other documents by using a <tocref> tag with the
|
||||||
|
appropriate id attribute value. Using these two tags allows any module to define a place
|
||||||
|
in the table of contents system (<tocdef>), which also provides a place for
|
||||||
|
other TOC_Source.xml files to insert content (<tocref>).
|
||||||
|
|
||||||
|
During the help build time, all TOC_Source.xml files will be parsed and validated to ensure
|
||||||
|
that all <tocref> tags point to valid <tocdef> tags. From these files will be generated
|
||||||
|
<module name>_TOC.xml files, which are table of contents files written in the format
|
||||||
|
desired by the JavaHelp system. Additionally, the genated files will be merged together
|
||||||
|
as they are loaded by the JavaHelp system. In the end, when displaying help in the Ghidra
|
||||||
|
help GUI, there will be on table of contents that has been created from the definitions in
|
||||||
|
all of the modules' TOC_Source.xml files.
|
||||||
|
|
||||||
|
|
||||||
|
Tags and Attributes
|
||||||
|
|
||||||
|
<tocdef>
|
||||||
|
-id - the name of the definition (this must be unique across all TOC_Source.xml files)
|
||||||
|
-text - the display text of the node, as seen in the help GUI
|
||||||
|
-target** - the file to display when the node is clicked in the GUI
|
||||||
|
-sortgroup - this is a string that defines where a given node should appear under a given
|
||||||
|
parent. The string values will be sorted by the JavaHelp system using
|
||||||
|
a javax.text.RulesBasedCollator. If this attribute is not specified, then
|
||||||
|
the text of attribute will be used.
|
||||||
|
|
||||||
|
<tocref>
|
||||||
|
-id - The id of the <tocdef> that this reference points to
|
||||||
|
|
||||||
|
**The URL for the target is relative and should start with 'help/topics'. This text is
|
||||||
|
used by the Ghidra help system to provide a universal starting point for all links so that
|
||||||
|
they can be resolved at runtime, across modules.
|
||||||
|
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<tocroot>
|
||||||
|
|
||||||
|
|
||||||
|
</tocroot>
|
|
@ -0,0 +1,64 @@
|
||||||
|
/* ###
|
||||||
|
* IP: GHIDRA
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
WARNING!
|
||||||
|
This file is copied to all help directories. If you change this file, you must copy it
|
||||||
|
to each src/main/help/help/shared directory.
|
||||||
|
|
||||||
|
|
||||||
|
Java Help Note: JavaHelp does not accept sizes (like in 'margin-top') in anything but
|
||||||
|
px (pixel) or with no type marking.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
body { margin-bottom: 50px; margin-left: 10px; margin-right: 10px; margin-top: 10px; } /* some padding to improve readability */
|
||||||
|
li { font-family:times new roman; font-size:14pt; }
|
||||||
|
h1 { color:#000080; font-family:times new roman; font-size:36pt; font-style:italic; font-weight:bold; text-align:center; }
|
||||||
|
h2 { margin: 10px; margin-top: 20px; color:#984c4c; font-family:times new roman; font-size:18pt; font-weight:bold; }
|
||||||
|
h3 { margin-left: 10px; margin-top: 20px; color:#0000ff; font-family:times new roman; `font-size:14pt; font-weight:bold; }
|
||||||
|
h4 { margin-left: 10px; margin-top: 20px; font-family:times new roman; font-size:14pt; font-style:italic; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
P tag code. Most of the help files nest P tags inside of blockquote tags (the was the
|
||||||
|
way it had been done in the beginning). The net effect is that the text is indented. In
|
||||||
|
modern HTML we would use CSS to do this. We need to support the Ghidra P tags, nested in
|
||||||
|
blockquote tags, as well as naked P tags. The following two lines accomplish this. Note
|
||||||
|
that the 'blockquote p' definition will inherit from the first 'p' definition.
|
||||||
|
*/
|
||||||
|
p { margin-left: 40px; font-family:times new roman; font-size:14pt; }
|
||||||
|
blockquote p { margin-left: 10px; }
|
||||||
|
|
||||||
|
p.providedbyplugin { color:#7f7f7f; margin-left: 10px; font-size:14pt; margin-top:100px }
|
||||||
|
p.ProvidedByPlugin { color:#7f7f7f; margin-left: 10px; font-size:14pt; margin-top:100px }
|
||||||
|
p.relatedtopic { color:#800080; margin-left: 10px; font-size:14pt; }
|
||||||
|
p.RelatedTopic { color:#800080; margin-left: 10px; font-size:14pt; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
We wish for a tables to have space between it and the preceding element, so that text
|
||||||
|
is not too close to the top of the table. Also, nest the table a bit so that it is clear
|
||||||
|
the table relates to the preceding text.
|
||||||
|
*/
|
||||||
|
table { margin-left: 20px; margin-top: 10px; width: 80%;}
|
||||||
|
td { font-family:times new roman; font-size:14pt; vertical-align: top; }
|
||||||
|
th { font-family:times new roman; font-size:14pt; font-weight:bold; background-color: #EDF3FE; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
Code-like formatting for things such as file system paths and proper names of classes,
|
||||||
|
methods, etc. To apply this to a file path, use this syntax:
|
||||||
|
<CODE CLASS="path">...</CODE>
|
||||||
|
*/
|
||||||
|
code { color: black; font-weight: bold; font-family: courier new, monospace; font-size: 14pt; white-space: nowrap; }
|
||||||
|
code.path { color: #4682B4; font-weight: bold; font-family: courier new, monospace; font-size: 14pt; white-space: nowrap; }
|
BIN
Ghidra/Framework/Docking/src/main/help/help/shared/arrow.gif
Normal file
After Width: | Height: | Size: 69 B |
BIN
Ghidra/Framework/Docking/src/main/help/help/shared/close16.gif
Normal file
After Width: | Height: | Size: 859 B |
BIN
Ghidra/Framework/Docking/src/main/help/help/shared/menu16.gif
Normal file
After Width: | Height: | Size: 62 B |
BIN
Ghidra/Framework/Docking/src/main/help/help/shared/note-red.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
Ghidra/Framework/Docking/src/main/help/help/shared/note.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 4.1 KiB |
BIN
Ghidra/Framework/Docking/src/main/help/help/shared/redo.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
Ghidra/Framework/Docking/src/main/help/help/shared/tip.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
Ghidra/Framework/Docking/src/main/help/help/shared/undo.png
Normal file
After Width: | Height: | Size: 185 B |
BIN
Ghidra/Framework/Docking/src/main/help/help/shared/warning.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
|
||||||
|
|
||||||
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
<TITLE>Placholder Title</TITLE>
|
||||||
|
<LINK rel="stylesheet" type="text/css" href="../../shared/Frontpage.css">
|
||||||
|
</HEAD>
|
||||||
|
|
||||||
|
<BODY>
|
||||||
|
<H1>Stub</H1>
|
||||||
|
|
||||||
|
<P>Blah blah</P>
|
||||||
|
|
||||||
|
<P class="relatedtopic">Related Topics:</P>
|
||||||
|
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
|
@ -24,11 +24,11 @@ import javax.swing.event.ChangeListener;
|
||||||
|
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.OptionDialog;
|
import docking.widgets.OptionDialog;
|
||||||
import docking.widgets.tabbedpane.DockingTabRenderer;
|
import docking.widgets.tabbedpane.DockingTabRenderer;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
|
import help.HelpService;
|
||||||
import utilities.util.reflection.ReflectionUtilities;
|
import utilities.util.reflection.ReflectionUtilities;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,10 +23,10 @@ import java.util.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
import docking.action.*;
|
import docking.action.*;
|
||||||
import docking.help.HelpDescriptor;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
|
import help.HelpDescriptor;
|
||||||
|
import help.HelpService;
|
||||||
import utilities.util.reflection.ReflectionUtilities;
|
import utilities.util.reflection.ReflectionUtilities;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,13 +29,13 @@ import org.jdesktop.animation.timing.TimingTargetAdapter;
|
||||||
import docking.action.*;
|
import docking.action.*;
|
||||||
import docking.actions.KeyBindingUtils;
|
import docking.actions.KeyBindingUtils;
|
||||||
import docking.event.mouse.GMouseListenerAdapter;
|
import docking.event.mouse.GMouseListenerAdapter;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.menu.DialogToolbarButton;
|
import docking.menu.DialogToolbarButton;
|
||||||
import docking.util.AnimationUtils;
|
import docking.util.AnimationUtils;
|
||||||
import docking.widgets.label.GDHtmlLabel;
|
import docking.widgets.label.GDHtmlLabel;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
import ghidra.util.task.*;
|
import ghidra.util.task.*;
|
||||||
|
import help.HelpService;
|
||||||
import utility.function.Callback;
|
import utility.function.Callback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,9 +23,9 @@ import javax.swing.*;
|
||||||
import javax.swing.FocusManager;
|
import javax.swing.FocusManager;
|
||||||
|
|
||||||
import docking.action.DockingActionIf;
|
import docking.action.DockingActionIf;
|
||||||
import docking.help.HelpService;
|
|
||||||
import ghidra.util.CascadedDropTarget;
|
import ghidra.util.CascadedDropTarget;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper class for user components. Adds the title, local toolbar and provides the drag target
|
* Wrapper class for user components. Adds the title, local toolbar and provides the drag target
|
||||||
|
|
|
@ -30,8 +30,6 @@ import org.jdesktop.animation.timing.Animator.RepeatBehavior;
|
||||||
import org.jdesktop.animation.timing.TimingTargetAdapter;
|
import org.jdesktop.animation.timing.TimingTargetAdapter;
|
||||||
import org.jdesktop.animation.timing.interpolation.PropertySetter;
|
import org.jdesktop.animation.timing.interpolation.PropertySetter;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.util.AnimationUtils;
|
import docking.util.AnimationUtils;
|
||||||
import generic.util.WindowUtilities;
|
import generic.util.WindowUtilities;
|
||||||
import generic.util.image.ImageUtils;
|
import generic.util.image.ImageUtils;
|
||||||
|
@ -41,6 +39,8 @@ import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.bean.GGlassPane;
|
import ghidra.util.bean.GGlassPane;
|
||||||
import ghidra.util.bean.GGlassPanePainter;
|
import ghidra.util.bean.GGlassPanePainter;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,10 +25,10 @@ import javax.swing.*;
|
||||||
import org.apache.commons.collections4.map.LazyMap;
|
import org.apache.commons.collections4.map.LazyMap;
|
||||||
|
|
||||||
import docking.framework.ApplicationInformationDisplayFactory;
|
import docking.framework.ApplicationInformationDisplayFactory;
|
||||||
import docking.help.HelpDescriptor;
|
|
||||||
import generic.util.WindowUtilities;
|
import generic.util.WindowUtilities;
|
||||||
import ghidra.framework.Application;
|
import ghidra.framework.Application;
|
||||||
import ghidra.util.bean.GGlassPane;
|
import ghidra.util.bean.GGlassPane;
|
||||||
|
import help.HelpDescriptor;
|
||||||
|
|
||||||
// NOTE: this class has a static focus component variable that is set whenever the dialog gets
|
// NOTE: this class has a static focus component variable that is set whenever the dialog gets
|
||||||
// activated and is scheduled to get focus at a later time. This variable is static so that only
|
// activated and is scheduled to get focus at a later time. This variable is static so that only
|
||||||
|
|
|
@ -31,7 +31,6 @@ import org.jdom.Element;
|
||||||
|
|
||||||
import docking.action.DockingActionIf;
|
import docking.action.DockingActionIf;
|
||||||
import docking.actions.*;
|
import docking.actions.*;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.PasswordDialog;
|
import docking.widgets.PasswordDialog;
|
||||||
import generic.util.WindowUtilities;
|
import generic.util.WindowUtilities;
|
||||||
import ghidra.framework.OperatingSystem;
|
import ghidra.framework.OperatingSystem;
|
||||||
|
@ -41,6 +40,8 @@ import ghidra.util.*;
|
||||||
import ghidra.util.datastruct.*;
|
import ghidra.util.datastruct.*;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
import ghidra.util.task.SwingUpdateManager;
|
import ghidra.util.task.SwingUpdateManager;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import util.CollectionUtils;
|
import util.CollectionUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,11 +73,6 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
||||||
public static final String DOCKING_WINDOWS_OWNER = "DockingWindows";
|
public static final String DOCKING_WINDOWS_OWNER = "DockingWindows";
|
||||||
public static final String TOOL_PREFERENCES_XML_NAME = "PREFERENCES";
|
public static final String TOOL_PREFERENCES_XML_NAME = "PREFERENCES";
|
||||||
|
|
||||||
/**
|
|
||||||
* The helpService field should be set to the appropriate help service provider.
|
|
||||||
*/
|
|
||||||
private static HelpService helpService = new DefaultHelpService();
|
|
||||||
|
|
||||||
// we use a list to maintain order
|
// we use a list to maintain order
|
||||||
private static List<DockingWindowManager> instances = new ArrayList<>();
|
private static List<DockingWindowManager> instances = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -161,25 +157,13 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
||||||
return "DockingWindowManager: " + root.getTitle();
|
return "DockingWindowManager: " + root.getTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the help service for the all docking window managers.
|
|
||||||
*
|
|
||||||
* @param helpSvc the help service to use.
|
|
||||||
*/
|
|
||||||
public static void setHelpService(HelpService helpSvc) {
|
|
||||||
if (helpSvc == null) {
|
|
||||||
throw new IllegalArgumentException("HelpService may not be null");
|
|
||||||
}
|
|
||||||
helpService = helpSvc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the global help service.
|
* Returns the global help service.
|
||||||
*
|
*
|
||||||
* @return the global help service.
|
* @return the global help service.
|
||||||
*/
|
*/
|
||||||
public static HelpService getHelpService() {
|
public static HelpService getHelpService() {
|
||||||
return helpService;
|
return Help.getHelpService();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static synchronized void addInstance(DockingWindowManager winMgr) {
|
private static synchronized void addInstance(DockingWindowManager winMgr) {
|
||||||
|
@ -516,6 +500,7 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerHelpLocation(ComponentProvider provider, HelpLocation helpLocation) {
|
private void registerHelpLocation(ComponentProvider provider, HelpLocation helpLocation) {
|
||||||
|
HelpService helpService = Help.getHelpService();
|
||||||
HelpLocation registeredHelpLocation = helpService.getHelpLocation(provider);
|
HelpLocation registeredHelpLocation = helpService.getHelpLocation(provider);
|
||||||
if (registeredHelpLocation != null) {
|
if (registeredHelpLocation != null) {
|
||||||
return; // nothing to do; location already registered
|
return; // nothing to do; location already registered
|
||||||
|
|
|
@ -21,7 +21,7 @@ import java.util.Set;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
import docking.ActionContext;
|
import docking.ActionContext;
|
||||||
import docking.help.HelpDescriptor;
|
import help.HelpDescriptor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base interface for clients that wish to create commands to be registered with a tool.
|
* The base interface for clients that wish to create commands to be registered with a tool.
|
||||||
|
|
|
@ -20,9 +20,9 @@ import java.awt.*;
|
||||||
import javax.swing.KeyStroke;
|
import javax.swing.KeyStroke;
|
||||||
|
|
||||||
import docking.*;
|
import docking.*;
|
||||||
import docking.help.HelpService;
|
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.SystemUtilities;
|
import ghidra.util.SystemUtilities;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
public class HelpAction extends DockingAction {
|
public class HelpAction extends DockingAction {
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ import java.awt.*;
|
||||||
import java.awt.geom.*;
|
import java.awt.geom.*;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -27,7 +26,8 @@ import javax.help.*;
|
||||||
import javax.help.event.HelpModelEvent;
|
import javax.help.event.HelpModelEvent;
|
||||||
import javax.help.event.HelpModelListener;
|
import javax.help.event.HelpModelListener;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.text.*;
|
import javax.swing.text.AttributeSet;
|
||||||
|
import javax.swing.text.BadLocationException;
|
||||||
import javax.swing.text.html.HTML;
|
import javax.swing.text.html.HTML;
|
||||||
import javax.swing.text.html.HTMLDocument;
|
import javax.swing.text.html.HTMLDocument;
|
||||||
|
|
||||||
|
@ -39,101 +39,38 @@ import docking.util.AnimationPainter;
|
||||||
import docking.util.AnimationUtils;
|
import docking.util.AnimationUtils;
|
||||||
import ghidra.framework.preferences.Preferences;
|
import ghidra.framework.preferences.Preferences;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
import ghidra.util.Swing;
|
||||||
import ghidra.util.bean.GGlassPane;
|
import ghidra.util.bean.GGlassPane;
|
||||||
import resources.ResourceManager;
|
import help.CustomTOCView;
|
||||||
|
import help.GHelpBroker;
|
||||||
// NOTE: for JH 2.0, this class has been rewritten to not
|
|
||||||
// access the 'frame' and 'dialog' variable directly
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ghidra help broker that displays the help set; sets the Ghidra icon on
|
* An extension of the {@link GHelpBroker} that allows {@code Docking} classes to be installed.
|
||||||
* the help frame and attempts to maintain the user window size.
|
* <p>
|
||||||
|
* Additions include a search feature a navigation aid.
|
||||||
*/
|
*/
|
||||||
public class GHelpBroker extends DefaultHelpBroker {
|
public class DockingHelpBroker extends GHelpBroker {
|
||||||
|
|
||||||
private static final List<Image> ICONS = ApplicationInformationDisplayFactory.getWindowIcons();
|
private static final List<Image> ICONS = ApplicationInformationDisplayFactory.getWindowIcons();
|
||||||
|
|
||||||
private static final int MAX_CALLOUT_RETRIES = 3;
|
private static final int MAX_CALLOUT_RETRIES = 3;
|
||||||
|
|
||||||
private Dimension windowSize = new Dimension(1100, 700);
|
|
||||||
|
|
||||||
private JEditorPane htmlEditorPane;
|
|
||||||
private Animator lastAnimator;
|
|
||||||
private URL loadingURL;
|
|
||||||
private PropertyChangeListener pageLoadListener = new PageLoadingListener();
|
private PropertyChangeListener pageLoadListener = new PageLoadingListener();
|
||||||
private HelpModelListener helpModelListener = new HelpIDChangedListener();
|
private HelpModelListener helpModelListener = new HelpIDChangedListener();
|
||||||
private Window activationWindow;
|
private Animator lastAnimator;
|
||||||
|
private URL loadingURL;
|
||||||
|
|
||||||
// Create the zoom in/out icons that will be added to the default jHelp toolbar.
|
public DockingHelpBroker(HelpSet hs) {
|
||||||
private static final ImageIcon ZOOM_OUT_ICON =
|
|
||||||
ResourceManager.loadImage("images/list-remove.png");
|
|
||||||
private static final ImageIcon ZOOM_IN_ICON = ResourceManager.loadImage("images/list-add.png");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Construct a new GhidraHelpBroker.
|
|
||||||
* @param hs java help set associated with this help broker
|
|
||||||
*/
|
|
||||||
public GHelpBroker(HelpSet hs) {
|
|
||||||
super(hs);
|
super(hs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// Overridden so that we can call the preferred version of setCurrentURL on the HelpModel,
|
protected List<Image> getApplicationIcons() {
|
||||||
// which fixes a bug with the history list (SCR 7639)
|
return ICONS;
|
||||||
public void setCurrentURL(final URL URL) {
|
|
||||||
|
|
||||||
HelpModel model = getHelpModel();
|
|
||||||
if (model != null) {
|
|
||||||
model.setCurrentURL(URL, getHistoryName(URL), null);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
super.setCurrentURL(URL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Perform some shenanigans to force Java Help to reload the given URL */
|
@Override
|
||||||
void reloadHelpPage(URL url) {
|
protected HelpModel getCustomHelpModel() {
|
||||||
clearContentViewer();
|
|
||||||
prepareToCallout(url);
|
|
||||||
try {
|
|
||||||
htmlEditorPane.setPage(url);
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
Msg.error(this, "Unexpected error loading help page: " + url, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void clearContentViewer() {
|
|
||||||
htmlEditorPane.getDocument().putProperty(Document.StreamDescriptionProperty, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private JScrollPane getScrollPane(JEditorPane editorPane) {
|
|
||||||
Container parent = editorPane.getParent();
|
|
||||||
while (parent != null) {
|
|
||||||
if (parent instanceof JScrollPane) {
|
|
||||||
return (JScrollPane) parent;
|
|
||||||
}
|
|
||||||
parent = parent.getParent();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private JEditorPane getHTMLEditorPane(JHelpContentViewer contentViewer) {
|
|
||||||
//
|
|
||||||
// Intimate Knowledge - construction of the viewer:
|
|
||||||
//
|
|
||||||
// -BorderLayout
|
|
||||||
// -JScrollPane
|
|
||||||
// -Viewport
|
|
||||||
// -JHEditorPane extends JEditorPane
|
|
||||||
//
|
|
||||||
//
|
|
||||||
Component[] components = contentViewer.getComponents();
|
|
||||||
JScrollPane scrollPane = (JScrollPane) components[0];
|
|
||||||
JViewport viewport = scrollPane.getViewport();
|
|
||||||
|
|
||||||
return (JEditorPane) viewport.getView();
|
|
||||||
}
|
|
||||||
|
|
||||||
private HelpModel getHelpModel() {
|
|
||||||
//
|
//
|
||||||
// Unusual Code Alert!: We have opened up access to the help system's HelpModel by way
|
// Unusual Code Alert!: We have opened up access to the help system's HelpModel by way
|
||||||
// of our CustomTOCView object that we install elsewhere. We need
|
// of our CustomTOCView object that we install elsewhere. We need
|
||||||
|
@ -160,133 +97,18 @@ public class GHelpBroker extends DefaultHelpBroker {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setDisplayed(boolean b) {
|
protected void installHelpSearcher(JHelp jHelp, HelpModel helpModel) {
|
||||||
if (!b) {
|
|
||||||
super.setDisplayed(b);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// this must be before any call that triggers the help system to create its window
|
|
||||||
initializeScreenDevice();
|
|
||||||
|
|
||||||
WindowPresentation windowPresentation = getWindowPresentation();
|
|
||||||
updateWindowSize(windowPresentation);
|
|
||||||
|
|
||||||
// this has to be before getHelpWindow() or the value returned will be null
|
|
||||||
super.setDisplayed(b);
|
|
||||||
|
|
||||||
initializeUIWindowPresentation(windowPresentation);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initializeScreenDevice() {
|
|
||||||
if (isInitialized()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activationWindow == null) {
|
|
||||||
// This can happen when we show the 'What's New' help page on a fresh install. In
|
|
||||||
// that case, we were not activated from an existing window, thus, there may
|
|
||||||
// be no parent window.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
|
||||||
GraphicsDevice[] gs = ge.getScreenDevices();
|
|
||||||
GraphicsConfiguration config = activationWindow.getGraphicsConfiguration();
|
|
||||||
GraphicsDevice parentDevice = config.getDevice();
|
|
||||||
for (int i = 0; i < gs.length; i++) {
|
|
||||||
if (gs[i] == parentDevice) {
|
|
||||||
// update the help window's screen to match that of the parent
|
|
||||||
setScreen(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initializeUIWindowPresentation(WindowPresentation windowPresentation) {
|
|
||||||
|
|
||||||
Window helpWindow = windowPresentation.getHelpWindow();
|
|
||||||
Container contentPane = null;
|
|
||||||
if (helpWindow instanceof JFrame) {
|
|
||||||
JFrame frame = (JFrame) helpWindow;
|
|
||||||
installRootPane(frame);
|
|
||||||
frame.setIconImages(ICONS);
|
|
||||||
contentPane = frame.getContentPane();
|
|
||||||
}
|
|
||||||
else if (helpWindow instanceof JDialog) {
|
|
||||||
JDialog dialog = (JDialog) helpWindow;
|
|
||||||
installRootPane(dialog);
|
|
||||||
contentPane = dialog.getContentPane();
|
|
||||||
}
|
|
||||||
|
|
||||||
initializeUIComponents(contentPane);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isInitialized() {
|
|
||||||
return htmlEditorPane != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initializeUIComponents(Container contentPane) {
|
|
||||||
|
|
||||||
if (isInitialized()) {
|
|
||||||
return;// already initialized
|
|
||||||
}
|
|
||||||
|
|
||||||
Component[] components = contentPane.getComponents();
|
|
||||||
JHelp jHelp = (JHelp) components[0];
|
|
||||||
addCustomToolbarItems(jHelp);
|
|
||||||
JHelpContentViewer contentViewer = jHelp.getContentViewer();
|
|
||||||
htmlEditorPane = getHTMLEditorPane(contentViewer);
|
|
||||||
|
|
||||||
// just creating the search wires everything together
|
|
||||||
HelpModel helpModel = getHelpModel();
|
|
||||||
helpModel.addHelpModelListener(helpModelListener);
|
helpModel.addHelpModelListener(helpModelListener);
|
||||||
new HelpViewSearcher(jHelp, helpModel);
|
new HelpViewSearcher(jHelp, helpModel);
|
||||||
|
|
||||||
installActions(jHelp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Create zoom in/out buttons on the default help window toolbar.
|
protected void showNavigationAid(URL url) {
|
||||||
* @param jHelp the java help object used to retrieve the help components
|
prepareToCallout(url);
|
||||||
*/
|
|
||||||
protected void addCustomToolbarItems(final JHelp jHelp) {
|
|
||||||
|
|
||||||
for (Component component : jHelp.getComponents()) {
|
|
||||||
if (component instanceof JToolBar) {
|
|
||||||
JToolBar toolbar = (JToolBar) component;
|
|
||||||
toolbar.addSeparator();
|
|
||||||
|
|
||||||
ImageIcon zoomOutIcon = ResourceManager.getScaledIcon(ZOOM_OUT_ICON, 24, 24);
|
|
||||||
JButton zoomOutBtn = new JButton(zoomOutIcon);
|
|
||||||
zoomOutBtn.setToolTipText("Zoom out");
|
|
||||||
zoomOutBtn.addActionListener(e -> {
|
|
||||||
GHelpHTMLEditorKit.zoomOut();
|
|
||||||
|
|
||||||
// Need to reload the page to force the scroll panes to resize properly. A
|
|
||||||
// simple revalidate/repaint won't do it.
|
|
||||||
reloadHelpPage(getCurrentURL());
|
|
||||||
});
|
|
||||||
toolbar.add(zoomOutBtn);
|
|
||||||
|
|
||||||
ImageIcon zoomInIcon = ResourceManager.getScaledIcon(ZOOM_IN_ICON, 24, 24);
|
|
||||||
JButton zoomInBtn = new JButton(zoomInIcon);
|
|
||||||
zoomInBtn.setToolTipText("Zoom in");
|
|
||||||
zoomInBtn.addActionListener(e -> {
|
|
||||||
GHelpHTMLEditorKit.zoomIn();
|
|
||||||
|
|
||||||
// Need to reload the page to force the scroll panes to resize properly. A
|
|
||||||
// simple revalidate/repaint won't do it.
|
|
||||||
reloadHelpPage(getCurrentURL());
|
|
||||||
});
|
|
||||||
toolbar.add(zoomInBtn);
|
|
||||||
|
|
||||||
// Once we've found the toolbar we can break out of the loop and stop looking for it.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void installActions(JHelp help) {
|
@Override
|
||||||
|
protected void installActions(JHelp help) {
|
||||||
JToolBar toolbar = null;
|
JToolBar toolbar = null;
|
||||||
Component[] components = help.getComponents();
|
Component[] components = help.getComponents();
|
||||||
for (Component c : components) {
|
for (Component c : components) {
|
||||||
|
@ -308,79 +130,24 @@ public class GHelpBroker extends DefaultHelpBroker {
|
||||||
toolbar.add(new JButton(action));
|
toolbar.add(new JButton(action));
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getHistoryName(URL URL) {
|
@Override // opened access
|
||||||
String text = URL.getFile();
|
protected void reloadHelpPage(URL url) {
|
||||||
int index = text.lastIndexOf('/');
|
super.reloadHelpPage(url);
|
||||||
if (index != -1) {
|
|
||||||
// we want just the filename
|
|
||||||
text = text.substring(index + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
String ref = URL.getRef();
|
|
||||||
if (ref != null) {
|
|
||||||
text += " - " + ref;
|
|
||||||
}
|
|
||||||
return text;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void installRootPane(JFrame frame) {
|
//=================================================================================================
|
||||||
Component oldGlassPane = frame.getGlassPane();
|
// Navigation Aid Section
|
||||||
if (!(oldGlassPane instanceof GGlassPane)) {
|
//=================================================================================================
|
||||||
GGlassPane gGlassPane = new GGlassPane();
|
|
||||||
frame.setGlassPane(gGlassPane);
|
|
||||||
gGlassPane.setVisible(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void installRootPane(JDialog dialog) {
|
private JScrollPane getScrollPane(JEditorPane editorPane) {
|
||||||
Component oldGlassPane = dialog.getGlassPane();
|
Container parent = editorPane.getParent();
|
||||||
if (!(oldGlassPane instanceof GGlassPane)) {
|
while (parent != null) {
|
||||||
GGlassPane gGlassPane = new GGlassPane();
|
if (parent instanceof JScrollPane) {
|
||||||
dialog.setGlassPane(gGlassPane);
|
return (JScrollPane) parent;
|
||||||
gGlassPane.setVisible(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateWindowSize(WindowPresentation presentation) {
|
|
||||||
if (windowSize == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
presentation.createHelpWindow();
|
|
||||||
presentation.setSize(windowSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setActivationWindow(Window window) {
|
|
||||||
WindowPresentation windowPresentation = getWindowPresentation();
|
|
||||||
Window helpWindow = windowPresentation.getHelpWindow();
|
|
||||||
if (helpWindow == null) {
|
|
||||||
activationWindow = window;
|
|
||||||
super.setActivationWindow(window);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
windowSize = helpWindow.getSize();// remember the previous size
|
|
||||||
|
|
||||||
boolean wasModal = isModalWindow(helpWindow);
|
|
||||||
boolean willBeModal = isModalWindow(window);
|
|
||||||
if (!wasModal && willBeModal) {
|
|
||||||
// in this condition, a new window will be shown, but the old one is not properly
|
|
||||||
// closed by JavaHelp
|
|
||||||
helpWindow.setVisible(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
super.setActivationWindow(window);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isModalWindow(Window window) {
|
|
||||||
if (window instanceof Dialog) {
|
|
||||||
Dialog dialog = (Dialog) window;
|
|
||||||
if (dialog.isModal()) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
parent = parent.getParent();
|
||||||
}
|
}
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showNavigationAid() {
|
private void showNavigationAid() {
|
||||||
|
@ -398,7 +165,7 @@ public class GHelpBroker extends DefaultHelpBroker {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calloutReferenceLater() {
|
private void calloutReferenceLater() {
|
||||||
SwingUtilities.invokeLater(() -> calloutReference(loadingURL));
|
Swing.runLater(() -> calloutReference(loadingURL));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calloutReference(final URL url) {
|
private void calloutReference(final URL url) {
|
||||||
|
@ -477,7 +244,7 @@ public class GHelpBroker extends DefaultHelpBroker {
|
||||||
//
|
//
|
||||||
// Unusual Code: Not yet rendered! Try again.
|
// Unusual Code: Not yet rendered! Try again.
|
||||||
//
|
//
|
||||||
SwingUtilities.invokeLater(() -> doCalloutReference(area, numberOfCalls));
|
Swing.runLater(() -> doCalloutReference(area, numberOfCalls));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -519,7 +286,6 @@ public class GHelpBroker extends DefaultHelpBroker {
|
||||||
|
|
||||||
loadingURL = url;
|
loadingURL = url;
|
||||||
|
|
||||||
// TODO
|
|
||||||
// updateTitle();
|
// updateTitle();
|
||||||
|
|
||||||
if (isCurrentPage(loadingURL)) {
|
if (isCurrentPage(loadingURL)) {
|
||||||
|
@ -650,8 +416,8 @@ public class GHelpBroker extends DefaultHelpBroker {
|
||||||
// At 0%, with 100% opacity; at the end, paint with 0% opacity
|
// At 0%, with 100% opacity; at the end, paint with 0% opacity
|
||||||
//
|
//
|
||||||
Composite originalComposite = g2d.getComposite();
|
Composite originalComposite = g2d.getComposite();
|
||||||
AlphaComposite alphaComposite = AlphaComposite.getInstance(
|
AlphaComposite alphaComposite = AlphaComposite
|
||||||
AlphaComposite.SrcOver.getRule(), (float) (1 - percentComplete));
|
.getInstance(AlphaComposite.SrcOver.getRule(), (float) (1 - percentComplete));
|
||||||
g2d.setComposite(alphaComposite);
|
g2d.setComposite(alphaComposite);
|
||||||
|
|
||||||
double transition = 1 - percentComplete;
|
double transition = 1 - percentComplete;
|
|
@ -0,0 +1,38 @@
|
||||||
|
/* ###
|
||||||
|
* IP: GHIDRA
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package docking.help;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
import javax.help.HelpBroker;
|
||||||
|
import javax.help.HelpSetException;
|
||||||
|
|
||||||
|
import help.GHelpSet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An extension of the {@link GHelpSet} that allows {@code Docking} classes to be installed.
|
||||||
|
*/
|
||||||
|
public class DockingHelpSet extends GHelpSet {
|
||||||
|
|
||||||
|
public DockingHelpSet(ClassLoader loader, URL helpset) throws HelpSetException {
|
||||||
|
super(loader, helpset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HelpBroker createHelpBroker() {
|
||||||
|
return new DockingHelpBroker(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -38,6 +38,7 @@ import ghidra.util.*;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
import ghidra.util.exception.CancelledException;
|
import ghidra.util.exception.CancelledException;
|
||||||
import ghidra.util.task.TaskMonitor;
|
import ghidra.util.task.TaskMonitor;
|
||||||
|
import help.*;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
import utilities.util.reflection.ReflectionUtilities;
|
import utilities.util.reflection.ReflectionUtilities;
|
||||||
|
|
||||||
|
@ -83,7 +84,7 @@ public class HelpManager implements HelpService {
|
||||||
* @throws HelpSetException if HelpSet could not be created
|
* @throws HelpSetException if HelpSet could not be created
|
||||||
*/
|
*/
|
||||||
protected HelpManager(URL url) throws HelpSetException {
|
protected HelpManager(URL url) throws HelpSetException {
|
||||||
mainHS = new GHelpSet(new GHelpClassLoader(null), url);
|
mainHS = new DockingHelpSet(new GHelpClassLoader(null), url);
|
||||||
mainHB = mainHS.createHelpBroker();
|
mainHB = mainHS.createHelpBroker();
|
||||||
mainHS.setTitle(GHIDRA_HELP_TITLE);
|
mainHS.setTitle(GHIDRA_HELP_TITLE);
|
||||||
|
|
||||||
|
@ -260,8 +261,8 @@ public class HelpManager implements HelpService {
|
||||||
displayHelp(createHelpID(helpId), window);
|
displayHelp(createHelpID(helpId), window);
|
||||||
}
|
}
|
||||||
catch (BadIDException e) {
|
catch (BadIDException e) {
|
||||||
Msg.info(this, "Could not find help for ID: \"" + helpId +
|
Msg.info(this,
|
||||||
"\" from HelpLocation: " + loc);
|
"Could not find help for ID: \"" + helpId + "\" from HelpLocation: " + loc);
|
||||||
displayHelp(HELP_NOT_FOUND_PAGE_URL, window);
|
displayHelp(HELP_NOT_FOUND_PAGE_URL, window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -565,12 +566,12 @@ public class HelpManager implements HelpService {
|
||||||
/** This forces page to be redisplayed when location has not changed */
|
/** This forces page to be redisplayed when location has not changed */
|
||||||
private void reloadPage(URL helpURL) {
|
private void reloadPage(URL helpURL) {
|
||||||
|
|
||||||
if (!(mainHB instanceof GHelpBroker)) {
|
if (!(mainHB instanceof DockingHelpBroker)) {
|
||||||
// not our broker installed; can't force a reload
|
// not our broker installed; can't force a reload
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
((GHelpBroker) mainHB).reloadHelpPage(validateUrl(helpURL));
|
((DockingHelpBroker) mainHB).reloadHelpPage(validateUrl(helpURL));
|
||||||
}
|
}
|
||||||
|
|
||||||
private URL getURLForID(ID ID) {
|
private URL getURLForID(ID ID) {
|
||||||
|
|
|
@ -23,11 +23,11 @@ import javax.swing.JButton;
|
||||||
|
|
||||||
import docking.ActionContext;
|
import docking.ActionContext;
|
||||||
import docking.action.*;
|
import docking.action.*;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.widgets.EventTrigger;
|
import docking.widgets.EventTrigger;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Swing;
|
import ghidra.util.Swing;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
|
import help.Help;
|
||||||
import resources.icons.EmptyIcon;
|
import resources.icons.EmptyIcon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,12 +24,12 @@ import javax.swing.BorderFactory;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.border.Border;
|
import javax.swing.border.Border;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import ghidra.framework.options.*;
|
import ghidra.framework.options.*;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
import ghidra.util.layout.VerticalLayout;
|
import ghidra.util.layout.VerticalLayout;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -27,8 +27,6 @@ import javax.swing.*;
|
||||||
import javax.swing.tree.TreePath;
|
import javax.swing.tree.TreePath;
|
||||||
import javax.swing.tree.TreeSelectionModel;
|
import javax.swing.tree.TreeSelectionModel;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.MultiLineLabel;
|
import docking.widgets.MultiLineLabel;
|
||||||
import docking.widgets.OptionDialog;
|
import docking.widgets.OptionDialog;
|
||||||
import docking.widgets.label.GIconLabel;
|
import docking.widgets.label.GIconLabel;
|
||||||
|
@ -40,6 +38,8 @@ import ghidra.util.*;
|
||||||
import ghidra.util.bean.opteditor.OptionsVetoException;
|
import ghidra.util.bean.opteditor.OptionsVetoException;
|
||||||
import ghidra.util.layout.MiddleLayout;
|
import ghidra.util.layout.MiddleLayout;
|
||||||
import ghidra.util.task.SwingUpdateManager;
|
import ghidra.util.task.SwingUpdateManager;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
public class OptionsPanel extends JPanel {
|
public class OptionsPanel extends JPanel {
|
||||||
|
|
|
@ -29,7 +29,6 @@ import javax.swing.table.TableModel;
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
|
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.menu.*;
|
import docking.menu.*;
|
||||||
import docking.widgets.EmptyBorderButton;
|
import docking.widgets.EmptyBorderButton;
|
||||||
import docking.widgets.EventTrigger;
|
import docking.widgets.EventTrigger;
|
||||||
|
@ -45,6 +44,7 @@ import ghidra.util.datastruct.WeakDataStructureFactory;
|
||||||
import ghidra.util.datastruct.WeakSet;
|
import ghidra.util.datastruct.WeakSet;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
import ghidra.util.task.SwingUpdateManager;
|
import ghidra.util.task.SwingUpdateManager;
|
||||||
|
import help.HelpService;
|
||||||
import resources.Icons;
|
import resources.Icons;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
import utilities.util.reflection.ReflectionUtilities;
|
import utilities.util.reflection.ReflectionUtilities;
|
||||||
|
|
|
@ -22,10 +22,10 @@ import javax.swing.*;
|
||||||
import javax.swing.table.*;
|
import javax.swing.table.*;
|
||||||
|
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.table.columnfilter.ColumnBasedTableFilter;
|
import docking.widgets.table.columnfilter.ColumnBasedTableFilter;
|
||||||
import ghidra.util.HTMLUtilities;
|
import ghidra.util.HTMLUtilities;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,7 +23,6 @@ import javax.swing.border.BevelBorder;
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
|
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.EmptyBorderButton;
|
import docking.widgets.EmptyBorderButton;
|
||||||
import docking.widgets.filter.*;
|
import docking.widgets.filter.*;
|
||||||
import docking.widgets.label.GLabel;
|
import docking.widgets.label.GLabel;
|
||||||
|
@ -32,6 +31,7 @@ import docking.widgets.tree.support.GTreeFilter;
|
||||||
import ghidra.framework.options.PreferenceState;
|
import ghidra.framework.options.PreferenceState;
|
||||||
import ghidra.util.FilterTransformer;
|
import ghidra.util.FilterTransformer;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
public class DefaultGTreeFilterProvider implements GTreeFilterProvider {
|
public class DefaultGTreeFilterProvider implements GTreeFilterProvider {
|
||||||
private static final String FILTER_STATE = "FILTER_STATE";
|
private static final String FILTER_STATE = "FILTER_STATE";
|
||||||
|
|
|
@ -25,11 +25,11 @@ import javax.swing.border.TitledBorder;
|
||||||
|
|
||||||
import docking.DialogComponentProvider;
|
import docking.DialogComponentProvider;
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.EmptyBorderButton;
|
import docking.widgets.EmptyBorderButton;
|
||||||
import docking.widgets.label.GDLabel;
|
import docking.widgets.label.GDLabel;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -27,7 +27,6 @@ import com.google.common.base.Function;
|
||||||
import docking.DockingUtils;
|
import docking.DockingUtils;
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.actions.KeyBindingUtils;
|
import docking.actions.KeyBindingUtils;
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.EmptyBorderButton;
|
import docking.widgets.EmptyBorderButton;
|
||||||
import docking.widgets.PopupWindow;
|
import docking.widgets.PopupWindow;
|
||||||
import docking.widgets.label.GIconLabel;
|
import docking.widgets.label.GIconLabel;
|
||||||
|
@ -58,6 +57,7 @@ import ghidra.graph.viewer.vertex.*;
|
||||||
import ghidra.util.HTMLUtilities;
|
import ghidra.util.HTMLUtilities;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
|
import help.HelpService;
|
||||||
import resources.Icons;
|
import resources.Icons;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
import util.CollectionUtils;
|
import util.CollectionUtils;
|
||||||
|
|
|
@ -24,8 +24,13 @@ eclipse.project.name = 'Framework Help'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':Utility')
|
api project(':Utility')
|
||||||
api project(':Docking')
|
api project(':Generic')
|
||||||
|
|
||||||
|
api 'net.java.dev.timingframework:timingframework:1.0'
|
||||||
|
|
||||||
|
// Only include this debug version of the jh library if necessary.
|
||||||
|
//api name:'jh2.with.debug'
|
||||||
|
api 'javax.help:javahelp:2.0.05'
|
||||||
|
|
||||||
// api name:'jh' - provided by Docking
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,10 @@ import java.awt.*;
|
||||||
|
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
|
|
||||||
import docking.help.HelpDescriptor;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
import help.HelpDescriptor;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
public class DefaultHelpService implements HelpService {
|
public class DefaultHelpService implements HelpService {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package docking.help;
|
package help;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.event.KeyAdapter;
|
import java.awt.event.KeyAdapter;
|
|
@ -1,6 +1,5 @@
|
||||||
/* ###
|
/* ###
|
||||||
* IP: GHIDRA
|
* IP: GHIDRA
|
||||||
* REVIEWED: YES
|
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package docking.help;
|
package help;
|
||||||
|
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package docking.help;
|
package help;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
331
Ghidra/Framework/Help/src/main/java/help/GHelpBroker.java
Normal file
|
@ -0,0 +1,331 @@
|
||||||
|
/* ###
|
||||||
|
* IP: GHIDRA
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package help;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.help.*;
|
||||||
|
import javax.swing.*;
|
||||||
|
import javax.swing.text.Document;
|
||||||
|
|
||||||
|
import ghidra.util.Msg;
|
||||||
|
import ghidra.util.bean.GGlassPane;
|
||||||
|
import resources.ResourceManager;
|
||||||
|
|
||||||
|
// NOTE: for JH 2.0, this class has been rewritten to not
|
||||||
|
// access the 'frame' and 'dialog' variable directly
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ghidra help broker that displays the help set; sets the application icon on the help frame and
|
||||||
|
* attempts to maintain the user window size.
|
||||||
|
*/
|
||||||
|
public class GHelpBroker extends DefaultHelpBroker {
|
||||||
|
|
||||||
|
// Create the zoom in/out icons that will be added to the default jHelp toolbar.
|
||||||
|
private static final ImageIcon ZOOM_OUT_ICON =
|
||||||
|
ResourceManager.loadImage("images/list-remove.png");
|
||||||
|
private static final ImageIcon ZOOM_IN_ICON = ResourceManager.loadImage("images/list-add.png");
|
||||||
|
|
||||||
|
private Dimension windowSize = new Dimension(1100, 700);
|
||||||
|
|
||||||
|
protected JEditorPane htmlEditorPane;
|
||||||
|
private Window activationWindow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct a new GhidraHelpBroker.
|
||||||
|
* @param hs java help set associated with this help broker
|
||||||
|
*/
|
||||||
|
public GHelpBroker(HelpSet hs) {
|
||||||
|
super(hs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
// Overridden so that we can call the preferred version of setCurrentURL on the HelpModel,
|
||||||
|
// which fixes a bug with the history list (SCR 7639)
|
||||||
|
public void setCurrentURL(final URL URL) {
|
||||||
|
|
||||||
|
HelpModel model = getCustomHelpModel();
|
||||||
|
if (model != null) {
|
||||||
|
model.setCurrentURL(URL, getHistoryName(URL), null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
super.setCurrentURL(URL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected List<Image> getApplicationIcons() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected HelpModel getCustomHelpModel() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform some shenanigans to force Java Help to reload the given URL */
|
||||||
|
protected void reloadHelpPage(URL url) {
|
||||||
|
clearContentViewer();
|
||||||
|
showNavigationAid(url);
|
||||||
|
try {
|
||||||
|
htmlEditorPane.setPage(url);
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
Msg.error(this, "Unexpected error loading help page: " + url, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void showNavigationAid(URL url) {
|
||||||
|
// this base class does not have a navigation aid
|
||||||
|
}
|
||||||
|
|
||||||
|
private void clearContentViewer() {
|
||||||
|
htmlEditorPane.getDocument().putProperty(Document.StreamDescriptionProperty, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private JEditorPane getHTMLEditorPane(JHelpContentViewer contentViewer) {
|
||||||
|
//
|
||||||
|
// Intimate Knowledge - construction of the viewer:
|
||||||
|
//
|
||||||
|
// -BorderLayout
|
||||||
|
// -JScrollPane
|
||||||
|
// -Viewport
|
||||||
|
// -JHEditorPane extends JEditorPane
|
||||||
|
//
|
||||||
|
//
|
||||||
|
Component[] components = contentViewer.getComponents();
|
||||||
|
JScrollPane scrollPane = (JScrollPane) components[0];
|
||||||
|
JViewport viewport = scrollPane.getViewport();
|
||||||
|
|
||||||
|
return (JEditorPane) viewport.getView();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDisplayed(boolean b) {
|
||||||
|
if (!b) {
|
||||||
|
super.setDisplayed(b);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// this must be before any call that triggers the help system to create its window
|
||||||
|
initializeScreenDevice();
|
||||||
|
|
||||||
|
WindowPresentation windowPresentation = getWindowPresentation();
|
||||||
|
updateWindowSize(windowPresentation);
|
||||||
|
|
||||||
|
// this has to be before getHelpWindow() or the value returned will be null
|
||||||
|
super.setDisplayed(b);
|
||||||
|
|
||||||
|
initializeUIWindowPresentation(windowPresentation);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeScreenDevice() {
|
||||||
|
if (isInitialized()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (activationWindow == null) {
|
||||||
|
// This can happen when we show the 'What's New' help page on a fresh install. In
|
||||||
|
// that case, we were not activated from an existing window, thus, there may
|
||||||
|
// be no parent window.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||||
|
GraphicsDevice[] gs = ge.getScreenDevices();
|
||||||
|
GraphicsConfiguration config = activationWindow.getGraphicsConfiguration();
|
||||||
|
GraphicsDevice parentDevice = config.getDevice();
|
||||||
|
for (int i = 0; i < gs.length; i++) {
|
||||||
|
if (gs[i] == parentDevice) {
|
||||||
|
// update the help window's screen to match that of the parent
|
||||||
|
setScreen(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeUIWindowPresentation(WindowPresentation windowPresentation) {
|
||||||
|
|
||||||
|
Window helpWindow = windowPresentation.getHelpWindow();
|
||||||
|
Container contentPane = null;
|
||||||
|
if (helpWindow instanceof JFrame) {
|
||||||
|
JFrame frame = (JFrame) helpWindow;
|
||||||
|
installRootPane(frame);
|
||||||
|
List<Image> icons = getApplicationIcons();
|
||||||
|
if (icons != null) {
|
||||||
|
frame.setIconImages(icons);
|
||||||
|
}
|
||||||
|
contentPane = frame.getContentPane();
|
||||||
|
}
|
||||||
|
else if (helpWindow instanceof JDialog) {
|
||||||
|
JDialog dialog = (JDialog) helpWindow;
|
||||||
|
installRootPane(dialog);
|
||||||
|
contentPane = dialog.getContentPane();
|
||||||
|
}
|
||||||
|
|
||||||
|
initializeUIComponents(contentPane);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isInitialized() {
|
||||||
|
return htmlEditorPane != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeUIComponents(Container contentPane) {
|
||||||
|
|
||||||
|
if (isInitialized()) {
|
||||||
|
return;// already initialized
|
||||||
|
}
|
||||||
|
|
||||||
|
Component[] components = contentPane.getComponents();
|
||||||
|
JHelp jHelp = (JHelp) components[0];
|
||||||
|
addCustomToolbarItems(jHelp);
|
||||||
|
JHelpContentViewer contentViewer = jHelp.getContentViewer();
|
||||||
|
htmlEditorPane = getHTMLEditorPane(contentViewer);
|
||||||
|
|
||||||
|
// just creating the search wires everything together
|
||||||
|
HelpModel helpModel = getCustomHelpModel();
|
||||||
|
installHelpSearcher(jHelp, helpModel);
|
||||||
|
if (helpModel != null) {
|
||||||
|
installHelpSearcher(jHelp, helpModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
installActions(jHelp);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void installHelpSearcher(JHelp jHelp, HelpModel helpModel) {
|
||||||
|
// this base class does not provide an in-page search feature
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create zoom in/out buttons on the default help window toolbar.
|
||||||
|
* @param jHelp the java help object used to retrieve the help components
|
||||||
|
*/
|
||||||
|
protected void addCustomToolbarItems(final JHelp jHelp) {
|
||||||
|
|
||||||
|
for (Component component : jHelp.getComponents()) {
|
||||||
|
if (component instanceof JToolBar) {
|
||||||
|
JToolBar toolbar = (JToolBar) component;
|
||||||
|
toolbar.addSeparator();
|
||||||
|
|
||||||
|
ImageIcon zoomOutIcon = ResourceManager.getScaledIcon(ZOOM_OUT_ICON, 24, 24);
|
||||||
|
JButton zoomOutBtn = new JButton(zoomOutIcon);
|
||||||
|
zoomOutBtn.setToolTipText("Zoom out");
|
||||||
|
zoomOutBtn.addActionListener(e -> {
|
||||||
|
GHelpHTMLEditorKit.zoomOut();
|
||||||
|
|
||||||
|
// Need to reload the page to force the scroll panes to resize properly. A
|
||||||
|
// simple revalidate/repaint won't do it.
|
||||||
|
reloadHelpPage(getCurrentURL());
|
||||||
|
});
|
||||||
|
toolbar.add(zoomOutBtn);
|
||||||
|
|
||||||
|
ImageIcon zoomInIcon = ResourceManager.getScaledIcon(ZOOM_IN_ICON, 24, 24);
|
||||||
|
JButton zoomInBtn = new JButton(zoomInIcon);
|
||||||
|
zoomInBtn.setToolTipText("Zoom in");
|
||||||
|
zoomInBtn.addActionListener(e -> {
|
||||||
|
GHelpHTMLEditorKit.zoomIn();
|
||||||
|
|
||||||
|
// Need to reload the page to force the scroll panes to resize properly. A
|
||||||
|
// simple revalidate/repaint won't do it.
|
||||||
|
reloadHelpPage(getCurrentURL());
|
||||||
|
});
|
||||||
|
toolbar.add(zoomInBtn);
|
||||||
|
|
||||||
|
// Once we've found the toolbar we can break out of the loop and stop looking for it.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void installActions(JHelp help) {
|
||||||
|
// subclasses may have actions
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getHistoryName(URL URL) {
|
||||||
|
String text = URL.getFile();
|
||||||
|
int index = text.lastIndexOf('/');
|
||||||
|
if (index != -1) {
|
||||||
|
// we want just the filename
|
||||||
|
text = text.substring(index + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
String ref = URL.getRef();
|
||||||
|
if (ref != null) {
|
||||||
|
text += " - " + ref;
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void installRootPane(JFrame frame) {
|
||||||
|
Component oldGlassPane = frame.getGlassPane();
|
||||||
|
if (!(oldGlassPane instanceof GGlassPane)) {
|
||||||
|
GGlassPane gGlassPane = new GGlassPane();
|
||||||
|
frame.setGlassPane(gGlassPane);
|
||||||
|
gGlassPane.setVisible(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void installRootPane(JDialog dialog) {
|
||||||
|
Component oldGlassPane = dialog.getGlassPane();
|
||||||
|
if (!(oldGlassPane instanceof GGlassPane)) {
|
||||||
|
GGlassPane gGlassPane = new GGlassPane();
|
||||||
|
dialog.setGlassPane(gGlassPane);
|
||||||
|
gGlassPane.setVisible(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateWindowSize(WindowPresentation presentation) {
|
||||||
|
if (windowSize == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
presentation.createHelpWindow();
|
||||||
|
presentation.setSize(windowSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setActivationWindow(Window window) {
|
||||||
|
WindowPresentation windowPresentation = getWindowPresentation();
|
||||||
|
Window helpWindow = windowPresentation.getHelpWindow();
|
||||||
|
if (helpWindow == null) {
|
||||||
|
activationWindow = window;
|
||||||
|
super.setActivationWindow(window);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
windowSize = helpWindow.getSize();// remember the previous size
|
||||||
|
|
||||||
|
boolean wasModal = isModalWindow(helpWindow);
|
||||||
|
boolean willBeModal = isModalWindow(window);
|
||||||
|
if (!wasModal && willBeModal) {
|
||||||
|
// in this condition, a new window will be shown, but the old one is not properly
|
||||||
|
// closed by JavaHelp
|
||||||
|
helpWindow.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
super.setActivationWindow(window);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isModalWindow(Window window) {
|
||||||
|
if (window instanceof Dialog) {
|
||||||
|
Dialog dialog = (Dialog) window;
|
||||||
|
if (dialog.isModal()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,7 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package docking.help;
|
package help;
|
||||||
|
|
||||||
import java.awt.Desktop;
|
import java.awt.Desktop;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
|
@ -13,7 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package docking.help;
|
package help;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
|
@ -13,10 +13,9 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package docking.help;
|
package help;
|
||||||
|
|
||||||
import docking.DefaultHelpService;
|
import docking.DefaultHelpService;
|
||||||
import docking.DockingWindowManager;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the HelpManager for the application. This is just a glorified global variable for
|
* Creates the HelpManager for the application. This is just a glorified global variable for
|
||||||
|
@ -36,9 +35,8 @@ public class Help {
|
||||||
}
|
}
|
||||||
|
|
||||||
// allows help services to install themselves
|
// allows help services to install themselves
|
||||||
static void installHelpService(HelpService service) {
|
public static void installHelpService(HelpService service) {
|
||||||
helpService = service;
|
helpService = service;
|
||||||
DockingWindowManager.setHelpService(helpService);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,6 +1,5 @@
|
||||||
/* ###
|
/* ###
|
||||||
* IP: GHIDRA
|
* IP: GHIDRA
|
||||||
* REVIEWED: YES
|
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -14,18 +13,20 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package docking.help;
|
package help;
|
||||||
|
|
||||||
public interface HelpDescriptor {
|
public interface HelpDescriptor {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the object for which help locations are defined. This may be the implementor of
|
* Returns the object for which help locations are defined. This may be the implementor of
|
||||||
* this interface or some other delegate object.
|
* this interface or some other delegate object.
|
||||||
|
* @return the help object
|
||||||
*/
|
*/
|
||||||
public Object getHelpObject();
|
public Object getHelpObject();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a descriptive String about the help object that this descriptor represents.
|
* Returns a descriptive String about the help object that this descriptor represents.
|
||||||
|
* @return the help info
|
||||||
*/
|
*/
|
||||||
public String getHelpInfo();
|
public String getHelpInfo();
|
||||||
}
|
}
|
|
@ -13,7 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package docking.help;
|
package help;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
|
@ -1,6 +1,5 @@
|
||||||
/* ###
|
/* ###
|
||||||
* IP: GHIDRA
|
* IP: GHIDRA
|
||||||
* REVIEWED: YES
|
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -16,22 +15,14 @@
|
||||||
*/
|
*/
|
||||||
package help;
|
package help;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
import java.nio.file.*;
|
||||||
import java.io.OutputStreamWriter;
|
import java.util.*;
|
||||||
import java.nio.file.DirectoryStream;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public class JavaHelpSetBuilder {
|
public class JavaHelpSetBuilder {
|
||||||
private static final String TAB = "\t";
|
private static final String TAB = "\t";
|
||||||
private static final Set<String> searchFileNames =
|
private static final Set<String> searchFileNames = new HashSet<String>(Arrays
|
||||||
new HashSet<String>(Arrays.asList(new String[] { "DOCS", "DOCS.TAB", "OFFSETS",
|
.asList(new String[] { "DOCS", "DOCS.TAB", "OFFSETS", "POSITIONS", "SCHEMA", "TMAP" }));
|
||||||
"POSITIONS", "SCHEMA", "TMAP" }));
|
|
||||||
private static int indentionLevel;
|
private static int indentionLevel;
|
||||||
|
|
||||||
private final String moduleName;
|
private final String moduleName;
|
||||||
|
@ -97,7 +88,7 @@ public class JavaHelpSetBuilder {
|
||||||
indentionLevel++;
|
indentionLevel++;
|
||||||
writeLine("<name>TOC</name>", writer);
|
writeLine("<name>TOC</name>", writer);
|
||||||
writeLine("<label>Ghidra Table of Contents</label>", writer);
|
writeLine("<label>Ghidra Table of Contents</label>", writer);
|
||||||
writeLine("<type>docking.help.CustomTOCView</type>", writer);
|
writeLine("<type>" + CustomTOCView.class.getName() + "</type>", writer);
|
||||||
writeLine("<data>" + helpSetTOCFile.getFileName() + "</data>", writer);
|
writeLine("<data>" + helpSetTOCFile.getFileName() + "</data>", writer);
|
||||||
indentionLevel--;
|
indentionLevel--;
|
||||||
|
|
||||||
|
@ -116,7 +107,7 @@ public class JavaHelpSetBuilder {
|
||||||
writeLine("<name>Search</name>", writer);
|
writeLine("<name>Search</name>", writer);
|
||||||
writeLine("<label>Search for Keywords</label>", writer);
|
writeLine("<label>Search for Keywords</label>", writer);
|
||||||
// writeLine("<type>javax.help.SearchView</type>", writer);
|
// writeLine("<type>javax.help.SearchView</type>", writer);
|
||||||
writeLine("<type>docking.help.CustomSearchView</type>", writer);
|
writeLine("<type>" + CustomSearchView.class.getName() + "</type>", writer);
|
||||||
|
|
||||||
if (hasIndexerFiles(helpSearchDirectory)) {
|
if (hasIndexerFiles(helpSearchDirectory)) {
|
||||||
writeLine("<data engine=\"com.sun.java.help.search.DefaultSearchEngine\">" +
|
writeLine("<data engine=\"com.sun.java.help.search.DefaultSearchEngine\">" +
|
||||||
|
@ -148,7 +139,7 @@ public class JavaHelpSetBuilder {
|
||||||
// writeLine( "<label>Favorites</label>", writer );
|
// writeLine( "<label>Favorites</label>", writer );
|
||||||
// writeLine( "<type>javax.help.FavoritesView</type>", writer );
|
// writeLine( "<type>javax.help.FavoritesView</type>", writer );
|
||||||
writeLine("<label>Ghidra Favorites</label>", writer);
|
writeLine("<label>Ghidra Favorites</label>", writer);
|
||||||
writeLine("<type>docking.help.CustomFavoritesView</type>", writer);
|
writeLine("<type>" + CustomFavoritesView.class.getName() + "</type>", writer);
|
||||||
indentionLevel--;
|
indentionLevel--;
|
||||||
|
|
||||||
writeLine("</view>", writer);
|
writeLine("</view>", writer);
|
||||||
|
@ -158,8 +149,8 @@ public class JavaHelpSetBuilder {
|
||||||
throws IOException {
|
throws IOException {
|
||||||
writer.write("<?xml version='1.0' encoding='ISO-8859-1' ?>");
|
writer.write("<?xml version='1.0' encoding='ISO-8859-1' ?>");
|
||||||
writer.newLine();
|
writer.newLine();
|
||||||
writer.write("<!DOCTYPE helpset PUBLIC \"-//Sun Microsystems Inc.//DTD JavaHelp "
|
writer.write("<!DOCTYPE helpset PUBLIC \"-//Sun Microsystems Inc.//DTD JavaHelp " +
|
||||||
+ "HelpSet Version 2.0//EN\" \"http://java.sun.com/products/javahelp/helpset_2_0.dtd\">");
|
"HelpSet Version 2.0//EN\" \"http://java.sun.com/products/javahelp/helpset_2_0.dtd\">");
|
||||||
writer.newLine();
|
writer.newLine();
|
||||||
writer.newLine();
|
writer.newLine();
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@ import javax.help.Map.ID;
|
||||||
import javax.help.TOCView;
|
import javax.help.TOCView;
|
||||||
import javax.swing.tree.DefaultMutableTreeNode;
|
import javax.swing.tree.DefaultMutableTreeNode;
|
||||||
|
|
||||||
import docking.help.CustomTOCView.CustomTreeItemDecorator;
|
|
||||||
import help.HelpBuildUtils;
|
import help.HelpBuildUtils;
|
||||||
import help.TOCItemProvider;
|
import help.TOCItemProvider;
|
||||||
|
import help.CustomTOCView.CustomTreeItemDecorator;
|
||||||
import help.validator.model.*;
|
import help.validator.model.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,8 +26,8 @@ import java.util.regex.Pattern;
|
||||||
import javax.help.HelpSet;
|
import javax.help.HelpSet;
|
||||||
import javax.help.HelpSetException;
|
import javax.help.HelpSetException;
|
||||||
|
|
||||||
import docking.help.GHelpSet;
|
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
|
import help.GHelpSet;
|
||||||
import help.validator.model.GhidraTOCFile;
|
import help.validator.model.GhidraTOCFile;
|
||||||
|
|
||||||
public class JarHelpModuleLocation extends HelpModuleLocation {
|
public class JarHelpModuleLocation extends HelpModuleLocation {
|
||||||
|
|
|
@ -37,8 +37,6 @@ import db.buffers.DataBuffer;
|
||||||
import docking.*;
|
import docking.*;
|
||||||
import docking.action.DockingAction;
|
import docking.action.DockingAction;
|
||||||
import docking.action.MenuData;
|
import docking.action.MenuData;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.tool.ToolConstants;
|
import docking.tool.ToolConstants;
|
||||||
import docking.util.AnimationUtils;
|
import docking.util.AnimationUtils;
|
||||||
import docking.util.image.ToolIconURL;
|
import docking.util.image.ToolIconURL;
|
||||||
|
@ -77,6 +75,8 @@ import ghidra.util.exception.VersionException;
|
||||||
import ghidra.util.task.*;
|
import ghidra.util.task.*;
|
||||||
import ghidra.util.xml.GenericXMLOutputter;
|
import ghidra.util.xml.GenericXMLOutputter;
|
||||||
import ghidra.util.xml.XmlUtilities;
|
import ghidra.util.xml.XmlUtilities;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tool that serves as the the Ghidra Project Window. Only those plugins that
|
* Tool that serves as the the Ghidra Project Window. Only those plugins that
|
||||||
|
|
|
@ -25,14 +25,14 @@ import org.apache.logging.log4j.core.LoggerContext;
|
||||||
import org.apache.logging.log4j.core.config.Configuration;
|
import org.apache.logging.log4j.core.config.Configuration;
|
||||||
|
|
||||||
import docking.StatusBarSpacer;
|
import docking.StatusBarSpacer;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.EmptyBorderButton;
|
import docking.widgets.EmptyBorderButton;
|
||||||
import docking.widgets.label.GDLabel;
|
import docking.widgets.label.GDLabel;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.layout.HorizontalLayout;
|
import ghidra.util.layout.HorizontalLayout;
|
||||||
import ghidra.util.task.BufferedSwingRunner;
|
import ghidra.util.task.BufferedSwingRunner;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import log.LogListener;
|
import log.LogListener;
|
||||||
import log.LogPanelAppender;
|
import log.LogPanelAppender;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
|
@ -26,8 +26,6 @@ import javax.swing.*;
|
||||||
|
|
||||||
import docking.ActionContext;
|
import docking.ActionContext;
|
||||||
import docking.ComponentProvider;
|
import docking.ComponentProvider;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.tabbedpane.DockingTabRenderer;
|
import docking.widgets.tabbedpane.DockingTabRenderer;
|
||||||
import ghidra.framework.main.datatable.ProjectDataTablePanel;
|
import ghidra.framework.main.datatable.ProjectDataTablePanel;
|
||||||
import ghidra.framework.main.datatree.ProjectDataTreePanel;
|
import ghidra.framework.main.datatree.ProjectDataTreePanel;
|
||||||
|
@ -35,6 +33,8 @@ import ghidra.framework.model.*;
|
||||||
import ghidra.framework.options.SaveState;
|
import ghidra.framework.options.SaveState;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages the data tree for the active project, and the trees for the
|
* Manages the data tree for the active project, and the trees for the
|
||||||
|
|
|
@ -26,8 +26,6 @@ import javax.swing.*;
|
||||||
import javax.swing.border.BevelBorder;
|
import javax.swing.border.BevelBorder;
|
||||||
|
|
||||||
import docking.DialogComponentProvider;
|
import docking.DialogComponentProvider;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.OptionDialog;
|
import docking.widgets.OptionDialog;
|
||||||
import docking.widgets.label.GDLabel;
|
import docking.widgets.label.GDLabel;
|
||||||
import docking.widgets.label.GLabel;
|
import docking.widgets.label.GLabel;
|
||||||
|
@ -45,6 +43,8 @@ import ghidra.util.exception.CancelledException;
|
||||||
import ghidra.util.layout.PairLayout;
|
import ghidra.util.layout.PairLayout;
|
||||||
import ghidra.util.layout.VerticalLayout;
|
import ghidra.util.layout.VerticalLayout;
|
||||||
import ghidra.util.task.*;
|
import ghidra.util.task.*;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,8 +29,6 @@ import org.jdesktop.animation.timing.TimingTargetAdapter;
|
||||||
|
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.dnd.*;
|
import docking.dnd.*;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.tool.ToolConstants;
|
import docking.tool.ToolConstants;
|
||||||
import docking.util.image.ToolIconURL;
|
import docking.util.image.ToolIconURL;
|
||||||
import docking.widgets.EmptyBorderButton;
|
import docking.widgets.EmptyBorderButton;
|
||||||
|
@ -40,6 +38,8 @@ import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
import ghidra.util.bean.GGlassPane;
|
import ghidra.util.bean.GGlassPane;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component that is a drop target for a DataTreeTransferable object.
|
* Component that is a drop target for a DataTreeTransferable object.
|
||||||
|
|
|
@ -23,8 +23,6 @@ import java.util.HashMap;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.border.Border;
|
import javax.swing.border.Border;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.combobox.GComboBox;
|
import docking.widgets.combobox.GComboBox;
|
||||||
import docking.widgets.dialogs.InputDialog;
|
import docking.widgets.dialogs.InputDialog;
|
||||||
import ghidra.framework.model.*;
|
import ghidra.framework.model.*;
|
||||||
|
@ -32,6 +30,8 @@ import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.exception.DuplicateNameException;
|
import ghidra.util.exception.DuplicateNameException;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
class WorkspacePanel extends JPanel implements WorkspaceChangeListener {
|
class WorkspacePanel extends JPanel implements WorkspaceChangeListener {
|
||||||
private final static long serialVersionUID = 1L;
|
private final static long serialVersionUID = 1L;
|
||||||
|
|
|
@ -25,8 +25,6 @@ import javax.swing.*;
|
||||||
|
|
||||||
import docking.ActionContext;
|
import docking.ActionContext;
|
||||||
import docking.ComponentProvider;
|
import docking.ComponentProvider;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.label.GHtmlLabel;
|
import docking.widgets.label.GHtmlLabel;
|
||||||
import docking.widgets.table.*;
|
import docking.widgets.table.*;
|
||||||
import docking.widgets.table.threaded.*;
|
import docking.widgets.table.threaded.*;
|
||||||
|
@ -36,6 +34,8 @@ import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
import ghidra.util.bean.GGlassPane;
|
import ghidra.util.bean.GGlassPane;
|
||||||
import ghidra.util.bean.GGlassPanePainter;
|
import ghidra.util.bean.GGlassPanePainter;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
public class ProjectDataTablePanel extends JPanel {
|
public class ProjectDataTablePanel extends JPanel {
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ import javax.swing.tree.TreeSelectionModel;
|
||||||
|
|
||||||
import docking.ActionContext;
|
import docking.ActionContext;
|
||||||
import docking.ComponentProvider;
|
import docking.ComponentProvider;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.tree.GTreeNode;
|
import docking.widgets.tree.GTreeNode;
|
||||||
import docking.widgets.tree.support.GTreeSelectionListener;
|
import docking.widgets.tree.support.GTreeSelectionListener;
|
||||||
import ghidra.framework.main.FrontEndPlugin;
|
import ghidra.framework.main.FrontEndPlugin;
|
||||||
|
@ -36,6 +34,8 @@ import ghidra.framework.main.FrontEndTool;
|
||||||
import ghidra.framework.model.*;
|
import ghidra.framework.model.*;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Panel that contains a DataTree for showing project data.
|
* Panel that contains a DataTree for showing project data.
|
||||||
|
|
|
@ -37,8 +37,6 @@ import docking.actions.PopupActionProvider;
|
||||||
import docking.actions.ToolActions;
|
import docking.actions.ToolActions;
|
||||||
import docking.framework.AboutDialog;
|
import docking.framework.AboutDialog;
|
||||||
import docking.framework.ApplicationInformationDisplayFactory;
|
import docking.framework.ApplicationInformationDisplayFactory;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.tool.ToolConstants;
|
import docking.tool.ToolConstants;
|
||||||
import docking.tool.util.DockingToolConstants;
|
import docking.tool.util.DockingToolConstants;
|
||||||
import docking.util.image.ToolIconURL;
|
import docking.util.image.ToolIconURL;
|
||||||
|
@ -57,6 +55,8 @@ import ghidra.framework.plugintool.util.*;
|
||||||
import ghidra.framework.project.ProjectDataService;
|
import ghidra.framework.project.ProjectDataService;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
import ghidra.util.task.*;
|
import ghidra.util.task.*;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class that is a container to manage plugins and their actions, and to coordinate the
|
* Base class that is a container to manage plugins and their actions, and to coordinate the
|
||||||
|
|
|
@ -23,12 +23,12 @@ import java.util.Set;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.table.TableColumn;
|
import javax.swing.table.TableColumn;
|
||||||
|
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.table.*;
|
import docking.widgets.table.*;
|
||||||
import ghidra.app.util.GenericHelpTopics;
|
import ghidra.app.util.GenericHelpTopics;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Container for the {@link GTable} that displays ghidra extensions.
|
* Container for the {@link GTable} that displays ghidra extensions.
|
||||||
|
|
|
@ -32,8 +32,6 @@ import docking.KeyEntryTextField;
|
||||||
import docking.action.DockingActionIf;
|
import docking.action.DockingActionIf;
|
||||||
import docking.action.KeyBindingData;
|
import docking.action.KeyBindingData;
|
||||||
import docking.actions.KeyBindingUtils;
|
import docking.actions.KeyBindingUtils;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.tool.util.DockingToolConstants;
|
import docking.tool.util.DockingToolConstants;
|
||||||
import docking.widgets.*;
|
import docking.widgets.*;
|
||||||
import docking.widgets.label.GIconLabel;
|
import docking.widgets.label.GIconLabel;
|
||||||
|
@ -45,6 +43,8 @@ import ghidra.util.*;
|
||||||
import ghidra.util.exception.AssertException;
|
import ghidra.util.exception.AssertException;
|
||||||
import ghidra.util.layout.PairLayout;
|
import ghidra.util.layout.PairLayout;
|
||||||
import ghidra.util.layout.VerticalLayout;
|
import ghidra.util.layout.VerticalLayout;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
import resources.Icons;
|
import resources.Icons;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
|
|
|
@ -22,14 +22,14 @@ import javax.swing.*;
|
||||||
import javax.swing.table.TableColumn;
|
import javax.swing.table.TableColumn;
|
||||||
|
|
||||||
import docking.DialogComponentProvider;
|
import docking.DialogComponentProvider;
|
||||||
import docking.help.Help;
|
|
||||||
import docking.help.HelpService;
|
|
||||||
import docking.widgets.table.*;
|
import docking.widgets.table.*;
|
||||||
import ghidra.app.util.GenericHelpTopics;
|
import ghidra.app.util.GenericHelpTopics;
|
||||||
import ghidra.framework.plugintool.PluginConfigurationModel;
|
import ghidra.framework.plugintool.PluginConfigurationModel;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.framework.plugintool.util.PluginDescription;
|
import ghidra.framework.plugintool.util.PluginDescription;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
|
import help.Help;
|
||||||
|
import help.HelpService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialog that displays plugins in a tabular format, allowing users to install or uninstall them. The
|
* Dialog that displays plugins in a tabular format, allowing users to install or uninstall them. The
|
||||||
|
|