Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.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 | 735224fcc45f |
children |
comparison
equal
deleted
inserted
replaced
18:735224fcc45f | 19:52184e4b815c |
---|---|
49 import org.eclipse.jface.resource.JFaceResources; | 49 import org.eclipse.jface.resource.JFaceResources; |
50 import org.eclipse.jface.viewers.ILabelProvider; | 50 import org.eclipse.jface.viewers.ILabelProvider; |
51 | 51 |
52 import java.lang.all; | 52 import java.lang.all; |
53 import java.util.Set; | 53 import java.util.Set; |
54 import java.lang.JThread; | 54 import java.lang.Thread; |
55 | 55 |
56 /** | 56 /** |
57 * ContentProposalAdapter can be used to attach content proposal behavior to a | 57 * ContentProposalAdapter can be used to attach content proposal behavior to a |
58 * control. This behavior includes obtaining proposals, opening a popup dialog, | 58 * control. This behavior includes obtaining proposals, opening a popup dialog, |
59 * managing the content of the control relative to the selections in the popup, | 59 * managing the content of the control relative to the selections in the popup, |
931 auto r = new class() Runnable { | 931 auto r = new class() Runnable { |
932 public void run() { | 932 public void run() { |
933 pendingDescriptionUpdate = true; | 933 pendingDescriptionUpdate = true; |
934 | 934 |
935 try { | 935 try { |
936 JThread.sleep( POPUP_DELAY ); | 936 Thread.sleep( POPUP_DELAY ); |
937 } | 937 } |
938 catch (InterruptedException e) { | 938 catch (InterruptedException e) { |
939 } | 939 } |
940 | 940 |
941 if (!isValid()) { | 941 if (!isValid()) { |
973 } | 973 } |
974 } | 974 } |
975 }); | 975 }); |
976 } | 976 } |
977 }; | 977 }; |
978 JThread t = new JThread(r); | 978 Thread t = new Thread(r); |
979 t.start(); | 979 t.start(); |
980 } | 980 } |
981 } | 981 } |
982 | 982 |
983 /* | 983 /* |
2016 if (autoActivationDelay > 0) { | 2016 if (autoActivationDelay > 0) { |
2017 auto r = new class Runnable{ | 2017 auto r = new class Runnable{ |
2018 public void run(){ | 2018 public void run(){ |
2019 receivedKeyDown = false; | 2019 receivedKeyDown = false; |
2020 try { | 2020 try { |
2021 JThread.sleep(autoActivationDelay); | 2021 Thread.sleep(autoActivationDelay); |
2022 } catch (InterruptedException e) { | 2022 } catch (InterruptedException e) { |
2023 } | 2023 } |
2024 if (!isValid() || receivedKeyDown) { | 2024 if (!isValid() || receivedKeyDown) { |
2025 return; | 2025 return; |
2026 } | 2026 } |
2029 openProposalPopup(true); | 2029 openProposalPopup(true); |
2030 } | 2030 } |
2031 }); | 2031 }); |
2032 } | 2032 } |
2033 }; | 2033 }; |
2034 JThread t = new JThread(r); | 2034 Thread t = new Thread(r); |
2035 t.start(); | 2035 t.start(); |
2036 } else { | 2036 } else { |
2037 // Since we do not sleep, we must open the popup | 2037 // Since we do not sleep, we must open the popup |
2038 // in an async exec. This is necessary because | 2038 // in an async exec. This is necessary because |
2039 // this method may be called in the middle of handling | 2039 // this method may be called in the middle of handling |