// ĠCopyright Ġ 2 0 0 0 - 2 0 2 1 ĠJetBrains Ġs . r . o . Ġand Ġcontributors . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ @ file : Jvm Name (" Plugins Ad vert iser ") Ċ Ċ package Ġcom . intellij . openapi . update Settings . impl . plugins Ad vertisement Ċ Ċ import Ġcom . intellij . ide . plugins . PluginManager Core Ċ import Ġcom . intellij . ide . plugins . Plugin Node Ċ import Ġcom . intellij . ide . plugins . Repository Helper Ċ import Ġcom . intellij . ide . plugins . advert iser . Plugin Data Ċ import Ġcom . intellij . ide . util . Properties Component Ċ import Ġcom . intellij . notification . Notification Group Ċ import Ġcom . intellij . notification . Notification Group Manager Ċ import Ġcom . intellij . openapi . application . ex . Application Info Ex Ċ import Ġcom . intellij . openapi . diagnostic . Logger Ċ import Ġcom . intellij . openapi . extensions . Plugin Id Ċ import Ġcom . intellij . openapi . progress . Progress Indicator Ċ import Ġcom . intellij . openapi . progress . Progress Manager Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . util . Platform Utils . is Ide a Ult imate Ċ import Ġorg . jetbrains . annotations . Api Status Ċ import Ġjava . io . IOException Ċ Ċ private Ġconst Ġval ĠIG NORE _ UL TIM ATE _ ED ITION Ġ= Ġ" ignore Ult imate Edition " Ċ Ċ @ get : Jvm Name (" getLog ") Ċ val ĠLOG Ġ= ĠLogger . getInstance ("# Plugins Ad vert iser ") Ċ Ċ private Ġval Ġproperties Component ĊĠ Ġget () Ġ= ĠProperties Component . getInstance () Ċ Ċ var Ġis Ignore Ide Suggestion : ĠBoolean ĊĠ Ġget () Ġ= Ġproperties Component . isTrue Value ( IGNORE _ UL TIM ATE _ ED ITION ) ĊĠ Ġset ( value ) Ġ= Ġproperties Component . setValue ( IGNORE _ UL TIM ATE _ ED ITION , Ġvalue ) Ċ Ċ @ Jvm Field Ċ @ Api Status . Scheduled For Removal ( in Version Ġ= Ġ" 2 0 2 1 . 3 ") Ċ @ Deprecated (" Use Ġ` notification Group ` Ġproperty ") Ċ val ĠNOT IFICATION _ GROUP Ġ= Ġnotification Group Ċ Ċ val Ġnotification Group : ĠNotification Group ĊĠ Ġget () Ġ= ĠNotification Group Manager . getInstance (). get Notification Group (" Plugins ĠSuggest ion ") Ċ Ċ @ Suppress (" Deprecated Callable Add Replace With ") Ċ @ Deprecated (" Use Ġ` install And Enable ( Project , ĠSet , ĠBoolean , ĠRunnable )` ") Ċ fun Ġinstall And Enable Plugins ( ĊĠ Ġplugin Ids : ĠSet < String >, ĊĠ ĠonSuccess : ĠRunnable , Ċ ) Ġ{ ĊĠ Ġinstall And Enable ( ĊĠĠĠ ĠLinked HashSet ( plugin Ids . map Ġ{ ĠPlugin Id . getId ( it ) Ġ}), ĊĠĠĠ ĠonSuccess , ĊĠ Ġ) Ċ } Ċ Ċ @ Deprecated (" Use Ġ` install And Enable ( Project , ĠSet , ĠBoolean , ĠRunnable )` ") Ċ fun Ġinstall And Enable ( ĊĠ Ġplugin Ids : ĠSet < Plugin Id >, ĊĠ ĠonSuccess : ĠRunnable , Ċ ) Ġ= Ġinstall And Enable ( null , Ġplugin Ids , Ġtrue , ĠonSuccess ) Ċ Ċ fun Ġinstall And Enable ( ĊĠ Ġproject : ĠProject ?, ĊĠ Ġplugin Ids : ĠSet < Plugin Id >, ĊĠ Ġshow Dialog : ĠBoolean Ġ= Ġfalse , ĊĠ ĠonSuccess : ĠRunnable , Ċ ) Ġ= ĠProgress Manager . getInstance (). run ( Install And Enable Task ( project , Ġplugin Ids , Ġshow Dialog , ĠonSuccess )) Ċ Ċ internal Ġfun Ġget Bund led Plugin To Install ( plugins : ĠCollection < Plugin Data >): ĠList < String > Ġ{ ĊĠ Ġreturn Ġif Ġ( is Ide a Ult imate ()) Ġ{ ĊĠĠĠ Ġempty List () ĊĠ Ġ} ĊĠ Ġelse Ġ{ ĊĠĠĠ Ġval Ġdescriptors ById Ġ= ĠPlugin Manager Core . build Plugin Id Map () ĊĠĠĠ Ġplugins ĊĠĠĠĠĠ Ġ. filter Ġ{ Ġit . is Bund led Ġ} ĊĠĠĠĠĠ Ġ. filter Not Ġ{ Ġdescriptors ById . containsKey ( it . plugin Id ) Ġ} ĊĠĠĠĠĠ Ġ. map Ġ{ Ġit . plugin Name Ġ} ĊĠ Ġ} Ċ } Ċ Ċ /** Ċ Ġ* ĠLoads Ġlist Ġof Ġplugins , Ġcompatible Ġwith Ġa Ġcurrent Ġbuild , Ġfrom Ġall Ġconfigured Ġrepositories Ċ Ġ*/ Ċ @ Jvm Over loads Ċ internal Ġfun Ġload Plugins From Custom Repositories ( indicator : ĠProgress Indicator ? Ġ= Ġnull ): ĠList < Plugin Node > Ġ{ ĊĠ Ġreturn ĠRepository Helper ĊĠĠĠ Ġ. get Plugin Hosts () ĊĠĠĠ Ġ. filter Not Ġ{ ĊĠĠĠĠĠ Ġit Ġ== Ġnull ĊĠĠĠĠĠ Ġ&& ĠApplication Info Ex . getInstance Ex (). uses Jet Brains Plugin Repository () ĊĠĠĠ Ġ}. flatMap Ġ{ ĊĠĠĠĠĠ Ġtry Ġ{ ĊĠĠĠĠĠĠĠ ĠRepository Helper . load Plugins ( it , Ġnull , Ġindicator ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġcatch Ġ( e : ĠIOException ) Ġ{ ĊĠĠĠĠĠĠĠ ĠLOG . info (" Couldn 't Ġload Ġplugins Ġfrom Ġ$ it : Ġ$ e ") ĊĠĠĠĠĠĠĠ ĠLOG . debug ( e ) ĊĠĠĠĠĠĠĠ Ġempty List < Plugin Node >() ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ}. distinct By Ġ{ Ġit . plugin Id Ġ} Ċ } Ċ