anchor hasn't survived during the long insertHandler activity (EA-23659)

This commit is contained in:
peter.gromov
2010-11-24 20:06:50 +03:00
parent 1890308113
commit bbe3945d91
@@ -65,6 +65,7 @@ public class DefaultInsertHandler extends TemplateInsertHandler implements Clone
final boolean needLeftParenth = isToInsertParenth(context, item);
final boolean hasParams = needLeftParenth && hasParams(context, item);
final boolean annotation = insertingAnnotation(context, item);
if (CompletionUtil.isOverwrite(item, completionChar)) {
removeEndOfIdentifier(needLeftParenth && hasParams, context);
@@ -114,7 +115,7 @@ public class DefaultInsertHandler extends TemplateInsertHandler implements Clone
});
}
if (insertingAnnotation(context, item)) {
if (annotation) {
// Check if someone inserts annotation class that require @
PsiElement elementAt = file.findElementAt(context.getStartOffset());
final PsiElement parentElement = elementAt != null ? elementAt.getParent():null;