Skip to content

Commit 78d9a6c

Browse files
committed
Merge remote-tracking branch
'origin/GP-3349_ghidragon_adding_support_for_mutliple_default_contexts--SQUASHED' Conflicts: Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin2Test.java
2 parents 5708d69 + 5da5af2 commit 78d9a6c

File tree

149 files changed

+1353
-1231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+1353
-1231
lines changed

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/DebuggerSnapActionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
*/
1616
package ghidra.app.plugin.core.debug.gui;
1717

18-
import docking.ActionContext;
18+
import docking.DefaultActionContext;
1919
import ghidra.trace.model.Trace;
2020

21-
public class DebuggerSnapActionContext extends ActionContext {
21+
public class DebuggerSnapActionContext extends DefaultActionContext {
2222
private final Trace trace;
2323
private final long snap;
2424

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointLocationsActionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import java.util.Collection;
1919
import java.util.stream.Collectors;
2020

21-
import docking.ActionContext;
21+
import docking.DefaultActionContext;
2222
import ghidra.trace.model.breakpoint.TraceBreakpoint;
2323

24-
public class DebuggerBreakpointLocationsActionContext extends ActionContext {
24+
public class DebuggerBreakpointLocationsActionContext extends DefaultActionContext {
2525
private final Collection<BreakpointLocationRow> selection;
2626

2727
public DebuggerBreakpointLocationsActionContext(Collection<BreakpointLocationRow> selection) {

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerLogicalBreakpointsActionContext.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import java.util.Collection;
1919
import java.util.stream.Collectors;
2020

21-
import docking.ActionContext;
21+
import docking.DefaultActionContext;
2222
import ghidra.app.services.LogicalBreakpoint;
2323

24-
public class DebuggerLogicalBreakpointsActionContext extends ActionContext {
24+
public class DebuggerLogicalBreakpointsActionContext extends DefaultActionContext {
2525
private final Collection<LogicalBreakpointRow> selection;
2626

2727
public DebuggerLogicalBreakpointsActionContext(Collection<LogicalBreakpointRow> selection) {
@@ -34,7 +34,7 @@ public Collection<LogicalBreakpointRow> getSelection() {
3434

3535
public Collection<LogicalBreakpoint> getBreakpoints() {
3636
return selection.stream()
37-
.map(row -> row.getLogicalBreakpoint())
38-
.collect(Collectors.toList());
37+
.map(row -> row.getLogicalBreakpoint())
38+
.collect(Collectors.toList());
3939
}
4040
}

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerMakeBreakpointsEffectiveActionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
*/
1616
package ghidra.app.plugin.core.debug.gui.breakpoint;
1717

18-
import docking.ActionContext;
18+
import docking.DefaultActionContext;
1919

2020
// TODO: Any granularity, or just one suggested action on the global tool?
21-
public class DebuggerMakeBreakpointsEffectiveActionContext extends ActionContext {
21+
public class DebuggerMakeBreakpointsEffectiveActionContext extends DefaultActionContext {
2222
// Nothing to add
2323
}

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/console/LogRowConsoleActionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616
package ghidra.app.plugin.core.debug.gui.console;
1717

18-
import docking.ActionContext;
18+
import docking.DefaultActionContext;
1919

20-
public class LogRowConsoleActionContext extends ActionContext {
20+
public class LogRowConsoleActionContext extends DefaultActionContext {
2121

2222
}

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/listing/DebuggerOpenProgramActionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
import java.util.Objects;
1919

20-
import docking.ActionContext;
20+
import docking.DefaultActionContext;
2121
import ghidra.framework.model.DomainFile;
2222

23-
public class DebuggerOpenProgramActionContext extends ActionContext {
23+
public class DebuggerOpenProgramActionContext extends DefaultActionContext {
2424
private final DomainFile df;
2525
private final int hashCode;
2626

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/memory/DebuggerRegionActionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import java.util.Collection;
1919
import java.util.Set;
2020

21-
import docking.ActionContext;
21+
import docking.DefaultActionContext;
2222
import docking.widgets.table.GTable;
2323

24-
public class DebuggerRegionActionContext extends ActionContext {
24+
public class DebuggerRegionActionContext extends DefaultActionContext {
2525
private final Set<RegionRow> selectedRegions;
2626

2727
public DebuggerRegionActionContext(DebuggerRegionsProvider provider,

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/memview/MemviewProvider.java

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import javax.swing.*;
2424

2525
import docking.ActionContext;
26+
import docking.DefaultActionContext;
2627
import docking.action.DockingAction;
2728
import docking.action.builder.ToggleActionBuilder;
2829
import ghidra.app.plugin.core.debug.DebuggerPluginPackage;
@@ -96,27 +97,27 @@ private void createActions() {
9697
tool.addLocalAction(this, zoomOutTAction);
9798

9899
new ToggleActionBuilder("Toggle Layout", plugin.getName()) //
99-
//.menuPath("&Toggle layout") //
100-
.toolBarIcon(AbstractRefreshAction.ICON)
101-
.helpLocation(new HelpLocation(plugin.getName(), "toggle_layout")) //
102-
.onAction(ctx -> performToggleLayout(ctx))
103-
.buildAndInstallLocal(this);
100+
//.menuPath("&Toggle layout") //
101+
.toolBarIcon(AbstractRefreshAction.ICON)
102+
.helpLocation(new HelpLocation(plugin.getName(), "toggle_layout")) //
103+
.onAction(ctx -> performToggleLayout(ctx))
104+
.buildAndInstallLocal(this);
104105

105106
new ToggleActionBuilder("Toggle Process Trace", plugin.getName()) //
106-
//.menuPath("&Toggle layout") //
107-
.toolBarIcon(DebuggerResources.ICON_SYNC)
108-
.helpLocation(new HelpLocation(plugin.getName(), "toggle_process_trace")) //
109-
.onAction(ctx -> performToggleTrace(ctx))
110-
.selected(false)
111-
.buildAndInstallLocal(this);
107+
//.menuPath("&Toggle layout") //
108+
.toolBarIcon(DebuggerResources.ICON_SYNC)
109+
.helpLocation(new HelpLocation(plugin.getName(), "toggle_process_trace")) //
110+
.onAction(ctx -> performToggleTrace(ctx))
111+
.selected(false)
112+
.buildAndInstallLocal(this);
112113

113114
new ToggleActionBuilder("Apply Filter To Panel", plugin.getName()) //
114-
//.menuPath("&Toggle layout") //
115-
.toolBarIcon(DebuggerResources.ICON_FILTER)
116-
.helpLocation(new HelpLocation(plugin.getName(), "apply_to_panel")) //
117-
.onAction(ctx -> performApplyFilterToPanel(ctx))
118-
.selected(true)
119-
.buildAndInstallLocal(this);
115+
//.menuPath("&Toggle layout") //
116+
.toolBarIcon(DebuggerResources.ICON_FILTER)
117+
.helpLocation(new HelpLocation(plugin.getName(), "apply_to_panel")) //
118+
.onAction(ctx -> performApplyFilterToPanel(ctx))
119+
.selected(true)
120+
.buildAndInstallLocal(this);
120121

121122
}
122123

@@ -176,10 +177,10 @@ void dispose() {
176177
@Override
177178
public ActionContext getActionContext(MouseEvent event) {
178179
if (event != null && event.getSource() == mainPanel) {
179-
return new ActionContext(this, mainPanel);
180+
return new DefaultActionContext(this, mainPanel);
180181
}
181182
if (event != null && event.getSource() == memviewPanel) {
182-
return new ActionContext(this, memviewPanel);
183+
return new DefaultActionContext(this, memviewPanel);
183184
}
184185
return null;
185186
}
@@ -217,7 +218,7 @@ public void refresh() {
217218
public void goTo(int x, int y) {
218219
Rectangle bounds = scrollPane.getBounds();
219220
scrollPane.getViewport()
220-
.scrollRectToVisible(new Rectangle(x, y, bounds.width, bounds.height));
221+
.scrollRectToVisible(new Rectangle(x, y, bounds.width, bounds.height));
221222
scrollPane.getViewport().doLayout();
222223
}
223224

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/model/DebuggerObjectActionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
import java.util.Collection;
2020
import java.util.List;
2121

22-
import docking.ActionContext;
2322
import docking.ComponentProvider;
23+
import docking.DefaultActionContext;
2424
import ghidra.trace.model.target.TraceObjectValue;
2525

26-
public class DebuggerObjectActionContext extends ActionContext {
26+
public class DebuggerObjectActionContext extends DefaultActionContext {
2727
private final List<TraceObjectValue> objectValues;
2828

2929
public DebuggerObjectActionContext(Collection<TraceObjectValue> objectValues,

Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/modules/DebuggerMissingModuleActionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
import java.util.Objects;
1919

20-
import docking.ActionContext;
20+
import docking.DefaultActionContext;
2121
import ghidra.trace.model.modules.TraceModule;
2222

23-
public class DebuggerMissingModuleActionContext extends ActionContext {
23+
public class DebuggerMissingModuleActionContext extends DefaultActionContext {
2424
private final TraceModule module;
2525
private final int hashCode;
2626

0 commit comments

Comments
 (0)