28
28
import com .jetbrains .php .lang .psi .elements .*;
29
29
import java .util .*;
30
30
import com .magento .idea .magento2plugin .actions .generation .ImportReferences .PhpClassReferenceResolver ;
31
- import com .magento .idea .magento2plugin .actions .generation .data .MagentoPluginMethodData ;
32
- import com .magento .idea .magento2plugin .actions .generation .generator .MagentoPluginMethodsGenerator ;
31
+ import com .magento .idea .magento2plugin .actions .generation .data .code . PluginMethodData ;
32
+ import com .magento .idea .magento2plugin .actions .generation .generator .code . PluginMethodsGenerator ;
33
33
import com .magento .idea .magento2plugin .actions .generation .util .CodeStyleSettings ;
34
34
import com .magento .idea .magento2plugin .actions .generation .util .CollectInsertedMethods ;
35
35
import com .magento .idea .magento2plugin .actions .generation .util .FillTextBufferWithPluginMethods ;
41
41
import org .jetbrains .annotations .NotNull ;
42
42
import org .jetbrains .annotations .Nullable ;
43
43
44
- public abstract class PluginGeneratePluginMethodHandlerBase implements LanguageCodeInsightActionHandler {
44
+ public abstract class PluginGenerateMethodHandlerBase implements LanguageCodeInsightActionHandler {
45
45
private CollectInsertedMethods collectInsertedMethods ;
46
46
public String type ;
47
47
public FillTextBufferWithPluginMethods fillTextBuffer ;
48
48
49
- public PluginGeneratePluginMethodHandlerBase (Plugin .PluginType type ) {
49
+ public PluginGenerateMethodHandlerBase (Plugin .PluginType type ) {
50
50
this .type = type .toString ();
51
51
this .fillTextBuffer = FillTextBufferWithPluginMethods .getInstance ();
52
52
this .collectInsertedMethods = CollectInsertedMethods .getInstance ();
@@ -69,7 +69,7 @@ public boolean isValidFor(Editor editor, PsiFile file) {
69
69
public void invoke (@ NotNull Project project , @ NotNull Editor editor , @ NotNull PsiFile pluginFile ) {
70
70
PhpFile pluginPhpFile = (PhpFile )pluginFile ;
71
71
PhpClass pluginClass = PhpCodeEditUtil .findClassAtCaret (editor , pluginPhpFile );
72
- Key <Object > targetClassKey = Key .create (MagentoPluginMethodsGenerator .originalTargetKey );
72
+ Key <Object > targetClassKey = Key .create (PluginMethodsGenerator .originalTargetKey );
73
73
if (pluginClass == null ) {
74
74
return ;
75
75
}
@@ -97,7 +97,7 @@ public void invoke(@NotNull Project project, @NotNull Editor editor, @NotNull Ps
97
97
98
98
for (PhpNamedElementNode member : members ) {
99
99
PsiElement method = member .getPsiElement ();
100
- MagentoPluginMethodData [] pluginMethods = this .createPluginMethods (pluginClass , (Method ) method , targetClassKey );
100
+ PluginMethodData [] pluginMethods = this .createPluginMethods (pluginClass , (Method ) method , targetClassKey );
101
101
fillTextBuffer .execute (targetClassKey , insertedMethodsNames , resolver , textBuf , pluginMethods );
102
102
}
103
103
@@ -121,7 +121,7 @@ private void insertPluginMethodsToFile(@NotNull Project project, @NotNull Editor
121
121
}
122
122
}
123
123
124
- protected abstract MagentoPluginMethodData [] createPluginMethods (PhpClass currentClass , Method method , Key <Object > targetClassKey );
124
+ protected abstract PluginMethodData [] createPluginMethods (PhpClass currentClass , Method method , Key <Object > targetClassKey );
125
125
126
126
protected String getErrorMessage () {
127
127
return "No methods to generate" ;
@@ -135,7 +135,7 @@ public boolean startInWriteAction() {
135
135
protected PhpNamedElementNode [] chooseMembers (PhpNamedElementNode [] members , boolean allowEmptySelection , Project project ) {
136
136
PhpNamedElementNode [] nodes = fixOrderToBeAsOriginalFiles (members ).toArray (new PhpNamedElementNode [members .length ]);
137
137
if (!ApplicationManager .getApplication ().isHeadlessEnvironment ()) {
138
- PluginGeneratePluginMethodHandlerBase .MyMemberChooser chooser = new PluginGeneratePluginMethodHandlerBase .MyMemberChooser (nodes , allowEmptySelection , project );
138
+ PluginGenerateMethodHandlerBase .MyMemberChooser chooser = new PluginGenerateMethodHandlerBase .MyMemberChooser (nodes , allowEmptySelection , project );
139
139
chooser .setTitle ("Choose Methods" );
140
140
chooser .setCopyJavadocVisible (false );
141
141
chooser .show ();
0 commit comments