// Ġ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 . plugins . gradle . issue Ċ Ċ import Ġcom . intellij . build . Build View Ċ import Ġcom . intellij . build . issue . Build Issue Ċ import Ġcom . intellij . build . issue . Build Issue Quick Fix Ċ import Ġcom . intellij . execution . runners . Execution Util Ċ import Ġcom . intellij . openapi . action System . An ActionEvent Ċ import Ġcom . intellij . openapi . action System . DataProvider Ċ import Ġcom . intellij . openapi . action System . Lang Data Keys Ċ import Ġcom . intellij . openapi . external System . issue . quick fix . Re import Quick Fix . Companion . request Import Ċ import Ġcom . intellij . openapi . external System . util . External System Bundle Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . pom . Navig atable Ċ import Ġorg . jetbrains . annotations . Api Status Ċ import Ġorg . jetbrains . plugins . gradle . settings . Gradle Settings Ċ import Ġorg . jetbrains . plugins . gradle . util . Gradle Constants Ċ import Ġjava . util . concurrent . Comp letableFuture Ċ import Ġjava . util . concurrent . Comp letableFuture . run Async Ċ Ċ @ Api Status . Internal Ċ abstract Ġclass ĠUn resolved Dependency Issue ( dependency Name : ĠString ) Ġ: ĠBuild Issue Ġ{ ĊĠ Ġoverride Ġval Ġtitle : ĠString Ġ= Ġ" Could Ġnot Ġresolve Ġ$ dependency Name " ĊĠ Ġoverride Ġfun Ġget Navig atable ( project : ĠProject ): ĠNavig atable ? Ġ= Ġnull ĊĊĠ Ġfun Ġbuild Description ( failure Message : ĠString ?, Ġis Offline Mode : ĠBoolean , Ġoffline Mode Quick Fix Text : ĠString ): ĠString Ġ{ ĊĠĠĠ Ġval Ġissue Description Ġ= ĠStringBuilder ( failure Message ?. trim ()) ĊĠĠĠ Ġval Ġno Repositories Defined Ġ= Ġfailure Message ?. contains (" no Ġrepositories Ġare Ġdefined ") Ġ?: Ġfalse ĊĊĠĠĠ Ġissue Description . append ("\ n \ n Possible Ġsolution :\ n ") ĊĠĠĠ Ġwhen Ġ{ ĊĠĠĠĠĠ Ġis Offline Mode Ġ&& Ġ! no Repositories Defined Ġ-> Ġissue Description . append ( ĊĠĠĠĠĠĠĠ Ġ" Ġ- Ġ< a Ġhref =\" $ offline Quick Fix Id \"> $ offline Mode Quick Fix Text </ a >\ n ") ĊĠĠĠĠĠ Ġelse Ġ-> Ġissue Description . append ( ĊĠĠĠĠĠĠĠ Ġ" Ġ- ĠDeclare Ġrepository Ġproviding Ġthe Ġartifact , Ġsee Ġthe Ġdocumentation Ġat Ġ$ decl aring Repositories Link \ n ") ĊĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġissue Description . toString () ĊĠ Ġ} ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġinternal Ġconst Ġval Ġoffline Quick Fix Id Ġ= Ġ" disable _ offline _ mode " ĊĠĠĠ Ġprivate Ġconst Ġval Ġdeclaring Repositories Link Ġ= Ġ" https :// docs . gradle . org / current / user guide / decl aring _ repositories . html " ĊĠ Ġ} Ċ } Ċ Ċ @ Api Status . Experimental Ċ class ĠUn resolved Dependency Sync Issue ( dependency Name : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfailure Message : ĠString ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġproject Path : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġis Offline Mode : ĠBoolean ) Ġ: ĠUn resolved Dependency Issue ( dependency Name ) Ġ{ ĊĠ Ġoverride Ġval Ġquick Fixes Ġ= Ġif Ġ( is Offline Mode ) ĠlistOf < Build Issue Quick Fix >( Disable Offline And Re import ( project Path )) Ġelse Ġempty List () ĊĠ Ġoverride Ġval Ġdescription : ĠString Ġ= Ġbuild Description ( failure Message , Ġis Offline Mode , Ġ" Disable Ġoffline Ġmode Ġand Ġre import Ġthe Ġproject ") ĊĊĠ Ġinner Ġclass ĠDisable Offline And Re import ( private Ġval Ġproject Path : ĠString ) Ġ: ĠBuild Issue Quick Fix Ġ{ ĊĠĠĠ Ġoverride Ġval Ġid Ġ= Ġoffline Quick Fix Id ĊĠĠĠ Ġoverride Ġfun Ġrun Quick Fix ( project : ĠProject , Ġdata Provider : ĠData Provider ): ĠCompletableFuture < *> Ġ{ ĊĠĠĠĠĠ ĠGradle Settings . getInstance ( project ). is Offline Work Ġ= Ġfalse ĊĠĠĠĠĠ Ġreturn Ġtry R er un ( dataProvider ) Ġ?: Ġrequest Import ( project , Ġproject Path , ĠGradle Constants . SYSTEM _ ID ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ Ċ @ Api Status . Experimental Ċ class ĠUn resolved Dependency Build Issue ( dependency Name : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfailure Message : ĠString ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġis Offline Mode : ĠBoolean ) Ġ: ĠUn resolved Dependency Issue ( dependency Name ) Ġ{ ĊĠ Ġoverride Ġval Ġquick Fixes Ġ= Ġif Ġ( is Offline Mode ) ĠlistOf < Build Issue Quick Fix >( Disable Offline And R er un ()) Ġelse Ġempty List () ĊĠ Ġoverride Ġval Ġdescription : ĠString Ġ= Ġbuild Description ( failure Message , Ġis Offline Mode , Ġ" Disable Ġoffline Ġmode Ġand Ġrer un Ġthe Ġbuild ") ĊĊĠ Ġinner Ġclass ĠDisable Offline And R er un Ġ: ĠBuild Issue Quick Fix Ġ{ ĊĠĠĠ Ġoverride Ġval Ġid Ġ= Ġoffline Quick Fix Id ĊĠĠĠ Ġoverride Ġfun Ġrun Quick Fix ( project : ĠProject , Ġdata Provider : ĠData Provider ): ĠCompletableFuture < *> Ġ{ ĊĠĠĠĠĠ ĠGradle Settings . getInstance ( project ). is Offline Work Ġ= Ġfalse ĊĠĠĠĠĠ Ġreturn Ġtry R er un ( dataProvider ) Ġ?: ĠCompletableFuture . completed Future ( null ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ Ċ private Ġfun Ġtry R er un ( dataProvider : ĠData Provider ): ĠCompletableFuture < *> ? Ġ{ ĊĠ Ġval Ġenvironment Ġ= ĠLang Data Keys . EXEC UTION _ ENVIRONMENT . getData ( dataProvider ) ĊĠ Ġif Ġ( environment Ġ!= Ġnull ) Ġ{ ĊĠĠĠ Ġreturn Ġrun Async Ġ{ ĠExecution Util . restart ( environment ) Ġ} ĊĠ Ġ} ĊĠ Ġval Ġrestart Actions Ġ= ĠBuild View . RE START _ ACTION S . getData ( dataProvider ) ĊĠ Ġval Ġre import Action Text Ġ= ĠExternal System Bundle . message (" action . refresh . project . text ", ĠGradle Constants . SYSTEM _ ID . readable Name ) ĊĠ Ġrestart Actions ?. find Ġ{ Ġit . template Text Ġ== Ġre import Action Text Ġ} ?. let Ġ{ Ġaction Ġ-> ĊĠĠĠ Ġval Ġaction Event Ġ= ĠAn ActionEvent . createFrom An Action ( action , Ġnull , Ġ" Build View ", Ġdata Provider :: getData ) ĊĠĠĠ Ġaction . update ( action Event ) ĊĠĠĠ Ġif Ġ( action Event . presentation . isEnabled And Visible ) Ġ{ ĊĠĠĠĠĠ Ġreturn Ġrun Async Ġ{ Ġaction . action Performed ( action Event ) Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĠ Ġreturn Ġnull Ċ }