Create from usage: Renamed doInvoke to addFunctionToSelectedOwner.
This commit is contained in:
@@ -614,7 +614,7 @@ public class CreateFunctionFromUsageFix extends CreateFromUsageFixBase {
|
|||||||
assert !ownerTypeCandidates.isEmpty();
|
assert !ownerTypeCandidates.isEmpty();
|
||||||
if (ownerTypeCandidates.size() == 1 || ApplicationManager.getApplication().isUnitTestMode()) {
|
if (ownerTypeCandidates.size() == 1 || ApplicationManager.getApplication().isUnitTestMode()) {
|
||||||
selectedReceiverType = ownerTypeCandidates.get(0);
|
selectedReceiverType = ownerTypeCandidates.get(0);
|
||||||
doInvoke(project);
|
addFunctionToSelectedOwner(project);
|
||||||
} else {
|
} else {
|
||||||
// class selection
|
// class selection
|
||||||
List<ClassCandidate> options = new ArrayList<ClassCandidate>();
|
List<ClassCandidate> options = new ArrayList<ClassCandidate>();
|
||||||
@@ -638,7 +638,7 @@ public class CreateFunctionFromUsageFix extends CreateFromUsageFixBase {
|
|||||||
CommandProcessor.getInstance().executeCommand(project, new Runnable() {
|
CommandProcessor.getInstance().executeCommand(project, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
doInvoke(project);
|
addFunctionToSelectedOwner(project);
|
||||||
}
|
}
|
||||||
}, getText(), null);
|
}, getText(), null);
|
||||||
}
|
}
|
||||||
@@ -651,7 +651,7 @@ public class CreateFunctionFromUsageFix extends CreateFromUsageFixBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doInvoke(@NotNull final Project project) {
|
private void addFunctionToSelectedOwner(@NotNull final Project project) {
|
||||||
// gather relevant information
|
// gather relevant information
|
||||||
ownerClassDescriptor = DescriptorUtils.getClassDescriptorForType(selectedReceiverType.getType());
|
ownerClassDescriptor = DescriptorUtils.getClassDescriptorForType(selectedReceiverType.getType());
|
||||||
JetType receiverType = ownerClassDescriptor.getDefaultType();
|
JetType receiverType = ownerClassDescriptor.getDefaultType();
|
||||||
|
|||||||
Reference in New Issue
Block a user