package Ġcom . jetbrains . edu . learning . marketplace Ċ Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . intellij . openapi . startup . Startup Activity Ċ import Ġcom . intellij . util . messages . Message Bus Connection Ċ import Ġcom . jetbrains . edu . learning . E du Log In Listener Ċ import Ġcom . jetbrains . edu . learning . E du Utils Ċ import Ġcom . jetbrains . edu . learning . Study Task Manager Ċ import Ġcom . jetbrains . edu . learning . course Format . E du Course Ċ import Ġcom . jetbrains . edu . learning . is UnitTest Mode Ċ import Ġcom . jetbrains . edu . learning . marketplace . api . Market place Sub missions Connector Ċ import Ġcom . jetbrains . edu . learning . marketplace . settings . Market place Settings Ċ import Ġcom . jetbrains . edu . learning . marketplace . update . Market place Update Checker Ċ import Ġcom . jetbrains . edu . learning . submissions . Sub missions Manager Ċ import Ġcom . jetbrains . edu . learning . task Description . ui . Task Description View Ċ import Ġcom . jetbrains . edu . learning . task Description . ui . tab . Tab Manager Ċ Ċ class ĠMarketplace Startup Activity Ġ: ĠStartup Activity Ġ{ ĊĊĠ Ġoverride Ġfun Ġrun Activity ( project : ĠProject ) Ġ{ ĊĠĠĠ Ġif Ġ( project . is Disposed Ġ|| Ġ! E du Utils . is Student Project ( project ) Ġ|| Ġis UnitTest Mode ) Ġreturn ĊĠĠĠ Ġval Ġtask Manager Ġ= ĠStudy Task Manager . getInstance ( project ) ĊĠĠĠ Ġval Ġcourse Ġ= ĠStudy Task Manager . getInstance ( project ). course Ġas ? ĠE du Course Ġ?: Ġreturn ĊĠĠĠ Ġif Ġ(! course . is Market place Remote ) Ġreturn ĊĊĠĠĠ ĠMarketplace Update Checker . getInstance ( project ). check () ĊĊĠĠĠ Ġval Ġsubmissions Manager Ġ= ĠSub missions Manager . getInstance ( project ) ĊĠĠĠ Ġif Ġ(! submissions Manager . submissions Supported ()) Ġreturn ĊĊĠĠĠ Ġval Ġaccount Ġ= ĠMarketplace Settings . INSTANCE . account ĊĠĠĠ Ġif Ġ( account Ġ!= Ġnull Ġ&& Ġaccount . is Jwt Token Provided ()) Ġ{ ĊĠĠĠĠĠ Ġsubmissions Manager . prepare Sub missions Content () ĊĠĠĠ Ġ} ĊĠĠĠ Ġelse Ġ{ ĊĠĠĠĠĠ Ġval Ġbus Connection : ĠMessage Bus Connection Ġ= Ġproject . message Bus . connect ( task Manager ) ĊĠĠĠĠĠ Ġbus Connection . subscribe ( Market place Sub missions Connector . GR AZ IE _ AUTHORIZATION _ TOPIC , Ġobject Ġ: ĠE du Log In Listener Ġ{ ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġuser LoggedIn () Ġ{ ĊĠĠĠĠĠĠĠĠĠ Ġval Ġuser Account Ġ= ĠMarketplace Settings . INSTANCE . account ĊĠĠĠĠĠĠĠĠĠ Ġif Ġ( user Account Ġ== Ġnull Ġ|| Ġuser Account . is Jwt Token Provided ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġsubmissions Manager . prepare Sub missions Content () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġuser Logged Out () Ġ{ ĊĠĠĠĠĠĠĠĠĠ ĠTask Description View . getInstance ( project ). update Tab ( Tab Manager . Tab Type . SUB MISSION S _ TAB ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ }