family name fixed

This commit is contained in:
Danila Ponomarenko
2012-06-15 15:19:05 +04:00
parent 8ab72023cb
commit c95dcb1535
6 changed files with 29 additions and 18 deletions
@@ -28,15 +28,9 @@ import javax.swing.*;
/**
* @author Danila Ponomarenko
*/
public abstract class BaseRunRefactoringAction<T extends RefactoringActionHandler> implements IntentionAction, Iconable, LowPriorityAction {
public abstract class BaseRunRefactoringAction implements IntentionAction, Iconable, LowPriorityAction {
public static final Icon REFACTORING_BULB = AllIcons.Actions.RefactoringBulb;
@NotNull
@Override
public final String getFamilyName() {
return CodeInsightBundle.message("intention.refactoring.family");
}
@Override
public final boolean startInWriteAction() {
return false;
@@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable;
/**
* @author Danila Ponomarenko
*/
public class EncapsulateFieldAction extends BaseRunRefactoringAction<EncapsulateFieldsHandler> {
public class EncapsulateFieldAction extends BaseRunRefactoringAction {
@NotNull
@Override
@@ -36,6 +36,12 @@ public class EncapsulateFieldAction extends BaseRunRefactoringAction<Encapsulate
return CodeInsightBundle.message("intention.encapsulate.field.text");
}
@NotNull
@Override
public final String getFamilyName() {
return getText();
}
@Override
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
final PsiField field = getField(getElement(editor, file));
@@ -29,7 +29,7 @@ import org.jetbrains.annotations.Nullable;
/**
* @author Danila Ponomarenko
*/
public class IntroduceVariableAction extends BaseRunRefactoringAction<IntroduceVariableHandler> {
public class IntroduceVariableIntentionAction extends BaseRunRefactoringAction {
@NotNull
@Override
@@ -37,6 +37,12 @@ public class IntroduceVariableAction extends BaseRunRefactoringAction<IntroduceV
return CodeInsightBundle.message("intention.introduce.variable.text");
}
@NotNull
@Override
public String getFamilyName() {
return getText();
}
@Override
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
final PsiElement element = getElement(editor, file);
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.NotNull;
* User: anna
* Date: 9/5/11
*/
public class RunRefactoringAction extends BaseRunRefactoringAction<RefactoringActionHandler> {
public class RunRefactoringAction extends BaseRunRefactoringAction {
private final RefactoringActionHandler myHandler;
private final String myCommandName;
@@ -41,6 +41,12 @@ public class RunRefactoringAction extends BaseRunRefactoringAction<RefactoringAc
return myCommandName;
}
@NotNull
@Override
public final String getFamilyName() {
return getText();
}
@Override
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
return true;