equal
deleted
inserted
replaced
5 Isabelle/jEdit plugin -- main setup. |
5 Isabelle/jEdit plugin -- main setup. |
6 */ |
6 */ |
7 |
7 |
8 package isabelle.jedit |
8 package isabelle.jedit |
9 |
9 |
10 import org.gjt.sp.jedit.jEdit |
|
11 import org.gjt.sp.jedit.EditPlugin |
|
12 import org.gjt.sp.util.Log |
|
13 |
|
14 import errorlist.DefaultErrorSource |
|
15 import errorlist.ErrorSource |
|
16 |
|
17 import java.util.Properties |
10 import java.util.Properties |
18 import java.lang.NumberFormatException |
11 import java.lang.NumberFormatException |
19 |
12 |
20 import scala.collection.mutable.ListBuffer |
13 import scala.collection.mutable.ListBuffer |
21 import scala.io.Source |
14 import scala.io.Source |
|
15 |
|
16 import org.gjt.sp.util.Log |
|
17 import org.gjt.sp.jedit.{jEdit, EBPlugin, EBMessage} |
|
18 import org.gjt.sp.jedit.msg.DockableWindowUpdate |
|
19 |
|
20 import errorlist.DefaultErrorSource |
|
21 import errorlist.ErrorSource |
22 |
22 |
23 |
23 |
24 |
24 |
25 /** global state **/ |
25 /** global state **/ |
26 |
26 |
96 } |
96 } |
97 |
97 |
98 |
98 |
99 /* Main plugin setup */ |
99 /* Main plugin setup */ |
100 |
100 |
101 class IsabellePlugin extends EditPlugin { |
101 class IsabellePlugin extends EBPlugin { |
102 |
102 |
103 import IsabellePlugin._ |
103 import IsabellePlugin._ |
104 |
104 |
105 val errors = new DefaultErrorSource("isabelle") |
105 val errors = new DefaultErrorSource("isabelle") |
106 val consumer_thread = new ConsumerThread |
106 val consumer_thread = new ConsumerThread |
147 |
147 |
148 consumer_thread.start |
148 consumer_thread.start |
149 |
149 |
150 } |
150 } |
151 |
151 |
152 |
|
153 override def stop = { |
152 override def stop = { |
154 isabelle.kill |
153 isabelle.kill |
155 consumer_thread.join |
154 consumer_thread.join |
156 ErrorSource.unregisterErrorSource(errors) |
155 ErrorSource.unregisterErrorSource(errors) |
157 } |
156 } |
158 |
157 |
|
158 |
|
159 override def handleMessage(message: EBMessage) = message match { |
|
160 case _: DockableWindowUpdate => // FIXME check isabelle process |
|
161 case _ => |
|
162 } |
|
163 |
159 } |
164 } |