mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+54
-23
@@ -15,18 +15,16 @@
|
||||
*/
|
||||
package com.intellij.codeInspection;
|
||||
|
||||
import com.intellij.codeInsight.ChangeContextUtil;
|
||||
import com.intellij.codeInsight.daemon.GroupNames;
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.HighlightControlFlowUtil;
|
||||
import com.intellij.codeInsight.intention.HighPriorityAction;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.search.searches.ReferencesSearch;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.util.PsiUtil;
|
||||
import com.intellij.psi.util.RedundantCastUtil;
|
||||
import com.intellij.util.Function;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -74,7 +72,7 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaLocalInspectionTool
|
||||
final String functionalInterfaceErrorMessage = LambdaUtil.checkInterfaceFunctional(baseClassType);
|
||||
if (functionalInterfaceErrorMessage == null) {
|
||||
final PsiMethod[] methods = aClass.getMethods();
|
||||
if (methods.length == 1) {
|
||||
if (methods.length == 1 && aClass.getFields().length == 0) {
|
||||
final PsiCodeBlock body = methods[0].getBody();
|
||||
if (body != null) {
|
||||
final boolean [] bodyContainsForbiddenRefs = new boolean[1];
|
||||
@@ -128,7 +126,7 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaLocalInspectionTool
|
||||
if (element != null) {
|
||||
final PsiAnonymousClass anonymousClass = PsiTreeUtil.getParentOfType(element, PsiAnonymousClass.class);
|
||||
LOG.assertTrue(anonymousClass != null);
|
||||
|
||||
ChangeContextUtil.encodeContextInfo(anonymousClass, true);
|
||||
boolean validContext = LambdaUtil.isValidLambdaContext(anonymousClass.getParent().getParent());
|
||||
final String canonicalText = anonymousClass.getBaseClassType().getCanonicalText();
|
||||
final PsiMethod method = anonymousClass.getMethods()[0];
|
||||
@@ -139,25 +137,69 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaLocalInspectionTool
|
||||
final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project);
|
||||
PsiLambdaExpression lambdaExpression =
|
||||
(PsiLambdaExpression)elementFactory.createExpressionFromText(withoutTypesDeclared, anonymousClass);
|
||||
|
||||
final PsiCodeBlock body = method.getBody();
|
||||
LOG.assertTrue(body != null);
|
||||
final PsiStatement[] statements = body.getStatements();
|
||||
PsiElement copy = body.copy();
|
||||
if (statements.length == 1 && statements[0] instanceof PsiReturnStatement) {
|
||||
PsiExpression value = ((PsiReturnStatement)statements[0]).getReturnValue();
|
||||
if (value != null) {
|
||||
copy = value.copy();
|
||||
}
|
||||
}
|
||||
|
||||
PsiElement lambdaBody = lambdaExpression.getBody();
|
||||
LOG.assertTrue(lambdaBody != null);
|
||||
lambdaBody.replace(copy);
|
||||
|
||||
final PsiNewExpression newExpression = (PsiNewExpression)anonymousClass.getParent();
|
||||
lambdaExpression = (PsiLambdaExpression)newExpression.replace(lambdaExpression);
|
||||
ChangeContextUtil.decodeContextInfo(lambdaExpression, null, null);
|
||||
if (!validContext) {
|
||||
lambdaExpression.replace(elementFactory.createExpressionFromText("((" + canonicalText + ")" + withoutTypesDeclared + ")", lambdaExpression));
|
||||
final PsiParenthesizedExpression typeCast =
|
||||
(PsiParenthesizedExpression)elementFactory.createExpressionFromText("((" + canonicalText + ")" + withoutTypesDeclared + ")", lambdaExpression);
|
||||
final PsiExpression typeCastExpr = typeCast.getExpression();
|
||||
LOG.assertTrue(typeCastExpr != null);
|
||||
final PsiExpression typeCastOperand = ((PsiTypeCastExpression)typeCastExpr).getOperand();
|
||||
LOG.assertTrue(typeCastOperand != null);
|
||||
final PsiElement fromText = ((PsiLambdaExpression)typeCastOperand).getBody();
|
||||
LOG.assertTrue(fromText != null);
|
||||
lambdaBody = lambdaExpression.getBody();
|
||||
LOG.assertTrue(lambdaBody != null);
|
||||
fromText.replace(lambdaBody);
|
||||
lambdaExpression.replace(typeCast);
|
||||
return;
|
||||
}
|
||||
|
||||
PsiType interfaceType = lambdaExpression.getFunctionalInterfaceType();
|
||||
if (isInferenced(lambdaExpression, interfaceType)) {
|
||||
lambdaExpression = (PsiLambdaExpression)lambdaExpression.replace(elementFactory.createExpressionFromText(lambdaWithTypesDeclared, lambdaExpression));
|
||||
if (isInferred(lambdaExpression, interfaceType)) {
|
||||
final PsiLambdaExpression withTypes =
|
||||
(PsiLambdaExpression)elementFactory.createExpressionFromText(lambdaWithTypesDeclared, lambdaExpression);
|
||||
final PsiElement withTypesBody = withTypes.getBody();
|
||||
LOG.assertTrue(withTypesBody != null);
|
||||
lambdaBody = lambdaExpression.getBody();
|
||||
LOG.assertTrue(lambdaBody != null);
|
||||
withTypesBody.replace(lambdaBody);
|
||||
lambdaExpression = (PsiLambdaExpression)lambdaExpression.replace(withTypes);
|
||||
|
||||
interfaceType = lambdaExpression.getFunctionalInterfaceType();
|
||||
if (isInferenced(lambdaExpression, interfaceType)) {
|
||||
lambdaExpression.replace(elementFactory.createExpressionFromText("(" + canonicalText + ")" + withoutTypesDeclared, lambdaExpression));
|
||||
if (isInferred(lambdaExpression, interfaceType)) {
|
||||
final PsiTypeCastExpression typeCast = (PsiTypeCastExpression)elementFactory.createExpressionFromText("(" + canonicalText + ")" + withoutTypesDeclared, lambdaExpression);
|
||||
final PsiExpression typeCastOperand = typeCast.getOperand();
|
||||
LOG.assertTrue(typeCastOperand instanceof PsiLambdaExpression);
|
||||
final PsiElement fromText = ((PsiLambdaExpression)typeCastOperand).getBody();
|
||||
LOG.assertTrue(fromText != null);
|
||||
lambdaBody = lambdaExpression.getBody();
|
||||
LOG.assertTrue(lambdaBody != null);
|
||||
fromText.replace(lambdaBody);
|
||||
lambdaExpression.replace(typeCast);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isInferenced(PsiLambdaExpression lambdaExpression, PsiType interfaceType) {
|
||||
private static boolean isInferred(PsiLambdaExpression lambdaExpression, PsiType interfaceType) {
|
||||
return interfaceType == null || !LambdaUtil.isLambdaFullyInferred(lambdaExpression, interfaceType) || LambdaUtil.checkInterfaceFunctional(interfaceType) != null;
|
||||
}
|
||||
|
||||
@@ -185,18 +227,7 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaLocalInspectionTool
|
||||
buf.append(")");
|
||||
}
|
||||
}
|
||||
buf.append("->");
|
||||
final PsiCodeBlock body = method.getBody();
|
||||
LOG.assertTrue(body != null);
|
||||
final PsiStatement[] statements = body.getStatements();
|
||||
if (statements.length == 1 && statements[0] instanceof PsiReturnStatement) {
|
||||
PsiExpression value = ((PsiReturnStatement)statements[0]).getReturnValue();
|
||||
if (value != null) {
|
||||
buf.append(value.getText());
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
buf.append(body.getText());
|
||||
buf.append("-> {}");
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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 com.intellij.refactoring.safeDelete;
|
||||
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.impl.source.javadoc.PsiDocMethodOrFieldRef;
|
||||
import com.intellij.refactoring.safeDelete.usageInfo.SafeDeleteReferenceJavaDeleteUsageInfo;
|
||||
import com.intellij.usageView.UsageInfo;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Max Medvedev
|
||||
*/
|
||||
public class JavaSafeDeleteDelegateImpl implements JavaSafeDeleteDelegate {
|
||||
@Override
|
||||
public void createUsageInfoForParameter(final PsiReference reference,
|
||||
final List<UsageInfo> usages,
|
||||
final PsiParameter parameter,
|
||||
final PsiMethod method) {
|
||||
int index = method.getParameterList().getParameterIndex(parameter);
|
||||
final PsiElement element = reference.getElement();
|
||||
PsiCall call = null;
|
||||
if (element instanceof PsiCall) {
|
||||
call = (PsiCall)element;
|
||||
}
|
||||
else if (element.getParent() instanceof PsiCall) {
|
||||
call = (PsiCall)element.getParent();
|
||||
}
|
||||
if (call != null) {
|
||||
final PsiExpressionList argList = call.getArgumentList();
|
||||
if (argList != null) {
|
||||
final PsiExpression[] args = argList.getExpressions();
|
||||
if (index < args.length) {
|
||||
if (!parameter.isVarArgs()) {
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(args[index], parameter, true));
|
||||
}
|
||||
else {
|
||||
for (int i = index; i < args.length; i++) {
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(args[i], parameter, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (element instanceof PsiDocMethodOrFieldRef) {
|
||||
if (((PsiDocMethodOrFieldRef)element).getSignature() != null) {
|
||||
@NonNls final StringBuffer newText = new StringBuffer();
|
||||
newText.append("/** @see #").append(method.getName()).append('(');
|
||||
final List<PsiParameter> parameters = new ArrayList<PsiParameter>(Arrays.asList(method.getParameterList().getParameters()));
|
||||
parameters.remove(parameter);
|
||||
newText.append(StringUtil.join(parameters, new Function<PsiParameter, String>() {
|
||||
@Override
|
||||
public String fun(PsiParameter psiParameter) {
|
||||
return parameter.getType().getCanonicalText();
|
||||
}
|
||||
}, ","));
|
||||
newText.append(")*/");
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(element, parameter, true) {
|
||||
public void deleteElement() throws IncorrectOperationException {
|
||||
final PsiDocMethodOrFieldRef.MyReference javadocMethodReference =
|
||||
(PsiDocMethodOrFieldRef.MyReference)element.getReference();
|
||||
if (javadocMethodReference != null) {
|
||||
javadocMethodReference.bindToText(method.getContainingClass(), newText);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-51
@@ -26,11 +26,9 @@ import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
|
||||
import com.intellij.psi.codeStyle.VariableKind;
|
||||
import com.intellij.psi.impl.source.javadoc.PsiDocMethodOrFieldRef;
|
||||
import com.intellij.psi.javadoc.PsiDocTag;
|
||||
import com.intellij.psi.search.searches.OverridingMethodsSearch;
|
||||
import com.intellij.psi.search.searches.ReferencesSearch;
|
||||
@@ -47,11 +45,9 @@ import com.intellij.usageView.UsageInfo;
|
||||
import com.intellij.usageView.UsageViewUtil;
|
||||
import com.intellij.usages.*;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.Processor;
|
||||
import com.intellij.util.containers.HashMap;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.*;
|
||||
@@ -681,56 +677,12 @@ public class JavaSafeDeleteProcessor extends SafeDeleteProcessorDelegateBase {
|
||||
|
||||
private static void findParameterUsages(final PsiParameter parameter, final List<UsageInfo> usages) {
|
||||
final PsiMethod method = (PsiMethod)parameter.getDeclarationScope();
|
||||
final int index = method.getParameterList().getParameterIndex(parameter);
|
||||
//search for refs to current method only, do not search for refs to overriding methods, they'll be searched separately
|
||||
ReferencesSearch.search(method).forEach(new Processor<PsiReference>() {
|
||||
public boolean process(final PsiReference reference) {
|
||||
final PsiElement element = reference.getElement();
|
||||
PsiCall call = null;
|
||||
if (element instanceof PsiCall) {
|
||||
call = (PsiCall)element;
|
||||
} else if (element.getParent() instanceof PsiCall) {
|
||||
call = (PsiCall)element.getParent();
|
||||
}
|
||||
if (call != null) {
|
||||
final PsiExpressionList argList = call.getArgumentList();
|
||||
if (argList != null) {
|
||||
final PsiExpression[] args = argList.getExpressions();
|
||||
if (index < args.length) {
|
||||
if (!parameter.isVarArgs()) {
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(args[index], parameter, true));
|
||||
}
|
||||
else {
|
||||
for (int i = index; i < args.length; i++) {
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(args[i], parameter, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (element instanceof PsiDocMethodOrFieldRef) {
|
||||
if (((PsiDocMethodOrFieldRef)element).getSignature() != null) {
|
||||
@NonNls final StringBuffer newText = new StringBuffer();
|
||||
newText.append("/** @see #").append(method.getName()).append('(');
|
||||
final List<PsiParameter> parameters = new ArrayList<PsiParameter>(Arrays.asList(method.getParameterList().getParameters()));
|
||||
parameters.remove(parameter);
|
||||
newText.append(StringUtil.join(parameters, new Function<PsiParameter, String>() {
|
||||
@Override
|
||||
public String fun(PsiParameter psiParameter) {
|
||||
return parameter.getType().getCanonicalText();
|
||||
}
|
||||
}, ","));
|
||||
newText.append(")*/");
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(element, parameter, true) {
|
||||
public void deleteElement() throws IncorrectOperationException {
|
||||
final PsiDocMethodOrFieldRef.MyReference javadocMethodReference =
|
||||
(PsiDocMethodOrFieldRef.MyReference)element.getReference();
|
||||
if (javadocMethodReference != null) {
|
||||
javadocMethodReference.bindToText(method.getContainingClass(), newText);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
PsiElement element = reference.getElement();
|
||||
if (element != null) {
|
||||
JavaSafeDeleteDelegate.EP.forLanguage(element.getLanguage()).createUsageInfoForParameter(reference, usages, parameter, method);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -766,6 +718,7 @@ public class JavaSafeDeleteProcessor extends SafeDeleteProcessorDelegateBase {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private static boolean isInside(PsiElement place, PsiElement[] ancestors) {
|
||||
return isInside(place, Arrays.asList(ancestors));
|
||||
}
|
||||
|
||||
+7
-7
@@ -2,13 +2,13 @@
|
||||
class Test {
|
||||
{
|
||||
Comparable<String> c = o -> {
|
||||
Runnable r = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(o);
|
||||
}
|
||||
};
|
||||
return 0;
|
||||
Runnable r = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(o);
|
||||
}
|
||||
};
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
class Test {
|
||||
{
|
||||
Comparable<String> c = o -> {
|
||||
System.out.println();
|
||||
return 0;
|
||||
System.out.println();
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
interface I {
|
||||
|
||||
}
|
||||
interface Bar extends I {
|
||||
int smth = 0;
|
||||
int compare(String o1, String o2);
|
||||
}
|
||||
{
|
||||
I bar2 = (Bar) (o1, o2) -> {
|
||||
System.out.println(Bar.smth);
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
class Test {
|
||||
{
|
||||
Runnable r = () -> {
|
||||
System.out.println("");
|
||||
System.out.println("");
|
||||
};
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
class Test {
|
||||
{
|
||||
Runnable[] r = new Runnable[] {() -> {
|
||||
System.out.println("");
|
||||
System.out.println("");
|
||||
}};
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// "Replace with lambda" "false"
|
||||
class Test {
|
||||
interface I {
|
||||
|
||||
}
|
||||
interface Bar extends I {
|
||||
int compare(String o1, String o2);
|
||||
}
|
||||
{
|
||||
I bar2 = new Ba<caret>r() {
|
||||
int k;
|
||||
@Override
|
||||
public int compare(String o1, String o2) {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
interface I {
|
||||
|
||||
}
|
||||
interface Bar extends I {
|
||||
int smth = 0;
|
||||
int compare(String o1, String o2);
|
||||
}
|
||||
{
|
||||
I bar2 = new Ba<caret>r() {
|
||||
@Override
|
||||
public int compare(String o1, String o2) {
|
||||
System.out.println(smth);
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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 com.intellij.refactoring.safeDelete;
|
||||
|
||||
import com.intellij.lang.LanguageExtension;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.PsiParameter;
|
||||
import com.intellij.psi.PsiReference;
|
||||
import com.intellij.usageView.UsageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Max Medvedev
|
||||
*/
|
||||
public interface JavaSafeDeleteDelegate {
|
||||
LanguageExtension<JavaSafeDeleteDelegate> EP =
|
||||
new LanguageExtension<JavaSafeDeleteDelegate>("com.intellij.refactoring.safeDelete.JavaSafeDeleteDelegate");
|
||||
|
||||
void createUsageInfoForParameter(final PsiReference reference,
|
||||
final List<UsageInfo> usages,
|
||||
final PsiParameter parameter,
|
||||
final PsiMethod method);
|
||||
}
|
||||
+4
@@ -120,6 +120,10 @@ public abstract class ContributorsBasedGotoByModel implements ChooseByNameModel
|
||||
Processor<ChooseByNameContributor> processor = new Processor<ChooseByNameContributor>() {
|
||||
@Override
|
||||
public boolean process(ChooseByNameContributor contributor) {
|
||||
if (myProject.isDisposed()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
for (NavigationItem item : contributor.getItemsByName(name, pattern, myProject, checkBoxState)) {
|
||||
if (item == null) {
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
implementation="org.jetbrains.plugins.groovy.refactoring.changeSignature.GrChangeSignatureUsageProcessor" id="groovyProcessor"
|
||||
order="before javaProcessor"/>
|
||||
<safeDelete.importSearcher implementation="org.jetbrains.plugins.groovy.refactoring.safeDelete.GroovyImportSearcher"/>
|
||||
<refactoring.safeDelete.JavaSafeDeleteDelegate implementationClass="org.jetbrains.plugins.groovy.refactoring.safeDelete.JavaSafeDeleteDelegateForGroovy" language="Groovy"/>
|
||||
|
||||
<constantExpressionEvaluator language="Groovy"
|
||||
implementationClass="org.jetbrains.plugins.groovy.lang.psi.util.GroovyConstantExpressionEvaluator"/>
|
||||
|
||||
+5
@@ -16,6 +16,9 @@
|
||||
|
||||
package org.jetbrains.plugins.groovy.lang.groovydoc.psi.api;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@@ -25,4 +28,6 @@ public interface GrDocMethodReference extends GrDocMemberReference{
|
||||
|
||||
@NotNull
|
||||
GrDocMethodParams getParameterList();
|
||||
|
||||
PsiElement bindToText(Project project, String text);
|
||||
}
|
||||
|
||||
+14
-3
@@ -17,16 +17,18 @@
|
||||
package org.jetbrains.plugins.groovy.lang.groovydoc.psi.impl;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.javadoc.PsiDocComment;
|
||||
import com.intellij.psi.util.PropertyUtil;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.plugins.groovy.lang.groovydoc.psi.api.GrDocMethodParams;
|
||||
import org.jetbrains.plugins.groovy.lang.groovydoc.psi.api.GrDocMethodReference;
|
||||
import org.jetbrains.plugins.groovy.lang.groovydoc.psi.api.GrDocReferenceElement;
|
||||
import org.jetbrains.plugins.groovy.lang.groovydoc.psi.api.*;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyElementVisitor;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElementFactory;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.types.GrCodeReferenceElement;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.util.PsiUtil;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.processors.MethodResolverProcessor;
|
||||
@@ -55,6 +57,15 @@ public class GrDocMethodReferenceImpl extends GrDocMemberReferenceImpl implement
|
||||
return child;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiElement bindToText(Project project, String text) {
|
||||
GrDocComment comment = GroovyPsiElementFactory.getInstance(project).createDocCommentFromText(text);
|
||||
PsiElement tag = PsiTreeUtil.getChildOfType(comment, GrDocTag.class);
|
||||
PsiElement ref = PsiTreeUtil.getChildOfType(tag, GrDocMethodReference.class);
|
||||
assert ref != null : text;
|
||||
return replace(ref);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiElement resolve() {
|
||||
String name = getReferenceName();
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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.plugins.groovy.refactoring.safeDelete;
|
||||
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.refactoring.safeDelete.JavaSafeDeleteDelegate;
|
||||
import com.intellij.refactoring.safeDelete.usageInfo.SafeDeleteReferenceJavaDeleteUsageInfo;
|
||||
import com.intellij.usageView.UsageInfo;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.plugins.groovy.lang.groovydoc.psi.api.GrDocMethodReference;
|
||||
import org.jetbrains.plugins.groovy.lang.groovydoc.psi.api.GrDocReferenceElement;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.signatures.GrClosureSignature;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrCall;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.signatures.GrClosureSignatureUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Max Medvedev
|
||||
*/
|
||||
public class JavaSafeDeleteDelegateForGroovy implements JavaSafeDeleteDelegate {
|
||||
@Override
|
||||
public void createUsageInfoForParameter(PsiReference reference,
|
||||
List<UsageInfo> usages,
|
||||
final PsiParameter parameter,
|
||||
final PsiMethod method) {
|
||||
int index = method.getParameterList().getParameterIndex(parameter);
|
||||
final PsiElement element = reference.getElement();
|
||||
GrCall call = null;
|
||||
if (element instanceof GrCall) {
|
||||
call = (GrCall)element;
|
||||
}
|
||||
else if (element.getParent() instanceof GrCall) {
|
||||
call = (GrCall)element.getParent();
|
||||
}
|
||||
if (call != null) {
|
||||
GrClosureSignature signature = GrClosureSignatureUtil.createSignature(call);
|
||||
if (signature == null) return;//todo ???
|
||||
GrClosureSignatureUtil.ArgInfo<PsiElement>[] argInfos = GrClosureSignatureUtil.mapParametersToArguments(signature, call);
|
||||
if (argInfos == null) return; //todo???
|
||||
|
||||
for (PsiElement arg : argInfos[index].args) {
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(arg, parameter, true));
|
||||
}
|
||||
}
|
||||
else if (element instanceof GrDocMethodReference) {
|
||||
@NonNls final StringBuilder newText = new StringBuilder();
|
||||
newText.append("/** @see ");
|
||||
GrDocReferenceElement holder = ((GrDocMethodReference)element).getReferenceHolder();
|
||||
if (holder != null) {
|
||||
newText.append(holder.getText());
|
||||
}
|
||||
newText.append('#');
|
||||
newText.append(method.getName());
|
||||
newText.append('(');
|
||||
final List<PsiParameter> parameters = new ArrayList<PsiParameter>(Arrays.asList(method.getParameterList().getParameters()));
|
||||
parameters.remove(parameter);
|
||||
newText.append(StringUtil.join(parameters, new Function<PsiParameter, String>() {
|
||||
@Override
|
||||
public String fun(PsiParameter psiParameter) {
|
||||
return parameter.getType().getCanonicalText();
|
||||
}
|
||||
}, ","));
|
||||
newText.append(")*/");
|
||||
usages.add(new SafeDeleteReferenceJavaDeleteUsageInfo(element, parameter, true) {
|
||||
public void deleteElement() throws IncorrectOperationException {
|
||||
((GrDocMethodReference)element).bindToText(method.getProject(), newText.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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.plugins.groovy.refactoring.safeDelete
|
||||
|
||||
import com.intellij.codeInsight.TargetElementUtilBase
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.refactoring.safeDelete.SafeDeleteHandler
|
||||
import com.intellij.refactoring.safeDelete.SafeDeleteProcessor
|
||||
import org.jetbrains.plugins.groovy.LightGroovyTestCase
|
||||
import org.jetbrains.plugins.groovy.util.TestUtils;
|
||||
|
||||
/**
|
||||
* @author Max Medvedev
|
||||
*/
|
||||
public class SafeDeleteJavaParameterTest extends LightGroovyTestCase {
|
||||
|
||||
final String basePath = TestUtils.testDataPath + "refactoring/safeDeleteJavaParameter/"
|
||||
|
||||
void testGroovyCall() {
|
||||
doTest('''\
|
||||
class A {
|
||||
void foo(int ba<caret>r) {}
|
||||
}
|
||||
''', '''\
|
||||
new A().foo(2)
|
||||
''', '''\
|
||||
new A().foo()
|
||||
''')
|
||||
}
|
||||
|
||||
void testGroovyDocRef() {
|
||||
doTest('''\
|
||||
class A {
|
||||
void foo(int ba<caret>r) {}
|
||||
}
|
||||
''', '''\
|
||||
/**
|
||||
@see A#foo(int)
|
||||
*/
|
||||
class X{}
|
||||
''', '''\
|
||||
/**
|
||||
@see A#foo()
|
||||
*/
|
||||
class X{}
|
||||
''')
|
||||
}
|
||||
|
||||
private void doTest(String java, String groovy, String groovyAfter) {
|
||||
myFixture.configureByText('test.java', java)
|
||||
def groovyFile = myFixture.addFileToProject('test.groovy', groovy)
|
||||
|
||||
final PsiElement psiElement = TargetElementUtilBase
|
||||
.findTargetElement(myFixture.editor, TargetElementUtilBase.ELEMENT_NAME_ACCEPTED | TargetElementUtilBase.REFERENCED_ELEMENT_ACCEPTED);
|
||||
|
||||
SafeDeleteHandler.invoke(myFixture.project, [psiElement] as PsiElement[], true)
|
||||
|
||||
assertEquals(groovyAfter, groovyFile.text)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
java.util.ArrayList<java.lang.Integer> list = new java.util.ArrayList<java.lang.Integer>(java.util.Arrays.asList(1, 2, 3));
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(list, new groovy.lang.Closure<java.lang.Void>(this, this) {
|
||||
public void doCall(java.lang.Object it) {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(closure.this, it);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, it);
|
||||
}
|
||||
|
||||
public void doCall() {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
public abstract class Anon extends groovy.lang.GroovyObjectSupport implements groovy.lang.GroovyObject {
|
||||
public Anon(java.lang.Object foo) {
|
||||
Anon.this.foo = foo;
|
||||
this.foo = foo;
|
||||
}
|
||||
public abstract void run() ;
|
||||
public java.lang.Object getFoo() {
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
public class IntCat extends groovy.lang.GroovyObjectSupport implements groovy.lang.GroovyObject {
|
||||
public static void call(java.lang.Integer i) {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(IntCat.this, i);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, i);
|
||||
}
|
||||
|
||||
public static void call(java.lang.Integer i, java.lang.String s) {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(IntCat.this, s);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, s);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,7 +14,7 @@ new closureInUse(new groovy.lang.Binding(args)).run();
|
||||
}
|
||||
|
||||
public java.lang.Object run() {
|
||||
return org.codehaus.groovy.runtime.DefaultGroovyMethods.use(closureInUse.this, IntCat.class, new groovy.lang.Closure<java.lang.Void>(this, this) {
|
||||
return org.codehaus.groovy.runtime.DefaultGroovyMethods.use(this, IntCat.class, new groovy.lang.Closure<java.lang.Void>(this, this) {
|
||||
public void doCall(java.lang.Object it) {
|
||||
IntCat.call(2);
|
||||
IntCat.call(2, "a");
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@ public Base(java.lang.Object a) {
|
||||
public class Inheritor extends Base implements groovy.lang.GroovyObject {
|
||||
public Inheritor(int x, int y) {
|
||||
super(x);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(Inheritor.this, y);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, y);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ public java.lang.Object foo() {
|
||||
invokeMethod("bar", new java.lang.Object[]{2});
|
||||
java.util.LinkedHashMap<java.lang.String, java.lang.Integer> map = new java.util.LinkedHashMap<java.lang.String, java.lang.Integer>(1);
|
||||
map.put("s", 4);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(Abc.this, invokeMethod("bar", new java.lang.Object[]{map, 3}));
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, invokeMethod("bar", new java.lang.Object[]{map, 3}));
|
||||
java.lang.String s = "a";
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.invokeMethod(s, "bar", new java.lang.Object[]{4});
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(Abc.this, org.codehaus.groovy.runtime.DefaultGroovyMethods.invokeMethod(s, "bar", new java.lang.Object[]{5}));
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, org.codehaus.groovy.runtime.DefaultGroovyMethods.invokeMethod(s, "bar", new java.lang.Object[]{5}));
|
||||
return org.codehaus.groovy.runtime.DefaultGroovyMethods.invokeMethod(s, "anme", new java.util.ArrayList<java.lang.Object>());
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
public class A extends groovy.lang.GroovyObjectSupport implements groovy.lang.GroovyObject {
|
||||
public void foo() {
|
||||
setProperty("bar", 2);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(A.this, setProperty0(A.this, "bar", 3));
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, setProperty0(this, "bar", 3));
|
||||
java.lang.String s = "a";
|
||||
s.bar = 4;
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(A.this, s.bar = 5);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(A.this, getProperty("bar"));
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(A.this, s.getProperty("bar"));
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, s.bar = 5);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, getProperty("bar"));
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, s.getProperty("bar"));
|
||||
}
|
||||
|
||||
private static <Value>Value setProperty0(groovy.lang.GroovyObjectSupport propOwner, java.lang.String property, Value newValue) {
|
||||
|
||||
@@ -29,7 +29,7 @@ new hash(new groovy.lang.Binding(args)).run();
|
||||
public java.lang.Object run() {
|
||||
int KB = 1024;
|
||||
int MB = 1024 * KB;
|
||||
java.io.File f = new java.io.File(hash.this.getBinding().getProperty("args")[0]);
|
||||
java.io.File f = new java.io.File(this.getBinding().getProperty("args")[0]);
|
||||
if (!org.codehaus.groovy.runtime.DefaultGroovyMethods.asBoolean(f.exists()) || !org.codehaus.groovy.runtime.DefaultGroovyMethods.asBoolean(f.isFile())){
|
||||
println("Invalid file " + java.lang.String.valueOf(f) + " provided");
|
||||
println("Usage: groovy sha1.groovy <file_to_hash>");
|
||||
|
||||
plugins/groovy/testdata/refactoring/convertGroovyToJava/file/methodParamInClosureImplicitReturn.java
Vendored
+2
-2
@@ -12,7 +12,7 @@ public void foo(int x) {
|
||||
final groovy.lang.Reference<java.lang.Integer> i = new groovy.lang.Reference<java.lang.Integer>(x);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(new java.util.ArrayList<java.lang.Integer>(java.util.Arrays.asList(1, 2, 3)), new groovy.lang.Closure<java.lang.Number>(this, this) {
|
||||
public java.lang.Number doCall(java.lang.Object it) {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(methodParamInClosureImplicitReturn.this, i.get());
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, i.get());
|
||||
return setGroovyRef(i, i.get() + 1);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ return doCall(null);
|
||||
});
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(new java.util.ArrayList<java.lang.Integer>(java.util.Arrays.asList(1, 2, 3)), new groovy.lang.Closure<java.lang.Integer>(this, this) {
|
||||
public java.lang.Integer doCall(java.lang.Object it) {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(methodParamInClosureImplicitReturn.this, i.get());
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, i.get());
|
||||
i.set(i.get()++);
|
||||
return i.get();
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
public class X extends groovy.lang.GroovyObjectSupport implements groovy.lang.GroovyObject {
|
||||
public void foo() {
|
||||
final groovy.lang.Reference<java.lang.Integer> ab = new groovy.lang.Reference<java.lang.Integer>(4);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(X.this, new groovy.lang.Closure<java.lang.Object>(this, this) {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(this, new groovy.lang.Closure<java.lang.Object>(this, this) {
|
||||
public java.lang.Object doCall(java.lang.Object it) {
|
||||
return org.codehaus.groovy.runtime.DefaultGroovyMethods.each(X.this, new groovy.lang.Closure<java.lang.Integer>(this, this) {
|
||||
return org.codehaus.groovy.runtime.DefaultGroovyMethods.each(this, new groovy.lang.Closure<java.lang.Integer>(this, this) {
|
||||
public java.lang.Integer doCall(java.lang.Object it) {
|
||||
return setGroovyRef(ab, 2);
|
||||
}
|
||||
@@ -20,7 +20,7 @@ return doCall(null);
|
||||
}
|
||||
|
||||
});
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(X.this, ab.get());
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, ab.get());
|
||||
}
|
||||
|
||||
private static <T> T setGroovyRef(groovy.lang.Reference<T> ref, T newValue) {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ foo.set(foo.get()++);
|
||||
foo.set(foo.get() + 2);
|
||||
foo.set(foo.get() - 1);
|
||||
foo.set(4);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(refInClosureInScript.this, foo.get());
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, foo.get());
|
||||
}
|
||||
|
||||
public void doCall() {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
public class returns extends groovy.lang.GroovyObjectSupport implements groovy.lang.GroovyObject {
|
||||
public void foo1() {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(returns.this, "foo");
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, "foo");
|
||||
}
|
||||
|
||||
public void foo2() {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(returns.this, "foo");
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, "foo");
|
||||
}
|
||||
|
||||
public int foo3() {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(returns.this, "foo");
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, "foo");
|
||||
}
|
||||
|
||||
public java.lang.Integer foo4() {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
public class Foo extends groovy.lang.GroovyObjectSupport implements groovy.lang.GroovyObject {
|
||||
public void print() {
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(Foo.this, CONST);
|
||||
org.codehaus.groovy.runtime.DefaultGroovyMethods.print(this, CONST);
|
||||
}
|
||||
|
||||
public static java.lang.Integer getCONST() {
|
||||
|
||||
+2
-1
@@ -74,7 +74,8 @@ public class MavenModuleNameMapper {
|
||||
|
||||
for (NameItem name : names) {
|
||||
if (name.module != null) {
|
||||
existingNames.add(name.getResultName());
|
||||
boolean wasAdded = existingNames.add(name.getResultName());
|
||||
assert wasAdded : name.getResultName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +155,8 @@
|
||||
<extensionPoint name="codeInsight.createFieldFromUsageHelper" beanClass="com.intellij.lang.LanguageExtensionPoint"/>
|
||||
|
||||
<extensionPoint name="library.dependencyScopeSuggester" interface="com.intellij.openapi.roots.LibraryDependencyScopeSuggester"/>
|
||||
|
||||
<extensionPoint name="refactoring.safeDelete.JavaSafeDeleteDelegate" beanClass="com.intellij.lang.LanguageExtensionPoint"/>
|
||||
</extensionPoints>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
@@ -1096,6 +1098,7 @@
|
||||
<refactoring.moveInnerHandler language="JAVA" implementationClass="com.intellij.refactoring.move.moveInner.MoveJavaInnerHandler" id="java"/>
|
||||
|
||||
<refactoring.safeDeleteProcessor implementation="com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor" id="javaProcessor"/>
|
||||
<refactoring.safeDelete.JavaSafeDeleteDelegate implementationClass="com.intellij.refactoring.safeDelete.JavaSafeDeleteDelegateImpl" language="JAVA"/>
|
||||
<safeDelete.importSearcher implementation="com.intellij.refactoring.safeDelete.JavaImportSearcher"/>
|
||||
|
||||
<refactoring.introduceParameterMethodUsagesProcessor implementation="com.intellij.refactoring.introduceParameter.JavaIntroduceParameterMethodUsagesProcessor"/>
|
||||
|
||||
Reference in New Issue
Block a user