File tree 4 files changed +32
-4
lines changed
src/com/magento/idea/magento2plugin/actions/generation
4 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 5
5
6
6
package com .magento .idea .magento2plugin .actions .generation ;
7
7
8
+ import com .intellij .openapi .actionSystem .ActionUpdateThread ;
9
+ import com .intellij .openapi .actionSystem .ActionUpdateThreadAware ;
8
10
import com .intellij .openapi .actionSystem .AnActionEvent ;
9
11
import com .intellij .openapi .actionSystem .PlatformDataKeys ;
10
12
import com .intellij .openapi .editor .Caret ;
24
26
import com .magento .idea .magento2plugin .util .magento .plugin .IsPluginAllowedForMethodUtil ;
25
27
import org .jetbrains .annotations .NotNull ;
26
28
27
- public class CreateAPluginAction extends DumbAwareAction {
29
+ public class CreateAPluginAction extends DumbAwareAction implements ActionUpdateThreadAware {
28
30
29
31
public static final String ACTION_NAME = "Create a new Plugin" ;
30
32
public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Plugin" ;
@@ -90,6 +92,11 @@ public boolean isDumbAware() {
90
92
return false ;
91
93
}
92
94
95
+ @ Override
96
+ public @ NotNull ActionUpdateThread getActionUpdateThread () {
97
+ return ActionUpdateThread .BGT ;
98
+ }
99
+
93
100
private Pair <PsiFile , PhpClass > findPhpClass (final @ NotNull AnActionEvent event ) {
94
101
final PsiFile psiFile = event .getData (PlatformDataKeys .PSI_FILE );
95
102
Original file line number Diff line number Diff line change 6
6
package com .magento .idea .magento2plugin .actions .generation ;
7
7
8
8
import com .intellij .lang .ASTNode ;
9
+ import com .intellij .openapi .actionSystem .ActionUpdateThread ;
10
+ import com .intellij .openapi .actionSystem .ActionUpdateThreadAware ;
9
11
import com .intellij .openapi .actionSystem .AnActionEvent ;
10
12
import com .intellij .openapi .actionSystem .PlatformDataKeys ;
11
13
import com .intellij .openapi .editor .Caret ;
28
30
import com .magento .idea .magento2plugin .project .Settings ;
29
31
import org .jetbrains .annotations .NotNull ;
30
32
31
- public class CreateAnObserverAction extends DumbAwareAction {
33
+ public class CreateAnObserverAction extends DumbAwareAction implements ActionUpdateThreadAware {
32
34
33
35
public static final String ACTION_NAME = "Create a new Observer for this event" ;
34
36
public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Observer" ;
@@ -87,6 +89,11 @@ public boolean isDumbAware() {
87
89
return false ;
88
90
}
89
91
92
+ @ Override
93
+ public @ NotNull ActionUpdateThread getActionUpdateThread () {
94
+ return ActionUpdateThread .BGT ;
95
+ }
96
+
90
97
private PsiElement getElement (final @ NotNull AnActionEvent event ) {
91
98
final Caret caret = event .getData (PlatformDataKeys .CARET );
92
99
Original file line number Diff line number Diff line change 5
5
6
6
package com .magento .idea .magento2plugin .actions .generation ;
7
7
8
+ import com .intellij .openapi .actionSystem .ActionUpdateThread ;
9
+ import com .intellij .openapi .actionSystem .ActionUpdateThreadAware ;
8
10
import com .intellij .openapi .actionSystem .AnActionEvent ;
9
11
import com .intellij .openapi .actionSystem .PlatformDataKeys ;
10
12
import com .intellij .openapi .editor .Caret ;
21
23
import com .magento .idea .magento2plugin .project .Settings ;
22
24
import org .jetbrains .annotations .NotNull ;
23
25
24
- public class InjectAViewModelAction extends DumbAwareAction {
26
+ public class InjectAViewModelAction extends DumbAwareAction implements ActionUpdateThreadAware {
25
27
26
28
public static final String ACTION_NAME = "Inject a new View Model for this block" ;
27
29
public static final String ACTION_DESCRIPTION = "Inject a new Magento 2 View Model" ;
@@ -68,6 +70,11 @@ public boolean isDumbAware() {
68
70
return false ;
69
71
}
70
72
73
+ @ Override
74
+ public @ NotNull ActionUpdateThread getActionUpdateThread () {
75
+ return ActionUpdateThread .BGT ;
76
+ }
77
+
71
78
/**
72
79
* Get focused (target) element for the event.
73
80
*
Original file line number Diff line number Diff line change 5
5
6
6
package com .magento .idea .magento2plugin .actions .generation ;
7
7
8
+ import com .intellij .openapi .actionSystem .ActionUpdateThread ;
9
+ import com .intellij .openapi .actionSystem .ActionUpdateThreadAware ;
8
10
import com .intellij .openapi .actionSystem .AnActionEvent ;
9
11
import com .intellij .openapi .actionSystem .PlatformDataKeys ;
10
12
import com .intellij .openapi .project .DumbAwareAction ;
19
21
import com .magento .idea .magento2plugin .util .GetFirstClassOfFile ;
20
22
import org .jetbrains .annotations .NotNull ;
21
23
22
- public class OverrideClassByAPreferenceAction extends DumbAwareAction {
24
+ public class OverrideClassByAPreferenceAction extends DumbAwareAction implements ActionUpdateThreadAware {
23
25
public static final String ACTION_NAME = "Override this class by a new Preference" ;
24
26
public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Preference" ;
25
27
public static final String INTERFACE_ACTION = "Override this interface by a new Preference" ;
@@ -75,6 +77,11 @@ public boolean isDumbAware() {
75
77
return false ;
76
78
}
77
79
80
+ @ Override
81
+ public @ NotNull ActionUpdateThread getActionUpdateThread () {
82
+ return ActionUpdateThread .BGT ;
83
+ }
84
+
78
85
private Pair <PsiFile , PhpClass > findPhpClass (@ NotNull final AnActionEvent event ) {
79
86
final PsiFile psiFile = event .getData (PlatformDataKeys .PSI_FILE );
80
87
You can’t perform that action at this time.
0 commit comments