Mercurial > projects > dwt-addons
comparison dwtx/jface/text/reconciler/AbstractReconciler.d @ 172:d994a8b2cdf7
again compile fixes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 10 Sep 2008 23:14:02 +0200 |
parents | 862b05e0334a |
children |
comparison
equal
deleted
inserted
replaced
171:ee33f30b14e2 | 172:d994a8b2cdf7 |
---|---|
85 * runs with minimal priority. | 85 * runs with minimal priority. |
86 * | 86 * |
87 * @param name the thread's name | 87 * @param name the thread's name |
88 */ | 88 */ |
89 public this(String name) { | 89 public this(String name) { |
90 thread = new Thread( &run ); | 90 thread = new JThread( &run ); |
91 thread.name = name; | 91 thread.setName( name ); |
92 thread.priority = Thread.PRIORITY_MIN; | 92 thread.setPriority( JThread.MIN_PRIORITY ); |
93 thread.isDaemon(true); | 93 thread.setDaemon(true); |
94 } | 94 } |
95 | 95 |
96 public void start(){ | 96 public void start(){ |
97 thread.start(); | 97 thread.start(); |
98 } | 98 } |
99 public bool isAlive(){ | 99 public bool isAlive(){ |
100 return thread.isRunning(); | 100 return thread.isAlive(); |
101 } | 101 } |
102 public JThread getThread(){ | 102 public JThread getThread(){ |
103 return thread; | 103 return thread; |
104 } | 104 } |
105 /** | 105 /** |
263 * @see IDocumentListener#documentChanged(DocumentEvent) | 263 * @see IDocumentListener#documentChanged(DocumentEvent) |
264 */ | 264 */ |
265 public void documentChanged(DocumentEvent e) { | 265 public void documentChanged(DocumentEvent e) { |
266 | 266 |
267 if (!fThread.isDirty() && fThread.isAlive()) { | 267 if (!fThread.isDirty() && fThread.isAlive()) { |
268 if (!fIsAllowedToModifyDocument && Thread.getThis() is fThread.getThread()) | 268 if (!fIsAllowedToModifyDocument && JThread.currentThread() is fThread.getThread()) |
269 throw new UnsupportedOperationException("The reconciler thread is not allowed to modify the document"); //$NON-NLS-1$ | 269 throw new UnsupportedOperationException("The reconciler thread is not allowed to modify the document"); //$NON-NLS-1$ |
270 aboutToBeReconciled(); | 270 aboutToBeReconciled(); |
271 } | 271 } |
272 | 272 |
273 /* | 273 /* |
628 * | 628 * |
629 * @return <code>true</code> if running in this reconciler's background thread | 629 * @return <code>true</code> if running in this reconciler's background thread |
630 * @since 3.4 | 630 * @since 3.4 |
631 */ | 631 */ |
632 protected bool isRunningInReconcilerThread() { | 632 protected bool isRunningInReconcilerThread() { |
633 return Thread.getThis() is fThread.getThread(); | 633 return JThread.currentThread() is fThread.getThread(); |
634 } | 634 } |
635 } | 635 } |