Mercurial > projects > dwt2
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobMessages.d Sat Mar 14 18:23:29 2009 +0100 @@ -0,0 +1,62 @@ +/********************************************************************** + * Copyright (c) 2005, 2006 IBM Corporation and others. All rights reserved. This + * program and the accompanying materials are made available under the terms of + * the Eclipse Public License v1.0 which accompanies this distribution, and is + * available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM - Initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> + **********************************************************************/ +module org.eclipse.core.internal.jobs.JobMessages; + +import java.lang.JThread; +import tango.io.Stdout; +import tango.time.WallClock; +import tango.text.convert.TimeStamp; + +import java.lang.all; + +import org.osgi.util.NLS; + +/** + * Job plugin message catalog + */ +public class JobMessages : NLS { + private static const String BUNDLE_NAME = "org.eclipse.core.internal.jobs.messages"; //$NON-NLS-1$ + + // Job Manager and Locks + public static String jobs_blocked0 = "The user operation is waiting for background work to complete."; + public static String jobs_blocked1 = "The user operation is waiting for \"{0}\" to complete."; + public static String jobs_internalError = "An internal error occured during: \"{0}\"."; + public static String jobs_waitFamSub = "{0} work item(s) left."; + + // metadata + public static String meta_pluginProblems = "Problems occured when invoking code from plug-in: \"{0}\"."; + +// static this() { +// // load message values from bundle file +// reloadMessages(); +// } + + public static void reloadMessages() { + implMissing(__FILE__,__LINE__); +// NLS.initializeMessages(BUNDLE_NAME, import(BUNDLE_NAME~".properties")); + } + + /** + * Print a debug message to the console. + * Pre-pend the message with the current date and the name of the current thread. + */ + public static void message(String message) { + StringBuffer buffer = new StringBuffer(); + char[30] buf; + buffer.append(tango.text.convert.TimeStamp.format( buf, WallClock.now())); + buffer.append(" - ["); //$NON-NLS-1$ + buffer.append(JThread.currentThread().getName()); + buffer.append("] "); //$NON-NLS-1$ + buffer.append(message); + Stdout.formatln(buffer.toString()); + } +}