mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-66623 The caret after introducing constant should remain on the usage, not on the constant declaration
This commit is contained in:
+1
-6
@@ -255,16 +255,11 @@ public abstract class GrIntroduceHandlerBase<Settings extends GrIntroduceSetting
|
||||
|
||||
CommandProcessor.getInstance().executeCommand(context.project, new Runnable() {
|
||||
public void run() {
|
||||
final GrVariable created = ApplicationManager.getApplication().runWriteAction(new Computable<GrVariable>() {
|
||||
ApplicationManager.getApplication().runWriteAction(new Computable<GrVariable>() {
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user