This commit is contained in:
Manindra Moharana
2014-06-06 14:38:43 +05:30
parent 8ac153b4f5
commit 68958fe3e3

View File

@@ -1684,7 +1684,7 @@ public class ASTGenerator {
} else {
logE("null");
if(scrollOnly) {
editor.statusMessage("Can't find definition of " + simpName,
editor.statusMessage(simpName + " is not defined in this sketch",
DebugEditor.STATUS_ERR);
}
}
@@ -2310,6 +2310,15 @@ public class ASTGenerator {
DebugEditor.STATUS_WARNING);
return;
}
DefaultMutableTreeNode defCU = findAllOccurrences();
String selText = lastClickedWord == null ? editor.ta.getSelectedText()
: lastClickedWord;
if(defCU == null){
editor.statusMessage(selText + " isn't defined in this sketch, so it can't" +
" be renamed", DebugEditor.STATUS_ERR);
return;
}
if (!frmRename.isVisible()){
frmRename.setLocation(editor.getX()
+ (editor.getWidth() - frmRename.getWidth()) / 2,