diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/progress/DefaultCloseableTaskMonitor.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/progress/DefaultCloseableTaskMonitor.java index ddc1592ca9..d2e6506100 100644 --- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/progress/DefaultCloseableTaskMonitor.java +++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/progress/DefaultCloseableTaskMonitor.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,7 +111,7 @@ public class DefaultCloseableTaskMonitor implements CloseableTaskMonitor { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { if (receiver.isCancelled()) { throw new CancelledException(); } @@ -153,7 +153,7 @@ public class DefaultCloseableTaskMonitor implements CloseableTaskMonitor { } @Override - public void clearCanceled() { + public void clearCancelled() { throw new UnsupportedOperationException(); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/ApplyFunctionSignatureCmd.java b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/ApplyFunctionSignatureCmd.java index bb2f990d9a..f49a3872df 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/ApplyFunctionSignatureCmd.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/ApplyFunctionSignatureCmd.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. @@ -69,29 +69,6 @@ public class ApplyFunctionSignatureCmd extends BackgroundCommand { FunctionRenameOption.RENAME_IF_DEFAULT); } - /** - * Constructs a new command for applying a signature to an existing function. - *
- * 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. *
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java index 1f06878cc5..4afd5adacd 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java @@ -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(); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/ReferenceUtils.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/ReferenceUtils.java index f65102ed48..7324c2daf7 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/ReferenceUtils.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/ReferenceUtils.java @@ -162,31 +162,6 @@ public final class ReferenceUtils { return true; } - /** - * Returns all references (locations) that use the given datatype. - *

- * Note: 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 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. *

diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/HeadlessTimedTaskMonitor.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/HeadlessTimedTaskMonitor.java index b3a077d3de..12c71135cb 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/HeadlessTimedTaskMonitor.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/HeadlessTimedTaskMonitor.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. @@ -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; } } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BinaryLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BinaryLoader.java index d4e786c392..b81587aa34 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BinaryLoader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BinaryLoader.java @@ -51,7 +51,7 @@ public class BinaryLoader extends AbstractProgramLoader { } @Override - public boolean supportsLoadIntoProgram() { + public boolean supportsLoadIntoProgram(Program program) { return true; } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/DbgLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/DbgLoader.java index 99f0199624..cf4a350ebb 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/DbgLoader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/DbgLoader.java @@ -98,7 +98,7 @@ public class DbgLoader extends AbstractPeDebugLoader { } @Override - public boolean supportsLoadIntoProgram() { + public boolean supportsLoadIntoProgram(Program program) { return true; } } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/IntelHexLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/IntelHexLoader.java index c718d844c5..85d6c730e0 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/IntelHexLoader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/IntelHexLoader.java @@ -45,7 +45,7 @@ public class IntelHexLoader extends AbstractProgramLoader { } @Override - public boolean supportsLoadIntoProgram() { + public boolean supportsLoadIntoProgram(Program program) { return true; } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/Loader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/Loader.java index ec01c37e7c..d0411f7779 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/Loader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/Loader.java @@ -244,21 +244,6 @@ public interface Loader extends ExtensionPoint, Comparable { return name != null ? name.replaceAll("[\\\\:|]+", "/") : null; } - /** - * Checks to see if this {@link Loader} supports loading into an existing {@link Program}. - *

- * 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}. *

@@ -271,7 +256,7 @@ public interface Loader extends ExtensionPoint, Comparable { 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; } /** diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MapLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MapLoader.java index 8fe427f7a3..53ae7c3487 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MapLoader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MapLoader.java @@ -129,7 +129,7 @@ public class MapLoader extends AbstractProgramWrapperLoader { } @Override - public boolean supportsLoadIntoProgram() { + public boolean supportsLoadIntoProgram(Program program) { return true; } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MotorolaHexLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MotorolaHexLoader.java index 080bcad99e..58c6557c12 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MotorolaHexLoader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MotorolaHexLoader.java @@ -46,7 +46,7 @@ public class MotorolaHexLoader extends AbstractProgramLoader { } @Override - public boolean supportsLoadIntoProgram() { + public boolean supportsLoadIntoProgram(Program program) { return true; } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/XmlLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/XmlLoader.java index 84f949b647..07c41b5dfc 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/XmlLoader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/XmlLoader.java @@ -53,7 +53,7 @@ public class XmlLoader extends AbstractProgramLoader { } @Override - public boolean supportsLoadIntoProgram() { + public boolean supportsLoadIntoProgram(Program program) { return true; } diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin2Test.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin2Test.java index b19d866d45..b279b61dc0 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin2Test.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin2Test.java @@ -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()); } diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/framework/plugintool/dialog/ManageFrontEndToolTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/framework/plugintool/dialog/ManageFrontEndToolTest.java index 4ea348b306..2e27af50d2 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/framework/plugintool/dialog/ManageFrontEndToolTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/framework/plugintool/dialog/ManageFrontEndToolTest.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. @@ -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(); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/app/util/opinion/CDexLoader.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/app/util/opinion/CDexLoader.java index b428d70a49..a8560b7485 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/app/util/opinion/CDexLoader.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/app/util/opinion/CDexLoader.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. @@ -24,6 +24,7 @@ import ghidra.file.formats.android.cdex.CDexConstants; import ghidra.file.formats.android.dex.DexHeaderFactory; import ghidra.file.formats.android.dex.format.DexConstants; import ghidra.file.formats.android.dex.format.DexHeader; +import ghidra.program.model.listing.Program; public class CDexLoader extends DexLoader { @@ -70,7 +71,7 @@ public class CDexLoader extends DexLoader { } @Override - public boolean supportsLoadIntoProgram() { + public boolean supportsLoadIntoProgram(Program program) { return true; } diff --git a/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraTaskMonitor.java b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraTaskMonitor.java index 3bb6b51a6d..0a10bd4887 100644 --- a/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraTaskMonitor.java +++ b/Ghidra/Features/PyGhidra/src/main/java/ghidra/pyghidra/PyGhidraTaskMonitor.java @@ -131,14 +131,14 @@ public class PyGhidraTaskMonitor implements TaskMonitor { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { if (isCancelled()) { throw new CancelledException(); } } @Override - public void clearCanceled() { + public void clearCancelled() { isCancelled = false; } diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/SarifLoader.java b/Ghidra/Features/Sarif/src/main/java/sarif/SarifLoader.java index b47afaf00a..b27f749421 100644 --- a/Ghidra/Features/Sarif/src/main/java/sarif/SarifLoader.java +++ b/Ghidra/Features/Sarif/src/main/java/sarif/SarifLoader.java @@ -56,7 +56,7 @@ public class SarifLoader extends AbstractProgramLoader { } @Override - public boolean supportsLoadIntoProgram() { + public boolean supportsLoadIntoProgram(Program program) { return true; } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/FlowLayoutTextField.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/FlowLayoutTextField.java index 19726dfb75..b03333d876 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/FlowLayoutTextField.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/FlowLayoutTextField.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. @@ -15,7 +15,8 @@ */ package docking.widgets.fieldpanel.field; -import java.util.*; +import java.util.ArrayList; +import java.util.List; import docking.widgets.fieldpanel.support.FieldHighlightFactory; @@ -26,25 +27,6 @@ import docking.widgets.fieldpanel.support.FieldHighlightFactory; */ public class FlowLayoutTextField extends VerticalLayoutTextField { - /** - * This constructor will create a text field that will render one line of text. If - * metrics.stringWidth(text) > width, then the text will be wrapped. - * If text contains the highlight string, then it will be highlighted using the - * highlight color. - * - * @param textElements the AttributedStrings to display - * @param startX the x position to draw the string - * @param width the max width allocated to this field - * @param maxLines the max number of lines to display - * @param hlFactory the highlight factory - * @deprecated use the constructor that takes a list - */ - @Deprecated(since = "10.1", forRemoval = true) - public FlowLayoutTextField(FieldElement[] textElements, int startX, - int width, int maxLines, FieldHighlightFactory hlFactory) { - this(Arrays.asList(textElements), startX, width, maxLines, hlFactory); - } - /** * This constructor will create a text field that will render one line of text. If * metrics.stringWidth(text) > width, then the text will be wrapped. diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/VerticalLayoutTextField.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/VerticalLayoutTextField.java index c56a2649da..1183acdf18 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/VerticalLayoutTextField.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/VerticalLayoutTextField.java @@ -17,7 +17,6 @@ package docking.widgets.fieldpanel.field; import java.awt.*; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import javax.swing.JComponent; @@ -58,23 +57,6 @@ public class VerticalLayoutTextField implements TextField { protected boolean isClipped; - /** - * This constructor will create a text field from an array of FieldElements, putting each - * element on its own line. - * - * @param textElements the FieldElements to display - * @param startX the x position to draw the element - * @param width the max width allocated to this field - * @param maxLines the max number of lines to display - * @param hlFactory the highlight factory - * @deprecated use the constructor that takes a list - */ - @Deprecated(since = "10.1", forRemoval = true) - public VerticalLayoutTextField(FieldElement[] textElements, int startX, int width, int maxLines, - FieldHighlightFactory hlFactory) { - this(Arrays.asList(textElements), startX, width, maxLines, hlFactory, " "); - } - /** * This constructor will create a text field from an array of FieldElements, putting each * element on its own line. diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/imagepanel/ImagePanel.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/imagepanel/ImagePanel.java index 5abe81ff44..27463ab60a 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/imagepanel/ImagePanel.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/imagepanel/ImagePanel.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. @@ -203,26 +203,6 @@ public class ImagePanel extends JPanel { return imagePanel.getBackground(); } - /** - * Unused - * @param text unused - * @deprecated unused - */ - @Deprecated(since = "10.2", forRemoval = true) // unused - public void setText(String text) { - // unused - } - - /** - * Unused - * @return unused - * @deprecated unused - */ - @Deprecated(since = "10.2", forRemoval = true) // unused - public String getText() { - return null; - } - /** * Get the current zoom factor the image is being drawn to * @return the image magnification factor diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/tree/TreeTaskMonitor.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/tree/TreeTaskMonitor.java index f635d02d2b..673be10c85 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/tree/TreeTaskMonitor.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/tree/TreeTaskMonitor.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. @@ -131,7 +131,7 @@ public class TreeTaskMonitor implements TaskMonitor { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { monitor.checkCancelled(); } @@ -172,7 +172,7 @@ public class TreeTaskMonitor implements TaskMonitor { } @Override - public void clearCanceled() { + public void clearCancelled() { monitor.clearCancelled(); } } diff --git a/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/BasicTaskMonitor.java b/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/BasicTaskMonitor.java index dc72a9cb08..04814bb6e9 100644 --- a/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/BasicTaskMonitor.java +++ b/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/BasicTaskMonitor.java @@ -71,7 +71,7 @@ class BasicTaskMonitor implements TaskMonitor { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { if (isCancelled) { throw new CancelledException(); } @@ -132,7 +132,7 @@ class BasicTaskMonitor implements TaskMonitor { } @Override - public void clearCanceled() { + public void clearCancelled() { isCancelled = false; } diff --git a/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskDialog.java b/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskDialog.java index 6fa1340280..7b32fa0b24 100644 --- a/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskDialog.java +++ b/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskDialog.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. @@ -497,12 +497,12 @@ public class TaskDialog extends DialogComponentProvider implements TaskMonitor { } @Override - public synchronized void clearCanceled() { + public synchronized void clearCancelled() { monitorComponent.clearCancelled(); } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { monitorComponent.checkCancelled(); } diff --git a/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskMonitorComponent.java b/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskMonitorComponent.java index 7dec9d15eb..194779c931 100644 --- a/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskMonitorComponent.java +++ b/Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskMonitorComponent.java @@ -153,7 +153,7 @@ public class TaskMonitorComponent extends JPanel implements TaskMonitor { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { if (isCancelled) { throw new CancelledException(); } @@ -251,7 +251,7 @@ public class TaskMonitorComponent extends JPanel implements TaskMonitor { } @Override - public void clearCanceled() { + public void clearCancelled() { synchronized (this) { isCancelled = false; } diff --git a/Ghidra/Framework/Generic/src/main/java/generic/concurrent/FutureTaskMonitor.java b/Ghidra/Framework/Generic/src/main/java/generic/concurrent/FutureTaskMonitor.java index 89c4db3a3c..04227f08f2 100644 --- a/Ghidra/Framework/Generic/src/main/java/generic/concurrent/FutureTaskMonitor.java +++ b/Ghidra/Framework/Generic/src/main/java/generic/concurrent/FutureTaskMonitor.java @@ -97,7 +97,7 @@ class FutureTaskMonitor extends FutureTask implements TaskMonitor { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { if (isCancelled()) { throw new CancelledException(); } @@ -187,7 +187,7 @@ class FutureTaskMonitor extends FutureTask implements TaskMonitor { } @Override - public void clearCanceled() { + public void clearCancelled() { // once cancelled, always cancelled throw new UnsupportedOperationException(); diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java index a7c152720f..a970a5cc6d 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java @@ -20,151 +20,54 @@ import java.util.ArrayList; import java.util.List; /** - * Identifies the current platform (operating system and architecture) and - * identifies the appropriate module OS directory which contains native binaries + * Identifies the current platform (operating system and architecture) and identifies the + * appropriate module OS directory which contains native binaries */ public enum Platform { - /** - * Identifies a Windows x86 32-bit OS. - */ + /// Identifies a Windows x86 32-bit OS WIN_X86_32(OperatingSystem.WINDOWS, Architecture.X86, "win_x86_32", ".dll", ".exe"), - /** - * Identifies a Windows x86 64-bit OS. - */ + /// Identifies a Windows x86 64-bit OS WIN_X86_64(OperatingSystem.WINDOWS, Architecture.X86_64, "win_x86_64", ".dll", ".exe"), - /** - * Identifies a Windows ARM 64-bit OS. - */ + /// Identifies a Windows ARM 64-bit OS WIN_ARM_64(OperatingSystem.WINDOWS, Architecture.ARM_64, "win_arm_64", ".dll", ".exe"), - /** - * Identifies a Linux x86 32-bit OS. - */ + /// Identifies a Linux x86 32-bit OS LINUX_X86_32(OperatingSystem.LINUX, Architecture.X86, "linux_x86_32", ".so", ""), - /** - * Identifies a Linux x86 64-bit OS. - */ + /// Identifies a Linux x86 64-bit OS LINUX_X86_64(OperatingSystem.LINUX, Architecture.X86_64, "linux_x86_64", ".so", ""), - /** - * Identifies a Linux ARM 64-bit OS. - */ + /// Identifies a Linux ARM 64-bit OS LINUX_ARM_64(OperatingSystem.LINUX, Architecture.ARM_64, "linux_arm_64", ".so", ""), - /** - * Identifies a macOS x86 32-bit OS. - */ + /// Identifies a macOS x86 32-bit OS MAC_X86_32(OperatingSystem.MAC_OS_X, Architecture.X86, "mac_x86_32", ".dylib", ""), - /** - * Identifies a macOS x86 64-bit OS. - */ + /// Identifies a macOS x86 64-bit OS MAC_X86_64(OperatingSystem.MAC_OS_X, Architecture.X86_64, "mac_x86_64", ".dylib", ""), - /** - * Identifies a macOS ARM 64-bit OS. - */ + /// Identifies a macOS ARM 64-bit OS MAC_ARM_64(OperatingSystem.MAC_OS_X, Architecture.ARM_64, "mac_arm_64", ".dylib", ""), - /** - * Identifies a FreeBSD x86 64-bit OS. - */ + /// Identifies a FreeBSD x86 64-bit OS FREEBSD_X86_64(OperatingSystem.FREE_BSD, Architecture.X86_64, "freebsd_x86_64", ".so", ""), - /** - * Identifies a FreeBSD ARM 64-bit OS. - */ + /// Identifies a FreeBSD ARM 64-bit OS FREEBSD_ARM_64(OperatingSystem.FREE_BSD, Architecture.ARM_64, "freebsd_arm_64", ".so", ""), - /** - * Identifies a OpenBSD x86 64-bit OS. - */ + /// Identifies a OpenBSD x86 64-bit OS OPENBSD_X86_64(OperatingSystem.OPEN_BSD, Architecture.X86_64, "openbsd_x86_64", ".so", ""), - /** - * Identifies a OpenBSD ARM 64-bit OS. - */ + /// Identifies a OpenBSD ARM 64-bit OS OPENBSD_ARM_64(OperatingSystem.OPEN_BSD, Architecture.ARM_64, "openbsd_arm_64", ".so", ""), - /** - * Identifies an unsupported OS. - */ - UNSUPPORTED(OperatingSystem.UNSUPPORTED, Architecture.UNKNOWN, null, null, ""), + /// Identifies an unsupported OS + UNSUPPORTED(OperatingSystem.UNSUPPORTED, Architecture.UNKNOWN, null, null, ""); - /** - * Identifies a Windows 64-bit OS. - * - * @deprecated Use {@link #WIN_X86_64} instead. - */ - @Deprecated(since = "10.1", forRemoval = true) - WIN_64(OperatingSystem.WINDOWS, Architecture.X86_64, "win_x86_64", ".dll", ".exe"), - - /** - * Identifies a Windows OS, the architecture for which we do not know or have not encountered. - * We'll treat it as {@link #WIN_X86_64} and hope for the best. - * - * @deprecated Unknown architectures are not supported - */ - @Deprecated(since = "10.1", forRemoval = true) - WIN_UNKOWN(OperatingSystem.WINDOWS, Architecture.UNKNOWN, "win_x86_64", ".dll", ".exe"), - - /** - * Identifies a Linux X86 32-bit OS. - * - * @deprecated Use {@link #LINUX_X86_32} instead. - */ - @Deprecated(since = "10.1", forRemoval = true) - LINUX(OperatingSystem.LINUX, Architecture.X86, "linux_x86_32", ".so", ""), - - /** - * Identifies a Linux X86 64-bit OS. - * - * @deprecated Use {@link #LINUX_X86_64} instead. - */ - @Deprecated(since = "10.1", forRemoval = true) - LINUX_64(OperatingSystem.LINUX, Architecture.X86_64, "linux_x86_64", ".so", ""), - - /** - * Identifies a Linux OS, the architecture for which we do not know or have not encountered. - * We'll treat it as {@link #LINUX_X86_64} and hope for the best. - * - * @deprecated Unknown architectures are not supported - */ - @Deprecated(since = "10.1", forRemoval = true) - LINUX_UKNOWN(OperatingSystem.LINUX, Architecture.UNKNOWN, "linux_x86_64", ".so", ""), - - /** - * Identifies a macOS X86 32-bit OS. - * - * @deprecated Use {@link #MAC_OSX_32} instead. - */ - @Deprecated(since = "10.1", forRemoval = true) - MAC_OSX_32(OperatingSystem.MAC_OS_X, Architecture.X86, "mac_x86_32", ".dylib", ""), - - /** - * Identifies a macOS X86 64-bit OS. - * - * @deprecated Use {@link #MAC_X86_64} instead. - */ - @Deprecated(since = "10.1", forRemoval = true) - MAC_OSX_64(OperatingSystem.MAC_OS_X, Architecture.X86_64, "mac_x86_64", ".dylib", ""), - - /** - * Identifies a macOS OS, the architecture for which we do not know or have not encountered. - * We'll treat it as {@link #MAC_X86_64} and hope for the best. - * - * @deprecated Use {@link #MAC_X86_64} instead. - */ - @Deprecated(since = "10.1", forRemoval = true) - MAC_UNKNOWN(OperatingSystem.MAC_OS_X, Architecture.UNKNOWN, "mac_x86_64", ".dylib", ""); - - /** - * A constant identifying the current platform. - */ + /// A constant identifying the current platform. public static final Platform CURRENT_PLATFORM = findCurrentPlatform(); private OperatingSystem operatingSystem; @@ -184,42 +87,37 @@ public enum Platform { } /** - * Returns the operating system for this platform. - * @return the operating system for this platform + * {@return the operating system for this platform} */ public OperatingSystem getOperatingSystem() { return operatingSystem; } /** - * Returns the architecture for this platform. - * @return the architecture for this platform + * {@return the architecture for this platform} */ public Architecture getArchitecture() { return architecture; } /** - * Returns the directory name of the current platform. - * @return the directory name of the current platform + * {@return the directory name of the current platform} */ public String getDirectoryName() { return directoryName; } /** - * Returns the library extension for this platform. - * @return the library extension for this platform + * {@return the library extension for this platform} */ public String getLibraryExtension() { return libraryExtension; } /** - * Based on the current platform, - * returns an operating system specific - * library paths that are not found on the - * PATH environment variable. + * Based on the current platform, returns an operating system specific library paths that are + * not found on the PATH environment variable. + * * @return additional library paths */ public List getAdditionalLibraryPaths() { @@ -276,12 +174,8 @@ public enum Platform { } private static boolean matchesCurrentPlatform(Platform platform) { - if (platform.operatingSystem == OperatingSystem.CURRENT_OPERATING_SYSTEM) { - if (platform.architecture == Architecture.CURRENT_ARCHITECTURE) { - return true; - } - } - return false; + return platform.operatingSystem == OperatingSystem.CURRENT_OPERATING_SYSTEM && + platform.architecture == Architecture.CURRENT_ARCHITECTURE; } public String getExecutableExtension() { diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TaskMonitorAdapter.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TaskMonitorAdapter.java index 5c0e23a1d5..2cdb71a237 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TaskMonitorAdapter.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TaskMonitorAdapter.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. @@ -36,14 +36,6 @@ public class TaskMonitorAdapter implements TaskMonitor { private boolean cancelEnabled = false; private volatile boolean cancelled; - /** - * Provides a static instance of TaskMonitorAdapter - * which is a non-cancellable task monitor with no visual components. - * @deprecated use {@link TaskMonitor#DUMMY} instead - */ - @Deprecated - public static final TaskMonitor DUMMY_MONITOR = TaskMonitor.DUMMY; - public TaskMonitorAdapter() { // do nothing } @@ -57,14 +49,6 @@ public class TaskMonitorAdapter implements TaskMonitor { return cancelled; } - @Deprecated(since = "10.3") - @Override - public void checkCanceled() throws CancelledException { - if (cancelled) { - throw new CancelledException(); - } - } - @Override public void checkCancelled() throws CancelledException { if (cancelled) { @@ -147,7 +131,7 @@ public class TaskMonitorAdapter implements TaskMonitor { } @Override - public void clearCanceled() { + public void clearCancelled() { synchronized (this) { if (!cancelled) { return; diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TaskMonitorSplitter.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TaskMonitorSplitter.java index 99f384d765..fc985dac8e 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TaskMonitorSplitter.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TaskMonitorSplitter.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. @@ -65,12 +65,12 @@ public class TaskMonitorSplitter { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { parent.checkCancelled(); } @Override - public void clearCanceled() { + public void clearCancelled() { throw new UnsupportedOperationException(); } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TimeoutTaskMonitor.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TimeoutTaskMonitor.java index 831df63d50..9165989aa7 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TimeoutTaskMonitor.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TimeoutTaskMonitor.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. @@ -177,7 +177,7 @@ public class TimeoutTaskMonitor implements TaskMonitor { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { if (didTimeout()) { throw new TimeoutException( "Operation cancelled due to timeout of " + timeout + " " + timeUnit.toString()); @@ -228,7 +228,7 @@ public class TimeoutTaskMonitor implements TaskMonitor { } @Override - public void clearCanceled() { + public void clearCancelled() { delegate.clearCancelled(); } } diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/WrappingTaskMonitor.java b/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/WrappingTaskMonitor.java index 7c1c30ca0e..8eed93682b 100644 --- a/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/WrappingTaskMonitor.java +++ b/Ghidra/Framework/Generic/src/main/java/ghidra/util/task/WrappingTaskMonitor.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. @@ -133,12 +133,6 @@ public class WrappingTaskMonitor implements TaskMonitor { return delegate.isIndeterminate(); } - @Deprecated(since = "10.3") - @Override - public void checkCanceled() throws CancelledException { - delegate.checkCancelled(); - } - @Override public void checkCancelled() throws CancelledException { delegate.checkCancelled(); @@ -182,7 +176,7 @@ public class WrappingTaskMonitor implements TaskMonitor { } @Override - public synchronized void clearCanceled() { + public synchronized void clearCancelled() { delegate.clearCancelled(); } } diff --git a/Ghidra/Framework/Gui/src/test/java/ghidra/util/task/UnknownProgressWrappingTaskMonitorTest.java b/Ghidra/Framework/Gui/src/test/java/ghidra/util/task/UnknownProgressWrappingTaskMonitorTest.java index 6925291633..f6892b1a76 100644 --- a/Ghidra/Framework/Gui/src/test/java/ghidra/util/task/UnknownProgressWrappingTaskMonitorTest.java +++ b/Ghidra/Framework/Gui/src/test/java/ghidra/util/task/UnknownProgressWrappingTaskMonitorTest.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. @@ -31,7 +31,7 @@ public class UnknownProgressWrappingTaskMonitorTest extends AbstractGenericTest UnknownProgressWrappingTaskMonitor upwtm = new UnknownProgressWrappingTaskMonitor(monitor, 100); try { - upwtm.checkCanceled(); + upwtm.checkCancelled(); fail(); } catch (CancelledException e) { diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/LockingTaskMonitor.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/LockingTaskMonitor.java index cec54f2dbb..c3616f43ca 100644 --- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/LockingTaskMonitor.java +++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/LockingTaskMonitor.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,7 +189,7 @@ class LockingTaskMonitor implements TaskMonitor { } @Override - public void clearCanceled() { + public void clearCancelled() { this.isCanceled = false; if (taskDialog != null) { taskDialog.clearCancelled(); @@ -197,7 +197,7 @@ class LockingTaskMonitor implements TaskMonitor { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { if (isCancelled()) { throw new CancelledException(); } diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginTool.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginTool.java index 87ec0b360e..cd052658a6 100644 --- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginTool.java +++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/plugintool/PluginTool.java @@ -892,19 +892,6 @@ public abstract class PluginTool extends AbstractDockingTool { addPlugins(List.of(className)); } - /** - * Add plugins to the tool. - * @param classNames array of plugin class names - * @throws PluginException if a plugin could not be constructed, or - * there was problem executing its init() method, or if a plugin of this - * class already exists in the tool - * @deprecated use {@link #addPlugins(Collection)} - */ - @Deprecated(since = "10.2", forRemoval = true) - public void addPlugins(String[] classNames) throws PluginException { - addPlugins(Arrays.asList(classNames)); - } - /** * Add plugins to the tool. * @param classNames collection of plugin class names @@ -930,16 +917,6 @@ public abstract class PluginTool extends AbstractDockingTool { }, PluginException.class); } - /** - * Remove the array of plugins from the tool. - * @param plugins array of plugins to remove - * @deprecated use {@link #removePlugins(List)} - */ - @Deprecated(since = "10.2", forRemoval = true) - public void removePlugins(Plugin[] plugins) { - removePlugins(Arrays.asList(plugins)); - } - /** * Remove the array of plugins from the tool. * @param plugins array of plugins to remove diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/task/GTaskMonitor.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/task/GTaskMonitor.java index 67015df9d1..a7292609f3 100644 --- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/task/GTaskMonitor.java +++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/task/GTaskMonitor.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. @@ -108,7 +108,7 @@ public class GTaskMonitor implements TaskMonitor, CancelledListener { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { if (isCancelled) { setMessage("CANCELLED!"); throw new CancelledException(); @@ -156,7 +156,7 @@ public class GTaskMonitor implements TaskMonitor, CancelledListener { } @Override - public void clearCanceled() { + public void clearCancelled() { isCancelled = false; } diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DataTypeManager.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DataTypeManager.java index ef51e220ca..da20223d02 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DataTypeManager.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DataTypeManager.java @@ -327,18 +327,6 @@ public interface DataTypeManager { */ public boolean remove(DataType dataType); - /** - * Deprecated. Use {@link #remove(DataType)}. - * @param dataType the data type - * @param monitor the monitor - * @return true if the data type existed and was removed - * @deprecated use {@link #remove(DataType)} - */ - @Deprecated(since = "10.4", forRemoval = true) - public default boolean remove(DataType dataType, TaskMonitor monitor) { - return remove(dataType); - } - /** * Remove the given data types from this manager. *
diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/SymbolType.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/SymbolType.java index 72193927dd..7d58fd9f43 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/SymbolType.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/SymbolType.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. @@ -61,12 +61,6 @@ public abstract class SymbolType { }; - /** - * @deprecated use {@link #LABEL} instead. - */ - @Deprecated(since = "9.1", forRemoval = true) - public static final SymbolType CODE = LABEL; - public static final SymbolType LIBRARY = new SymbolType("Library", true, 1) { @Override public boolean isValidParent(Program program, Namespace parent, Address symbolAddr, diff --git a/Ghidra/Framework/Utility/src/main/java/ghidra/GhidraLauncher.java b/Ghidra/Framework/Utility/src/main/java/ghidra/GhidraLauncher.java index d5f5c9ef83..937e20d480 100644 --- a/Ghidra/Framework/Utility/src/main/java/ghidra/GhidraLauncher.java +++ b/Ghidra/Framework/Utility/src/main/java/ghidra/GhidraLauncher.java @@ -31,9 +31,6 @@ import utility.module.ModuleUtilities; /** * Class used to prepare Ghidra for launching - *

- * A {@link #main(String[])} method is provided which redirects execution to a - * {@link GhidraLaunchable} class passed in as a command line argument */ public class GhidraLauncher { @@ -81,21 +78,6 @@ public class GhidraLauncher { launchable.launch(layout, Arrays.copyOfRange(args, 1, args.length)); } - /** - * Launches the given {@link GhidraLaunchable} specified in the first command line argument - * - * @param args The first argument is the name of the {@link GhidraLaunchable} to launch. - * The remaining args get passed through to the class's {@link GhidraLaunchable#launch} - * method. - * @throws Exception If there was a problem launching. See the exception's message for more - * details on what went wrong. - * @deprecated Use {@link Ghidra#main(String[])} instead - */ - @Deprecated(since = "10.1", forRemoval = true) - public static void main(String[] args) throws Exception { - launch(args); - } - /** * {@return the current number of milliseconds that have elapsed since execution began} */ diff --git a/Ghidra/Framework/Utility/src/main/java/ghidra/util/task/StubTaskMonitor.java b/Ghidra/Framework/Utility/src/main/java/ghidra/util/task/StubTaskMonitor.java index f4d84e76ce..7791bdc23f 100644 --- a/Ghidra/Framework/Utility/src/main/java/ghidra/util/task/StubTaskMonitor.java +++ b/Ghidra/Framework/Utility/src/main/java/ghidra/util/task/StubTaskMonitor.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. @@ -74,7 +74,7 @@ class StubTaskMonitor implements TaskMonitor { } @Override - public void checkCanceled() throws CancelledException { + public void checkCancelled() throws CancelledException { // stub } @@ -122,7 +122,7 @@ class StubTaskMonitor implements TaskMonitor { } @Override - public void clearCanceled() { + public void clearCancelled() { // stub } diff --git a/Ghidra/Framework/Utility/src/main/java/ghidra/util/task/TaskMonitor.java b/Ghidra/Framework/Utility/src/main/java/ghidra/util/task/TaskMonitor.java index c7ab691dc7..898d5509ad 100644 --- a/Ghidra/Framework/Utility/src/main/java/ghidra/util/task/TaskMonitor.java +++ b/Ghidra/Framework/Utility/src/main/java/ghidra/util/task/TaskMonitor.java @@ -129,19 +129,8 @@ public interface TaskMonitor { /** * Check to see if this monitor has been cancelled * @throws CancelledException if monitor has been cancelled - * @deprecated Use {@link #checkCancelled()} instead */ - @Deprecated(since = "10.3") - public void checkCanceled() throws CancelledException; - - /** - * Check to see if this monitor has been cancelled - * @throws CancelledException if monitor has been cancelled - */ - public default void checkCancelled() throws CancelledException { - // note: call checkCancelled() until it is removed; this produces the least number of changes - checkCanceled(); - } + public void checkCancelled() throws CancelledException; /** * Increases the progress value by 1. @@ -216,16 +205,6 @@ public interface TaskMonitor { /** * Clear the cancellation so that this TaskMonitor may be reused - * @deprecated Use {@link #clearCancelled()} instead */ - @Deprecated(since = "10.3") - public void clearCanceled(); - - /** - * Clear the cancellation so that this TaskMonitor may be reused - */ - public default void clearCancelled() { - // note: call clearCancelled() until it is removed; this produces the least number of changes - clearCanceled(); - } + public void clearCancelled(); } diff --git a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/EquatePluginScreenShots.java b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/EquatePluginScreenShots.java index 68ffd379db..011b3d3df9 100644 --- a/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/EquatePluginScreenShots.java +++ b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/EquatePluginScreenShots.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. @@ -16,6 +16,7 @@ package help.screenshot; import java.awt.Rectangle; +import java.util.List; import javax.swing.JTextField; import javax.swing.SwingUtilities; @@ -33,7 +34,6 @@ import ghidra.app.plugin.core.equate.EquateTableProvider; import ghidra.app.plugin.core.flowarrow.FlowArrowPlugin; import ghidra.app.util.bean.SetEquateDialog; import ghidra.app.util.datatype.ApplyEnumDialog; -import ghidra.framework.plugintool.Plugin; import ghidra.program.model.address.*; import ghidra.program.model.data.*; import ghidra.program.model.listing.*; @@ -64,7 +64,7 @@ public class EquatePluginScreenShots extends GhidraScreenShotGenerator { super.setUp(); FlowArrowPlugin flowArrowPlugin = getPlugin(tool, FlowArrowPlugin.class); - tool.removePlugins(new Plugin[] { flowArrowPlugin }); + tool.removePlugins(List.of(flowArrowPlugin)); equatePlugin = getPlugin(tool, EquatePlugin.class); cb = getPlugin(tool, CodeBrowserPlugin.class); diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ByteViewerToolConnectionTest.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ByteViewerToolConnectionTest.java index ecbbf4e5ab..dfb9946732 100644 --- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ByteViewerToolConnectionTest.java +++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ByteViewerToolConnectionTest.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. @@ -18,6 +18,7 @@ package ghidra.framework.main; import static org.junit.Assert.*; import java.awt.Rectangle; +import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicReference; @@ -261,7 +262,7 @@ public class ByteViewerToolConnectionTest extends AbstractGhidraHeadedIntegratio private void removePlugin(final PluginTool tool, final Plugin plugin) throws Exception { SwingUtilities.invokeAndWait(() -> { - tool.removePlugins(new Plugin[] { plugin }); + tool.removePlugins(List.of(plugin)); tool.getProject().getToolManager().toolChanged(tool); }); } diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ToolConnectionTest.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ToolConnectionTest.java index 072d13d784..c091e239e6 100644 --- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ToolConnectionTest.java +++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/ToolConnectionTest.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. @@ -18,6 +18,7 @@ package ghidra.framework.main; import static org.junit.Assert.*; import java.awt.Rectangle; +import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicReference; @@ -227,7 +228,7 @@ public class ToolConnectionTest extends AbstractGhidraHeadedIntegrationTest { private void removePlugin(final PluginTool tool, final Plugin plugin) throws Exception { runSwing(() -> { - tool.removePlugins(new Plugin[] { plugin }); + tool.removePlugins(List.of(plugin)); tool.getProject().getToolManager().toolChanged(tool); }); } diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/plugintool/PluginManagerTest.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/plugintool/PluginManagerTest.java index 62abc0b1eb..30a2e7088e 100644 --- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/plugintool/PluginManagerTest.java +++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/plugintool/PluginManagerTest.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. @@ -145,7 +145,7 @@ public class PluginManagerTest extends AbstractGhidraHeadedIntegrationTest { // Load a plugin and a second plugin that provides a dependency at the same time. // Loading PluginA by itself would fail. tool.addPlugins( - new String[] { MissingDepPluginA.class.getName(), MissingDepPluginB.class.getName() }); + List.of(MissingDepPluginA.class.getName(), MissingDepPluginB.class.getName())); assertPlugin(MissingDepPluginA.class); assertPlugin(MissingDepPluginB.class); @@ -225,8 +225,8 @@ public class PluginManagerTest extends AbstractGhidraHeadedIntegrationTest { setErrorsExpected(true); try { - tool.addPlugins(new String[] { IsolatedFailPluginA.class.getName(), - IsolatedFailPluginB.class.getName() }); + tool.addPlugins( + List.of(IsolatedFailPluginA.class.getName(), IsolatedFailPluginB.class.getName())); fail("Should have gotten an exception because PluginB was bad"); } catch (PluginException pe) { @@ -282,7 +282,7 @@ public class PluginManagerTest extends AbstractGhidraHeadedIntegrationTest { runSwing(() -> { try { - tool.removePlugins(new Plugin[] { p }); + tool.removePlugins(List.of(p)); } catch (Exception e) { if (!exceptional) {