GP-7104: Starting to remove stuff marked deprecated since 10.x (and

older)
This commit is contained in:
Ryan Kurtz
2026-07-30 13:13:50 -04:00
parent 79c5490042
commit 79fe87452d
43 changed files with 129 additions and 453 deletions

View File

@@ -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.
@@ -69,29 +69,6 @@ public class ApplyFunctionSignatureCmd extends BackgroundCommand<Program> {
FunctionRenameOption.RENAME_IF_DEFAULT);
}
/**
* Constructs a new command for applying a signature to an existing function.
* <br>
* All datatypes will be resolved using the
* {@link DataTypeConflictHandler#DEFAULT_HANDLER default conflict handler}.
*
* @param entry entry point address for the function to be created.
* @param signature function signature to apply
* @param source the source of this function signature
* @param preserveCallingConvention if true the function calling convention will not be changed
* @param forceSetName true if name of the function should be set to the name, otherwise name
* will only be set name if currently default (e.g., FUN_1234). A value of
* true is equivalent to {@link FunctionRenameOption#RENAME}, while a value
* of false is equivalent to {@link FunctionRenameOption#RENAME_IF_DEFAULT}.
*/
@Deprecated(since = "10.3", forRemoval = true)
public ApplyFunctionSignatureCmd(Address entry, FunctionSignature signature, SourceType source,
boolean preserveCallingConvention, boolean forceSetName) {
this(entry, signature, source, preserveCallingConvention, false,
DataTypeConflictHandler.DEFAULT_HANDLER,
forceSetName ? FunctionRenameOption.RENAME : FunctionRenameOption.RENAME_IF_DEFAULT);
}
/**
* Constructs a new command for applying a signature to an existing function.
* <br>

View File

@@ -1524,7 +1524,7 @@ public class AutoAnalysisManager {
}
@Override
public void checkCanceled() throws CancelledException {
public void checkCancelled() throws CancelledException {
primaryMonitor.checkCancelled();
secondaryMonitor.checkCancelled();
}
@@ -1568,7 +1568,7 @@ public class AutoAnalysisManager {
}
@Override
public void clearCanceled() {
public void clearCancelled() {
primaryMonitor.clearCancelled();
secondaryMonitor.clearCancelled();
}

View File

@@ -162,31 +162,6 @@ public final class ReferenceUtils {
return true;
}
/**
* Returns all references (locations) that use the given datatype.
* <p>
* <b>Note: </b> This method call may take a long time, as it must search all of the data
* within the program and may also perform long running tasks, like decompiling every function
* in the program.
*
* @param accumulator the results storage.
* @param dataType The datatype for which to find references.
* @param fieldName optional field name for which to search; the {@code dataType} must be a
* {@link Composite} to search for a field.
* @param program The program from within which to find references.
* @param monitor A task monitor to be updated as data is searched; if this is null, then a
* dummy monitor will be used.
* @throws CancelledException if the monitor is cancelled.
* @deprecated use {@link #findDataTypeFieldReferences(Accumulator, FieldMatcher, Program,
* boolean, TaskMonitor)}.
*/
@Deprecated(since = "10.2")
public static void findDataTypeReferences(Accumulator<LocationReference> accumulator,
DataType dataType, String fieldName, Program program, TaskMonitor monitor)
throws CancelledException {
findDataTypeReferences(accumulator, dataType, fieldName, program, true, monitor);
}
/**
* Returns all references (locations) that use the given datatype.
* <p>

View File

@@ -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.
@@ -93,7 +93,7 @@ public class HeadlessTimedTaskMonitor implements TaskMonitor {
}
@Override
public void checkCanceled() throws CancelledException {
public void checkCancelled() throws CancelledException {
if (isCancelled()) {
throw new CancelledException();
}
@@ -136,7 +136,7 @@ public class HeadlessTimedTaskMonitor implements TaskMonitor {
}
@Override
public void clearCanceled() {
public void clearCancelled() {
isCancelled = false;
}
}

View File

@@ -51,7 +51,7 @@ public class BinaryLoader extends AbstractProgramLoader {
}
@Override
public boolean supportsLoadIntoProgram() {
public boolean supportsLoadIntoProgram(Program program) {
return true;
}

View File

@@ -98,7 +98,7 @@ public class DbgLoader extends AbstractPeDebugLoader {
}
@Override
public boolean supportsLoadIntoProgram() {
public boolean supportsLoadIntoProgram(Program program) {
return true;
}
}

View File

@@ -45,7 +45,7 @@ public class IntelHexLoader extends AbstractProgramLoader {
}
@Override
public boolean supportsLoadIntoProgram() {
public boolean supportsLoadIntoProgram(Program program) {
return true;
}

View File

@@ -244,21 +244,6 @@ public interface Loader extends ExtensionPoint, Comparable<Loader> {
return name != null ? name.replaceAll("[\\\\:|]+", "/") : null;
}
/**
* Checks to see if this {@link Loader} supports loading into an existing {@link Program}.
* <p>
* The default behavior of this method is to return false.
*
* @return True if this {@link Loader} supports loading into an existing {@link Program};
* otherwise, false.
* @deprecated use {@link #supportsLoadIntoProgram(Program)} instead so you can restrict what
* types of {@link Program}s can get loaded into other types of {@link Program}s
*/
@Deprecated(since = "10.4")
public default boolean supportsLoadIntoProgram() {
return false;
}
/**
* Checks to see if this {@link Loader} supports loading into the given {@link Program}.
* <p>
@@ -271,7 +256,7 @@ public interface Loader extends ExtensionPoint, Comparable<Loader> {
public default boolean supportsLoadIntoProgram(Program program) {
// We don't want to change the behavior of older implementations. They should update their
// deprecated method usage and put in proper Program-specific checks
return supportsLoadIntoProgram();
return false;
}
/**

View File

@@ -129,7 +129,7 @@ public class MapLoader extends AbstractProgramWrapperLoader {
}
@Override
public boolean supportsLoadIntoProgram() {
public boolean supportsLoadIntoProgram(Program program) {
return true;
}

View File

@@ -46,7 +46,7 @@ public class MotorolaHexLoader extends AbstractProgramLoader {
}
@Override
public boolean supportsLoadIntoProgram() {
public boolean supportsLoadIntoProgram(Program program) {
return true;
}

View File

@@ -53,7 +53,7 @@ public class XmlLoader extends AbstractProgramLoader {
}
@Override
public boolean supportsLoadIntoProgram() {
public boolean supportsLoadIntoProgram(Program program) {
return true;
}

View File

@@ -19,6 +19,7 @@ import static org.junit.Assert.*;
import java.awt.Component;
import java.awt.Container;
import java.util.List;
import javax.swing.*;
@@ -32,7 +33,6 @@ import ghidra.app.plugin.core.table.TableServicePlugin;
import ghidra.app.services.GoToService;
import ghidra.app.services.ProgramManager;
import ghidra.framework.options.Options;
import ghidra.framework.plugintool.Plugin;
import ghidra.framework.plugintool.PluginTool;
import ghidra.program.database.ProgramBuilder;
import ghidra.program.model.address.Address;
@@ -538,7 +538,7 @@ public class SearchTextPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
setTextAndPressEnter(tf, "hello");
runSwing(() -> tool.removePlugins(new Plugin[] { plugin }));
runSwing(() -> tool.removePlugins(List.of(plugin)));
assertFalse(tempDialog.isVisible());
}

View File

@@ -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.
@@ -82,7 +82,7 @@ public class ManageFrontEndToolTest extends AbstractGhidraHeadedIntegrationTest
assertNotNull(p);
runSwing(() -> {
managePluginsDialog.close();
tool.removePlugins(new Plugin[] { p });
tool.removePlugins(List.of(p));
});
showProvider();