mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Groovy: in-place introduce from variable always process all occurrences
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -262,7 +262,7 @@ public abstract class GrAbstractInplaceIntroducer<Settings extends GrIntroduceSe
|
||||
|
||||
@Override
|
||||
public boolean isReplaceAllOccurrences() {
|
||||
return myReplaceChoice != OccurrencesChooser.ReplaceChoice.NO || myContext.getOccurrences().length == 1;
|
||||
return myReplaceChoice != OccurrencesChooser.ReplaceChoice.NO;
|
||||
}
|
||||
|
||||
protected abstract Settings getSettings();
|
||||
|
||||
+3
-1
@@ -185,9 +185,11 @@ public abstract class GrIntroduceHandlerBase<Settings extends GrIntroduceSetting
|
||||
}
|
||||
else if (context.getStringPart() != null) {
|
||||
map.put(OccurrencesChooser.ReplaceChoice.NO, Collections.<Object>singletonList(context.getStringPart()));
|
||||
return map;
|
||||
}
|
||||
else if (context.getVar() != null) {
|
||||
map.put(OccurrencesChooser.ReplaceChoice.NO, Collections.<Object>singletonList(context.getVar()));
|
||||
map.put(OccurrencesChooser.ReplaceChoice.ALL, Collections.<Object>singletonList(context.getVar()));
|
||||
return map;
|
||||
}
|
||||
|
||||
PsiElement[] occurrences = context.getOccurrences();
|
||||
|
||||
Reference in New Issue
Block a user