Ghidra is a software reverse engineering (SRE) framework
GP-5742 Corrected deprecation comments/annotations
ghidra1cb3f884ef5f8
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/comments/SetCommentCmd.java b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/comments/SetCommentCmd.javaindex 77d83d32ab..3925a92320 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/comments/SetCommentCmd.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/comments/SetCommentCmd.java@@ -123,9 +123,28 @@ public class SetCommentCmd implements Command<Program> {* @param program the program being analyzed* @param addr the address where data is created* @param comment the comment about the data- * @param commentType the type of comment+ * @param commentType the type of comment ({@link CodeUnit#PLATE_COMMENT},+ * {@link CodeUnit#PRE_COMMENT}, {@link CodeUnit#EOL_COMMENT}, {@link CodeUnit#POST_COMMENT},+ * {@link CodeUnit#REPEATABLE_COMMENT})+ * @deprecated Use {@link #createComment(Program, Address, String, CommentType)} instead*/+ @Deprecated(forRemoval = true, since = "11.4")+ public static void createComment(Program program, Address addr, String comment,+ int commentType) {+ SetCommentCmd commentCmd =+ new SetCommentCmd(addr, CommentType.valueOf(commentType), comment);+ commentCmd.applyTo(program);+ }+ /**+ * Creates the specified comment of the specified type at address. The current comment of+ * this commentType will be cleared.+ *+ * @param program the program being analyzed+ * @param addr the address where data is created+ * @param comment the comment about the data+ * @param commentType the type of comment+ */public static void createComment(Program program, Address addr, String comment,CommentType commentType) {SetCommentCmd commentCmd = new SetCommentCmd(addr, commentType, comment);diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/CodeUnit.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/CodeUnit.javaindex 9cd2c4cf82..6a48b83ff2 100644--- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/CodeUnit.java+++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/CodeUnit.java@@ -195,7 +195,7 @@ public interface CodeUnit extends MemBuffer, PropertySet {* three types of comments supported* @deprecated use {@link #setComment(CommentType, String)} instead*/- @Deprecated+ @Deprecated(forRemoval = true, since = "11.4")public default void setComment(int commentType, String comment) {setComment(CommentType.valueOf(commentType), comment);}@@ -216,7 +216,9 @@ public interface CodeUnit extends MemBuffer, PropertySet {* @param comment an array of strings where each string is a single line of the comment.* @throws IllegalArgumentException if type is not one of the* three types of comments supported+ * @deprecated use {@link #setCommentAsArray(CommentType, String[])} instead*/+ @Deprecated(forRemoval = true, since = "11.4")public default void setCommentAsArray(int commentType, String[] comment) {setCommentAsArray(CommentType.valueOf(commentType), comment);}