Mercurial > projects > dwt2
comparison org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/AdditionalInfoController2.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 |
---|---|
24 import org.eclipse.jface.internal.text.link.contentassist.IContentAssistListener2; // packageimport | 24 import org.eclipse.jface.internal.text.link.contentassist.IContentAssistListener2; // packageimport |
25 import org.eclipse.jface.internal.text.link.contentassist.ContentAssistant2; // packageimport | 25 import org.eclipse.jface.internal.text.link.contentassist.ContentAssistant2; // packageimport |
26 | 26 |
27 import java.lang.all; | 27 import java.lang.all; |
28 import java.util.Set; | 28 import java.util.Set; |
29 import java.lang.JThread; | 29 import java.lang.Thread; |
30 import tango.core.sync.Mutex; | 30 import tango.core.sync.Mutex; |
31 import tango.core.sync.Condition; | 31 import tango.core.sync.Condition; |
32 | 32 |
33 import org.eclipse.swt.events.SelectionEvent; | 33 import org.eclipse.swt.events.SelectionEvent; |
34 import org.eclipse.swt.events.SelectionListener; | 34 import org.eclipse.swt.events.SelectionListener; |
73 | 73 |
74 | 74 |
75 /** The proposal table */ | 75 /** The proposal table */ |
76 private Table fProposalTable; | 76 private Table fProposalTable; |
77 /** The thread controlling the delayed display of the additional info */ | 77 /** The thread controlling the delayed display of the additional info */ |
78 private JThread fThread; | 78 private Thread fThread; |
79 /** Indicates whether the display delay has been reset */ | 79 /** Indicates whether the display delay has been reset */ |
80 private bool fIsReset= false; | 80 private bool fIsReset= false; |
81 /** Object to synchronize display thread and table selection changes */ | 81 /** Object to synchronize display thread and table selection changes */ |
82 private const Mutex fMutex; | 82 private const Mutex fMutex; |
83 private const Condition fMutex_cond; | 83 private const Condition fMutex_cond; |
125 fProposalTable= cast(Table) control; | 125 fProposalTable= cast(Table) control; |
126 fProposalTable.addSelectionListener(fSelectionListener); | 126 fProposalTable.addSelectionListener(fSelectionListener); |
127 synchronized (fThreadAccess) { | 127 synchronized (fThreadAccess) { |
128 if (fThread !is null) | 128 if (fThread !is null) |
129 fThread.interrupt(); | 129 fThread.interrupt(); |
130 fThread= new JThread(this, ContentAssistMessages.getString("InfoPopup.info_delay_timer_name")); //$NON-NLS-1$ | 130 fThread= new Thread(this, ContentAssistMessages.getString("InfoPopup.info_delay_timer_name")); //$NON-NLS-1$ |
131 | 131 |
132 fStartSignal= new Mutex(); | 132 fStartSignal= new Mutex(); |
133 fStartSignal_cond= new Condition(fStartSignal); | 133 fStartSignal_cond= new Condition(fStartSignal); |
134 synchronized (fStartSignal) { | 134 synchronized (fStartSignal) { |
135 fThread.start(); | 135 fThread.start(); |
204 } catch (InterruptedException e) { | 204 } catch (InterruptedException e) { |
205 } | 205 } |
206 | 206 |
207 synchronized (fThreadAccess) { | 207 synchronized (fThreadAccess) { |
208 // only null fThread if it is us! | 208 // only null fThread if it is us! |
209 if (JThread.currentThread() is fThread) | 209 if (Thread.currentThread() is fThread) |
210 fThread= null; | 210 fThread= null; |
211 } | 211 } |
212 } | 212 } |
213 | 213 |
214 /** | 214 /** |