diff --git a/pdex/src/processing/mode/experimental/ASTGenerator.java b/pdex/src/processing/mode/experimental/ASTGenerator.java index c8774bfef..7d06e953c 100644 --- a/pdex/src/processing/mode/experimental/ASTGenerator.java +++ b/pdex/src/processing/mode/experimental/ASTGenerator.java @@ -1580,6 +1580,7 @@ public class ASTGenerator { public void handleRefactor(){ if(editor.ta.getSelectedText() == null){ + editor.statusError("Highlight the class/function/variable name first"); return; } if (!frmRename.isVisible()){ diff --git a/pdex/src/processing/mode/experimental/ErrorCheckerService.java b/pdex/src/processing/mode/experimental/ErrorCheckerService.java index 67448450b..a80dba777 100644 --- a/pdex/src/processing/mode/experimental/ErrorCheckerService.java +++ b/pdex/src/processing/mode/experimental/ErrorCheckerService.java @@ -300,6 +300,7 @@ public class ErrorCheckerService implements Runnable{ updateErrorTable(); editor.updateErrorBar(problemsList); updateEditorStatus(); + editor.getTextArea().repaint(); updatePaintedThingys(); int x = textModified.get(); //System.out.println("TM " + x); @@ -698,15 +699,15 @@ public class ErrorCheckerService implements Runnable{ /** * Repaints the textarea if required */ - public void updatePaintedThingys() { - editor.getTextArea().repaint(); - updateEditorStatus(); + public void updatePaintedThingys() { currentTab = editor.getSketch().getCodeIndex( editor.getSketch().getCurrentCode()); - //System.out.println("awesome! " + currentTab + " LT " + lastTab); + //System.out.println("Tab changed " + currentTab + " LT " + lastTab); if (currentTab != lastTab) { - textModified.incrementAndGet(); + textModified.set(5); lastTab = currentTab; + editor.getTextArea().repaint(); + updateEditorStatus(); return; }