106106import org .jsoup .nodes .Document ;
107107import org .jsoup .select .Elements ;
108108
109- import processing .app .Base ;
110109import processing .app .Library ;
110+ import processing .app .Messages ;
111111import processing .app .Platform ;
112112import processing .app .SketchCode ;
113113import processing .app .Util ;
@@ -243,7 +243,7 @@ protected DefaultMutableTreeNode buildAST(String source, CompilationUnit cu) {
243243 .types ().get (0 )));
244244 //log("Total CU " + compilationUnit.types().size());
245245 if (compilationUnit .types () == null || compilationUnit .types ().isEmpty ()){
246- Base .loge ("No CU found!" );
246+ Messages .loge ("No CU found!" );
247247 }
248248 visitRecur ((ASTNode ) compilationUnit .types ().get (0 ), codeTree );
249249 SwingWorker <Object , Object > worker = new SwingWorker <Object , Object >() {
@@ -869,7 +869,7 @@ public void preparePredictions(final String word, final int line,
869869 ASTNode testnode = parser .createAST (null );
870870 //Base.loge("PREDICTION PARSER PROBLEMS: " + parser);
871871 // Find closest ASTNode of the document to this word
872- Base .loge ("Typed: " + word2 + "|" + " temp Node type: " + testnode .getClass ().getSimpleName ());
872+ Messages .loge ("Typed: " + word2 + "|" + " temp Node type: " + testnode .getClass ().getSimpleName ());
873873 if (testnode instanceof MethodInvocation ){
874874 MethodInvocation mi = (MethodInvocation )testnode ;
875875 log (mi .getName () + "," + mi .getExpression () + "," + mi .typeArguments ().size ());
@@ -882,15 +882,15 @@ public void preparePredictions(final String word, final int line,
882882 // Make sure nearestNode is not NULL if couldn't find a closeset node
883883 nearestNode = (ASTNode ) errorCheckerService .getLastCorrectCU ().types ().get (0 );
884884 }
885- Base .loge (lineNumber + " Nearest ASTNode to PRED "
885+ Messages .loge (lineNumber + " Nearest ASTNode to PRED "
886886 + getNodeAsString (nearestNode ));
887887
888888 candidates = new ArrayList <CompletionCandidate >();
889889 lastPredictedWord = word2 ;
890890 // Determine the expression typed
891891
892892 if (testnode instanceof SimpleName && !noCompare ) {
893- Base .loge ("One word expression " + getNodeAsString (testnode ));
893+ Messages .loge ("One word expression " + getNodeAsString (testnode ));
894894 //==> Simple one word exprssion - so is just an identifier
895895
896896 // Bottom up traversal of the AST to look for possible definitions at
@@ -974,7 +974,7 @@ public void preparePredictions(final String word, final int line,
974974
975975 // ==> Complex expression of type blah.blah2().doIt,etc
976976 // Have to resolve it by carefully traversing AST of testNode
977- Base .loge ("Complex expression " + getNodeAsString (testnode ));
977+ Messages .loge ("Complex expression " + getNodeAsString (testnode ));
978978 log ("candidates empty" );
979979 ASTNode childExpr = getChildExpression (testnode );
980980 log ("Parent expression : " + getParentExpression (testnode ));
@@ -1236,7 +1236,7 @@ public String getJavaSourceCodeLine(int javaLineNumber) {
12361236 - lineElement .getStartOffset ());
12371237 return javaLine ;
12381238 } catch (BadLocationException e ) {
1239- Base .loge (e + " in getJavaSourceCodeline() for jinenum: " + javaLineNumber );
1239+ Messages .loge (e + " in getJavaSourceCodeline() for jinenum: " + javaLineNumber );
12401240 }
12411241 return null ;
12421242 }
@@ -1263,7 +1263,7 @@ public Element getJavaSourceCodeElement(int javaLineNumber) {
12631263// - lineElement.getStartOffset());
12641264 return lineElement ;
12651265 } catch (BadLocationException e ) {
1266- Base .loge (e + " in getJavaSourceCodeline() for jinenum: " + javaLineNumber );
1266+ Messages .loge (e + " in getJavaSourceCodeline() for jinenum: " + javaLineNumber );
12671267 }
12681268 return null ;
12691269 }
@@ -1744,7 +1744,7 @@ public ASTNodeWrapper getASTNodeAt(int lineNumber, String name, int offset,
17441744 ASTNodeWrapper declWrap = new ASTNodeWrapper (simpName2 , nodeLabel );
17451745 //errorCheckerService.highlightNode(declWrap);
17461746 if (!declWrap .highlightNode (this )) {
1747- Base .loge ("Highlighting failed." );
1747+ Messages .loge ("Highlighting failed." );
17481748 }
17491749 }
17501750
@@ -1859,7 +1859,7 @@ protected void addListeners(){
18591859
18601860 @ Override
18611861 public void valueChanged (TreeSelectionEvent e ) {
1862- Base .log (e .toString ());
1862+ Messages .log (e .toString ());
18631863 SwingWorker <Object , Object > worker = new SwingWorker <Object , Object >() {
18641864
18651865 @ Override
@@ -2159,8 +2159,7 @@ protected DefaultMutableTreeNode findAllOccurrences(){
21592159 if (wnode .getNode () == null ){
21602160 return null ;
21612161 }
2162- Base .loge ("Gonna find all occurrences of "
2163- + getNodeAsString (wnode .getNode ()));
2162+ Messages .loge ("Gonna find all occurrences of " + getNodeAsString (wnode .getNode ()));
21642163
21652164 //If wnode is a constructor, find the TD instead.
21662165 if (wnode .getNodeType () == ASTNode .METHOD_DECLARATION ) {
@@ -2176,7 +2175,7 @@ protected DefaultMutableTreeNode findAllOccurrences(){
21762175 if (node != null && node instanceof TypeDeclaration ){
21772176 TypeDeclaration td = (TypeDeclaration ) node ;
21782177 if (td .getName ().toString ().equals (md .getName ().toString ())){
2179- Base .loge ("Renaming constructor of " + getNodeAsString (td ));
2178+ Messages .loge ("Renaming constructor of " + getNodeAsString (td ));
21802179 wnode = new ASTNodeWrapper (td );
21812180 }
21822181 }
@@ -2414,7 +2413,7 @@ protected boolean isInstanceOfType(ASTNode node,ASTNode decl, String name){
24142413 }
24152414 log ("Visiting: " + getNodeAsString (node ));
24162415 ASTNode decl2 = findDeclaration (sn );
2417- Base .loge ("It's decl: " + getNodeAsString (decl2 ));
2416+ Messages .loge ("It's decl: " + getNodeAsString (decl2 ));
24182417 log ("But we need: " +getNodeAsString (decl ));
24192418 for (ASTNode astNode : nodesToBeMatched ) {
24202419 if (astNode .equals (decl2 )){
@@ -3714,7 +3713,7 @@ else if (className.endsWith("Type"))
37143713
37153714
37163715 static private void log (Object object ) {
3717- Base .log (object == null ? "null" : object .toString ());
3716+ Messages .log (object == null ? "null" : object .toString ());
37183717 }
37193718
37203719
0 commit comments