diff --git a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/DBTraceDefinedDataAdapter.java b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/DBTraceDefinedDataAdapter.java index be761171ab..5803ea66aa 100644 --- a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/DBTraceDefinedDataAdapter.java +++ b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/DBTraceDefinedDataAdapter.java @@ -124,12 +124,6 @@ public interface DBTraceDefinedDataAdapter extends DBTraceDataAdapter { } } - @Deprecated - @Override - default DBTraceDefinedDataAdapter getComponentAt(int offset) { - return getComponentContaining(offset); - } - @Override default DBTraceDefinedDataAdapter getComponentContaining(int offset) { // We may write to the cache @@ -216,11 +210,11 @@ public interface DBTraceDefinedDataAdapter extends DBTraceDataAdapter { @Override default DBTraceDefinedDataAdapter getPrimitiveAt(int offset) { // We may write to the cache - try (LockHold hold = LockHold.lock(getTrace().getReadWriteLock().writeLock())) { + try (LockHold _ = LockHold.lock(getTrace().getReadWriteLock().writeLock())) { if (offset < 0 || offset >= getLength()) { return null; } - DBTraceDefinedDataAdapter component = getComponentAt(offset); + DBTraceDefinedDataAdapter component = getComponentContaining(offset); if (component == null || component == this) { return this; } diff --git a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/UndefinedDBTraceData.java b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/UndefinedDBTraceData.java index ea436391a7..11c2d38ae7 100644 --- a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/UndefinedDBTraceData.java +++ b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/UndefinedDBTraceData.java @@ -244,11 +244,6 @@ public class UndefinedDBTraceData implements DBTraceDataAdapter, TraceSpaceMixin return 0; } - @Override - public TraceData getComponentAt(int offset) { - return null; - } - @Override public TraceData getComponentContaining(int offset) { return null; diff --git a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/listing/TraceData.java b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/listing/TraceData.java index f3317f6474..443a43382b 100644 --- a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/listing/TraceData.java +++ b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/listing/TraceData.java @@ -4,9 +4,9 @@ * 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. @@ -26,9 +26,6 @@ public interface TraceData extends TraceCodeUnit, Data { @Override TraceData getComponent(int index); - @Override - TraceData getComponentAt(int offset); - @Override TraceData getComponentContaining(int offset); diff --git a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/util/TraceRegisterUtils.java b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/util/TraceRegisterUtils.java index 414cafc6c9..78d8bc8ff2 100644 --- a/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/util/TraceRegisterUtils.java +++ b/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/util/TraceRegisterUtils.java @@ -200,7 +200,7 @@ public enum TraceRegisterUtils { } // we know data contains register, and data cannot exceed Integer.MAX_VALUE in length int offset = (int) range.getMinAddress().subtract(data.getMinAddress()); - TraceData component = data.getComponentAt(offset); + TraceData component = data.getComponentContaining(offset); if (component == null) { // TODO: I'm not sure this can happen return null; } diff --git a/Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/listing/DBTraceCodeUnitTest.java b/Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/listing/DBTraceCodeUnitTest.java index 5c17fe7dda..7c6862861a 100644 --- a/Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/listing/DBTraceCodeUnitTest.java +++ b/Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/listing/DBTraceCodeUnitTest.java @@ -1687,41 +1687,41 @@ public class DBTraceCodeUnitTest extends AbstractGhidraHeadlessIntegrationTest { assertEquals("tac", d400c.getComponent(2).getValue()); assertEquals("toe", d400c.getComponent(3).getValue()); - assertNull(u3fff.getComponentAt(0)); - assertNull(d4000.getComponentAt(0)); + assertNull(u3fff.getComponentContaining(0)); + assertNull(d4000.getComponentContaining(0)); - assertNull(d4004.getComponentAt(-1)); - assertEquals(d4004.getComponent(0), d4004.getComponentAt(0)); - assertEquals(d4004.getComponent(0), d4004.getComponentAt(1)); - assertEquals(d4004.getComponent(1), d4004.getComponentAt(2)); - assertEquals(d4004.getComponent(1), d4004.getComponentAt(3)); - assertEquals(d4004.getComponent(2), d4004.getComponentAt(4)); - assertNull(d4004.getComponentAt(5)); + assertNull(d4004.getComponentContaining(-1)); + assertEquals(d4004.getComponent(0), d4004.getComponentContaining(0)); + assertEquals(d4004.getComponent(0), d4004.getComponentContaining(1)); + assertEquals(d4004.getComponent(1), d4004.getComponentContaining(2)); + assertEquals(d4004.getComponent(1), d4004.getComponentContaining(3)); + assertEquals(d4004.getComponent(2), d4004.getComponentContaining(4)); + assertNull(d4004.getComponentContaining(5)); - assertEquals(d400c.getComponent(0), d400c.getComponentAt(0)); - assertEquals(d400c.getComponent(0), d400c.getComponentAt(1)); - assertEquals(d400c.getComponent(1), d400c.getComponentAt(2)); - assertEquals(d400c.getComponent(1), d400c.getComponentAt(3)); - assertEquals(d400c.getComponent(1), d400c.getComponentAt(4)); - assertEquals(d400c.getComponent(1), d400c.getComponentAt(5)); - assertEquals(d400c.getComponent(2), d400c.getComponentAt(6)); - assertEquals(d400c.getComponent(2), d400c.getComponentAt(7)); - assertEquals(d400c.getComponent(2), d400c.getComponentAt(8)); - assertEquals(d400c.getComponent(2), d400c.getComponentAt(9)); - assertEquals(d400c.getComponent(3), d400c.getComponentAt(10)); - assertEquals(d400c.getComponent(3), d400c.getComponentAt(11)); - assertEquals(d400c.getComponent(3), d400c.getComponentAt(12)); - assertEquals(d400c.getComponent(3), d400c.getComponentAt(13)); + assertEquals(d400c.getComponent(0), d400c.getComponentContaining(0)); + assertEquals(d400c.getComponent(0), d400c.getComponentContaining(1)); + assertEquals(d400c.getComponent(1), d400c.getComponentContaining(2)); + assertEquals(d400c.getComponent(1), d400c.getComponentContaining(3)); + assertEquals(d400c.getComponent(1), d400c.getComponentContaining(4)); + assertEquals(d400c.getComponent(1), d400c.getComponentContaining(5)); + assertEquals(d400c.getComponent(2), d400c.getComponentContaining(6)); + assertEquals(d400c.getComponent(2), d400c.getComponentContaining(7)); + assertEquals(d400c.getComponent(2), d400c.getComponentContaining(8)); + assertEquals(d400c.getComponent(2), d400c.getComponentContaining(9)); + assertEquals(d400c.getComponent(3), d400c.getComponentContaining(10)); + assertEquals(d400c.getComponent(3), d400c.getComponentContaining(11)); + assertEquals(d400c.getComponent(3), d400c.getComponentContaining(12)); + assertEquals(d400c.getComponent(3), d400c.getComponentContaining(13)); - assertNull(d401c.getComponentAt(0)); - assertNull(d401c.getComponentAt(1)); - assertNull(d401c.getComponentAt(2)); - assertNull(d401c.getComponentAt(3)); + assertNull(d401c.getComponentContaining(0)); + assertNull(d401c.getComponentContaining(1)); + assertNull(d401c.getComponentContaining(2)); + assertNull(d401c.getComponentContaining(3)); - assertEquals(d4020.getComponent(0), d4020.getComponentAt(0)); - assertEquals(d4020.getComponent(1), d4020.getComponentAt(1)); - assertEquals(d4020.getComponent(2), d4020.getComponentAt(2)); - assertEquals(d4020.getComponent(3), d4020.getComponentAt(3)); + assertEquals(d4020.getComponent(0), d4020.getComponentContaining(0)); + assertEquals(d4020.getComponent(1), d4020.getComponentContaining(1)); + assertEquals(d4020.getComponent(2), d4020.getComponentContaining(2)); + assertEquals(d4020.getComponent(3), d4020.getComponentContaining(3)); assertNull(u3fff.getComponentsContaining(-1)); assertTrue(u3fff.getComponentsContaining(0).isEmpty()); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/ProgramMergeManagerPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/ProgramMergeManagerPlugin.java index 68f8bd5709..e28ef46718 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/ProgramMergeManagerPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/ProgramMergeManagerPlugin.java @@ -4,9 +4,9 @@ * 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. @@ -252,11 +252,6 @@ public class ProgramMergeManagerPlugin extends MergeManagerPlugin implements Pro // not supported } - @Override - public void releaseProgram(Program program, Object persistentOwner) { - // not supported - } - @Override public void saveProgram() { // not supported @@ -282,11 +277,6 @@ public class ProgramMergeManagerPlugin extends MergeManagerPlugin implements Pro // not supported } - @Override - public boolean setPersistentOwner(Program program, Object owner) { - return false; - } - public void setSearchPriority(Program p, int priority) { // not supported } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/tool/ListingMergePanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/tool/ListingMergePanel.java index a04e238cfa..a296cac82d 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/merge/tool/ListingMergePanel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/merge/tool/ListingMergePanel.java @@ -486,16 +486,6 @@ public class ListingMergePanel extends JPanel return false; } - @Override - public GoToOverrideService getOverrideService() { - return null; - } - - @Override - public void setOverrideService(GoToOverrideService override) { - // no-op - } - @Override public Navigatable getDefaultNavigatable() { return null; diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/ProgramPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/ProgramPlugin.java index 457d827d3a..94860bdc98 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/ProgramPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/ProgramPlugin.java @@ -63,35 +63,6 @@ public abstract class ProgramPlugin extends Plugin { internalRegisterEventConsumed(ProgramClosedPluginEvent.class); } - /** - * Calling this constructor is works the same as calling {@link ProgramPlugin}. - * - * @deprecated call {@link #ProgramPlugin(PluginTool)} instead - * @param plugintool the tool - * @param consumeLocationChange not used - * @param consumeSelectionChange not used - */ - @Deprecated(forRemoval = true, since = "10.2") - public ProgramPlugin(PluginTool plugintool, boolean consumeLocationChange, - boolean consumeSelectionChange) { - this(plugintool); - } - - /** - * Calling this constructor is works the same as calling {@link ProgramPlugin}. - * - * @deprecated call {@link #ProgramPlugin(PluginTool)} instead - * @param plugintool the tool - * @param consumeLocationChange not used - * @param consumeSelectionChange not used - * @param consumeHighlightChange not used - */ - @Deprecated(forRemoval = true, since = "10.2") - public ProgramPlugin(PluginTool plugintool, boolean consumeLocationChange, - boolean consumeSelectionChange, boolean consumeHighlightChange) { - this(plugintool); - } - /** * Process the plugin event. *
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/DWARFAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/DWARFAnalyzer.java index b555036ceb..a5317cd208 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/DWARFAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/DWARFAnalyzer.java @@ -45,8 +45,7 @@ public class DWARFAnalyzer extends AbstractAnalyzer { */ public static boolean isAlreadyImported(Program program) { Options options = program.getOptions(Program.PROGRAM_INFO); - return options.getBoolean(DWARF_LOADED_OPTION_NAME, false) || - oldCheckIfDWARFImported(program); + return options.getBoolean(DWARF_LOADED_OPTION_NAME, false); } private DWARFImportOptions importOptions = new DWARFImportOptions(); @@ -132,15 +131,6 @@ public class DWARFAnalyzer extends AbstractAnalyzer { return false; } - - @Deprecated(forRemoval = true, since = "10.0") - private static boolean oldCheckIfDWARFImported(Program prog) { - // this was the old way of checking if the DWARF analyzer had already been run. Keep - // it around for a little bit so existing programs that have already imported DWARF data - // don't get re-run. Remove after a release or two. - return DWARFFunctionImporter.hasDWARFProgModule(prog, DWARFProgram.DWARF_ROOT_NAME); - } - @Override public boolean canAnalyze(Program program) { return DWARFProgram.isDWARF(program); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/progmgr/ProgramManagerPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/progmgr/ProgramManagerPlugin.java index cb8d23d8a9..a618ae58af 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/progmgr/ProgramManagerPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/progmgr/ProgramManagerPlugin.java @@ -37,7 +37,6 @@ import ghidra.app.util.HelpTopics; import ghidra.app.util.NamespaceUtils; import ghidra.app.util.task.OpenProgramRequest; import ghidra.app.util.task.OpenProgramTask; -import ghidra.framework.client.ClientUtil; import ghidra.framework.main.OpenVersionedFileDialog; import ghidra.framework.model.*; import ghidra.framework.options.*; @@ -1081,20 +1080,6 @@ public class ProgramManagerPlugin extends Plugin implements ProgramManager, Opti return programMgr.isVisible(program); } - @Override - public void releaseProgram(Program program, Object owner) { - if (programMgr.contains(program)) { - programMgr.releaseProgram(program, owner); - Msg.info(ClientUtil.class, - "Released program from " + tool.getName() + " tool: " + program.getDomainFile()); - } - } - - @Override - public boolean setPersistentOwner(Program program, Object owner) { - return programMgr.setPersistentOwner(program, owner); - } - public boolean isManaged(Program program) { return programMgr.contains(program); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/strings/TrigramStringValidator.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/strings/TrigramStringValidator.java index 9cb94a714e..7753e93599 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/strings/TrigramStringValidator.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/strings/TrigramStringValidator.java @@ -4,9 +4,9 @@ * 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. @@ -29,10 +29,10 @@ import ghidra.app.services.*; * a ".sng" model file to score strings. */ public class TrigramStringValidator implements StringValidatorService { - /** - * Remove this flag when the trigram model thresholds have been recalculated - */ - @Deprecated(forRemoval = true, since = "10.3") + + // !-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! + // TODO: Remove this flag when the trigram model thresholds have been recalculated + // !-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-! private static final boolean PRESERVE_BUG_SKIP_TRIGRAM = true; // "Bad" log to be used as default score when we know the string is bad diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/services/GoToService.java b/Ghidra/Features/Base/src/main/java/ghidra/app/services/GoToService.java index b4ea7cd888..c896d46252 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/services/GoToService.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/services/GoToService.java @@ -223,10 +223,4 @@ public interface GoToService { * @return the navigatable */ public Navigatable getDefaultNavigatable(); - - @Deprecated(forRemoval = true, since = "10.2") - public GoToOverrideService getOverrideService(); - - @Deprecated(forRemoval = true, since = "10.2") - public void setOverrideService(GoToOverrideService override); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/services/ProgramManager.java b/Ghidra/Features/Base/src/main/java/ghidra/app/services/ProgramManager.java index fc089ff6c7..f4fc13ca30 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/services/ProgramManager.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/services/ProgramManager.java @@ -4,9 +4,9 @@ * 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. @@ -189,36 +189,6 @@ public interface ProgramManager { */ public void saveProgramAs(Program program); - /** - * Establish a persistent owner on an open program. This will cause the program manager to imply - * make a program hidden if it is closed. - * - * @param program the program - * @param owner the owner - * @return true if program is open and another object is not already the owner, or the specified - * owner is already the owner. - * @see #releaseProgram(Program, Object) - * @deprecated this method is no longer used by the system - */ - @Deprecated(forRemoval = true, since = "10.2") - public boolean setPersistentOwner(Program program, Object owner); - - /** - * Release the persistent ownership of a program. - *
- * The program will automatically be closed if it is hidden or was marked as temporary. If any - * of these closures corresponds to a program with changes the user will be given an opportunity - * to save or keep the program open. - *
- * If persistentOwner is not the correct owner, the method will have no affect.
- *
- * @param program the program
- * @param persistentOwner the owner defined by {@link #setPersistentOwner(Program, Object)}
- * @deprecated this method is no longer used by the system
- */
- @Deprecated(forRemoval = true, since = "10.2")
- public void releaseProgram(Program program, Object persistentOwner);
-
/**
* Closes the given program with the option of saving any changes. The exact behavior of this
* method depends on several factors. First of all, if any other tool has this program open,
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToAddressLabelDialog.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToAddressLabelDialog.java
index 7610120838..6a4caf7d52 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToAddressLabelDialog.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToAddressLabelDialog.java
@@ -106,13 +106,6 @@ public class GoToAddressLabelDialog extends ReusableDialogComponentProvider
this.navigatable = nav;
currentAddress = addr;
clearStatusText();
- GoToOverrideService override = goToService.getOverrideService();
- if (override != null) {
- JComponent comp = override.getOverrideComponent();
- if (comp != null) {
- mainPanel.add(comp, BorderLayout.SOUTH);
- }
- }
setDialogEnabled(true);
tool.showDialog(this);
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToServiceImpl.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToServiceImpl.java
index f2e0d8d486..eb7ad3c0a5 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToServiceImpl.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/GoToServiceImpl.java
@@ -38,11 +38,6 @@ public class GoToServiceImpl implements GoToService {
helper = new GoToHelper(plugin.getTool());
}
- @Override
- public GoToOverrideService getOverrideService() {
- return override;
- }
-
@Override
public boolean goTo(ProgramLocation loc) {
return helper.goTo(defaultNavigatable, loc, loc.getProgram());
@@ -155,11 +150,6 @@ public class GoToServiceImpl implements GoToService {
return goToQuery(defaultNavigatable, fromAddr, queryData, listener, monitor);
}
- @Override
- public void setOverrideService(GoToOverrideService override) {
- this.override = override;
- }
-
@Override
public Navigatable getDefaultNavigatable() {
return defaultNavigatable;
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ProgramBigListingModel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ProgramBigListingModel.java
index 3ad0d340de..074d137c5e 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ProgramBigListingModel.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ProgramBigListingModel.java
@@ -391,7 +391,7 @@ public class ProgramBigListingModel implements ListingModel, FormatModelListener
int length = dt.getLength();
for (; offset < length; offset++) {
// If not beyond structure's end, check for non-filler.
- data = parent.getComponentAt(offset);
+ data = parent.getComponentContaining(offset);
if (data != null) { // Found non filler address so return it.
return data.getMinAddress();
}
@@ -540,7 +540,6 @@ public class ProgramBigListingModel implements ListingModel, FormatModelListener
private void addUnionPostOpenData(List list, Data data, Address addr) {
DataType dt = data.getBaseDataType();
if (dt instanceof Union) {
- Address dataAddr = data.getMinAddress();
if (openCloseMgr.isDataOpen(data)) {
int openIndex = openCloseMgr.getOpenDataIndex(data);
int i = openIndex;
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/features/base/codecompare/listing/ListingDisplayGoToService.java b/Ghidra/Features/Base/src/main/java/ghidra/features/base/codecompare/listing/ListingDisplayGoToService.java
index 1d1c7fbd0e..9058884880 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/features/base/codecompare/listing/ListingDisplayGoToService.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/features/base/codecompare/listing/ListingDisplayGoToService.java
@@ -46,11 +46,6 @@ class ListingDisplayGoToService implements GoToService {
this.listingPanel = listingPanel;
}
- @Override
- public GoToOverrideService getOverrideService() {
- return null;
- }
-
@Override
public boolean goTo(ProgramLocation loc) {
return doGoTo(loc);
@@ -121,11 +116,6 @@ class ListingDisplayGoToService implements GoToService {
"Go To Address or Label Query is not allowed in a dual listing view.");
}
- @Override
- public void setOverrideService(GoToOverrideService override) {
- // ignored
- }
-
@Override
public Navigatable getDefaultNavigatable() {
return new ListingDisplayNavigator(listingPanel, this);
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/FileCache.java b/Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/FileCache.java
index 3e9e14bde5..65dff32ca0 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/FileCache.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/FileCache.java
@@ -72,21 +72,6 @@ public class FileCache {
private FileCacheMaintenanceDaemon cleanDaemon;
private ReferenceMap
- * Clients using this constructor must override
- * {@link #makeProgramSelection(ProgramSelection, ActionContext)}.
- *
- *
- * Update: the preferred constructor for clients without a plugin is
- * {@link #MakeProgramSelectionAction(Navigatable, String, GhidraTable)}.
- *
- * @param owner the action's owner
- * @param table the table needed for this action
- * @deprecated use either of the other constructors
- */
- @Deprecated(forRemoval = true, since = "10.2")
- public MakeProgramSelectionAction(String owner, GhidraTable table) {
- super("Make Selection", owner, KeyBindingType.SHARED);
- this.table = Objects.requireNonNull(table);
- init(null);
- }
-
/**
* Special constructor for clients that do not have a plugin.
*
diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/services/TestDummyGoToService.java b/Ghidra/Features/Base/src/test/java/ghidra/app/services/TestDummyGoToService.java
index 3e332dce56..0eac560229 100644
--- a/Ghidra/Features/Base/src/test/java/ghidra/app/services/TestDummyGoToService.java
+++ b/Ghidra/Features/Base/src/test/java/ghidra/app/services/TestDummyGoToService.java
@@ -105,18 +105,6 @@ public class TestDummyGoToService implements GoToService {
return false;
}
- @Override
- public GoToOverrideService getOverrideService() {
- // stub
- return null;
- }
-
- @Override
- public void setOverrideService(GoToOverrideService override) {
- // stub
-
- }
-
@Override
public Navigatable getDefaultNavigatable() {
// stub
diff --git a/Ghidra/Features/Base/src/test/java/ghidra/app/services/TestDummyProgramManager.java b/Ghidra/Features/Base/src/test/java/ghidra/app/services/TestDummyProgramManager.java
index 737052a866..0b1552ccd4 100644
--- a/Ghidra/Features/Base/src/test/java/ghidra/app/services/TestDummyProgramManager.java
+++ b/Ghidra/Features/Base/src/test/java/ghidra/app/services/TestDummyProgramManager.java
@@ -4,9 +4,9 @@
* 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.
@@ -111,17 +111,6 @@ public class TestDummyProgramManager implements ProgramManager {
// stub
}
- @Override
- public boolean setPersistentOwner(Program program, Object owner) {
- // stub
- return false;
- }
-
- @Override
- public void releaseProgram(Program program, Object persistentOwner) {
- // stub
- }
-
@Override
public boolean closeProgram(Program program, boolean ignoreChanges) {
// stub
diff --git a/Ghidra/Features/Base/src/test/java/ghidra/test/JavaCompiler.java b/Ghidra/Features/Base/src/test/java/ghidra/test/JavaCompiler.java
deleted file mode 100644
index 82b2f7b82b..0000000000
--- a/Ghidra/Features/Base/src/test/java/ghidra/test/JavaCompiler.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/* ###
- * 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 ghidra.test;
-
-import java.io.*;
-
-/**
- * Compile a java file; deletes the java file and the class file when the
- * junit exits.
- *
- *
- */
-@Deprecated(forRemoval = true, since = "10.2") // This is not used
-public class JavaCompiler {
-
- private IOThread cmdOut;
- private IOThread cmdErr;
-
- public void compile(File javaFile) {
- String name = javaFile.getName();
- String className = name.substring(0, name.indexOf(".")) + ".class";
-
- File parent = javaFile.getParentFile();
- String parentPath = parent.getAbsolutePath();
- int pos = parentPath.lastIndexOf("ghidra");
- String destPath = parentPath.substring(0, pos - 1);
-
- javaFile.deleteOnExit();
-
- File classFile = new File(parent, className);
- classFile.deleteOnExit();
-
- String classpath = System.getProperty("java.class.path");
- String javaLoc = System.getProperty("java.home");
- if (javaLoc.endsWith("jre")) {
- javaLoc = javaLoc.substring(0, javaLoc.indexOf("jre") - 1);
- }
- String argV[] = new String[6];
- argV[0] = javaLoc + File.separator + "bin" + File.separator + "javac";
- argV[1] = "-classpath";
- argV[2] = classpath;
- argV[3] = "-d";
- argV[4] = destPath;
- argV[5] = javaFile.getAbsolutePath();
- try {
- Process p = Runtime.getRuntime().exec(argV);
- for (String element : argV) {
- System.out.print(element + " ");
- }
- System.out.println();
-
- InputStream stderrStream = p.getErrorStream();
- InputStream stdinStream = p.getInputStream();
-
- setupIO(stdinStream, stderrStream);
- p.waitFor();
-
- cmdOut.join();
- cmdErr.join();
-
- }
- catch (Exception e) {
- e.printStackTrace();
- }
-
- }
-
- private void setupIO(InputStream stdin, InputStream stderr) {
- cmdOut = new IOThread(stdin); //
- cmdErr = new IOThread(stderr);
- cmdOut.start();
- cmdErr.start();
- }
-
- /**
- *
- * Thread to read from an input stream and write it to stdout.
- */
- private class IOThread extends Thread {
- private BufferedReader shellOutput;
-
- public IOThread(InputStream input) {
- shellOutput = new BufferedReader(new InputStreamReader(input));
- }
-
- @Override
- public void run() {
- String line = null;
- try {
- while ((line = shellOutput.readLine()) != null) {
- System.out.println(line);
- }
- }
- catch (Exception e) {
- e.printStackTrace();
- }
-
- }
- }
-}
diff --git a/Ghidra/Features/DataGraph/src/main/java/datagraph/data/graph/panel/model/row/DataRowObject.java b/Ghidra/Features/DataGraph/src/main/java/datagraph/data/graph/panel/model/row/DataRowObject.java
index 676bffad13..a2aea4e8b0 100644
--- a/Ghidra/Features/DataGraph/src/main/java/datagraph/data/graph/panel/model/row/DataRowObject.java
+++ b/Ghidra/Features/DataGraph/src/main/java/datagraph/data/graph/panel/model/row/DataRowObject.java
@@ -15,16 +15,13 @@
*/
package datagraph.data.graph.panel.model.row;
-import docking.widgets.table.GTable;
-import docking.widgets.table.RowObject;
import ghidra.program.model.listing.Data;
/**
- * Abstract class for displaying rows in a Data GTrable model. Similar to a {@link RowObject} in
- * a {@link GTable}. The big difference is that each row maintains its indent level and whether
- * or not is is expanded. GTrables are like tables, but with a tree like structure. Each row that is
- * a child of another row has its indent level set to one more than its parent. The expanded flag is
- * used to indicate if a given row has visible child rows showing or not.
+ * Abstract class for displaying rows in a Data GTrable model. Each row maintains its indent level
+ * and whether or not is is expanded. GTables are like tables, but with a tree like structure. Each
+ * row that is a child of another row has its indent level set to one more than its parent. The
+ * expanded flag is used to indicate if a given row has visible child rows showing or not.
*/
public abstract class DataRowObject {
@@ -78,7 +75,7 @@ public abstract class DataRowObject {
}
/**
- * @{return the Data object associated with this row.}
+ * {@return the Data object associated with this row.}
*/
public abstract Data getData();
diff --git a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffGoToService.java b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffGoToService.java
index df89a57f36..dc0b503c6f 100644
--- a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffGoToService.java
+++ b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffGoToService.java
@@ -49,11 +49,6 @@ public class DiffGoToService implements GoToService {
helper = new GoToHelper(diffPlugin.getTool());
}
- @Override
- public GoToOverrideService getOverrideService() {
- return goToService.getOverrideService();
- }
-
@Override
public boolean goTo(ProgramLocation loc) {
return diffGoTo(loc);
@@ -161,11 +156,6 @@ public class DiffGoToService implements GoToService {
return goToService.goToQuery(navigatable, fromAddr, queryData, listener, monitor);
}
- @Override
- public void setOverrideService(GoToOverrideService override) {
- // Do nothing. (May need to change this later if there is reason to override Diff.)
- }
-
@Override
public Navigatable getDefaultNavigatable() {
return goToService.getDefaultNavigatable();
diff --git a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffProgramManager.java b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffProgramManager.java
index 0a2b9ec36a..24af1abb4a 100644
--- a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffProgramManager.java
+++ b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffProgramManager.java
@@ -4,9 +4,9 @@
* 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.
@@ -113,11 +113,6 @@ public class DiffProgramManager implements ProgramManager {
// stub
}
- @Override
- public void releaseProgram(Program program, Object persistentOwner) {
- // stub
- }
-
@Override
public void saveProgram() {
// stub
@@ -142,9 +137,4 @@ public class DiffProgramManager implements ProgramManager {
public void setCurrentProgram(Program p) {
// stub
}
-
- @Override
- public boolean setPersistentOwner(Program program, Object owner) {
- return false;
- }
}
diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/dialogs/TableChooserDialog.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/dialogs/TableChooserDialog.java
deleted file mode 100644
index 1faa465e60..0000000000
--- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/dialogs/TableChooserDialog.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/* ###
- * 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.widgets.dialogs;
-
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.swing.*;
-
-import docking.DialogComponentProvider;
-import docking.widgets.table.*;
-
-/**
- * @param
- * For the best behavior, a table model implementation should extend
- * {@link AbstractSortedTableModel}, as the system is written to work for those models. Use of
- * this class as a workaround is a suitable default, but will not always result in the desired
- * behavior. A major reason for this is that if any of the table's cell values change, the
- * row objects that created for non-{@link AbstractSortedTableModel}s will not be equal to
- * those created before the data change. This causes some features to break, such as selection
- * restoration after user edits.
- *
- * @deprecated this class is no longer used and will be removed
- */
-@Deprecated(forRemoval = true, since = "10.1")
-public class RowObject {
-
- /**
- * Factory method to create and initialize a row object.
- *
- * @param model the model required to gather data for the row object.
- * @param row the row for which to create a row object
- * @return the row object
- */
- public static RowObject createRowObject(TableModel model, int row) {
- RowObject rowObject = new RowObject();
- int columns = model.getColumnCount();
- for (int i = 0; i < columns; i++) {
- rowObject.addElement(model.getValueAt(row, i));
- }
- return rowObject;
- }
-
- List