MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / compileAndRun

Method compileAndRun

ij/src/main/java/ij/plugin/Compiler.java:60–83  ·  view source on GitHub ↗
(String path)

Source from the content-addressed store, hash-verified

58 }
59
60 void compileAndRun(String path) {
61 if (!open(path, "Compile and Run Plugin..."))
62 return;
63 if (name.endsWith(".class")) {
64 runPlugin(name.substring(0, name.length()-1));
65 return;
66 }
67 if (!isJavac()) {
68 if (IJ.debugMode) IJ.log("Compiler: javac not found");
69 if (!checkForUpdateDone) {
70 checkForUpdate("/plugins/compiler/Compiler.jar", "1.48c");
71 checkForUpdateDone = true;
72 }
73 Object compiler = IJ.runPlugIn("Compiler", dir+name);
74 if (compiler==null) {
75 boolean ok = Macro_Runner.downloadJar("/plugins/compiler/Compiler.jar");
76 if (ok)
77 IJ.runPlugIn("Compiler", dir+name);
78 }
79 return;
80 }
81 if (compile(dir+name))
82 runPlugin(name);
83 }
84
85 private void checkForUpdate(String plugin, String currentVersion) {
86 int slashIndex = plugin.lastIndexOf("/");

Callers 1

runMethod · 0.95

Calls 10

openMethod · 0.95
runPluginMethod · 0.95
isJavacMethod · 0.95
logMethod · 0.95
checkForUpdateMethod · 0.95
runPlugInMethod · 0.95
downloadJarMethod · 0.95
compileMethod · 0.95
substringMethod · 0.80
lengthMethod · 0.65

Tested by

no test coverage detected