mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 10:30:44 +01:00
commented out debug messages
This commit is contained in:
@@ -404,7 +404,7 @@ public class ErrorCheckerService implements Runnable{
|
||||
* Triggers error check
|
||||
*/
|
||||
public void runManualErrorCheck() {
|
||||
log("Error Check.");
|
||||
// log("Error Check.");
|
||||
textModified.incrementAndGet();
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ public class ErrorCheckerService implements Runnable{
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
if (ExperimentalMode.errorCheckEnabled){
|
||||
runManualErrorCheck();
|
||||
log("doc insert update, man error check..");
|
||||
//log("doc insert update, man error check..");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ public class ErrorCheckerService implements Runnable{
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
if (ExperimentalMode.errorCheckEnabled){
|
||||
runManualErrorCheck();
|
||||
log("doc remove update, man error check..");
|
||||
//log("doc remove update, man error check..");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ public class ErrorCheckerService implements Runnable{
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (ExperimentalMode.errorCheckEnabled){
|
||||
runManualErrorCheck();
|
||||
log("doc changed update, man error check..");
|
||||
//log("doc changed update, man error check..");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,8 +699,8 @@ public class ErrorCheckerService implements Runnable{
|
||||
// Code in pde tabs stored as PlainDocument
|
||||
PlainDocument pdeTabs[] = new PlainDocument[editor.getSketch()
|
||||
.getCodeCount()];
|
||||
log("calcPDEOffsetsForProbList() mco: " + mainClassOffset + " CU state: "
|
||||
+ compilationUnitState);
|
||||
// log("calcPDEOffsetsForProbList() mco: " + mainClassOffset + " CU state: "
|
||||
// + compilationUnitState);
|
||||
|
||||
javaSource.insertString(0, sourceCode, null);
|
||||
for (int i = 0; i < pdeTabs.length; i++) {
|
||||
@@ -725,8 +725,8 @@ public class ErrorCheckerService implements Runnable{
|
||||
for (Problem p : problemsList) {
|
||||
int prbStart = p.getIProblem().getSourceStart() - pkgNameOffset, prbEnd = p
|
||||
.getIProblem().getSourceEnd() - pkgNameOffset;
|
||||
log(p.toString());
|
||||
log("IProblem Start " + prbStart + ", End " + prbEnd);
|
||||
// log(p.toString());
|
||||
// log("IProblem Start " + prbStart + ", End " + prbEnd);
|
||||
int javaLineNumber = p.getSourceLineNumber()
|
||||
- ((compilationUnitState != 2) ? 1 : 2);
|
||||
Element lineElement = javaSource.getDefaultRootElement()
|
||||
|
||||
@@ -64,12 +64,12 @@ public class ErrorMessageSimplifier {
|
||||
return null;
|
||||
IProblem iprob = problem.getIProblem();
|
||||
String args[] = iprob.getArguments();
|
||||
log("Simplifying message: " + problem.getMessage() + " ID: "
|
||||
+ getIDName(iprob.getID()));
|
||||
log("Arg count: " + args.length);
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
log("Arg " + args[i]);
|
||||
}
|
||||
// log("Simplifying message: " + problem.getMessage() + " ID: "
|
||||
// + getIDName(iprob.getID()));
|
||||
// log("Arg count: " + args.length);
|
||||
// for (int i = 0; i < args.length; i++) {
|
||||
// log("Arg " + args[i]);
|
||||
// }
|
||||
|
||||
String result = null;
|
||||
switch (iprob.getID()) {
|
||||
@@ -151,7 +151,7 @@ public class ErrorMessageSimplifier {
|
||||
break;
|
||||
}
|
||||
|
||||
log("Simplified Error Msg: " + result);
|
||||
// log("Simplified Error Msg: " + result);
|
||||
if (result == null)
|
||||
return problem.getMessage();
|
||||
return result;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class OffsetMatcher {
|
||||
if(pdeCodeLine.trim().equals(javaCodeLine.trim())){ //TODO: trim() needed here?
|
||||
matchingNeeded = false;
|
||||
offsetMatch = new ArrayList<OffsetMatcher.OffsetPair>();
|
||||
log("Offset Matching not needed");
|
||||
//log("Offset Matching not needed");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -61,25 +61,25 @@ public class OffsetMatcher {
|
||||
}
|
||||
|
||||
public int getPdeOffForJavaOff(int start, int length) {
|
||||
log("PDE :" + pdeCodeLine + "\nJAVA:" + javaCodeLine);
|
||||
// log("PDE :" + pdeCodeLine + "\nJAVA:" + javaCodeLine);
|
||||
if(!matchingNeeded) return start;
|
||||
int ans = getPdeOffForJavaOff(start), end = getPdeOffForJavaOff(start + length - 1);
|
||||
log(start + " java start off, pde start off "
|
||||
+ ans);
|
||||
log((start + length - 1) + " java end off, pde end off "
|
||||
+ end);
|
||||
log("J: " + javaCodeLine.substring(start, start + length) + "\nP: "
|
||||
+ pdeCodeLine.substring(ans, end + 1));
|
||||
// log(start + " java start off, pde start off "
|
||||
// + ans);
|
||||
// log((start + length - 1) + " java end off, pde end off "
|
||||
// + end);
|
||||
// log("J: " + javaCodeLine.substring(start, start + length) + "\nP: "
|
||||
// + pdeCodeLine.substring(ans, end + 1));
|
||||
return ans;
|
||||
}
|
||||
|
||||
public int getJavaOffForPdeOff(int start, int length) {
|
||||
if(!matchingNeeded) return start;
|
||||
int ans = getJavaOffForPdeOff(start);
|
||||
log(start + " pde start off, java start off "
|
||||
+ getJavaOffForPdeOff(start));
|
||||
log((start + length - 1) + " pde end off, java end off "
|
||||
+ getJavaOffForPdeOff(start + length - 1));
|
||||
// log(start + " pde start off, java start off "
|
||||
// + getJavaOffForPdeOff(start));
|
||||
// log((start + length - 1) + " pde end off, java end off "
|
||||
// + getJavaOffForPdeOff(start + length - 1));
|
||||
return ans;
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ public class OffsetMatcher {
|
||||
} else if (offsetMatch.get(i).javaOffset == javaOff) {
|
||||
// int j = i;
|
||||
while (offsetMatch.get(--i).javaOffset == javaOff) {
|
||||
log("MP " + offsetMatch.get(i).javaOffset + " "
|
||||
+ offsetMatch.get(i).pdeOffset);
|
||||
// log("MP " + offsetMatch.get(i).javaOffset + " "
|
||||
// + offsetMatch.get(i).pdeOffset);
|
||||
}
|
||||
int pdeOff = offsetMatch.get(++i).pdeOffset;
|
||||
while (i > 0 && offsetMatch.get(--i).pdeOffset == pdeOff);
|
||||
@@ -140,8 +140,8 @@ public class OffsetMatcher {
|
||||
// word2 = reverse(word2);
|
||||
int len1 = pdeCodeLine.length();
|
||||
int len2 = javaCodeLine.length();
|
||||
log(pdeCodeLine + " len: " + len1);
|
||||
log(javaCodeLine + " len: " + len2);
|
||||
// log(pdeCodeLine + " len: " + len1);
|
||||
// log(javaCodeLine + " len: " + len2);
|
||||
// len1+1, len2+1, because finally return dp[len1][len2]
|
||||
int[][] dp = new int[len1 + 1][len2 + 1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user