pde x prefs now saved to the main preferences.txt

This commit is contained in:
Manindra Moharana
2013-09-15 21:56:02 +05:30
parent 69405772a8
commit 96c4fc1846
6 changed files with 37 additions and 26 deletions

View File

@@ -19,6 +19,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.table.DefaultTableModel;
import org.eclipse.jdt.core.JavaCore;
@@ -262,6 +263,7 @@ public class ErrorCheckerService implements Runnable{
// Completion wouldn't be complete, but it'd be still something
// better than nothing
astGenerator.buildAST(cu);
handleErrorCheckingToggle();
while (!stopThread.get()) {
try {
// Take a nap.
@@ -1399,6 +1401,26 @@ public class ErrorCheckerService implements Runnable{
return new String(p2, 0, index);
}
public void handleErrorCheckingToggle(){
if (!ExperimentalMode.errorCheckEnabled) {
// unticked Menu Item
pauseThread();
log(editor.getSketch().getName()
+ " - Error Checker paused.");
editor.errorBar.errorPoints.clear();
problemsList.clear();
updateErrorTable();
updateEditorStatus();
editor.getTextArea().repaint();
editor.errorBar.repaint();
} else {
resumeThread();
log(editor.getSketch().getName()
+ " - Error Checker resumed.");
runManualErrorCheck();
}
}
/**
* Stops the Error Checker Service thread
*/