package Ġcom . jetbrains . edu . learning . step ik . change Host Ċ Ċ import Ġcom . intellij . ide . util . Properties Component Ċ import Ġcom . intellij . openapi . action System . An ActionEvent Ċ import Ġcom . intellij . openapi . diagnostic . Logger Ċ import Ġcom . intellij . openapi . diagnostic . logger Ċ import Ġcom . intellij . openapi . project . D umb Aware Action Ċ import Ġcom . intellij . openapi . ui . ComboBox Ċ import Ġcom . intellij . openapi . ui . Dialog Wrapper Ċ import Ġcom . intellij . ui . Enum ComboBox Model Ċ import Ġcom . intellij . ui . layout .* Ċ import Ġcom . jetbrains . edu . learning . messages . E du Core Bundle Ċ import Ġcom . jetbrains . edu . learning . step ik . Step ik Names . STE PI K _ HOST _ ORD IN AL _ PROPERTY Ċ import Ġorg . jetbrains . annotations . Non N ls Ċ import Ġjavax . swing . J Component Ċ Ċ @ Suppress (" Component Not Registered ") Ċ class ĠSte pi k Change Host Ġ: ĠD umb Aware Action ( E du Core Bundle . message (" step ik . change . host ")) Ġ{ ĊĊĠ Ġoverride Ġfun ĠactionPerformed ( e : ĠAn ActionEvent ) Ġ{ ĊĠĠĠ Ġval Ġselected Host Ġ= Ġshow Step ik Change Host Dialog () ĊĊĠĠĠ Ġif Ġ( selected Host Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ ĠProperties Component . getInstance (). setValue ( STE PI K _ HOST _ ORD IN AL _ PROPERTY , Ġselected Host . ordinal , ĠSte pi k Host . PRO DU CTION . ordinal ) ĊĠĠĠĠĠ ĠLOG . info (" Step ik Ġurl Ġwas Ġchanged Ġto Ġ${ selected Host . url }") ĊĠĠĠ Ġ} ĊĠĠĠ Ġelse Ġ{ ĊĠĠĠĠĠ ĠLOG . info (" Selected ĠSte pi k Ġurl Ġitem Ġis Ġnull ") ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġprivate Ġval ĠLOG : ĠLogger Ġ= Ġlogger < Step ik Change Host >() ĊĊĠĠĠ Ġ@ Non N ls ĊĠĠĠ Ġconst Ġval ĠACTION _ ID Ġ= Ġ" Ed uc ational . Ed uc ator . Step ik Change Host " ĊĠ Ġ} Ċ } Ċ Ċ class ĠSte pi k Change Host Dialog Ġ: ĠDialog Wrapper ( true ) Ġ{ ĊĠ Ġprivate Ġval Ġhosts Combo Ġ= ĠCombo Box ( Enum ComboBox Model ( Step ik Host :: class . java )) ĊĊĠ Ġinit Ġ{ ĊĠĠĠ Ġtitle Ġ= ĠE du Core Bundle . message (" step ik . change . host ") ĊĠĠĠ Ġset OK ButtonText ( E du Core Bundle . message (" step ik . select ")) ĊĠĠĠ Ġhosts Combo . selected Item Ġ= ĠSte pi k Host . getSelected Host () ĊĠĠĠ Ġinit () ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġcreate Center Panel (): ĠJ Component Ġ= Ġpanel Ġ{ ĊĠĠĠ Ġrow ( E du Core Bundle . message (" step ik . url ")) Ġ{ Ġhosts Combo () Ġ} ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Preferred Focused Component (): ĠJ Component Ġ= Ġhosts Combo ĊĊĠ Ġfun Ġget SelectedItem (): ĠSte pi k Host ? Ġ= Ġhosts Combo . selected Item Ġas ĠSte pi k Host ? Ċ }