Skip to content

Commit 00aaffd

Browse files
committed
Code cleanup
1 parent bc0713d commit 00aaffd

File tree

5 files changed

+90
-83
lines changed

5 files changed

+90
-83
lines changed

Diff for: BAR/src/main/java/bar/BAR.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package bar;
22

3-
import org.scijava.plugin.Parameter;
4-
import org.scijava.plugin.Plugin;
5-
import org.scijava.script.ScriptService;
6-
73
import net.imagej.ops.AbstractNamespace;
84
import net.imagej.ops.Namespace;
95
import net.imagej.ops.Op;
106
import net.imagej.ops.OpMethod;
117

8+
import org.scijava.plugin.Parameter;
9+
import org.scijava.plugin.Plugin;
10+
import org.scijava.script.ScriptService;
11+
1212
@Plugin(type = Namespace.class)
1313
public class BAR extends AbstractNamespace {
1414

@@ -37,15 +37,17 @@ public interface GCD extends Op {
3737
// Built-in methods provide type-safe methods for accessing Ops
3838
// in a namespace.
3939

40-
// We always provide an Object... constructor that can be passed directly to the
40+
// We always provide an Object... constructor that can be passed directly to
41+
// the
4142
// OpService.run method
4243

4344
@OpMethod(op = bar.BAR.GCD.class)
4445
public Object gcd(final Object... args) {
4546
return ops().run(bar.BAR.GCD.class, args);
4647
}
4748

48-
// But we can also type-narrow our inputs and returns with our knowledge of the Op
49+
// But we can also type-narrow our inputs and returns with our knowledge of
50+
// the Op
4951
// implementations
5052

5153
@OpMethod(op = bar.BAR.GCD.class)

Diff for: BAR/src/main/java/bar/Installer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class Installer implements Command {
4646
@Parameter
4747
private UIService uiService;
4848

49-
@Parameter(visibility = ItemVisibility.MESSAGE, persist=false)
49+
@Parameter(visibility = ItemVisibility.MESSAGE, persist = false)
5050
private final String help = helpMsg();
5151

5252
@Parameter(label = "Action:", choices = { "Install files silently", "Install files in debug mode",
@@ -87,9 +87,9 @@ public void run() {
8787

8888
if (status != CLEAN_EXIT) {
8989
msgType = MessageType.WARNING_MESSAGE;
90-
msg = "An error occurred when copying files\n";
90+
msg = "An error occurred when copying files.\n";
9191
msg += (verbose) ? "Check Console for details" : "Turn on debugging for details";
92-
msg += "\nAttempt to open lib Directory?";
92+
msg += ".\nAttempt to open lib Directory?";
9393
}
9494
final Result choice = uiService.showDialog(msg, "BAR libs", msgType, optionType);
9595
if (choice == Result.YES_OPTION) {

Diff for: BAR/src/main/java/bar/Runner.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ public static void main(final String... args) throws Exception {
9292
runner.runScript("Data_Analysis", "Distribution_Plotter.ijm");
9393
}
9494

95-
private void runScript(URL url, final String filename, final Map<String, Object> inputMap) {
95+
private void runScript(final URL url, final String filename, final Map<String, Object> inputMap) {
9696
try {
9797
runScript(url.openStream(), filename, inputMap);
9898
lastLoadedURL = url;
99-
} catch (IOException exc) {
99+
} catch (final IOException exc) {
100100
error("Could not run " + url.toString(), IO_ERROR);
101101
exc.printStackTrace();
102102
}

0 commit comments

Comments
 (0)