Change Signature: Drop JetGeneratedInfo class (unused so far)
This commit is contained in:
@@ -62,7 +62,6 @@ public class JetChangeInfo implements ChangeInfo {
|
|||||||
private Visibility newVisibility;
|
private Visibility newVisibility;
|
||||||
private final List<JetParameterInfo> newParameters;
|
private final List<JetParameterInfo> newParameters;
|
||||||
private final PsiElement context;
|
private final PsiElement context;
|
||||||
private final JetGeneratedInfo generatedInfo;
|
|
||||||
private Boolean parameterNamesChanged;
|
private Boolean parameterNamesChanged;
|
||||||
private Map<String, Integer> oldNameToParameterIndex;
|
private Map<String, Integer> oldNameToParameterIndex;
|
||||||
private boolean primaryMethodUpdated;
|
private boolean primaryMethodUpdated;
|
||||||
@@ -77,8 +76,7 @@ public class JetChangeInfo implements ChangeInfo {
|
|||||||
String newReturnTypeText,
|
String newReturnTypeText,
|
||||||
Visibility newVisibility,
|
Visibility newVisibility,
|
||||||
List<JetParameterInfo> newParameters,
|
List<JetParameterInfo> newParameters,
|
||||||
PsiElement context,
|
PsiElement context
|
||||||
JetGeneratedInfo generatedInfo
|
|
||||||
) {
|
) {
|
||||||
this.oldDescriptor = oldDescriptor;
|
this.oldDescriptor = oldDescriptor;
|
||||||
this.newName = newName;
|
this.newName = newName;
|
||||||
@@ -87,7 +85,6 @@ public class JetChangeInfo implements ChangeInfo {
|
|||||||
this.newVisibility = newVisibility;
|
this.newVisibility = newVisibility;
|
||||||
this.newParameters = newParameters;
|
this.newParameters = newParameters;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.generatedInfo = generatedInfo;
|
|
||||||
this.originalPsiMethod = getCurrentPsiMethod();
|
this.originalPsiMethod = getCurrentPsiMethod();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,10 +290,6 @@ public class JetChangeInfo implements ChangeInfo {
|
|||||||
return newName;
|
return newName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetGeneratedInfo getGeneratedInfo() {
|
|
||||||
return generatedInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PsiElement getContext() {
|
public PsiElement getContext() {
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
@@ -416,8 +409,7 @@ public class JetChangeInfo implements ChangeInfo {
|
|||||||
returnTypeText,
|
returnTypeText,
|
||||||
functionDescriptor.getVisibility(),
|
functionDescriptor.getVisibility(),
|
||||||
newParameters,
|
newParameters,
|
||||||
method,
|
method
|
||||||
new JetGeneratedInfo()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -77,7 +77,6 @@ public class JetChangeSignatureDialog extends ChangeSignatureDialogBase<
|
|||||||
JetFunctionParameterTableModel
|
JetFunctionParameterTableModel
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
private final JetGeneratedInfo generatedInfo = new JetGeneratedInfo();
|
|
||||||
private final String commandName;
|
private final String commandName;
|
||||||
|
|
||||||
public JetChangeSignatureDialog(Project project, @NotNull JetMethodDescriptor methodDescriptor, PsiElement context, String commandName) {
|
public JetChangeSignatureDialog(Project project, @NotNull JetMethodDescriptor methodDescriptor, PsiElement context, String commandName) {
|
||||||
@@ -417,7 +416,7 @@ public class JetChangeSignatureDialog extends ChangeSignatureDialogBase<
|
|||||||
|
|
||||||
String returnTypeText = myReturnTypeCodeFragment != null ? myReturnTypeCodeFragment.getText().trim() : "";
|
String returnTypeText = myReturnTypeCodeFragment != null ? myReturnTypeCodeFragment.getText().trim() : "";
|
||||||
return new JetChangeInfo(myMethod, getMethodName(), getReturnType(), returnTypeText,
|
return new JetChangeInfo(myMethod, getMethodName(), getReturnType(), returnTypeText,
|
||||||
getVisibility(), parameters, myDefaultValueContext, generatedInfo
|
getVisibility(), parameters, myDefaultValueContext
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-9
@@ -149,15 +149,6 @@ public class JetChangeSignatureProcessor extends ChangeSignatureProcessorBase {
|
|||||||
return isPreviewUsages();
|
return isPreviewUsages();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
protected Collection<? extends PsiElement> getElementsToWrite(@NotNull UsageViewDescriptor descriptor) {
|
|
||||||
Collection<PsiElement> elements = new ArrayList<PsiElement>();
|
|
||||||
elements.addAll(super.getElementsToWrite(descriptor));
|
|
||||||
elements.addAll(getChangeInfo().getGeneratedInfo().getFilesToWrite());
|
|
||||||
return elements;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getCommandName() {
|
protected String getCommandName() {
|
||||||
return commandName;
|
return commandName;
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2013 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.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.jet.plugin.refactoring.changeSignature;
|
|
||||||
|
|
||||||
import com.intellij.psi.PsiFile;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class JetGeneratedInfo {
|
|
||||||
public List<PsiFile> getFilesToWrite() {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user