annotate org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.d @ 120:536e43f63c81

Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661 ===D2=== * added [Try]Immutable/Const/Shared templates to work with differenses in D1/D2 instead of version statements used these templates to work with strict type storage rules of dmd-2.053 * com.ibm.icu now also compilable with D2, but not tested yet * small fixes Snippet288 - shared data is in TLS ===Phobos=== * fixed critical bugs in Phobos implemention completely incorrect segfault prone fromStringz (Linux's port ruthless killer) terrible, incorrect StringBuffer realization (StyledText killer) * fixed small bugs as well Snippet72 - misprint in the snippet * implemented missed functionality for Phobos ByteArrayOutputStream implemented (image loading available) formatting correctly works for all DWT's cases As a result, folowing snippets now works with Phobos (Snippet### - what is fixed): Snippet24, 42, 111, 115, 130, 235, 276 - bad string formatting Snippet48, 282 - crash on image loading Snippet163, 189, 211, 213, 217, 218, 222 - crash on copy/cut in StyledText Snippet244 - hang-up ===Tango=== * few changes for the latest Tango trunc-r5661 * few small performance improvments ===General=== * implMissing-s for only one version changed to implMissingInTango/InPhobos * incorrect calls to Format in toString-s fixed * fixed loading \uXXXX characters in ResourceBundle * added good UTF-8 support for StyledText, TextLayout (Win32) and friends UTF functions revised and tested. It is now in java.nonstandard.*Utf modules StyledText and TextLayout (Win32) modules revised for UTF-8 support * removed small diferences in most identical files in *.swt.* folders *.swt.internal.image, *.swt.events and *.swt.custom are identical in Win32/Linux32 now 179 of 576 (~31%) files in *.swt.* folders are fully identical * Win32: snippets now have right subsystem, pretty icons and native system style controls * small fixes in snippets Snippet44 - it's not Snippet44 Snippet212 - functions work with different images and offsets arrays Win32: Snippet282 - crash on close if the button has an image Snippet293 - setGrayed is commented and others Win32: As a result, folowing snippets now works Snippet68 - color doesn't change Snippet163, 189, 211, 213, 217, 218, 222 - UTF-8 issues (see above) Snippet193 - no tabel headers
author Denis Shelomovskij <verylonglogin.reg@gmail.com>
date Sat, 09 Jul 2011 15:50:20 +0300
parents ed96ea2a2764
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
1 /*******************************************************************************
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
3 * All rights reserved. This program and the accompanying materials
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
4 * are made available under the terms of the Eclipse Public License v1.0
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
5 * which accompanies this distribution, and is available at
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
6 * http://www.eclipse.org/legal/epl-v10.html
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
7 *
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
8 * Contributors:
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
9 * IBM Corporation - initial API and implementation
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
10 * D Port:
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
11 * Thomas Demmer <t_demmer AT web DOT de>
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
12 *******************************************************************************/
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
13 module org.eclipse.swt.snippets.Snippet130;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
14 /*
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
15 * BusyIndicator example snippet: display busy cursor during long running task
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
16 *
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
17 * For a list of all SWT example snippets see
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
18 * http://www.eclipse.org/swt/snippets/
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
19 */
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
20 import org.eclipse.swt.SWT;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
21 import org.eclipse.swt.events.SelectionAdapter;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
22 import org.eclipse.swt.events.SelectionEvent;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
23 import org.eclipse.swt.layout.GridLayout;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
24 import org.eclipse.swt.layout.GridData;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
25 import org.eclipse.swt.widgets.Shell;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
26 import org.eclipse.swt.widgets.Button;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
27 import org.eclipse.swt.widgets.Display;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
28 import org.eclipse.swt.widgets.Shell;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
29 import org.eclipse.swt.widgets.Text;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
30
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
31
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
32 import org.eclipse.swt.custom.BusyIndicator;
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
33
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
34 import java.lang.all;
44
ed96ea2a2764 First swt win snippets are buiding with d2+phobos
Frank Benoit <benoit@tionex.de>
parents: 29
diff changeset
35 import java.lang.Thread;
28
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
36
120
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
37 void main() {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
38 Display display = new Display();
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
39 Shell shell = new Shell(display);
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
40 shell.setLayout(new GridLayout());
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
41 Text text = new Text(shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
42 text.setLayoutData(new GridData(GridData.FILL_BOTH));
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
43 int[] nextId = new int[1];
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
44 Button b = new Button(shell, SWT.PUSH);
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
45 b.setText("invoke long running job");
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
46
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
47 b.addSelectionListener(new class SelectionAdapter {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
48 public void widgetSelected(SelectionEvent e) {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
49 Runnable longJob = new class Runnable {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
50 bool done = false;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
51 int id;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
52 public void run() {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
53 Thread thread = new Thread({
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
54 id = nextId[0]++;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
55 display.syncExec(new class Runnable {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
56 public void run() {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
57 if (text.isDisposed()) return;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
58 text.append(Format("\nStart long running task {}", id));
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
59 }
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
60 }); // display.syncExec
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
61 /*
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
62 * This crashes when more than 1 thread gets created. THD
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
63 for (int i = 0; i < 100000; i++) {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
64 if (display.isDisposed()) return;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
65 getDwtLogger().info(__FILE__, __LINE__, "do task that takes a long time in a separate thread {}", id);
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
66 }
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
67 */
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
68 // This runs fine
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
69 for (int i = 0; i < 6; i++) {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
70 if (display.isDisposed()) return;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
71 getDwtLogger().info( __FILE__, __LINE__, "do task that takes a long time in a separate thread {} {}/6", id, i);
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
72 Thread.sleep(500);
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
73 }
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
74
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
75 if (display.isDisposed()) return;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
76 display.syncExec(new class Runnable {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
77 public void run() {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
78 if (text.isDisposed()) return;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
79 text.append(Format("\nCompleted long running task {}", id));
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
80 }
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
81 }); // display.syncExec
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
82 done = true;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
83 display.wake();
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
84 }); // thread = ...
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
85 thread.start();
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
86
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
87 while (!done && !shell.isDisposed()) {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
88 if (!display.readAndDispatch())
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
89 display.sleep();
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
90 }
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
91 }
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
92 }; // Runnable longJob = ...
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
93 BusyIndicator.showWhile(display, longJob);
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
94 } // widgetSelected();
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
95 }); // addSelectionListener
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
96
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
97
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
98 shell.setSize(250, 150);
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
99 shell.open();
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
100 while (!shell.isDisposed()) {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
101 if (!display.readAndDispatch())
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
102 display.sleep();
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
103 }
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
104 display.dispose();
28
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
105 }
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
106
120
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
107 void printStart(Text text, int id ) {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
108 if (text.isDisposed()) return;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
109 getDwtLogger().info( __FILE__, __LINE__, "Start long running task {}", id );
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
110 text.append(Format("\nStart long running task {}", id));
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
111 }
28
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
112
120
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
113 void printEnd(Text text, int id ) {
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
114 if (text.isDisposed()) return;
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
115 getDwtLogger().info( __FILE__, __LINE__, "Completed long running task {}", id );
536e43f63c81 Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents: 44
diff changeset
116 text.append(Format("\nCompleted long running task {}", id));
28
69b1fa94a4a8 Added SWT snippets
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
117 }