// ĠCopyright Ġ( c ) Ġ 2 0 1 7 , ĠHol ger ĠBrand l , ĠE k ater ina ĠT uz ova Ċ /* Ċ Ġ* ĠCopyright Ġ 2 0 0 0 - 2 0 1 9 ĠJetBrains Ġs . r . o . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ Ġ*/ Ċ Ċ package Ġorg . jetbrains . r . packages Ċ Ċ import Ġcom . intellij . openapi . components . Persistent State Component Ċ import Ġcom . intellij . openapi . components . State Ċ import Ġcom . intellij . openapi . components . Storage Ċ import Ġcom . intellij . openapi . diagnostic . Logger Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . util . xml b . Xml Serializer Util Ċ Ċ /** Ċ Ġ* Ġ@ author Ġav es log uz ova Ċ Ġ* Ġ@ author Ġh ol ger brand l Ċ Ġ*/ Ċ @ State ( name Ġ= Ġ" R Package Service ", Ġstorage s Ġ= Ġ[ Storage ( value Ġ= Ġ" r packages . xml ") ]) Ċ class ĠR Package Service Ġ: ĠPersistent State Component < R Package Service > Ġ{ ĊĠ Ġvar Ġcr an Mirror Ġ= Ġ 0 ĊĠ Ġvar Ġenabled Repository Urls Ġ= Ġmutable ListOf < String >() ĊĠ Ġvar Ġuser Repository Urls Ġ= Ġmutable ListOf < String >() ĊĊĠ Ġoverride Ġfun ĠgetState (): ĠR Package Service ? Ġ{ ĊĠĠĠ Ġreturn Ġthis ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġload State ( state : ĠR Package Service ) Ġ{ ĊĠĠĠ ĠXml Serializer Util . copy Bean ( state , Ġthis ) ĊĠ Ġ} ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġval ĠLOG Ġ= ĠLogger . getInstance ( R Package Service :: class . java ) ĊĊĠĠĠ Ġfun ĠgetInstance ( project : ĠProject ): ĠR Package Service Ġ{ ĊĠĠĠĠĠ Ġreturn Ġproject . getService ( R Package Service :: class . java ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ