Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFLabelController.java10
-rw-r--r--plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFLabelController.java18
-rw-r--r--plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java1
-rw-r--r--plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFLabelLifecycleManager.java4
-rw-r--r--tests/org.eclipse.eef.tests/src/org/eclipse/eef/tests/internal/controllers/EEFLabelControllerTests.java2
5 files changed, 18 insertions, 17 deletions
diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFLabelController.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFLabelController.java
index 21608c3f9..06687ef2d 100644
--- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFLabelController.java
+++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFLabelController.java
@@ -18,15 +18,15 @@ package org.eclipse.eef.core.api.controllers;
*/
public interface IEEFLabelController extends IEEFWidgetController {
/**
- * Register a consumer which will be called with the new body of the label when it will change.
+ * Register a consumer which will be called with the new value of the label when it will change.
*
* @param consumer
- * The consumer of the new body of the label
+ * The consumer of the new value of the label
*/
- void onNewBody(IConsumer<String> consumer);
+ void onNewValue(IConsumer<String> consumer);
/**
- * Remove the consumer of the new body of the label.
+ * Remove the consumer of the new value of the label.
*/
- void removeNewBodyConsumer();
+ void removeNewValueConsumer();
}
diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFLabelController.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFLabelController.java
index 4b87bcb9f..c81d58b66 100644
--- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFLabelController.java
+++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFLabelController.java
@@ -32,7 +32,7 @@ public class EEFLabelController extends AbstractEEFWidgetController implements I
/**
* The consumer of the new body.
*/
- private IConsumer<String> newBodyConsumer;
+ private IConsumer<String> newValueConsumer;
/**
* The constructor.
@@ -59,8 +59,8 @@ public class EEFLabelController extends AbstractEEFWidgetController implements I
public void refresh() {
super.refresh();
- String bodyExpression = this.description.getValueExpression();
- this.newEval().logIfInvalidType(String.class).call(bodyExpression, this.newBodyConsumer);
+ String valueExpression = this.description.getValueExpression();
+ this.newEval().logIfInvalidType(String.class).call(valueExpression, this.newValueConsumer);
}
/**
@@ -76,21 +76,21 @@ public class EEFLabelController extends AbstractEEFWidgetController implements I
/**
* {@inheritDoc}
*
- * @see org.eclipse.eef.core.api.controllers.IEEFLabelController#onNewBody(org.eclipse.eef.core.api.controllers.IConsumer)
+ * @see org.eclipse.eef.core.api.controllers.IEEFLabelController#onNewValue(org.eclipse.eef.core.api.controllers.IConsumer)
*/
@Override
- public void onNewBody(IConsumer<String> consumer) {
- this.newBodyConsumer = consumer;
+ public void onNewValue(IConsumer<String> consumer) {
+ this.newValueConsumer = consumer;
}
/**
* {@inheritDoc}
*
- * @see org.eclipse.eef.core.api.controllers.IEEFLabelController#removeNewBodyConsumer()
+ * @see org.eclipse.eef.core.api.controllers.IEEFLabelController#removeNewValueConsumer()
*/
@Override
- public void removeNewBodyConsumer() {
- this.newBodyConsumer = null;
+ public void removeNewValueConsumer() {
+ this.newValueConsumer = null;
}
}
diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java
index 194cdcb3a..b821a0f48 100644
--- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java
+++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java
@@ -150,6 +150,7 @@ public abstract class AbstractEEFWidgetLifecycleManager extends AbstractEEFLifec
this.help = widgetFactory.createCLabel(composite, ""); //$NON-NLS-1$
if (!Util.isBlank(this.getWidgetDescription().getHelpExpression())) {
this.help.setImage(EEFIdeUiPlugin.getPlugin().getImageRegistry().get(Icons.HELP));
+ this.help.setLayoutData(new GridData(this.getLabelVerticalAlignment()));
this.help.setToolTipText(""); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFLabelLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFLabelLifecycleManager.java
index 16094f846..2e848e442 100644
--- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFLabelLifecycleManager.java
+++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFLabelLifecycleManager.java
@@ -96,7 +96,7 @@ public class EEFLabelLifecycleManager extends AbstractEEFWidgetLifecycleManager
public void aboutToBeShown() {
super.aboutToBeShown();
- this.controller.onNewBody(new IConsumer<String>() {
+ this.controller.onNewValue(new IConsumer<String>() {
@Override
public void apply(String value) {
if (!body.isDisposed()) {
@@ -132,7 +132,7 @@ public class EEFLabelLifecycleManager extends AbstractEEFWidgetLifecycleManager
@Override
public void aboutToBeHidden() {
super.aboutToBeHidden();
- this.controller.removeNewBodyConsumer();
+ this.controller.removeNewValueConsumer();
}
/**
diff --git a/tests/org.eclipse.eef.tests/src/org/eclipse/eef/tests/internal/controllers/EEFLabelControllerTests.java b/tests/org.eclipse.eef.tests/src/org/eclipse/eef/tests/internal/controllers/EEFLabelControllerTests.java
index ccb475451..c032da914 100644
--- a/tests/org.eclipse.eef.tests/src/org/eclipse/eef/tests/internal/controllers/EEFLabelControllerTests.java
+++ b/tests/org.eclipse.eef.tests/src/org/eclipse/eef/tests/internal/controllers/EEFLabelControllerTests.java
@@ -56,7 +56,7 @@ public class EEFLabelControllerTests extends AbstractEEFControllerTests {
public void testBody() {
AtomicBoolean atomicBoolean = new AtomicBoolean(false);
IEEFLabelController controller = this.labelController(EEFDataTests.EEFLABELCONTROLLERTESTS_BODY);
- controller.onNewBody(label -> {
+ controller.onNewValue(label -> {
assertThat(label, is("This is the documentation of the project")); //$NON-NLS-1$
atomicBoolean.set(true);
});

Back to the top