equal
deleted
inserted
replaced
26 object PIDE |
26 object PIDE |
27 { |
27 { |
28 /* plugin instance */ |
28 /* plugin instance */ |
29 |
29 |
30 val options = new JEdit_Options |
30 val options = new JEdit_Options |
|
31 val completion_history = new Completion.History_Variable |
31 |
32 |
32 @volatile var startup_failure: Option[Throwable] = None |
33 @volatile var startup_failure: Option[Throwable] = None |
33 @volatile var startup_notified = false |
34 @volatile var startup_notified = false |
34 |
35 |
35 @volatile var plugin: Plugin = null |
36 @volatile var plugin: Plugin = null |
302 Isabelle_System.init() |
303 Isabelle_System.init() |
303 Isabelle_Font.install_fonts() |
304 Isabelle_Font.install_fonts() |
304 |
305 |
305 val init_options = Options.init() |
306 val init_options = Options.init() |
306 Swing_Thread.now { PIDE.options.update(init_options) } |
307 Swing_Thread.now { PIDE.options.update(init_options) } |
|
308 PIDE.completion_history.load() |
307 |
309 |
308 if (Platform.is_macos && PIDE.options.bool("jedit_mac_adapter")) |
310 if (Platform.is_macos && PIDE.options.bool("jedit_mac_adapter")) |
309 OSX_Adapter.set_quit_handler(this, this.getClass.getDeclaredMethod("handle_quit")) |
311 OSX_Adapter.set_quit_handler(this, this.getClass.getDeclaredMethod("handle_quit")) |
310 |
312 |
311 SyntaxUtilities.setStyleExtender(new Token_Markup.Style_Extender) |
313 SyntaxUtilities.setStyleExtender(new Token_Markup.Style_Extender) |
334 |
336 |
335 override def stop() |
337 override def stop() |
336 { |
338 { |
337 JEdit_Lib.jedit_text_areas.foreach(Completion_Popup.Text_Area.exit _) |
339 JEdit_Lib.jedit_text_areas.foreach(Completion_Popup.Text_Area.exit _) |
338 |
340 |
339 if (PIDE.startup_failure.isEmpty) |
341 if (PIDE.startup_failure.isEmpty) { |
340 PIDE.options.value.save_prefs() |
342 PIDE.options.value.save_prefs() |
|
343 PIDE.completion_history.value.save() |
|
344 } |
341 |
345 |
342 PIDE.session.phase_changed -= session_manager |
346 PIDE.session.phase_changed -= session_manager |
343 PIDE.exit_models(JEdit_Lib.jedit_buffers().toList) |
347 PIDE.exit_models(JEdit_Lib.jedit_buffers().toList) |
344 PIDE.session.stop() |
348 PIDE.session.stop() |
345 } |
349 } |