diff --git a/java/java-analysis-impl/src/messages/QuickFixBundle.properties b/java/java-analysis-impl/src/messages/QuickFixBundle.properties index 7e71e64d703f..0a35cc3e9d03 100644 --- a/java/java-analysis-impl/src/messages/QuickFixBundle.properties +++ b/java/java-analysis-impl/src/messages/QuickFixBundle.properties @@ -57,9 +57,9 @@ change.method.signature.from.usage.family=Change method signature from usage # {0} - original method signature including name, {1} - method name, {2} - proposed new parameters list change.method.signature.from.usage.text=Change signature of ''{0}'' to ''{1}({2})'' -add.parameter.from.usage.text=Add ''{0}'' as {1} parameter to method ''{2}'' -remove.parameter.from.usage.text=Remove {0} parameter from method ''{1}'' -change.parameter.from.usage.text=Change {0} parameter of method ''{1}'' from ''{2}'' to ''{3}'' +add.parameter.from.usage.text=Add ''{0}'' as {1,number,ordinal} parameter to method ''{2}'' +remove.parameter.from.usage.text=Remove {0,number,ordinal} parameter from method ''{1}'' +change.parameter.from.usage.text=Change {0,number,ordinal} parameter of method ''{1}'' from ''{2}'' to ''{3}'' searching.for.usages.progress.title=Searching For Usages... create.class.from.new.family=Create Class from New create.class.from.new.text=Create class ''{0}'' diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ChangeMethodSignatureFromUsageFix.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ChangeMethodSignatureFromUsageFix.java index f0d7335c1475..f98d5198cb56 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ChangeMethodSignatureFromUsageFix.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ChangeMethodSignatureFromUsageFix.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2015 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-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. package com.intellij.codeInsight.daemon.impl.quickfix; import com.intellij.codeInsight.FileModificationService; @@ -107,15 +93,15 @@ public class ChangeMethodSignatureFromUsageFix implements IntentionAction/*, Hig if (newParams.size() == 1) { final ParameterInfoImpl p = newParams.iterator().next(); return QuickFixBundle - .message("add.parameter.from.usage.text", p.getTypeText(), StringUtil.formatOrdinal(ArrayUtil.find(myNewParametersInfo, p) + 1), targetMethodName); + .message("add.parameter.from.usage.text", p.getTypeText(), ArrayUtil.find(myNewParametersInfo, p) + 1, targetMethodName); } if (removedParams.size() == 1) { final ParameterInfoImpl p = removedParams.iterator().next(); - return QuickFixBundle.message("remove.parameter.from.usage.text", StringUtil.formatOrdinal(p.getOldIndex() + 1), targetMethodName); + return QuickFixBundle.message("remove.parameter.from.usage.text", p.getOldIndex() + 1, targetMethodName); } if (changedParams.size() == 1) { final ParameterInfoImpl p = changedParams.iterator().next(); - return QuickFixBundle.message("change.parameter.from.usage.text", StringUtil.formatOrdinal(p.getOldIndex() + 1), targetMethodName, + return QuickFixBundle.message("change.parameter.from.usage.text", p.getOldIndex() + 1, targetMethodName, myTargetMethod.getParameterList().getParameters()[p.getOldIndex()].getType().getPresentableText(), p.getTypeText()); }