Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Yan2018-11-16 15:59:02 -0500
committerXi Yan2018-11-19 09:10:47 -0500
commite6277f941e70a83f8ef52d1084193c512b492e7b (patch)
treee3029ba6f6182a2fbff4e500aff3a0f7faf33885
parent87bf4d00c245a2eb44727a950e79624a869df902 (diff)
downloadeclipse.platform.swt-e6277f941e70a83f8ef52d1084193c512b492e7b.tar.gz
eclipse.platform.swt-e6277f941e70a83f8ef52d1084193c512b492e7b.tar.xz
eclipse.platform.swt-e6277f941e70a83f8ef52d1084193c512b492e7b.zip
Bug 540809 - Wait for shell in Snippet146
Change-Id: Ie7aaf40df7f56b6c323aa88df37a8c04feb8277e Signed-off-by: Xi Yan <xixiyan@redhat.com>
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java
index 3772b094f9..423a2db326 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java
@@ -36,6 +36,11 @@ public static void main(String[] args) {
new Thread(){
@Override
public void run(){
+ // wait for shell to be opened
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {}
+
String string = "Love the method.";
for (int i = 0; i < string.length(); i++) {
char ch = string.charAt(i);

Back to the top