Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Bégaudeau2016-05-25 11:22:54 +0000
committerStéphane Bégaudeau2016-05-25 11:22:54 +0000
commit1bdad88144ca76cc79fcbd751d448124803eeffe (patch)
tree83638a565c4d2f5c78413daff89380d5cec83436
parentcbe4c50a8e7ad37b811547c25834cf6f527aeb33 (diff)
downloadorg.eclipse.eef-1bdad88144ca76cc79fcbd751d448124803eeffe.tar.gz
org.eclipse.eef-1bdad88144ca76cc79fcbd751d448124803eeffe.tar.xz
org.eclipse.eef-1bdad88144ca76cc79fcbd751d448124803eeffe.zip
Fix an issue with the prefix of the validation messages
Change-Id: I503da332892e065485e4d170942d0ae2d2e1682e Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
-rw-r--r--plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/api/EEFTabbedPropertySheetPage.java2
-rw-r--r--plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/EEFMessagePrefixProvider.java33
2 files changed, 35 insertions, 0 deletions
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 2bf1789a8..d836b025d 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 java.util.concurrent.atomic.AtomicBoolean;
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 @@ public class EEFTabbedPropertySheetPage extends Page implements IPropertySheetPa
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 000000000..de9cdcf51
--- /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$
+ }
+
+}

Back to the top