Fix an issue with the prefix of the validation messages
Change-Id: I503da332892e065485e4d170942d0ae2d2e1682e
Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
diff --git a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/api/EEFTabbedPropertySheetPage.java b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/api/EEFTabbedPropertySheetPage.java
index 2bf1789..d836b02 100644
--- a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/api/EEFTabbedPropertySheetPage.java
+++ b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/api/EEFTabbedPropertySheetPage.java
@@ -21,6 +21,7 @@
import org.eclipse.eef.common.ui.api.EEFWidgetFactory;
import org.eclipse.eef.common.ui.api.IEEFFormContainer;
import org.eclipse.eef.properties.ui.internal.EEFTabbedPropertyViewPlugin;
+import org.eclipse.eef.properties.ui.internal.page.EEFMessagePrefixProvider;
import org.eclipse.eef.properties.ui.internal.page.EEFPartListenerAdapter;
import org.eclipse.eef.properties.ui.internal.page.EEFTabbedPropertyComposite;
import org.eclipse.eef.properties.ui.internal.page.EEFTabbedPropertyViewer;
@@ -223,6 +224,7 @@
this.form.setText(""); //$NON-NLS-1$
this.widgetFactory.decorateFormHeading(form);
+ this.form.getMessageManager().setMessagePrefixProvider(new EEFMessagePrefixProvider());
this.form.getMessageManager().setDecorationPosition(SWT.LEFT | SWT.TOP);
this.form.getMessageManager().setAutoUpdate(false);
diff --git a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/EEFMessagePrefixProvider.java b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/EEFMessagePrefixProvider.java
new file mode 100644
index 0000000..de9cdcf
--- /dev/null
+++ b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/EEFMessagePrefixProvider.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.eef.properties.ui.internal.page;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.IMessagePrefixProvider;
+
+/**
+ * This {@link IMessagePrefixProvider} will return an empty string as the prefix.
+ *
+ * @author sbegaudeau
+ */
+public class EEFMessagePrefixProvider implements IMessagePrefixProvider {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.forms.IMessagePrefixProvider#getPrefix(org.eclipse.swt.widgets.Control)
+ */
+ @Override
+ public String getPrefix(Control control) {
+ return ""; //$NON-NLS-1$
+ }
+
+}