IDEA-62180 Unable to type in code generation

This commit is contained in:
Maxim.Mossienko
2010-12-23 21:24:36 +03:00
parent 6ce11f88e1
commit 905cfd2fb9
@@ -574,6 +574,7 @@ public class TemplateState implements Disposable {
PsiDocumentManager.getInstance(myProject).doPostponedOperationsAndUnblockDocument(myDocument);
}
// Hours spent fixing code : 1
private void calcResults(final boolean isQuick) {
if (myProcessor != null && myCurrentVariableNumber >= 0) {
final String variableName = myTemplate.getVariableNameAt(myCurrentVariableNumber);
@@ -619,6 +620,7 @@ public class TemplateState implements Disposable {
}
mySelectionCalculated = true;
}
if (TemplateImpl.END.equals(variableName)) continue; // No need to update end since it can be placed over some other variable
String newValue = getVariableValue(variableName).getText();
int start = mySegments.getSegmentStart(i);
int end = mySegments.getSegmentEnd(i);