minor tweaks

This commit is contained in:
Manindra Moharana
2013-08-18 12:20:24 +05:30
parent 3f7efd4da5
commit a6af2cf54a
3 changed files with 45 additions and 31 deletions

View File

@@ -1,6 +1,7 @@
package processing.mode.experimental;
import static processing.mode.experimental.ExperimentalMode.log;
import static processing.mode.experimental.ExperimentalMode.logE;
import java.awt.EventQueue;
import java.io.File;
@@ -881,6 +882,7 @@ public class ErrorCheckerService implements Runnable{
}
public String getPDECodeAtLine(int tab, int linenumber){
if(linenumber < 0) return null;
editor.getSketch().setCurrentCode(tab);
return editor.ta.getLineText(linenumber);
}
@@ -1116,16 +1118,16 @@ public class ErrorCheckerService implements Runnable{
* @return true - if highlighting happened correctly.
*/
public boolean highlightNode(ASTNodeWrapper awrap){
int pdeoffsets[] = awrap.getPDECodeOffsets(this);
int javaoffsets[] = awrap.getJavaCodeOffsets(this);
try {
int pdeoffsets[] = awrap.getPDECodeOffsets(this);
int javaoffsets[] = awrap.getJavaCodeOffsets(this);
scrollToErrorLine(editor, pdeoffsets[0],
pdeoffsets[1],javaoffsets[1],
javaoffsets[2]);
return true;
} catch (Exception e) {
e.printStackTrace();
logE("Scrolling failed for " + awrap);
// e.printStackTrace();
}
return false;
}