Skip to content

Commit eab3fa0

Browse files
committed
More debugging statements under gated control.
1 parent 4e715ba commit eab3fa0

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/main/java/org/scijava/plugins/scripteditor/jython/ClassDotAutocompletions.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public List<CompletionText> get() {
6060
if (fm.isEmpty()) {
6161
// Maybe it's a python class
6262
// get them all via the org.python.indexer.Indexer and Builtins classes, see StaticDotAutocompletions
63-
System.out.println("Don't know yet how to handle class " + className);
63+
if( JythonAutocompletionProvider.debug >= 1) System.out.println("Don't know yet how to handle class " + className);
6464
}
6565
ac.addAll(fm);
6666
}

‎src/main/java/org/scijava/plugins/scripteditor/jython/DotAutocompletions.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static public List<CompletionText> getPublicFieldsAndMethods(final String classN
6060
for (final Method m: c.getMethods())
6161
ac.add(new CompletionText(m.getName() + "()", c, m)); // TODO could do a parameter-driven autocompletion
6262
} catch (final Exception e) {
63-
System.out.println("Could not load class " + className + " :: " + e.getMessage());
63+
if (JythonAutocompletionProvider.debug >= 2) System.out.println("Could not load class " + className + " :: " + e.getMessage());
6464
}
6565
}
6666
return ac;

‎src/main/java/org/scijava/plugins/scripteditor/jython/StaticDotAutocompletions.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ public List<CompletionText> get() {
8989
}
9090

9191
if (null != msg) {
92-
System.out.println(msg);
92+
if (JythonAutocompletionProvider.debug >= 1) System.out.println(msg);
9393
}
9494
} catch (Exception e) {
95-
if (null != msg) System.out.println(msg);
96-
e.printStackTrace();
95+
if (null != msg && JythonAutocompletionProvider.debug >= 1) System.out.println(msg);
96+
if (JythonAutocompletionProvider.debug >= 2) e.printStackTrace();
9797
}
9898
}
9999
return ac;

‎src/main/java/org/scijava/plugins/scripteditor/jython/VarDotAutocompletions.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public List<CompletionText> get() {
5050
final Class<?> c = Class.forName(className);
5151
DotAutocompletions.fieldsAndMethodsInto(c, ac);
5252
} catch (final Exception e) {
53-
System.out.println("Could not load class " + className + " :: " + e.getMessage());
53+
if (JythonAutocompletionProvider.debug >= 2) System.out.println("Could not load class " + className + " :: " + e.getMessage());
5454
}
5555
}
5656
return ac;

0 commit comments

Comments
 (0)