Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Bégaudeau2016-04-22 13:08:05 +0000
committerStephane Begaudeau2016-04-28 12:30:17 +0000
commita51da2b6af0ef47a166ca6cb0e8b62d77e79952c (patch)
tree6dbc3c27ede3d825772a716488dbab6cdaacfddb
parent5cc422ed397c3e651d9c49cbe16e034d16e8df1a (diff)
downloadorg.eclipse.eef-a51da2b6af0ef47a166ca6cb0e8b62d77e79952c.tar.gz
org.eclipse.eef-a51da2b6af0ef47a166ca6cb0e8b62d77e79952c.tar.xz
org.eclipse.eef-a51da2b6af0ef47a166ca6cb0e8b62d77e79952c.zip
Add a missing log and remove a useless TODO
Change-Id: I62d5894a18f2ac84304b88bf3a1be728ba191f13 Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
-rw-r--r--plugins/org.eclipse.eef.core/plugin.properties1
-rw-r--r--plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/AbstractEEFCustomWidgetController.java9
-rw-r--r--plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/Messages.java3
-rw-r--r--plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/EEFTab.java3
4 files changed, 13 insertions, 3 deletions
diff --git a/plugins/org.eclipse.eef.core/plugin.properties b/plugins/org.eclipse.eef.core/plugin.properties
index c5559c8d0..e8c4d7b9c 100644
--- a/plugins/org.eclipse.eef.core/plugin.properties
+++ b/plugins/org.eclipse.eef.core/plugin.properties
@@ -10,3 +10,4 @@ providerName = Eclipse Modeling Project
AbstractEEFWidgetController_InvalidValueForExpression=The expression ''{0}'' should return a value with the type {1}, it has returned instead {2}
+AbstractEEFWidgetController_NoCustomExpressionFoundForID=No custom expression found for the identifier ''{0}''. \ No newline at end of file
diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/AbstractEEFCustomWidgetController.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/AbstractEEFCustomWidgetController.java
index 9b369d8d7..d9005c43c 100644
--- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/AbstractEEFCustomWidgetController.java
+++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/AbstractEEFCustomWidgetController.java
@@ -10,10 +10,14 @@
*******************************************************************************/
package org.eclipse.eef.core.api.controllers;
+import java.text.MessageFormat;
+
import org.eclipse.eef.EEFCustomExpression;
import org.eclipse.eef.EEFCustomWidgetDescription;
import org.eclipse.eef.EefPackage;
import org.eclipse.eef.core.api.EditingContextAdapter;
+import org.eclipse.eef.core.internal.EEFCorePlugin;
+import org.eclipse.eef.core.internal.Messages;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.sirius.common.interpreter.api.IInterpreter;
import org.eclipse.sirius.common.interpreter.api.IVariableManager;
@@ -77,7 +81,10 @@ public abstract class AbstractEEFCustomWidgetController extends AbstractEEFWidge
}
}
}
- // TODO log error
+
+ String message = MessageFormat.format(Messages.AbstractEEFWidgetController_NoCustomExpressionFoundForID, customExpressionId);
+ EEFCorePlugin.getPlugin().error(message);
+
return null;
}
diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/Messages.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/Messages.java
index 756f512f4..2cfd90d05 100644
--- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/Messages.java
+++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/Messages.java
@@ -28,6 +28,9 @@ public final class Messages {
@TranslatableMessage
public static String AbstractEEFWidgetController_InvalidValueForExpression;
+ @TranslatableMessage
+ public static String AbstractEEFWidgetController_NoCustomExpressionFoundForID;
+
// CHECKSTYLE:ON
/**
diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/EEFTab.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/EEFTab.java
index 8b53e6650..9dec6c4e4 100644
--- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/EEFTab.java
+++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/EEFTab.java
@@ -116,7 +116,6 @@ public class EEFTab {
InputDescriptor input = (InputDescriptor) Platform.getAdapterManager().getAdapter(object, InputDescriptor.class);
if (input != null) {
- // TODO we should create a whole context with the current selection etc for the context
this.eefPage.getView().setInput(input);
}
}
@@ -140,7 +139,7 @@ public class EEFTab {
EAttribute imageExpressionEAttribute = EefPackage.Literals.EEF_VIEW_DESCRIPTION__IMAGE_EXPRESSION;
String imageExpression = eefView.getDescription().getImageExpression();
Object object = new Eval(eefView.getInterpreter(), eefView.getVariableManager())
- .get(imageExpressionEAttribute, imageExpression, Object.class);
+ .get(imageExpressionEAttribute, imageExpression, Object.class);
if (object instanceof URL) {
Image image = EEFIdeUiPlugin.getPlugin().getImage((URL) object);
this.formContainer.getForm().setImage(image);

Back to the top