package Ġcom . jetbrains . edu . course creator . actions Ċ Ċ import Ġcom . intellij . openapi . action System . An ActionEvent Ċ import Ġcom . intellij . openapi . action System . Common Data Keys Ċ import Ġcom . intellij . openapi . file Chooser . FileChooser Ċ import Ġcom . intellij . openapi . file Chooser . FileChooser Descriptor Ċ import Ġcom . intellij . openapi . project . D umb Aware Action Ċ import Ġcom . intellij . openapi . ui . Messages Ċ import Ġcom . jetbrains . edu . course creator . ui . CC New Course Dialog Ċ import Ġcom . jetbrains . edu . learning . E du Utils Ċ Ċ @ Suppress (" Component Not Registered ") Ġ Ġ// Ġeduc ational - core . xml Ċ class ĠCC Unpack Course Archive Ġ: ĠD umb Aware Action (" Unpack ĠCourse ĠFrom ĠArchive ", Ġ" Unpack ĠCourse ĠFrom ĠArchive ", Ġnull ) Ġ{ ĊĠ Ġoverride Ġfun ĠactionPerformed ( e : ĠAn ActionEvent ) Ġ{ ĊĠĠĠ Ġval Ġproject Ġ= Ġe . getData ( Common Data Keys . PROJECT ) ĊĠĠĠ Ġval Ġdescriptor Ġ= ĠFile Chooser Descriptor ( true , Ġtrue , Ġtrue , Ġtrue , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtrue , Ġfalse ) ĊĠĠĠ Ġval Ġvirtual File Ġ= ĠFile Chooser . choose File ( descriptor , Ġproject , Ġnull ) Ġ?: Ġreturn ĊĠĠĠ Ġval Ġcourse Ġ= ĠE du Utils . getLocal Course ( virtual File . path ) ĊĠĠĠ Ġif Ġ( course Ġ== Ġnull ) Ġ{ ĊĠĠĠĠĠ ĠMessages . show Error Dialog (" This Ġcourse Ġis Ġincompatible Ġwith Ġcurrent Ġversion ", Ġ" Failed Ġto ĠUn pack ĠCourse ") ĊĠĠĠĠĠ Ġreturn ĊĠĠĠ Ġ} ĊĊĠĠĠ ĠCC New Course Dialog (" Unpack ĠCourse ", Ġ" Unpack ", Ġcourse ). show () ĊĠ Ġ} Ċ } Ċ