2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com
.intellij
.refactoring
.changeSignature
;
18 import com
.intellij
.psi
.PsiElement
;
19 import com
.intellij
.psi
.PsiMethod
;
20 import com
.intellij
.refactoring
.RefactoringBundle
;
21 import com
.intellij
.refactoring
.rename
.UnresolvableCollisionUsageInfo
;
22 import com
.intellij
.refactoring
.util
.RefactoringUIUtil
;
23 import com
.intellij
.refactoring
.util
.CommonRefactoringUtil
;
28 public class NewParameterCollidesWithLocalUsageInfo
extends UnresolvableCollisionUsageInfo
{
29 private final PsiElement myConflictingElement
;
30 private final PsiMethod myMethod
;
32 public NewParameterCollidesWithLocalUsageInfo(PsiElement element
, PsiElement referencedElement
,
34 super(element
, referencedElement
);
35 myConflictingElement
= referencedElement
;
39 public String
getDescription() {
40 String buffer
= RefactoringBundle
.message("there.is.already.a.0.in.1.it.will.conflict.with.the.new.parameter",
41 RefactoringUIUtil
.getDescription(myConflictingElement
, true),
42 RefactoringUIUtil
.getDescription(myMethod
, true));
44 return CommonRefactoringUtil
.capitalize(buffer
);