public class OverrideImplementUtil extends OverrideImplementExploreUtil
OverrideImplementExploreUtil.MemberImplementorExplorersProvider, OverrideImplementExploreUtil.MethodSignatureComparator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IMPLEMENT_COMMAND_MARKER |
Modifier and Type | Method and Description |
---|---|
static void |
annotate(PsiMethod result,
java.lang.String fqn,
java.lang.String... annosToRemove) |
static void |
annotateOnOverrideImplement(PsiMethod method,
PsiClass targetClass,
PsiMethod overridden) |
static boolean |
canInsertOverride(PsiMethod superMethod,
PsiClass targetClass) |
static void |
chooseAndImplementMethods(Project project,
Editor editor,
PsiClass aClass) |
static void |
chooseAndOverrideMethods(Project project,
Editor editor,
PsiClass aClass) |
static void |
chooseAndOverrideOrImplementMethods(Project project,
Editor editor,
PsiClass aClass,
boolean toImplement) |
static java.util.List<PsiGenerationInfo<PsiMethod>> |
convert2GenerationInfos(java.util.Collection<? extends PsiMethod> methods) |
static Consumer<PsiMethod> |
createDefaultDecorator(PsiClass aClass,
PsiMethod method,
boolean toCopyJavaDoc,
boolean insertOverrideIfPossible) |
static PsiGenerationInfo<PsiMethod> |
createGenerationInfo(PsiMethod s) |
static void |
deleteDocComment(PsiMethod result) |
static PsiClass |
getContextClass(Project project,
Editor editor,
PsiFile file,
boolean allowInterface) |
static PsiElement |
getDefaultAnchorToOverrideOrImplement(PsiClass aClass,
PsiMethod baseMethod,
PsiSubstitutor substitutor) |
protected static java.util.List<MethodImplementor> |
getImplementors() |
static boolean |
isInsertOverride(PsiMethod superMethod,
PsiClass targetClass) |
static java.util.List<PsiGenerationInfo<PsiMethod>> |
overrideOrImplement(PsiClass psiClass,
PsiMethod baseMethod) |
static java.util.List<PsiMethod> |
overrideOrImplementMethod(PsiClass aClass,
PsiMethod method,
boolean toCopyJavaDoc)
generate methods (with bodies) corresponding to given method declaration
there are maybe two method implementations for one declaration
(e.g.
|
static java.util.List<PsiMethod> |
overrideOrImplementMethod(PsiClass aClass,
PsiMethod method,
PsiSubstitutor substitutor,
boolean toCopyJavaDoc,
boolean insertOverrideIfPossible) |
static java.util.List<PsiMethod> |
overrideOrImplementMethodCandidates(PsiClass aClass,
java.util.Collection<? extends CandidateInfo> candidatesToImplement,
boolean copyJavadoc) |
static java.util.List<PsiMethod> |
overrideOrImplementMethodCandidates(PsiClass aClass,
java.util.Collection<? extends CandidateInfo> candidates,
boolean toCopyJavaDoc,
boolean insertOverrideWherePossible) |
static java.util.List<PsiGenerationInfo<PsiMethod>> |
overrideOrImplementMethods(PsiClass aClass,
java.util.Collection<? extends PsiMethodMember> candidates,
boolean toCopyJavaDoc,
boolean toInsertAtOverride) |
static void |
overrideOrImplementMethodsInRightPlace(Editor editor,
PsiClass aClass,
java.util.Collection<? extends PsiMethodMember> members,
boolean copyJavadoc) |
static void |
overrideOrImplementMethodsInRightPlace(Editor editor,
PsiClass aClass,
java.util.Collection<? extends PsiMethodMember> candidates,
boolean copyJavadoc,
boolean insertOverrideWherePossible) |
static void |
setupMethodBody(PsiMethod result,
PsiMethod originalMethod,
PsiClass targetClass) |
static void |
setupMethodBody(PsiMethod result,
PsiMethod originalMethod,
PsiClass targetClass,
FileTemplate template) |
static MemberChooser<PsiMethodMember> |
showOverrideImplementChooser(Editor editor,
PsiElement aClass,
boolean toImplement,
java.util.Collection<CandidateInfo> candidates,
java.util.Collection<CandidateInfo> secondary) |
correctSubstitutor, getMapToOverrideImplement, getMapToOverrideImplement, getMethodSignaturesToImplement, getMethodSignaturesToOverride, getMethodsToOverrideImplement
public static final java.lang.String IMPLEMENT_COMMAND_MARKER
protected static java.util.List<MethodImplementor> getImplementors()
public static java.util.List<PsiMethod> overrideOrImplementMethod(PsiClass aClass, PsiMethod method, boolean toCopyJavaDoc) throws IncorrectOperationException
aClass
- context for method implementationsmethod
- method to override or implementtoCopyJavaDoc
- true if copy JavaDoc from method declarationIncorrectOperationException
public static boolean isInsertOverride(PsiMethod superMethod, PsiClass targetClass)
public static boolean canInsertOverride(PsiMethod superMethod, PsiClass targetClass)
public static java.util.List<PsiMethod> overrideOrImplementMethod(PsiClass aClass, PsiMethod method, PsiSubstitutor substitutor, boolean toCopyJavaDoc, boolean insertOverrideIfPossible) throws IncorrectOperationException
IncorrectOperationException
public static Consumer<PsiMethod> createDefaultDecorator(PsiClass aClass, PsiMethod method, boolean toCopyJavaDoc, boolean insertOverrideIfPossible)
public static void deleteDocComment(PsiMethod result)
public static void annotateOnOverrideImplement(PsiMethod method, PsiClass targetClass, PsiMethod overridden)
public static void annotate(PsiMethod result, java.lang.String fqn, java.lang.String... annosToRemove) throws IncorrectOperationException
IncorrectOperationException
public static java.util.List<PsiGenerationInfo<PsiMethod>> overrideOrImplementMethods(PsiClass aClass, java.util.Collection<? extends PsiMethodMember> candidates, boolean toCopyJavaDoc, boolean toInsertAtOverride) throws IncorrectOperationException
IncorrectOperationException
public static java.util.List<PsiMethod> overrideOrImplementMethodCandidates(PsiClass aClass, java.util.Collection<? extends CandidateInfo> candidates, boolean toCopyJavaDoc, boolean insertOverrideWherePossible) throws IncorrectOperationException
IncorrectOperationException
public static java.util.List<PsiGenerationInfo<PsiMethod>> convert2GenerationInfos(java.util.Collection<? extends PsiMethod> methods)
public static PsiGenerationInfo<PsiMethod> createGenerationInfo(PsiMethod s)
public static void setupMethodBody(PsiMethod result, PsiMethod originalMethod, PsiClass targetClass) throws IncorrectOperationException
IncorrectOperationException
public static void setupMethodBody(PsiMethod result, PsiMethod originalMethod, PsiClass targetClass, FileTemplate template) throws IncorrectOperationException
IncorrectOperationException
public static void chooseAndOverrideMethods(Project project, Editor editor, PsiClass aClass)
public static void chooseAndImplementMethods(Project project, Editor editor, PsiClass aClass)
public static void chooseAndOverrideOrImplementMethods(Project project, Editor editor, PsiClass aClass, boolean toImplement)
public static MemberChooser<PsiMethodMember> showOverrideImplementChooser(Editor editor, PsiElement aClass, boolean toImplement, java.util.Collection<CandidateInfo> candidates, java.util.Collection<CandidateInfo> secondary)
candidates,
- secondary should allow modificationspublic static void overrideOrImplementMethodsInRightPlace(Editor editor, PsiClass aClass, java.util.Collection<? extends PsiMethodMember> candidates, boolean copyJavadoc, boolean insertOverrideWherePossible)
public static PsiElement getDefaultAnchorToOverrideOrImplement(PsiClass aClass, PsiMethod baseMethod, PsiSubstitutor substitutor)
public static java.util.List<PsiGenerationInfo<PsiMethod>> overrideOrImplement(PsiClass psiClass, PsiMethod baseMethod) throws IncorrectOperationException
IncorrectOperationException
public static PsiClass getContextClass(Project project, Editor editor, PsiFile file, boolean allowInterface)
public static void overrideOrImplementMethodsInRightPlace(Editor editor, PsiClass aClass, java.util.Collection<? extends PsiMethodMember> members, boolean copyJavadoc)
public static java.util.List<PsiMethod> overrideOrImplementMethodCandidates(PsiClass aClass, java.util.Collection<? extends CandidateInfo> candidatesToImplement, boolean copyJavadoc) throws IncorrectOperationException
IncorrectOperationException