thread sync bug fix, again. '-_-

This commit is contained in:
Manindra Moharana
2013-08-25 18:38:09 +05:30
parent 285f81db65
commit aac15c0a8e
2 changed files with 38 additions and 35 deletions

View File

@@ -831,19 +831,21 @@ public class ErrorCheckerService implements Runnable{
public void updateEditorStatus() {
// editor.statusNotice("Position: " +
// editor.getTextArea().getCaretLine());
for (ErrorMarker emarker : editor.errorBar.errorPoints) {
if (emarker.getProblem().getLineNumber() == editor.getTextArea()
.getCaretLine() + 1) {
if (emarker.getType() == ErrorMarker.Warning) {
editor.statusNotice(emarker.getProblem().getMessage());
//+ " : " + errorMsgSimplifier.getIDName(emarker.problem.getIProblem().getID()));
//TODO: this is temporary
synchronized (editor.errorBar.errorPoints) {
for (ErrorMarker emarker : editor.errorBar.errorPoints) {
if (emarker.getProblem().getLineNumber() == editor.getTextArea()
.getCaretLine() + 1) {
if (emarker.getType() == ErrorMarker.Warning) {
editor.statusNotice(emarker.getProblem().getMessage());
//+ " : " + errorMsgSimplifier.getIDName(emarker.problem.getIProblem().getID()));
//TODO: this is temporary
}
else {
editor.statusError(emarker.getProblem().getMessage());
//+ " : " + errorMsgSimplifier.getIDName(emarker.problem.getIProblem().getID()));
}
return;
}
else {
editor.statusError(emarker.getProblem().getMessage());
//+ " : " + errorMsgSimplifier.getIDName(emarker.problem.getIProblem().getID()));
}
return;
}
}
if (editor.ta.getCaretLine() != lastCaretLine) {