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

Method delete

ij/src/main/java/ij/plugin/ClassChecker.java:35–59  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

33 }
34
35 void delete(String name) {
36 String path1 = null, path2 = null;
37 File file1, file2;
38 long date1, date2;
39 for (int i = 0; i < names.length; i++) {
40 if (path1 == null && names[i].equals(name)) {
41 path1 = paths[i] + names[i];
42 } else if (path2 == null && names[i].equals(name)) {
43 path2 = paths[i] + names[i];
44 }
45 if (path1 != null && path2 != null) {
46 file1 = new File(path1);
47 file2 = new File(path2);
48 if (file1 == null || file2 == null)
49 return;
50 date1 = file1.lastModified();
51 date2 = file2.lastModified();
52 if (date1 < date2)
53 log(path1);
54 else
55 log(path2);
56 break;
57 }
58 }
59 }
60
61 void log(String path) {
62 IJ.log("Duplicate plugin: " + path);

Callers 7

deleteDuplicatesMethod · 0.95
loadPreferencesMethod · 0.45
savePreferencesMethod · 0.45
doFileMethod · 0.45
saveAsJpegMethod · 0.45
runMethod · 0.45

Calls 2

logMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected