update copyright
[fedora-idea.git] / java / java-impl / src / com / intellij / codeInsight / daemon / impl / quickfix / ChangeExtendsToImplementsFix.java
bloba80b0a533d221f47c0e9affd2f05dcc48aae3160
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.
17 /**
18 * @author cdr
20 package com.intellij.codeInsight.daemon.impl.quickfix;
22 import com.intellij.codeInsight.daemon.QuickFixBundle;
23 import com.intellij.psi.PsiClass;
24 import com.intellij.psi.PsiClassType;
25 import com.intellij.psi.PsiKeyword;
26 import org.jetbrains.annotations.NotNull;
28 /**
29 * changes 'class a extends b' to 'class a implements b' or vice versa
31 public class ChangeExtendsToImplementsFix extends ExtendsListFix {
32 public ChangeExtendsToImplementsFix(PsiClass aClass, PsiClassType classToExtendFrom) {
33 super(aClass, classToExtendFrom, true);
36 @NotNull
37 public String getText() {
38 return QuickFixBundle.message("exchange.extends.implements.keyword",
39 myClass.isInterface() == myClassToExtendFrom.isInterface() ? PsiKeyword.IMPLEMENTS : PsiKeyword.EXTENDS,
40 myClass.isInterface() == myClassToExtendFrom.isInterface() ? PsiKeyword.EXTENDS : PsiKeyword.IMPLEMENTS,
41 myClassToExtendFrom.getQualifiedName());