public class CreateMethodFromMethodReferenceFix extends CreateFromUsageBaseFix
EMPTY_ARRAY| Constructor and Description |
|---|
CreateMethodFromMethodReferenceFix(PsiMethodReferenceExpression methodRef) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canBeTargetClass(PsiClass psiClass) |
protected PsiElement |
getElement() |
java.lang.String |
getFamilyName()
Returns the name of the family of intentions.
|
protected PsiMethodReferenceExpression |
getMethodReference() |
protected java.util.List<PsiClass> |
getTargetClasses(PsiElement element) |
void |
invoke(Project project,
Editor editor,
PsiFile file)
Called when user invokes intention.
|
protected boolean |
isAvailableImpl(int offset) |
protected boolean |
isValidElement(PsiElement element) |
chooseTargetClass, filterTargetClasses, getTargetSubstitutor, getVisibility, isAllowOuterTargetClass, isAvailable, positionCursor, setupGenericParameters, setupVisibility, shouldCreateStaticMember, startInWriteAction, startTemplate, startTemplate, startTemplatecanModify, getText, setText, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetElementToMakeWritablepublic CreateMethodFromMethodReferenceFix(PsiMethodReferenceExpression methodRef)
protected boolean isAvailableImpl(int offset)
isAvailableImpl in class CreateFromUsageBaseFixprotected PsiElement getElement()
getElement in class CreateFromUsageBaseFixprotected java.util.List<PsiClass> getTargetClasses(PsiElement element)
getTargetClasses in class CreateFromUsageBaseFixprotected boolean canBeTargetClass(PsiClass psiClass)
canBeTargetClass in class CreateFromUsageBaseFixpublic void invoke(Project project, Editor editor, PsiFile file) throws IncorrectOperationException
IntentionActionIntentionAction.startInWriteAction() returns true, this method is also called
inside write action.project - the project in which the intention is invoked.editor - the editor in which the intention is invoked.file - the file open in the editor.IncorrectOperationExceptionprotected boolean isValidElement(PsiElement element)
isValidElement in class CreateFromUsageBaseFixpublic java.lang.String getFamilyName()
IntentionActionIntentionManager.registerIntentionAndMetaData(IntentionAction, String...)protected PsiMethodReferenceExpression getMethodReference()