Useless generic parameter removed
This commit is contained in:
+3
-3
@@ -30,11 +30,11 @@ import org.jetbrains.jet.lang.psi.JetFile;
|
|||||||
import org.jetbrains.jet.lang.psi.JetPsiUtil;
|
import org.jetbrains.jet.lang.psi.JetPsiUtil;
|
||||||
import org.jetbrains.jet.plugin.JetBundle;
|
import org.jetbrains.jet.plugin.JetBundle;
|
||||||
|
|
||||||
public abstract class AbstractCodeTransformationIntention<T extends Transformer> extends BaseIntentionAction {
|
public abstract class AbstractCodeTransformationIntention extends BaseIntentionAction {
|
||||||
private final T transformer;
|
private final Transformer transformer;
|
||||||
private final Predicate<PsiElement> isApplicable;
|
private final Predicate<PsiElement> isApplicable;
|
||||||
|
|
||||||
protected AbstractCodeTransformationIntention(@NotNull T transformer, @NotNull Predicate<PsiElement> isApplicable) {
|
protected AbstractCodeTransformationIntention(@NotNull Transformer transformer, @NotNull Predicate<PsiElement> isApplicable) {
|
||||||
this.transformer = transformer;
|
this.transformer = transformer;
|
||||||
this.isApplicable = isApplicable;
|
this.isApplicable = isApplicable;
|
||||||
setText(JetBundle.message(transformer.getKey()));
|
setText(JetBundle.message(transformer.getKey()));
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
|||||||
import org.jetbrains.jet.plugin.intentions.branchedTransformations.WhenUtils;
|
import org.jetbrains.jet.plugin.intentions.branchedTransformations.WhenUtils;
|
||||||
import org.jetbrains.jet.plugin.intentions.Transformer;
|
import org.jetbrains.jet.plugin.intentions.Transformer;
|
||||||
|
|
||||||
public class EliminateWhenSubjectIntention extends AbstractCodeTransformationIntention<Transformer> {
|
public class EliminateWhenSubjectIntention extends AbstractCodeTransformationIntention {
|
||||||
private static final Transformer TRANSFORMER = new Transformer() {
|
private static final Transformer TRANSFORMER = new Transformer() {
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
|||||||
import org.jetbrains.jet.plugin.intentions.branchedTransformations.WhenUtils;
|
import org.jetbrains.jet.plugin.intentions.branchedTransformations.WhenUtils;
|
||||||
import org.jetbrains.jet.plugin.intentions.Transformer;
|
import org.jetbrains.jet.plugin.intentions.Transformer;
|
||||||
|
|
||||||
public class FlattenWhenIntention extends AbstractCodeTransformationIntention<Transformer> {
|
public class FlattenWhenIntention extends AbstractCodeTransformationIntention {
|
||||||
private static final Transformer TRANSFORMER = new Transformer() {
|
private static final Transformer TRANSFORMER = new Transformer() {
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
|||||||
import org.jetbrains.jet.plugin.intentions.branchedTransformations.BranchedFoldingUtils;
|
import org.jetbrains.jet.plugin.intentions.branchedTransformations.BranchedFoldingUtils;
|
||||||
import org.jetbrains.jet.plugin.intentions.branchedTransformations.FoldableKind;
|
import org.jetbrains.jet.plugin.intentions.branchedTransformations.FoldableKind;
|
||||||
|
|
||||||
public abstract class FoldBranchedExpressionIntention extends AbstractCodeTransformationIntention<FoldableKind> {
|
public abstract class FoldBranchedExpressionIntention extends AbstractCodeTransformationIntention {
|
||||||
protected FoldBranchedExpressionIntention(@NotNull final FoldableKind foldableKind) {
|
protected FoldBranchedExpressionIntention(@NotNull final FoldableKind foldableKind) {
|
||||||
super(
|
super(
|
||||||
foldableKind,
|
foldableKind,
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
|||||||
import org.jetbrains.jet.plugin.intentions.branchedTransformations.IfWhenUtils;
|
import org.jetbrains.jet.plugin.intentions.branchedTransformations.IfWhenUtils;
|
||||||
import org.jetbrains.jet.plugin.intentions.Transformer;
|
import org.jetbrains.jet.plugin.intentions.Transformer;
|
||||||
|
|
||||||
public class IfToWhenIntention extends AbstractCodeTransformationIntention<Transformer> {
|
public class IfToWhenIntention extends AbstractCodeTransformationIntention {
|
||||||
private static final Transformer TRANSFORMER = new Transformer() {
|
private static final Transformer TRANSFORMER = new Transformer() {
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
|||||||
import org.jetbrains.jet.plugin.intentions.branchedTransformations.WhenUtils;
|
import org.jetbrains.jet.plugin.intentions.branchedTransformations.WhenUtils;
|
||||||
import org.jetbrains.jet.plugin.intentions.Transformer;
|
import org.jetbrains.jet.plugin.intentions.Transformer;
|
||||||
|
|
||||||
public class IntroduceWhenSubjectIntention extends AbstractCodeTransformationIntention<Transformer> {
|
public class IntroduceWhenSubjectIntention extends AbstractCodeTransformationIntention {
|
||||||
private static final Transformer TRANSFORMER = new Transformer() {
|
private static final Transformer TRANSFORMER = new Transformer() {
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ import org.jetbrains.jet.lang.psi.JetExpression;
|
|||||||
import org.jetbrains.jet.plugin.intentions.branchedTransformations.*;
|
import org.jetbrains.jet.plugin.intentions.branchedTransformations.*;
|
||||||
import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
||||||
|
|
||||||
public abstract class UnfoldBranchedExpressionIntention extends AbstractCodeTransformationIntention<UnfoldableKind> {
|
public abstract class UnfoldBranchedExpressionIntention extends AbstractCodeTransformationIntention {
|
||||||
protected UnfoldBranchedExpressionIntention(@NotNull final UnfoldableKind unfoldableKind) {
|
protected UnfoldBranchedExpressionIntention(@NotNull final UnfoldableKind unfoldableKind) {
|
||||||
super(
|
super(
|
||||||
unfoldableKind,
|
unfoldableKind,
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
|||||||
import org.jetbrains.jet.plugin.intentions.branchedTransformations.IfWhenUtils;
|
import org.jetbrains.jet.plugin.intentions.branchedTransformations.IfWhenUtils;
|
||||||
import org.jetbrains.jet.plugin.intentions.Transformer;
|
import org.jetbrains.jet.plugin.intentions.Transformer;
|
||||||
|
|
||||||
public class WhenToIfIntention extends AbstractCodeTransformationIntention<Transformer> {
|
public class WhenToIfIntention extends AbstractCodeTransformationIntention {
|
||||||
private static final Transformer TRANSFORMER = new Transformer() {
|
private static final Transformer TRANSFORMER = new Transformer() {
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ import org.jetbrains.jet.lang.psi.JetProperty;
|
|||||||
import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
import org.jetbrains.jet.plugin.intentions.AbstractCodeTransformationIntention;
|
||||||
import org.jetbrains.jet.plugin.intentions.Transformer;
|
import org.jetbrains.jet.plugin.intentions.Transformer;
|
||||||
|
|
||||||
public class SplitPropertyDeclarationIntention extends AbstractCodeTransformationIntention<Transformer> {
|
public class SplitPropertyDeclarationIntention extends AbstractCodeTransformationIntention {
|
||||||
private static final Transformer TRANSFORMER = new Transformer() {
|
private static final Transformer TRANSFORMER = new Transformer() {
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user