11package  com .joutvhu .intellij .dartscripts ;
22
3+ import  com .intellij .codeInsight .daemon .GutterIconNavigationHandler ;
34import  com .intellij .codeInsight .daemon .LineMarkerInfo ;
45import  com .intellij .codeInsight .daemon .MergeableLineMarkerInfo ;
56import  com .intellij .codeInsight .intention .PriorityAction ;
2122import  com .intellij .openapi .editor .markup .MarkupEditorFilterFactory ;
2223import  com .intellij .openapi .util .Key ;
2324import  com .intellij .openapi .util .Pair ;
25+ import  com .intellij .openapi .util .TextRange ;
2426import  com .intellij .openapi .vfs .VirtualFile ;
2527import  com .intellij .psi .PsiElement ;
2628import  com .intellij .psi .SmartPointerManager ;
@@ -87,7 +89,7 @@ public static class RunLineMarkerInfo extends MergeableLineMarkerInfo<PsiElement
8789        private  final  AnAction  mySingleAction ;
8890
8991        RunLineMarkerInfo (PsiElement  element , Icon  icon , Function <? super  PsiElement , @ Nls  String > tooltipProvider , DefaultActionGroup  actionGroup ) {
90-             super (element , element .getTextRange (), icon , tooltipProvider , null , GutterIconRenderer .Alignment .CENTER , () ->  tooltipProvider . fun ( element ) );
92+             super (element , element .getTextRange (), icon , tooltipProvider , null , GutterIconRenderer .Alignment .CENTER );
9193            myActionGroup  = actionGroup ;
9294            if  (myActionGroup .getChildrenCount () == 1 ) {
9395                mySingleAction  = myActionGroup .getChildActionsOrStubs ()[0 ];
@@ -147,8 +149,8 @@ public LineMarkerActionWrapper(PsiElement element, @NotNull AnAction origin) {
147149        @ Override 
148150        public  AnAction  @ NotNull  [] getChildren (@ Nullable  AnActionEvent  e ) {
149151            if  (myOrigin  instanceof  ExecutorAction ) {
150-                 if  (((ExecutorAction )myOrigin ).getOrigin () instanceof  ExecutorRegistryImpl .ExecutorGroupActionGroup ) {
151-                     final  AnAction [] children  = ((ExecutorRegistryImpl .ExecutorGroupActionGroup )((ExecutorAction )myOrigin ).getOrigin ()).getChildren (null );
152+                 if  (((ExecutorAction )  myOrigin ).getOrigin () instanceof  ExecutorRegistryImpl .ExecutorGroupActionGroup ) {
153+                     final  AnAction [] children  = ((ExecutorRegistryImpl .ExecutorGroupActionGroup )  ((ExecutorAction )  myOrigin ).getOrigin ()).getChildren (null );
152154                    logger .assertTrue (ContainerUtil .all (Arrays .asList (children ), o  -> o  instanceof  RunContextAction ));
153155                    return  ContainerUtil .mapNotNull (children , o  -> {
154156                        PsiElement  element  = myElement .getElement ();
@@ -157,14 +159,14 @@ public LineMarkerActionWrapper(PsiElement element, @NotNull AnAction origin) {
157159                }
158160            }
159161            if  (myOrigin  instanceof  ActionGroup ) {
160-                 return  ((ActionGroup )myOrigin ).getChildren (e  == null  ? null  : wrapEvent (e ));
162+                 return  ((ActionGroup )  myOrigin ).getChildren (e  == null  ? null  : wrapEvent (e ));
161163            }
162164            return  AnAction .EMPTY_ARRAY ;
163165        }
164166
165167        @ Override 
166168        public  boolean  canBePerformed (@ NotNull  DataContext  context ) {
167-             return  !(myOrigin  instanceof  ActionGroup ) || ((ActionGroup )myOrigin ).canBePerformed (wrapContext (context ));
169+             return  !(myOrigin  instanceof  ActionGroup ) || ((ActionGroup )  myOrigin ).canBePerformed (wrapContext (context ));
168170        }
169171
170172        @ Override 
@@ -174,17 +176,17 @@ public boolean isDumbAware() {
174176
175177        @ Override 
176178        public  boolean  isPopup () {
177-             return  !(myOrigin  instanceof  ActionGroup ) || ((ActionGroup )myOrigin ).isPopup ();
179+             return  !(myOrigin  instanceof  ActionGroup ) || ((ActionGroup )  myOrigin ).isPopup ();
178180        }
179181
180182        @ Override 
181183        public  boolean  hideIfNoVisibleChildren () {
182-             return  myOrigin  instanceof  ActionGroup  && ((ActionGroup )myOrigin ).hideIfNoVisibleChildren ();
184+             return  myOrigin  instanceof  ActionGroup  && ((ActionGroup )  myOrigin ).hideIfNoVisibleChildren ();
183185        }
184186
185187        @ Override 
186188        public  boolean  disableIfNoVisibleChildren () {
187-             return  !(myOrigin  instanceof  ActionGroup ) || ((ActionGroup )myOrigin ).disableIfNoVisibleChildren ();
189+             return  !(myOrigin  instanceof  ActionGroup ) || ((ActionGroup )  myOrigin ).disableIfNoVisibleChildren ();
188190        }
189191
190192        @ Override 
@@ -210,7 +212,8 @@ protected DataContext wrapContext(DataContext dataContext) {
210212            PsiElement  element  = myElement .getElement ();
211213            if  (pair  == null  || pair .first  != element ) {
212214                pair  = Pair .pair (element , dataContext );
213-                 DataManager .getInstance ().saveInDataContext (dataContext , PubspecLineMarkerProvider .LOCATION_WRAPPER , pair );
215+                 DataManager .getInstance ()
216+                         .saveInDataContext (dataContext , PubspecLineMarkerProvider .LOCATION_WRAPPER , pair );
214217            }
215218            return  dataContext ;
216219        }
0 commit comments