diff org.eclipse.ui.forms/src/org/eclipse/ui/forms/IMessagePrefixProvider.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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.eclipse.ui.forms/src/org/eclipse/ui/forms/IMessagePrefixProvider.d	Sat Mar 14 18:23:29 2009 +0100
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
+ ******************************************************************************/
+module org.eclipse.ui.forms.IMessagePrefixProvider;
+
+import org.eclipse.swt.widgets.Control;
+
+import java.lang.all;
+
+/**
+ * This interface computes the prefix of a message that is created in the
+ * context of a control. Since messages are rolled up to the header in the
+ * message manager, it is important to create a prefix to indicate the context
+ * of a message in the form. Typically the prefix is computed by looking at the
+ * label that preceeds the control, if present. Alternative providers may
+ * include other text to further specify the location of the message.
+ *
+ * @see IMessageManager
+ * @see IMessage
+ * @since 3.3
+ */
+public interface IMessagePrefixProvider {
+    /**
+     * Returns the computed prefix for the provided control.
+     *
+     * @param control
+     *            the control to provide the prefix for
+     * @return the computed prefix
+     */
+    String getPrefix(Control control);
+}