public class CreateFieldFromUsageFix extends CreateVarFromUsageFix
myReferenceExpressionEMPTY_ARRAY| Constructor and Description | 
|---|
| CreateFieldFromUsageFix(PsiReferenceExpression referenceElement) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | canBeTargetClass(PsiClass psiClass) | 
| protected boolean | createConstantField() | 
| static void | createFieldFromUsageTemplate(PsiClass targetClass,
                            Project project,
                            java.lang.Object expectedTypes,
                            PsiField field,
                            boolean createConstantField,
                            PsiElement context) | 
| java.lang.String | getFamilyName()Returns the name of the family of intentions. | 
| protected java.util.List<PsiClass> | getTargetClasses(PsiElement element) | 
| protected java.lang.String | getText(java.lang.String varName) | 
| void | invoke(Project project,
      Editor editor,
      PsiFile file)Called when user invokes intention. | 
| static boolean | shouldCreateFinalMember(PsiReferenceExpression ref,
                       PsiClass targetClass) | 
getElement, isAvailableImpl, isValidElementchooseTargetClass, 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 CreateFieldFromUsageFix(PsiReferenceExpression referenceElement)
protected java.lang.String getText(java.lang.String varName)
getText in class CreateVarFromUsageFixprotected boolean createConstantField()
protected java.util.List<PsiClass> getTargetClasses(PsiElement element)
getTargetClasses in class CreateFromUsageBaseFixprotected boolean canBeTargetClass(PsiClass psiClass)
canBeTargetClass in class CreateVarFromUsageFixpublic 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.IncorrectOperationExceptionpublic static void createFieldFromUsageTemplate(PsiClass targetClass, Project project, java.lang.Object expectedTypes, PsiField field, boolean createConstantField, PsiElement context)
public static boolean shouldCreateFinalMember(PsiReferenceExpression ref, PsiClass targetClass)
public java.lang.String getFamilyName()
IntentionActionIntentionManager.registerIntentionAndMetaData(IntentionAction, String...)