equal
deleted
inserted
replaced
19 import org.gjt.sp.jedit.View |
19 import org.gjt.sp.jedit.View |
20 |
20 |
21 |
21 |
22 object Session_Build |
22 object Session_Build |
23 { |
23 { |
24 def check_dialog(view: View) |
24 def check_dialog(view: View): Unit = |
25 { |
25 { |
26 val options = PIDE.options.value |
26 val options = PIDE.options.value |
27 Isabelle_Thread.fork() { |
27 Isabelle_Thread.fork() { |
28 try { |
28 try { |
29 if (JEdit_Sessions.session_no_build || |
29 if (JEdit_Sessions.session_no_build || |
76 layout_panel.layout(scroll_text) = BorderPanel.Position.Center |
76 layout_panel.layout(scroll_text) = BorderPanel.Position.Center |
77 layout_panel.layout(action_panel) = BorderPanel.Position.South |
77 layout_panel.layout(action_panel) = BorderPanel.Position.South |
78 |
78 |
79 setContentPane(layout_panel.peer) |
79 setContentPane(layout_panel.peer) |
80 |
80 |
81 private def set_actions(cs: Component*) |
81 private def set_actions(cs: Component*): Unit = |
82 { |
82 { |
83 action_panel.contents.clear |
83 action_panel.contents.clear |
84 action_panel.contents ++= cs |
84 action_panel.contents ++= cs |
85 layout_panel.revalidate |
85 layout_panel.revalidate |
86 layout_panel.repaint |
86 layout_panel.repaint |
106 set_actions(button) |
106 set_actions(button) |
107 button.peer.getRootPane.setDefaultButton(button.peer) |
107 button.peer.getRootPane.setDefaultButton(button.peer) |
108 } |
108 } |
109 } |
109 } |
110 |
110 |
111 private def conclude() |
111 private def conclude(): Unit = |
112 { |
112 { |
113 setVisible(false) |
113 setVisible(false) |
114 dispose() |
114 dispose() |
115 } |
115 } |
116 |
116 |
118 /* close */ |
118 /* close */ |
119 |
119 |
120 setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE) |
120 setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE) |
121 |
121 |
122 addWindowListener(new WindowAdapter { |
122 addWindowListener(new WindowAdapter { |
123 override def windowClosing(e: WindowEvent) { |
123 override def windowClosing(e: WindowEvent): Unit = |
|
124 { |
124 if (_return_code.isDefined) conclude() |
125 if (_return_code.isDefined) conclude() |
125 else stopping() |
126 else stopping() |
126 } |
127 } |
127 }) |
128 }) |
128 |
129 |
129 private def stopping() |
130 private def stopping(): Unit = |
130 { |
131 { |
131 progress.stop |
132 progress.stop |
132 set_actions(new Label("Stopping ...")) |
133 set_actions(new Label("Stopping ...")) |
133 } |
134 } |
134 |
135 |