From d5deb8a6e7008ed64fdd03e06c511134b895c6c8 Mon Sep 17 00:00:00 2001 From: Maxim Medvedev Date: Wed, 16 Mar 2011 13:57:54 +0300 Subject: [PATCH] IDEA-66623 The caret after introducing constant should remain on the usage, not on the constant declaration --- .../refactoring/introduce/GrIntroduceHandlerBase.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/introduce/GrIntroduceHandlerBase.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/introduce/GrIntroduceHandlerBase.java index 976e2880edef..16f439914eb0 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/introduce/GrIntroduceHandlerBase.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/introduce/GrIntroduceHandlerBase.java @@ -255,16 +255,11 @@ public abstract class GrIntroduceHandlerBase() { + ApplicationManager.getApplication().runWriteAction(new Computable() { public GrVariable compute() { return runRefactoring(context, settings); } }); - - if (editor != null && created != null) { - PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument()); - editor.getCaretModel().moveToOffset(created.getNameIdentifierGroovy().getTextOffset()); - } } }, getRefactoringName(), null);