mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
Merge remote-tracking branch 'origin/Ghidra_11.4'
This commit is contained in:
commit
f981f43fad
183 changed files with 3088 additions and 3278 deletions
|
@ -24,17 +24,16 @@ import ghidra.program.model.listing.*;
|
|||
public class DeleteEmptyPlateCommentsScript extends GhidraScript {
|
||||
|
||||
private static String EMPTY_PLATE = "";
|
||||
/* (non-Javadoc)
|
||||
* @see ghidra.app.script.GhidraScript#run()
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void run() throws Exception {
|
||||
public void run() throws Exception {
|
||||
Listing listing = currentProgram.getListing();
|
||||
AddressSetView set = currentProgram.getMemory();
|
||||
if (currentSelection != null && !currentSelection.isEmpty()) {
|
||||
set = currentSelection;
|
||||
}
|
||||
int updateCount=0;
|
||||
|
||||
int updateCount = 0;
|
||||
AddressIterator iter = listing.getCommentAddressIterator(CommentType.PLATE, set, true);
|
||||
while (iter.hasNext()) {
|
||||
Address addr = iter.next();
|
||||
|
@ -48,7 +47,7 @@ public class DeleteEmptyPlateCommentsScript extends GhidraScript {
|
|||
}
|
||||
}
|
||||
if (updateCount > 0) {
|
||||
String cmt = updateCount > 1? "comments" : "comment";
|
||||
String cmt = updateCount > 1 ? "comments" : "comment";
|
||||
println("Removed " + updateCount + " emtpy plate " + cmt + ".");
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue