Mercurial > projects > dwt2
comparison org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobMessages.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children | 735224fcc45f |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
1 /********************************************************************** | |
2 * Copyright (c) 2005, 2006 IBM Corporation and others. All rights reserved. This | |
3 * program and the accompanying materials are made available under the terms of | |
4 * the Eclipse Public License v1.0 which accompanies this distribution, and is | |
5 * available at http://www.eclipse.org/legal/epl-v10.html | |
6 * | |
7 * Contributors: | |
8 * IBM - Initial API and implementation | |
9 * Port to the D programming language: | |
10 * Frank Benoit <benoit@tionex.de> | |
11 **********************************************************************/ | |
12 module org.eclipse.core.internal.jobs.JobMessages; | |
13 | |
14 import java.lang.JThread; | |
15 import tango.io.Stdout; | |
16 import tango.time.WallClock; | |
17 import tango.text.convert.TimeStamp; | |
18 | |
19 import java.lang.all; | |
20 | |
21 import org.osgi.util.NLS; | |
22 | |
23 /** | |
24 * Job plugin message catalog | |
25 */ | |
26 public class JobMessages : NLS { | |
27 private static const String BUNDLE_NAME = "org.eclipse.core.internal.jobs.messages"; //$NON-NLS-1$ | |
28 | |
29 // Job Manager and Locks | |
30 public static String jobs_blocked0 = "The user operation is waiting for background work to complete."; | |
31 public static String jobs_blocked1 = "The user operation is waiting for \"{0}\" to complete."; | |
32 public static String jobs_internalError = "An internal error occured during: \"{0}\"."; | |
33 public static String jobs_waitFamSub = "{0} work item(s) left."; | |
34 | |
35 // metadata | |
36 public static String meta_pluginProblems = "Problems occured when invoking code from plug-in: \"{0}\"."; | |
37 | |
38 // static this() { | |
39 // // load message values from bundle file | |
40 // reloadMessages(); | |
41 // } | |
42 | |
43 public static void reloadMessages() { | |
44 implMissing(__FILE__,__LINE__); | |
45 // NLS.initializeMessages(BUNDLE_NAME, import(BUNDLE_NAME~".properties")); | |
46 } | |
47 | |
48 /** | |
49 * Print a debug message to the console. | |
50 * Pre-pend the message with the current date and the name of the current thread. | |
51 */ | |
52 public static void message(String message) { | |
53 StringBuffer buffer = new StringBuffer(); | |
54 char[30] buf; | |
55 buffer.append(tango.text.convert.TimeStamp.format( buf, WallClock.now())); | |
56 buffer.append(" - ["); //$NON-NLS-1$ | |
57 buffer.append(JThread.currentThread().getName()); | |
58 buffer.append("] "); //$NON-NLS-1$ | |
59 buffer.append(message); | |
60 Stdout.formatln(buffer.toString()); | |
61 } | |
62 } |