40 |
40 |
41 def resources(): JEdit_Resources = |
41 def resources(): JEdit_Resources = |
42 session.resources.asInstanceOf[JEdit_Resources] |
42 session.resources.asInstanceOf[JEdit_Resources] |
43 |
43 |
44 def debugger: Debugger = session.debugger |
44 def debugger: Debugger = session.debugger |
45 |
|
46 lazy val editor = new JEdit_Editor |
|
47 |
45 |
48 |
46 |
49 /* current document content */ |
47 /* current document content */ |
50 |
48 |
51 def snapshot(view: View): Document.Snapshot = GUI_Thread.now |
49 def snapshot(view: View): Document.Snapshot = GUI_Thread.now |
173 |
171 |
174 private lazy val delay_load = |
172 private lazy val delay_load = |
175 GUI_Thread.delay_last(PIDE.options.seconds("editor_load_delay")) { delay_load_action() } |
173 GUI_Thread.delay_last(PIDE.options.seconds("editor_load_delay")) { delay_load_action() } |
176 |
174 |
177 private def file_watcher_action(changed: Set[JFile]): Unit = |
175 private def file_watcher_action(changed: Set[JFile]): Unit = |
178 if (Document_Model.sync_files(changed)) PIDE.editor.invoke_generated() |
176 if (Document_Model.sync_files(changed)) JEdit_Editor.invoke_generated() |
179 |
177 |
180 lazy val file_watcher: File_Watcher = |
178 lazy val file_watcher: File_Watcher = |
181 File_Watcher(file_watcher_action _, PIDE.options.seconds("editor_load_delay")) |
179 File_Watcher(file_watcher_action _, PIDE.options.seconds("editor_load_delay")) |
182 |
180 |
183 |
181 |
312 |
310 |
313 Session_Build.session_build(view) |
311 Session_Build.session_build(view) |
314 |
312 |
315 Keymap_Merge.check_dialog(view) |
313 Keymap_Merge.check_dialog(view) |
316 |
314 |
317 PIDE.editor.hyperlink_position(true, Document.Snapshot.init, |
315 JEdit_Editor.hyperlink_position(true, Document.Snapshot.init, |
318 JEdit_Sessions.session_info().open_root).foreach(_.follow(view)) |
316 JEdit_Sessions.session_info().open_root).foreach(_.follow(view)) |
319 |
317 |
320 case msg: BufferUpdate |
318 case msg: BufferUpdate |
321 if msg.getWhat == BufferUpdate.LOAD_STARTED || msg.getWhat == BufferUpdate.CLOSING => |
319 if msg.getWhat == BufferUpdate.LOAD_STARTED || msg.getWhat == BufferUpdate.CLOSING => |
322 if (msg.getBuffer != null) { |
320 if (msg.getBuffer != null) { |
323 exit_models(List(msg.getBuffer)) |
321 exit_models(List(msg.getBuffer)) |
324 PIDE.editor.invoke_generated() |
322 JEdit_Editor.invoke_generated() |
325 } |
323 } |
326 |
324 |
327 case msg: BufferUpdate |
325 case msg: BufferUpdate |
328 if msg.getWhat == BufferUpdate.PROPERTIES_CHANGED || msg.getWhat == BufferUpdate.LOADED => |
326 if msg.getWhat == BufferUpdate.PROPERTIES_CHANGED || msg.getWhat == BufferUpdate.LOADED => |
329 if (PIDE.session.is_ready) { |
327 if (PIDE.session.is_ready) { |