File tree Expand file tree Collapse file tree 4 files changed +32
-4
lines changed
src/com/magento/idea/magento2plugin/actions/generation Expand file tree Collapse file tree 4 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 55
66package com .magento .idea .magento2plugin .actions .generation ;
77
8+ import com .intellij .openapi .actionSystem .ActionUpdateThread ;
9+ import com .intellij .openapi .actionSystem .ActionUpdateThreadAware ;
810import com .intellij .openapi .actionSystem .AnActionEvent ;
911import com .intellij .openapi .actionSystem .PlatformDataKeys ;
1012import com .intellij .openapi .editor .Caret ;
2426import com .magento .idea .magento2plugin .util .magento .plugin .IsPluginAllowedForMethodUtil ;
2527import org .jetbrains .annotations .NotNull ;
2628
27- public class CreateAPluginAction extends DumbAwareAction {
29+ public class CreateAPluginAction extends DumbAwareAction implements ActionUpdateThreadAware {
2830
2931 public static final String ACTION_NAME = "Create a new Plugin" ;
3032 public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Plugin" ;
@@ -90,6 +92,11 @@ public boolean isDumbAware() {
9092 return false ;
9193 }
9294
95+ @ Override
96+ public @ NotNull ActionUpdateThread getActionUpdateThread () {
97+ return ActionUpdateThread .BGT ;
98+ }
99+
93100 private Pair <PsiFile , PhpClass > findPhpClass (final @ NotNull AnActionEvent event ) {
94101 final PsiFile psiFile = event .getData (PlatformDataKeys .PSI_FILE );
95102
Original file line number Diff line number Diff line change 66package com .magento .idea .magento2plugin .actions .generation ;
77
88import com .intellij .lang .ASTNode ;
9+ import com .intellij .openapi .actionSystem .ActionUpdateThread ;
10+ import com .intellij .openapi .actionSystem .ActionUpdateThreadAware ;
911import com .intellij .openapi .actionSystem .AnActionEvent ;
1012import com .intellij .openapi .actionSystem .PlatformDataKeys ;
1113import com .intellij .openapi .editor .Caret ;
2830import com .magento .idea .magento2plugin .project .Settings ;
2931import org .jetbrains .annotations .NotNull ;
3032
31- public class CreateAnObserverAction extends DumbAwareAction {
33+ public class CreateAnObserverAction extends DumbAwareAction implements ActionUpdateThreadAware {
3234
3335 public static final String ACTION_NAME = "Create a new Observer for this event" ;
3436 public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Observer" ;
@@ -87,6 +89,11 @@ public boolean isDumbAware() {
8789 return false ;
8890 }
8991
92+ @ Override
93+ public @ NotNull ActionUpdateThread getActionUpdateThread () {
94+ return ActionUpdateThread .BGT ;
95+ }
96+
9097 private PsiElement getElement (final @ NotNull AnActionEvent event ) {
9198 final Caret caret = event .getData (PlatformDataKeys .CARET );
9299
Original file line number Diff line number Diff line change 55
66package com .magento .idea .magento2plugin .actions .generation ;
77
8+ import com .intellij .openapi .actionSystem .ActionUpdateThread ;
9+ import com .intellij .openapi .actionSystem .ActionUpdateThreadAware ;
810import com .intellij .openapi .actionSystem .AnActionEvent ;
911import com .intellij .openapi .actionSystem .PlatformDataKeys ;
1012import com .intellij .openapi .editor .Caret ;
2123import com .magento .idea .magento2plugin .project .Settings ;
2224import org .jetbrains .annotations .NotNull ;
2325
24- public class InjectAViewModelAction extends DumbAwareAction {
26+ public class InjectAViewModelAction extends DumbAwareAction implements ActionUpdateThreadAware {
2527
2628 public static final String ACTION_NAME = "Inject a new View Model for this block" ;
2729 public static final String ACTION_DESCRIPTION = "Inject a new Magento 2 View Model" ;
@@ -68,6 +70,11 @@ public boolean isDumbAware() {
6870 return false ;
6971 }
7072
73+ @ Override
74+ public @ NotNull ActionUpdateThread getActionUpdateThread () {
75+ return ActionUpdateThread .BGT ;
76+ }
77+
7178 /**
7279 * Get focused (target) element for the event.
7380 *
Original file line number Diff line number Diff line change 55
66package com .magento .idea .magento2plugin .actions .generation ;
77
8+ import com .intellij .openapi .actionSystem .ActionUpdateThread ;
9+ import com .intellij .openapi .actionSystem .ActionUpdateThreadAware ;
810import com .intellij .openapi .actionSystem .AnActionEvent ;
911import com .intellij .openapi .actionSystem .PlatformDataKeys ;
1012import com .intellij .openapi .project .DumbAwareAction ;
1921import com .magento .idea .magento2plugin .util .GetFirstClassOfFile ;
2022import org .jetbrains .annotations .NotNull ;
2123
22- public class OverrideClassByAPreferenceAction extends DumbAwareAction {
24+ public class OverrideClassByAPreferenceAction extends DumbAwareAction implements ActionUpdateThreadAware {
2325 public static final String ACTION_NAME = "Override this class by a new Preference" ;
2426 public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Preference" ;
2527 public static final String INTERFACE_ACTION = "Override this interface by a new Preference" ;
@@ -75,6 +77,11 @@ public boolean isDumbAware() {
7577 return false ;
7678 }
7779
80+ @ Override
81+ public @ NotNull ActionUpdateThread getActionUpdateThread () {
82+ return ActionUpdateThread .BGT ;
83+ }
84+
7885 private Pair <PsiFile , PhpClass > findPhpClass (@ NotNull final AnActionEvent event ) {
7986 final PsiFile psiFile = event .getData (PlatformDataKeys .PSI_FILE );
8087
You can’t perform that action at this time.
0 commit comments