update copyright
[fedora-idea.git] / java / java-impl / src / com / intellij / refactoring / rename / SubmemberHidesMemberUsageInfo.java
blobc845cfec4c5a599e781326ccb291faf37ed405ea
1 /*
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.
18 * Created by IntelliJ IDEA.
19 * User: dsl
20 * Date: 05.06.2002
21 * Time: 12:43:27
22 * To change template for new class use
23 * Code Style | Class Templates options (Tools | IDE Options).
25 package com.intellij.refactoring.rename;
27 import com.intellij.psi.PsiElement;
28 import com.intellij.psi.PsiMethod;
29 import com.intellij.refactoring.RefactoringBundle;
30 import com.intellij.refactoring.util.RefactoringUIUtil;
31 import com.intellij.refactoring.util.CommonRefactoringUtil;
32 import com.intellij.usageView.UsageViewUtil;
34 public class SubmemberHidesMemberUsageInfo extends UnresolvableCollisionUsageInfo {
35 public SubmemberHidesMemberUsageInfo(PsiElement element, PsiElement referencedElement) {
36 super(element, referencedElement);
39 public String getDescription() {
40 String descr;
41 if (!(getElement() instanceof PsiMethod)) {
42 descr = RefactoringBundle.message("0.will.hide.renamed.1",
43 RefactoringUIUtil.getDescription(getElement(), true),
44 UsageViewUtil.getType(getElement()));
46 else {
47 descr = RefactoringBundle.message("0.will.override.renamed.1",
48 RefactoringUIUtil.getDescription(getElement(), true),
49 UsageViewUtil.getType(getElement()));
51 return CommonRefactoringUtil.capitalize(descr);