comparison org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.d @ 19:52184e4b815c

no more direct tango.core.Thread. Rename JThread to java.lang.Thread.
author Frank Benoit <benoit@tionex.de>
date Wed, 18 Mar 2009 10:55:25 +0100
parents bc29606a740c
children
comparison
equal deleted inserted replaced
18:735224fcc45f 19:52184e4b815c
50 import java.util.Stack; 50 import java.util.Stack;
51 import java.util.Iterator; 51 import java.util.Iterator;
52 import java.util.Map; 52 import java.util.Map;
53 import java.util.HashMap; 53 import java.util.HashMap;
54 import java.util.Set; 54 import java.util.Set;
55 import java.lang.JThread; 55 import java.lang.Thread;
56 import tango.core.sync.Mutex; 56 import tango.core.sync.Mutex;
57 import tango.core.sync.Condition; 57 import tango.core.sync.Condition;
58 58
59 import org.eclipse.swt.SWT; 59 import org.eclipse.swt.SWT;
60 import org.eclipse.swt.SWTError; 60 import org.eclipse.swt.SWTError;
285 // SWT intf impl 285 // SWT intf impl
286 public void keyReleased(KeyEvent e) { 286 public void keyReleased(KeyEvent e) {
287 super.keyReleased(e); 287 super.keyReleased(e);
288 } 288 }
289 289
290 private JThread fThread; 290 private Thread fThread;
291 private bool fIsReset= false; 291 private bool fIsReset= false;
292 private Mutex fMutex; 292 private Mutex fMutex;
293 private Condition fMutex_cond; 293 private Condition fMutex_cond;
294 private int fShowStyle; 294 private int fShowStyle;
295 295
301 fMutex_cond = new Condition(fMutex); 301 fMutex_cond = new Condition(fMutex);
302 } 302 }
303 303
304 protected void start(int showStyle) { 304 protected void start(int showStyle) {
305 fShowStyle= showStyle; 305 fShowStyle= showStyle;
306 fThread= new JThread(this); 306 fThread= new Thread(this);
307 fThread.setName( JFaceTextMessages.getString("ContentAssistant.assist_delay_timer_name")); //$NON-NLS-1$ 307 fThread.setName( JFaceTextMessages.getString("ContentAssistant.assist_delay_timer_name")); //$NON-NLS-1$
308 fThread.start(); 308 fThread.start();
309 } 309 }
310 310
311 public override void run() { 311 public override void run() {
334 fMutex_cond.notifyAll(); 334 fMutex_cond.notifyAll();
335 } 335 }
336 } 336 }
337 337
338 protected void stop() { 338 protected void stop() {
339 JThread threadToStop= fThread; 339 Thread threadToStop= fThread;
340 if (threadToStop !is null && threadToStop.isAlive()) 340 if (threadToStop !is null && threadToStop.isAlive())
341 threadToStop.interrupt(); 341 threadToStop.interrupt();
342 } 342 }
343 343
344 private bool contains(char[] characters, char character) { 344 private bool contains(char[] characters, char character) {