Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-0: Remove TODO keyword in Skeleton files...makes too much noise in the IDE

Ryan Kurtz2517a3234822
diff --git a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonAnalyzer.java b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonAnalyzer.java
index bc97cdfbf5..796a8d1579 100644
--- a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonAnalyzer.java
+++ b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonAnalyzer.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.
@@ -25,13 +25,13 @@ import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
/**
- * TODO: Provide class-level documentation that describes what this analyzer does.
+ * Provide class-level documentation that describes what this analyzer does.
*/
public class SkeletonAnalyzer extends AbstractAnalyzer {
public SkeletonAnalyzer() {
- // TODO: Name the analyzer and give it a description.
+ // Name the analyzer and give it a description.
super("My Analyzer", "Analyzer description goes here", AnalyzerType.BYTE_ANALYZER);
}
@@ -39,7 +39,7 @@ public class SkeletonAnalyzer extends AbstractAnalyzer {
@Override
public boolean getDefaultEnablement(Program program) {
- // TODO: Return true if analyzer should be enabled by default
+ // Return true if analyzer should be enabled by default
return true;
}
@@ -47,7 +47,7 @@ public class SkeletonAnalyzer extends AbstractAnalyzer {
@Override
public boolean canAnalyze(Program program) {
- // TODO: Examine 'program' to determine of this analyzer should analyze it. Return true
+ // Examine 'program' to determine of this analyzer should analyze it. Return true
// if it can.
return true;
@@ -56,7 +56,7 @@ public class SkeletonAnalyzer extends AbstractAnalyzer {
@Override
public void registerOptions(Options options, Program program) {
- // TODO: If this analyzer has custom options, register them here
+ // If this analyzer has custom options, register them here
options.registerOption("Option name goes here", false, null,
"Option description goes here");
@@ -66,7 +66,7 @@ public class SkeletonAnalyzer extends AbstractAnalyzer {
public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log)
throws CancelledException {
- // TODO: Perform analysis when things get added to the 'program'. Return true if the
+ // Perform analysis when things get added to the 'program'. Return true if the
// analysis succeeded.
return false;
diff --git a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonExporter.java b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonExporter.java
index 8719b275a2..6c69270677 100644
--- a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonExporter.java
+++ b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonExporter.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.
@@ -28,7 +28,7 @@ import ghidra.program.model.address.AddressSetView;
import ghidra.util.task.TaskMonitor;
/**
- * TODO: Provide class-level documentation that describes what this exporter does.
+ * Provide class-level documentation that describes what this exporter does.
*/
public class SkeletonExporter extends Exporter {
@@ -37,7 +37,7 @@ public class SkeletonExporter extends Exporter {
*/
public SkeletonExporter() {
- // TODO: Name the exporter and associate a file extension with it
+ // Name the exporter and associate a file extension with it
super("My Exporter", "exp", null);
}
@@ -45,7 +45,7 @@ public class SkeletonExporter extends Exporter {
@Override
public boolean supportsAddressRestrictedExport() {
- // TODO: return true if addrSet export parameter can be used to restrict export
+ // Return true if addrSet export parameter can be used to restrict export
return false;
}
@@ -54,7 +54,7 @@ public class SkeletonExporter extends Exporter {
public boolean export(File file, DomainObject domainObj, AddressSetView addrSet,
TaskMonitor monitor) throws ExporterException, IOException {
- // TODO: Perform the export, and return true if it succeeded
+ // Perform the export, and return true if it succeeded
return false;
}
@@ -63,7 +63,7 @@ public class SkeletonExporter extends Exporter {
public List<Option> getOptions(DomainObjectService domainObjectService) {
List<Option> list = new ArrayList<>();
- // TODO: If this exporter has custom options, add them to 'list'
+ // If this exporter has custom options, add them to 'list'
list.add(new Option("Option name goes here", "Default option value goes here"));
return list;
@@ -72,6 +72,6 @@ public class SkeletonExporter extends Exporter {
@Override
public void setOptions(List<Option> options) throws OptionException {
- // TODO: If this exporter has custom options, assign their values to the exporter here
+ // If this exporter has custom options, assign their values to the exporter here
}
}
diff --git a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonFileSystem.java b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonFileSystem.java
index ed31d90772..74775f3445 100644
--- a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonFileSystem.java
+++ b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonFileSystem.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.
@@ -30,7 +30,7 @@ import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
/**
- * TODO: Provide class-level documentation that describes what this file system does.
+ * Provide class-level documentation that describes what this file system does.
*/
@FileSystemInfo(type = "fstypegoeshere", // ([a-z0-9]+ only)
description = "File system description goes here", factory = SkeletonFileSystem.MyFileSystemFactory.class)
@@ -62,7 +62,7 @@ public class SkeletonFileSystem implements GFileSystem {
public void mount(TaskMonitor monitor) {
monitor.setMessage("Opening " + SkeletonFileSystem.class.getSimpleName() + "...");
- // TODO: Customize how things in the file system are stored. The following should be
+ // Customize how things in the file system are stored. The following should be
// treated as pseudo-code.
for (MyMetadata metadata : new MyMetadata[10]) {
if (monitor.isCancelled()) {
@@ -116,7 +116,7 @@ public class SkeletonFileSystem implements GFileSystem {
public ByteProvider getByteProvider(GFile file, TaskMonitor monitor)
throws IOException, CancelledException {
- // TODO: Get an ByteProvider for a file. The following is an example of how the metadata
+ // Get an ByteProvider for a file. The following is an example of how the metadata
// might be used to get an sub-ByteProvider from a stored provider offset.
MyMetadata metadata = fsih.getMetadata(file);
return (metadata != null)
@@ -140,7 +140,7 @@ public class SkeletonFileSystem implements GFileSystem {
return result;
}
- // TODO: Customize for the real file system.
+ // Customize for the real file system.
public static class MyFileSystemFactory
implements GFileSystemFactoryByteProvider<SkeletonFileSystem>,
GFileSystemProbeByteProvider {
@@ -159,14 +159,14 @@ public class SkeletonFileSystem implements GFileSystem {
public boolean probe(ByteProvider byteProvider, FileSystemService fsService,
TaskMonitor monitor) throws IOException, CancelledException {
- // TODO: Quickly and efficiently examine the bytes in 'byteProvider' to determine if
+ // Quickly and efficiently examine the bytes in 'byteProvider' to determine if
// it's a valid file system. If it is, return true.
return false;
}
}
- // TODO: Customize with metadata from files in the real file system. This is just a stub.
+ // Customize with metadata from files in the real file system. This is just a stub.
// The elements of the file system will most likely be modeled by Java classes external to this
// file.
private static class MyMetadata {
diff --git a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonLoader.java b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonLoader.java
index c46a64244a..6db4713540 100644
--- a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonLoader.java
+++ b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonLoader.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,15 +29,14 @@ import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
/**
- * TODO: Provide class-level documentation that describes what this loader does.
+ * Provide class-level documentation that describes what this loader does.
*/
public class SkeletonLoader extends AbstractProgramWrapperLoader {
@Override
public String getName() {
- // TODO: Name the loader. This name must match the name of the loader in the .opinion
- // files.
+ // Name the loader. This name must match the name of the loader in the .opinion files.
return "My loader";
}
@@ -46,7 +45,7 @@ public class SkeletonLoader extends AbstractProgramWrapperLoader {
public Collection<LoadSpec> findSupportedLoadSpecs(ByteProvider provider) throws IOException {
List<LoadSpec> loadSpecs = new ArrayList<>();
- // TODO: Examine the bytes in 'provider' to determine if this loader can load it. If it
+ // Examine the bytes in 'provider' to determine if this loader can load it. If it
// can load it, return the appropriate load specifications.
return loadSpecs;
@@ -57,7 +56,7 @@ public class SkeletonLoader extends AbstractProgramWrapperLoader {
Program program, TaskMonitor monitor, MessageLog log)
throws CancelledException, IOException {
- // TODO: Load the bytes from 'provider' into the 'program'.
+ // Load the bytes from 'provider' into the 'program'.
}
@Override
@@ -66,7 +65,7 @@ public class SkeletonLoader extends AbstractProgramWrapperLoader {
List<Option> list =
super.getDefaultOptions(provider, loadSpec, domainObject, isLoadIntoProgram);
- // TODO: If this loader has custom options, add them to 'list'
+ // If this loader has custom options, add them to 'list'
list.add(new Option("Option name goes here", "Default option value goes here"));
return list;
@@ -75,7 +74,7 @@ public class SkeletonLoader extends AbstractProgramWrapperLoader {
@Override
public String validateOptions(ByteProvider provider, LoadSpec loadSpec, List<Option> options, Program program) {
- // TODO: If this loader has custom options, validate them here. Not all options require
+ // If this loader has custom options, validate them here. Not all options require
// validation.
return super.validateOptions(provider, loadSpec, options, program);
diff --git a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonPlugin.java b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonPlugin.java
index 521e7880a3..1ffcbc635e 100644
--- a/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonPlugin.java
+++ b/GhidraBuild/Skeleton/src/main/java/skeleton/SkeletonPlugin.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.
@@ -33,7 +33,7 @@ import ghidra.util.Msg;
import resources.Icons;
/**
- * TODO: Provide class-level documentation that describes what this plugin does.
+ * Provide class-level documentation that describes what this plugin does.
*/
//@formatter:off
@PluginInfo(
@@ -56,11 +56,11 @@ public class SkeletonPlugin extends ProgramPlugin {
public SkeletonPlugin(PluginTool tool) {
super(tool);
- // TODO: Customize provider (or remove if a provider is not desired)
+ // Customize provider (or remove if a provider is not desired)
String pluginName = getName();
provider = new MyProvider(this, pluginName);
- // TODO: Customize help (or remove if help is not desired)
+ // Customize help (or remove if help is not desired)
String topicName = this.getClass().getPackage().getName();
String anchorName = "HelpAnchor";
provider.setHelpLocation(new HelpLocation(topicName, anchorName));
@@ -70,10 +70,10 @@ public class SkeletonPlugin extends ProgramPlugin {
public void init() {
super.init();
- // TODO: Acquire services if necessary
+ // Acquire services if necessary
}
- // TODO: If provider is desired, it is recommended to move it to its own file
+ // If provider is desired, it is recommended to move it to its own file
private static class MyProvider extends ComponentProvider {
private JPanel panel;
@@ -94,7 +94,7 @@ public class SkeletonPlugin extends ProgramPlugin {
setVisible(true);
}
- // TODO: Customize actions
+ // Customize actions
private void createActions() {
action = new DockingAction("My Action", getName()) {
@Override