mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] proper family name for Create Parameter and Method from usage fixes
This commit is contained in:
@@ -207,12 +207,14 @@ add.dynamic.property=Add Dynamic Property ''{0}''
|
||||
duplicate.element.in.the.map=Duplicate element ''{0}'' in the map
|
||||
dynamic.tool.window.id=Dynamic Members
|
||||
|
||||
create.from.usage.family.name=Create From Usage
|
||||
create.field.from.usage.family.name=Create field from usage
|
||||
create.field.from.usage=Create field ''{0}''
|
||||
create.method.from.usage.family.name=Create method from usage
|
||||
create.method.from.usage=Create method ''{0}''
|
||||
create.variable.from.usage.family.name=Create variable from usage
|
||||
create.variable.from.usage=Create Variable ''{0}''
|
||||
create.parameter.from.usage.family.name=Create parameter from usage
|
||||
create.parameter.from.usage=Create parameter ''{0}''
|
||||
add.dynamic.element=Add dynamic element
|
||||
add.dynamic.method=Add Dynamic Method
|
||||
dynamic.type=Type
|
||||
@@ -288,7 +290,6 @@ ellipsis.type.is.not.allowed.here=Ellipsis type is not allowed here
|
||||
method.0.is.too.complex.too.analyze=Method ''{0}'' is too complex to analyze.\nTypes of local variables are not inferred.
|
||||
closure.is.too.complex.to.analyze=Closure is complex to analyze.\nTypes of local variables are not inferred.
|
||||
0.is.deprecated=''{0}'' is deprecated
|
||||
create.parameter.from.usage=Create parameter ''{0}''
|
||||
wrong.number.of.type.arguments=Wrong number of type arguments\: {0}; required\: {1}
|
||||
type.argument.0.is.not.in.its.bound.should.extend.1=Type parameter ''{0}'' is not in its bound; should extend ''{1}''
|
||||
catch.statement.parameter.type.should.be.a.subclass.of.throwable=Catch statement parameter type should be a subclass of Throwable
|
||||
|
||||
+7
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.plugins.groovy.annotator.intentions;
|
||||
|
||||
import com.intellij.codeInsight.generation.OverrideImplementUtil;
|
||||
@@ -33,6 +33,12 @@ public class CreateMethodFromUsageFix extends GrCreateFromUsageBaseFix implement
|
||||
super(refExpression);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return GroovyBundle.message("create.method.from.usage.family.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String getText() {
|
||||
|
||||
+5
-19
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 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.
|
||||
*/
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.plugins.groovy.annotator.intentions;
|
||||
|
||||
import com.intellij.ide.util.SuperMethodWarningUtil;
|
||||
@@ -60,14 +46,14 @@ public class CreateParameterFromUsageFix extends Intention implements MethodOrCl
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
return GroovyBundle.message("create.parameter.from.usage", myName);
|
||||
public String getFamilyName() {
|
||||
return GroovyBundle.message("create.parameter.from.usage.family.name");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return GroovyBundle.message("create.from.usage.family.name");
|
||||
public String getText() {
|
||||
return GroovyBundle.message("create.parameter.from.usage", myName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
-9
@@ -12,12 +12,9 @@ import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.plugins.groovy.GroovyBundle;
|
||||
import org.jetbrains.plugins.groovy.intentions.base.Intention;
|
||||
import org.jetbrains.plugins.groovy.intentions.base.PsiElementPredicate;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.util.GrStaticChecker;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.util.PsiUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.ArrayList;
|
||||
@@ -34,12 +31,6 @@ public abstract class GrCreateFromUsageBaseFix extends Intention {
|
||||
myRefExpression = SmartPointerManager.getInstance(refExpression.getProject()).createSmartPsiElementPointer(refExpression);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String getFamilyName() {
|
||||
return GroovyBundle.message("create.from.usage.family.name");
|
||||
}
|
||||
|
||||
protected GrReferenceExpression getRefExpr() {
|
||||
return myRefExpression.getElement();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user