public abstract class GenerateMembersHandlerBase extends java.lang.Object implements CodeInsightActionHandler, ContextAwareActionHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
myToCopyJavaDoc |
Constructor and Description |
---|
GenerateMembersHandlerBase(java.lang.String chooserTitle) |
Modifier and Type | Method and Description |
---|---|
protected ClassMember [] |
chooseMembers(ClassMember[] members,
boolean allowEmptySelection,
boolean copyJavadocCheckbox,
Project project,
Editor editor) |
protected ClassMember [] |
chooseOriginalMembers(PsiClass aClass,
Project project) |
protected ClassMember [] |
chooseOriginalMembers(PsiClass aClass,
Project project,
Editor editor) |
protected void |
cleanup() |
protected MemberChooser<ClassMember> |
createMembersChooser(ClassMember[] members,
boolean allowEmptySelection,
boolean copyJavadocCheckbox,
Project project) |
protected abstract GenerationInfo[] |
generateMemberPrototypes(PsiClass aClass,
ClassMember originalMember) |
protected java.util.List<? extends GenerationInfo> |
generateMemberPrototypes(PsiClass aClass,
ClassMember[] members) |
protected abstract ClassMember[] |
getAllOriginalMembers(PsiClass aClass) |
protected javax.swing.JComponent |
getHeaderPanel(Project project) |
protected java.lang.String |
getHelpId() |
protected java.lang.String |
getNothingFoundMessage() |
protected javax.swing.JComponent [] |
getOptionControls() |
protected boolean |
hasMembers(PsiClass aClass) |
void |
invoke(Project project,
Editor editor,
PsiFile file) |
boolean |
isAvailableForQuickList(Editor editor,
PsiFile file,
DataContext dataContext)
Handlers could provide useful hints when they are actually not available, e.g.
|
protected void |
notifyOnSuccess(Editor editor,
ClassMember[] members,
java.util.List<? extends GenerationInfo> generatedMembers) |
boolean |
startInWriteAction()
Indicate whether this action should be invoked inside write action.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementToMakeWritable
public GenerateMembersHandlerBase(java.lang.String chooserTitle)
public boolean isAvailableForQuickList(Editor editor, PsiFile file, DataContext dataContext)
ContextAwareActionHandler
isAvailableForQuickList
in interface ContextAwareActionHandler
protected boolean hasMembers(PsiClass aClass)
public final void invoke(Project project, Editor editor, PsiFile file)
invoke
in interface CodeInsightActionHandler
protected void cleanup()
protected void notifyOnSuccess(Editor editor, ClassMember[] members, java.util.List<? extends GenerationInfo> generatedMembers)
protected java.lang.String getNothingFoundMessage()
protected ClassMember [] chooseOriginalMembers(PsiClass aClass, Project project)
protected ClassMember [] chooseOriginalMembers(PsiClass aClass, Project project, Editor editor)
protected ClassMember [] chooseMembers(ClassMember[] members, boolean allowEmptySelection, boolean copyJavadocCheckbox, Project project, Editor editor)
protected MemberChooser<ClassMember> createMembersChooser(ClassMember[] members, boolean allowEmptySelection, boolean copyJavadocCheckbox, Project project)
protected javax.swing.JComponent getHeaderPanel(Project project)
protected javax.swing.JComponent [] getOptionControls()
protected java.lang.String getHelpId()
protected java.util.List<? extends GenerationInfo> generateMemberPrototypes(PsiClass aClass, ClassMember[] members) throws IncorrectOperationException
IncorrectOperationException
protected abstract ClassMember[] getAllOriginalMembers(PsiClass aClass)
protected abstract GenerationInfo[] generateMemberPrototypes(PsiClass aClass, ClassMember originalMember) throws IncorrectOperationException
IncorrectOperationException
public boolean startInWriteAction()
WriteActionAware
false
if e.g. modal dialog is shown inside the action.
If false
is returned the action itself is responsible for starting write action
when needed, by calling Application.runWriteAction(Runnable)
.startInWriteAction
in interface WriteActionAware
true
if the action requires a write action (default), false
otherwise.