mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
introduce parameter: clean selection later to avoid focus troubles (IDEA-134272)
This commit is contained in:
+10
-3
@@ -490,9 +490,16 @@ public class IntroduceParameterHandler extends IntroduceHandlerBase {
|
||||
createTypeSelectorManager(occurences, initializerType), methodToSearchFor, method, getParamsToRemove(method, occurences), mustBeFinal);
|
||||
dialog.setReplaceAllOccurrences(replaceAllOccurrences);
|
||||
dialog.setGenerateDelegate(delegate);
|
||||
dialog.show();
|
||||
if (myEditor != null) {
|
||||
myEditor.getSelectionModel().removeSelection();
|
||||
if (dialog.showAndGet()) {
|
||||
final Runnable cleanSelectionRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (myEditor != null && !myEditor.isDisposed()) {
|
||||
myEditor.getSelectionModel().removeSelection();
|
||||
}
|
||||
}
|
||||
};
|
||||
SwingUtilities.invokeLater(cleanSelectionRunnable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user