summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorsten Sommer2013-07-13 16:21:39 -0400
committerTorsten Sommer2013-07-13 16:21:39 -0400
commit6d57663f8f2c9a606dc02ea416dbe94d18b96423 (patch)
tree7097c3812b147432700eb6312954e1e415a82183
parentb83a7a5e1be72aa08479ad80ec2e3dea9b1a60fa (diff)
downloadorg.eclipse.efxclipse-6d57663f8f2c9a606dc02ea416dbe94d18b96423.tar.gz
org.eclipse.efxclipse-6d57663f8f2c9a606dc02ea416dbe94d18b96423.tar.xz
org.eclipse.efxclipse-6d57663f8f2c9a606dc02ea416dbe94d18b96423.zip
JideFX controls and decorations added.
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/META-INF/MANIFEST.MF6
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/ControlDecoration.java74
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/DateControl.java38
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/EDataTypeTextField.java77
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/NumberFieldAddControl.java109
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/TextFieldAddControl.java52
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/DefaultModelElementForm.java96
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/ModelElementForm.java3
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/ValidationDecoration.java115
-rwxr-xr-xbundles/runtime/org.eclipse.fx.javafx/META-INF/MANIFEST.MF1
-rw-r--r--bundles/runtime/org.eclipse.fx.javafx/src/com/sun/javafx/scene/control/skin/resources/dummy.java5
-rwxr-xr-xbundles/runtime/org.eclipse.fx.javafx/src/com/sun/javafx/scene/control/skin/resources/dummy.txt0
-rw-r--r--demos/org.eclipse.fx.ecp.app.product/org.eclipse.fx.ecp.app.product.product.launch2
-rw-r--r--demos/org.eclipse.fx.ecp.app/META-INF/MANIFEST.MF1
-rw-r--r--demos/org.eclipse.fx.ecp.app/src/org/eclipse/fx/ecp/ModelEditorPart2.java8
15 files changed, 490 insertions, 97 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/META-INF/MANIFEST.MF b/bundles/runtime/org.eclipse.fx.ecp.ui/META-INF/MANIFEST.MF
index 70f074b46..6e5fb9b2c 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.ui/META-INF/MANIFEST.MF
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/META-INF/MANIFEST.MF
@@ -12,7 +12,10 @@ Require-Bundle: org.eclipse.core.runtime,
com.google.guava;bundle-version="10.0.1",
org.eclipse.fx.emf.edit.ui;bundle-version="0.8.1",
org.eclipse.e4.ui.workbench;bundle-version="0.0.0",
- org.eclipse.fx.emf.databinding;bundle-version="0.8.1"
+ org.eclipse.fx.emf.databinding;bundle-version="0.8.1",
+ jidefx-common;bundle-version="0.9.1",
+ jidefx-decoration;bundle-version="0.9.1",
+ jidefx-fields;bundle-version="0.9.1"
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.fx.ecp.ui,
org.eclipse.fx.ecp.ui.controls,
@@ -52,3 +55,4 @@ Import-Package: com.sun.javafx.scene.control.behavior;version="2.2.0",
javafx.util;version="2.2.0",
javafx.util.converter;version="2.2.0",
javax.inject;version="1.0.0"
+Bundle-ClassPath: .
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/ControlDecoration.java b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/ControlDecoration.java
index 2ad886e7f..72a75d1a0 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/ControlDecoration.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/ControlDecoration.java
@@ -1,22 +1,32 @@
package org.eclipse.fx.ecp.ui.controls;
import javafx.event.EventHandler;
+import javafx.geometry.Insets;
+import javafx.geometry.Pos;
+import javafx.geometry.Side;
import javafx.scene.control.Label;
-import javafx.scene.control.Tooltip;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
+import javafx.scene.text.Text;
+import jidefx.scene.control.popup.BalloonPopupOutline;
+import jidefx.scene.control.popup.ShapedPopup;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.fx.ecp.ui.ECPUtil;
+
+import com.fxexperience.javafx.animation.BounceInTransition;
+import com.fxexperience.javafx.animation.BounceOutTransition;
+import com.google.common.base.Objects;
public class ControlDecoration extends AnchorPane {
- private Label label;
- private Tooltip tooltip;
- private final EStructuralFeature feature;
- private final ECPControlBase control;
+ protected Label label;
+ protected final EStructuralFeature feature;
+ protected final ECPControlBase control;
+ protected final ShapedPopup shapedPopup;
+ protected Diagnostic diagnostic;
+ protected Text popupText;
public ControlDecoration(EStructuralFeature feature, ECPControlBase control) {
this.feature = feature;
@@ -24,6 +34,16 @@ public class ControlDecoration extends AnchorPane {
getChildren().add(control);
+ shapedPopup = new ShapedPopup();
+ shapedPopup.setAutoHide(false);
+ shapedPopup.setInsets(new Insets(20));
+ BalloonPopupOutline popupOutline = new BalloonPopupOutline();
+ popupOutline.setArrowSide(Side.TOP);
+ shapedPopup.setPopupOutline(popupOutline);
+ popupText = new Text();
+ popupText.setWrappingWidth(300);
+ shapedPopup.setPopupContent(popupText);
+
ImageView imageView = new ImageView(getClass().getResource("asterisk.png").toExternalForm());
label = new Label();
label.setGraphic(imageView);
@@ -31,51 +51,65 @@ public class ControlDecoration extends AnchorPane {
getChildren().add(label);
AnchorPane.setTopAnchor(label, -1.0);
AnchorPane.setLeftAnchor(label, -14.0);
- label.setVisible(false);
-
- tooltip = new Tooltip();
-
+ label.setOpacity(0);
label.setOnMouseEntered(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent arg0) {
- ECPUtil.showContextMenu(tooltip, label);
+ if (diagnostic != null)
+ shapedPopup.showPopup(label, Pos.BOTTOM_CENTER, 0, 5);
}
});
-
+
label.setOnMouseExited(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent arg0) {
- tooltip.hide();
+ if (diagnostic != null)
+ shapedPopup.hide();
}
});
}
public void handleValidation(Diagnostic diagnostic) {
- boolean showLabel = false;
+
+ Diagnostic newDiagnostic = null;
if (diagnostic != null) {
for (Diagnostic childDiagnostic : diagnostic.getChildren()) {
Object feature = childDiagnostic.getData().get(1);
if (feature == this.feature) {
- tooltip.setText(childDiagnostic.getMessage());
- showLabel = true;
+ newDiagnostic = childDiagnostic;
+ break;
}
}
}
- label.setVisible(showLabel);
- }
+ if (newDiagnostic != null && (this.diagnostic == null || !equals(newDiagnostic, this.diagnostic)))
+ popupText.setText(newDiagnostic.getMessage());
- public void resetValidation() {
- label.setVisible(false);
+ if (newDiagnostic != null && !equals(this.diagnostic, newDiagnostic)) {
+ BounceInTransition bounceInTransition = new BounceInTransition(label);
+ bounceInTransition.play();
+ } else if (newDiagnostic == null && label.getOpacity() == 1.0) {
+ BounceOutTransition bounceOutTransition = new BounceOutTransition(label);
+ bounceOutTransition.play();
+ }
+
+ this.diagnostic = newDiagnostic;
}
public void dispose() {
control.dispose();
}
+
+ protected static boolean equals(Diagnostic d1, Diagnostic d2) {
+ if(d1 != null && d2 != null)
+ return Objects.equal(d1.getMessage(), d2.getMessage());
+ else
+ return false;
+ }
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/DateControl.java b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/DateControl.java
index 935c77ddc..f74372d0c 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/DateControl.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/DateControl.java
@@ -1,14 +1,13 @@
package org.eclipse.fx.ecp.ui.controls;
-import java.time.LocalDate;
import java.util.Date;
import java.util.Objects;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
-import javafx.scene.control.DatePicker;
import javafx.scene.control.SkinBase;
import javafx.scene.layout.HBox;
+import jidefx.scene.control.field.DateField;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.ecp.edit.ECPControlContext;
@@ -18,23 +17,21 @@ import org.eclipse.fx.ecp.ui.ECPControl;
public class DateControl extends ECPControlBase {
- private DatePicker datePicker;
+ protected DateField dateField;
+ protected boolean internalUpdate = false;
public DateControl(IItemPropertyDescriptor propertyDescriptor, ECPControlContext context) {
super(propertyDescriptor, context);
setSkin(new Skin(this));
- datePicker.valueProperty().addListener(new ChangeListener<LocalDate>() {
+ dateField.valueProperty().addListener(new ChangeListener<Date>() {
@Override
- public void changed(ObservableValue<? extends LocalDate> observableValue, LocalDate oldDate, LocalDate newDate) {
- // only commit if the value has changed
- if (!Objects.equals(oldDate, newDate)) {
-
- @SuppressWarnings("deprecation")
- Date date = new Date(newDate.getYear() - 1900, newDate.getMonthValue(), newDate.getDayOfMonth());
- Command command = SetCommand.create(editingDomain, modelElement, feature, date);
+ public void changed(ObservableValue<? extends Date> observableValue, Date oldDate, Date newDate) {
+ // only commit if the value has changed and it's not an internal update
+ if (!Objects.equals(oldDate, newDate) && !internalUpdate) {
+ Command command = SetCommand.create(editingDomain, modelElement, feature, newDate);
if (command.canExecute())
editingDomain.getCommandStack().execute(command);
}
@@ -52,24 +49,23 @@ public class DateControl extends ECPControlBase {
if (newDate == null)
newDate = new Date();
- @SuppressWarnings("deprecation")
- LocalDate newLocalDate = LocalDate.of(newDate.getYear() + 1900, newDate.getMonth(), newDate.getDate());
-
// set the date only if the value has changed
- if (!Objects.equals(newLocalDate, datePicker.getValue()))
- datePicker.valueProperty().set(newLocalDate);
+ if (!Objects.equals(newDate, dateField.getValue())) {
+ internalUpdate = true;
+ dateField.setValue(newDate);
+ internalUpdate = false;
+ }
}
- private final class Skin extends SkinBase<DateControl> {
+ protected class Skin extends SkinBase<DateControl> {
private Skin(DateControl control) {
super(control);
-
HBox hBox = new HBox();
getChildren().add(hBox);
-
- datePicker = new DatePicker();
- hBox.getChildren().add(datePicker);
+ dateField = DateField.createDateField();
+ dateField.setPopupButtonVisible(true);
+ hBox.getChildren().add(dateField);
}
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/EDataTypeTextField.java b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/EDataTypeTextField.java
new file mode 100644
index 000000000..fa76bae5c
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/EDataTypeTextField.java
@@ -0,0 +1,77 @@
+package org.eclipse.fx.ecp.ui.controls.multi;
+
+import java.math.BigInteger;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javafx.scene.control.IndexRange;
+import javafx.scene.control.TextField;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+public class EDataTypeTextField extends TextField {
+
+ final static Set<Class<?>> INTEGRAL_TYPES = new HashSet<>();
+
+ static {
+ Collections.addAll(INTEGRAL_TYPES, Integer.class, int.class, Short.class, short.class, Long.class, long.class, BigInteger.class);
+ }
+
+ final EDataType dataType;
+ final String regex;
+
+ public EDataTypeTextField(EDataType dataType) {
+ this.dataType = dataType;
+ Class<?> instanceClass = dataType.getInstanceClass();
+
+ if (instanceClass == String.class || instanceClass == Boolean.class || instanceClass == boolean.class) {
+ regex = ".*";
+ } else if (instanceClass == Character.class || instanceClass == char.class) {
+ regex = "^.?$";
+ } else if (INTEGRAL_TYPES.contains(instanceClass)) {
+ regex = "^\\-?[0-9]*$";
+ } else {
+ regex = "^\\-?[0-9]+\\.?[0-9]*$";
+ }
+ }
+
+ @Override
+ public void replaceText(int start, int end, String text) {
+ String currentText = getText();
+ StringBuffer sb = new StringBuffer(currentText != null ? currentText : "");
+ sb.replace(start, end, text);
+ String tmp = sb.toString();
+
+ if (validate(tmp))
+ super.replaceText(start, end, text);
+ }
+
+ @Override
+ public void replaceSelection(String text) {
+ IndexRange selection = getSelection();
+ int start = selection.getStart();
+ int end = selection.getEnd();
+ StringBuffer sb = new StringBuffer(getText());
+ sb.replace(start, end, text);
+ String tmp = sb.toString();
+
+ if (validate(tmp))
+ super.replaceSelection(text);
+ }
+
+ private boolean validate(String tmp) {
+ return tmp.matches(regex);
+ }
+
+ public Object getValue() {
+ return EcoreUtil.createFromString(dataType, getText());
+ }
+
+ public void setValue(Object value) {
+ String result = EcoreUtil.convertToString(dataType, value);
+ setText(result == null ? "" : result);
+ }
+
+} \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/NumberFieldAddControl.java b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/NumberFieldAddControl.java
new file mode 100644
index 000000000..25f67434e
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/NumberFieldAddControl.java
@@ -0,0 +1,109 @@
+package org.eclipse.fx.ecp.ui.controls.multi;
+
+import javafx.collections.ObservableList;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.scene.control.Button;
+import javafx.scene.control.SkinBase;
+import javafx.scene.control.TextField;
+import javafx.scene.input.KeyCode;
+import javafx.scene.input.KeyEvent;
+import javafx.scene.layout.HBox;
+import javafx.scene.layout.Priority;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecp.edit.ECPControlContext;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.fx.ecp.ui.ECPUtil;
+import org.eclipse.fx.ecp.ui.controls.ECPControlBase;
+
+public class NumberFieldAddControl extends ECPControlBase {
+
+ protected TextField addTextField;
+ protected Button addButton;
+ protected Command addCommand;
+ protected EDataTypeValueHandler valueHandler = new EDataTypeValueHandler((EDataType) feature.getEType());
+
+ public NumberFieldAddControl(IItemPropertyDescriptor propertyDescriptor, ECPControlContext context) {
+ super(propertyDescriptor, context);
+
+ setSkin(new Skin(this));
+
+ update();
+ }
+
+ protected void doAdd() {
+ if (addCommand != null && addCommand.canExecute()) {
+ editingDomain.getCommandStack().execute(addCommand);
+ addTextField.selectAll();
+ addTextField.requestFocus();
+ }
+ }
+
+ @Override
+ protected void update() {
+ String text = addTextField.textProperty().getValue();
+ String message = valueHandler.isValid(text);
+
+ ObservableList<String> styleClass = addTextField.getStyleClass();
+
+ if (message == null) {
+ Object value = valueHandler.toValue(text);
+ addCommand = AddCommand.create(editingDomain, modelElement, feature, value);
+ styleClass.remove("error");
+ } else {
+ addCommand = null;
+ if (!styleClass.contains("error"))
+ styleClass.add("error");
+ }
+
+ addButton.setDisable(addCommand == null || !addCommand.canExecute());
+ }
+
+ protected class Skin extends SkinBase<NumberFieldAddControl> {
+
+ protected Skin(NumberFieldAddControl control) {
+ super(control);
+
+ HBox hBox = new HBox();
+ getChildren().add(hBox);
+
+ addTextField = new TextField() {
+
+ };
+
+ hBox.getChildren().add(addTextField);
+ addTextField.setText(feature.getDefaultValueLiteral());
+ addTextField.getStyleClass().add("left-pill");
+ HBox.setHgrow(addTextField, Priority.ALWAYS);
+
+ addButton = new Button();
+ hBox.getChildren().add(addButton);
+ addButton.setMaxHeight(Double.MAX_VALUE);
+ addButton.getStyleClass().addAll("right-pill", "text-field-add-button");
+ ECPUtil.addMark(addButton, "plus");
+
+ addButton.setOnAction(new EventHandler<ActionEvent>() {
+
+ @Override
+ public void handle(ActionEvent arg0) {
+ doAdd();
+ }
+
+ });
+
+ addTextField.setOnKeyPressed(new EventHandler<KeyEvent>() {
+ public void handle(final KeyEvent keyEvent) {
+ if (keyEvent.getCode() == KeyCode.ENTER) {
+ doAdd();
+ keyEvent.consume();
+ }
+ }
+ });
+ }
+
+ }
+
+}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/TextFieldAddControl.java b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/TextFieldAddControl.java
index 26c770b10..7549e4fb9 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/TextFieldAddControl.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/controls/multi/TextFieldAddControl.java
@@ -7,7 +7,6 @@ import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.scene.control.SkinBase;
-import javafx.scene.control.TextField;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.HBox;
@@ -19,12 +18,13 @@ import org.eclipse.emf.ecp.edit.ECPControlContext;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.fx.ecp.ui.ECPUtil;
+import org.eclipse.fx.ecp.ui.controls.AutoSelector;
import org.eclipse.fx.ecp.ui.controls.ECPControlBase;
public class TextFieldAddControl extends ECPControlBase {
- protected TextField addTextField;
- protected Button addButton;
+ protected EDataTypeTextField textField;
+ protected Button button;
protected Command addCommand;
protected EDataTypeValueHandler valueHandler = new EDataTypeValueHandler((EDataType) feature.getEType());
@@ -39,17 +39,17 @@ public class TextFieldAddControl extends ECPControlBase {
protected void doAdd() {
if (addCommand != null && addCommand.canExecute()) {
editingDomain.getCommandStack().execute(addCommand);
- addTextField.selectAll();
- addTextField.requestFocus();
+ textField.selectAll();
+ textField.requestFocus();
}
}
@Override
protected void update() {
- String text = addTextField.textProperty().getValue();
+ String text = textField.textProperty().getValue();
String message = valueHandler.isValid(text);
- ObservableList<String> styleClass = addTextField.getStyleClass();
+ ObservableList<String> styleClass = textField.getStyleClass();
if (message == null) {
Object value = valueHandler.toValue(text);
@@ -61,7 +61,7 @@ public class TextFieldAddControl extends ECPControlBase {
styleClass.add("error");
}
- addButton.setDisable(addCommand == null || !addCommand.canExecute());
+ button.setDisable(addCommand == null || !addCommand.canExecute());
}
protected class Skin extends SkinBase<TextFieldAddControl> {
@@ -72,13 +72,17 @@ public class TextFieldAddControl extends ECPControlBase {
HBox hBox = new HBox();
getChildren().add(hBox);
- addTextField = new TextField();
- hBox.getChildren().add(addTextField);
- addTextField.setText(feature.getDefaultValueLiteral());
- addTextField.getStyleClass().add("left-pill");
- HBox.setHgrow(addTextField, Priority.ALWAYS);
+ textField = new EDataTypeTextField((EDataType) feature.getEType());
+ hBox.getChildren().add(textField);
+ textField.getStyleClass().add("left-pill");
+
+ textField.focusedProperty().addListener(new AutoSelector(textField));
+
+ textField.setText(feature.getDefaultValueLiteral());
+
+ HBox.setHgrow(textField, Priority.ALWAYS);
- addTextField.textProperty().addListener(new ChangeListener<String>() {
+ textField.textProperty().addListener(new ChangeListener<String>() {
@Override
public void changed(ObservableValue<? extends String> arg0, String arg1, String arg2) {
@@ -87,25 +91,25 @@ public class TextFieldAddControl extends ECPControlBase {
});
- addTextField.focusedProperty().addListener(new ChangeListener<Boolean>() {
+ textField.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2) {
if (arg2) {
- addTextField.requestFocus();
- addTextField.selectAll();
+ textField.requestFocus();
+ textField.selectAll();
}
}
});
- addButton = new Button();
- hBox.getChildren().add(addButton);
- addButton.setMaxHeight(Double.MAX_VALUE);
- addButton.getStyleClass().addAll("right-pill", "text-field-add-button");
- ECPUtil.addMark(addButton, "plus");
+ button = new Button();
+ hBox.getChildren().add(button);
+ button.setMaxHeight(Double.MAX_VALUE);
+ button.getStyleClass().addAll("right-pill", "text-field-add-button");
+ ECPUtil.addMark(button, "plus");
- addButton.setOnAction(new EventHandler<ActionEvent>() {
+ button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent arg0) {
@@ -114,7 +118,7 @@ public class TextFieldAddControl extends ECPControlBase {
});
- addTextField.setOnKeyPressed(new EventHandler<KeyEvent>() {
+ textField.setOnKeyPressed(new EventHandler<KeyEvent>() {
public void handle(final KeyEvent keyEvent) {
if (keyEvent.getCode() == KeyCode.ENTER) {
doAdd();
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/DefaultModelElementForm.java b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/DefaultModelElementForm.java
index e2ed3bedf..d29eca8cc 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/DefaultModelElementForm.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/DefaultModelElementForm.java
@@ -3,19 +3,36 @@ package org.eclipse.fx.ecp.ui.form;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.function.Supplier;
+import javafx.animation.Transition;
+import javafx.beans.property.ObjectProperty;
+import javafx.geometry.Insets;
+import javafx.geometry.Point2D;
+import javafx.geometry.Pos;
import javafx.geometry.VPos;
import javafx.scene.Node;
import javafx.scene.control.Control;
import javafx.scene.control.Label;
import javafx.scene.control.SkinBase;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
-
+import jidefx.animation.AnimationType;
+import jidefx.animation.AnimationUtils;
+import jidefx.scene.control.decoration.DecorationPane;
+import jidefx.scene.control.decoration.DecorationUtils;
+import jidefx.scene.control.decoration.Decorator;
+import jidefx.scene.control.decoration.MutableDecorator;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.Diagnostician;
import org.eclipse.emf.ecp.edit.ECPControlContext;
import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
@@ -28,12 +45,29 @@ import org.eclipse.fx.ecp.ui.controls.ECPControlBase;
public class DefaultModelElementForm extends Control implements ModelElementForm {
ECPControlContext modelElementContext;
- private Map<EStructuralFeature, ControlDecoration> controls = new HashMap<>();
+ private Map<EStructuralFeature, ValidationDecoration> controls = new HashMap<>();
- public DefaultModelElementForm(ECPControlContext modelElementContext) {
+ public DefaultModelElementForm(final ECPControlContext modelElementContext) {
this.modelElementContext = modelElementContext;
setSkin(new Skin(this));
getStyleClass().add("model-element-form");
+
+ modelElementContext.getModelElement().eAdapters().add(new AdapterImpl() {
+
+ @Override
+ public void notifyChanged(Notification msg) {
+ validate();
+ }
+
+ });
+
+ validate();
+ }
+
+ protected void validate() {
+ Diagnostic diagnostic = Diagnostician.INSTANCE.validate(modelElementContext.getModelElement());
+ for (ValidationDecoration controlDecoration : controls.values())
+ controlDecoration.handleValidation(diagnostic);
}
public class Skin extends SkinBase<DefaultModelElementForm> {
@@ -44,7 +78,7 @@ public class DefaultModelElementForm extends Control implements ModelElementForm
super(modelElementForm);
gridPane = new GridPane();
- getChildren().add(gridPane);
+ getChildren().add(new DecorationPane(gridPane));
gridPane.getStyleClass().add("grid");
EObject modelElement = modelElementContext.getModelElement();
@@ -71,14 +105,19 @@ public class DefaultModelElementForm extends Control implements ModelElementForm
if (factory != null) {
ECPControlBase control = factory.createControl(propertyDescriptor, modelElementContext);
- AnchorPane.setLeftAnchor(control, 0.0);
- AnchorPane.setRightAnchor(control, 0.0);
+ gridPane.add(control, 1, i);
+
+ GridPane.setHgrow(control, Priority.ALWAYS);
- ControlDecoration controlDecoration = new ControlDecoration(feature, control);
- controls.put(feature, controlDecoration);
+ ValidationDecoration validationDecorator = new ValidationDecoration(control, feature);
+// DecorationUtils.install(control, validationDecorator);
+
+ // AnchorPane.setLeftAnchor(control, 0.0);
+ // AnchorPane.setRightAnchor(control, 0.0);
+ //
+ // ControlDecoration controlDecoration = new ControlDecoration(feature, control);
+ controls.put(feature, validationDecorator);
- gridPane.add(controlDecoration, 1, i);
- GridPane.setHgrow(controlDecoration, Priority.ALWAYS);
}
i++;
@@ -95,18 +134,11 @@ public class DefaultModelElementForm extends Control implements ModelElementForm
return getClass().getResource("../controls/ECPControls.css").toExternalForm();
}
-
@Override
public void dispose() {
- for (ControlDecoration controlDecoration : controls.values()) {
- controlDecoration.dispose();
- }
- }
-
- @Override
- public void handleValidation(Diagnostic diagnostic) {
- for (ControlDecoration controlDecoration : controls.values())
- controlDecoration.handleValidation(diagnostic);
+// for (ControlDecoration controlDecoration : controls.values()) {
+// controlDecoration.dispose();
+// }
}
public static class Factory implements ModelElementForm.Factory {
@@ -118,4 +150,28 @@ public class DefaultModelElementForm extends Control implements ModelElementForm
}
+ public static class ValidationDecorator extends MutableDecorator<Node> {
+
+ Image infoImage = new Image(Decorator.class.getResourceAsStream("overlay_info.png"));
+ Image warningImage = new Image(Decorator.class.getResourceAsStream("overlay_warning.png"));
+ Image errorImage = new Image(Decorator.class.getResourceAsStream("overlay_error.png"));
+
+ public ValidationDecorator() {
+ ImageView imageView = new ImageView(errorImage);
+ Label label = new Label(null, imageView);
+ nodeProperty().set(label);
+
+ label.setOpacity(0);
+
+ posProperty().set(Pos.TOP_LEFT);
+
+ Transition transition = AnimationUtils.createTransition(label, AnimationType.BOUNCE_IN);
+
+ transitionProperty().set(transition);
+
+ paddingProperty().set(new Insets(0));
+ }
+
+ }
+
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/ModelElementForm.java b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/ModelElementForm.java
index f5bbca20b..b81f2d08c 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/ModelElementForm.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/ModelElementForm.java
@@ -2,14 +2,11 @@ package org.eclipse.fx.ecp.ui.form;
import javafx.scene.Node;
-import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecp.edit.ECPControlContext;
public interface ModelElementForm {
- void handleValidation(Diagnostic diagnostic);
-
void dispose();
interface Factory {
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/ValidationDecoration.java b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/ValidationDecoration.java
new file mode 100644
index 000000000..134ea8934
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/form/ValidationDecoration.java
@@ -0,0 +1,115 @@
+package org.eclipse.fx.ecp.ui.form;
+
+import javafx.event.EventHandler;
+import javafx.geometry.Insets;
+import javafx.geometry.Point2D;
+import javafx.geometry.Pos;
+import javafx.geometry.Side;
+import javafx.scene.Node;
+import javafx.scene.control.Control;
+import javafx.scene.control.Label;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.text.Text;
+import jidefx.animation.AnimationType;
+import jidefx.scene.control.decoration.DecorationUtils;
+import jidefx.scene.control.decoration.Decorator;
+import jidefx.scene.control.popup.BalloonPopupOutline;
+import jidefx.scene.control.popup.ShapedPopup;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import com.google.common.base.Objects;
+
+public class ValidationDecoration {
+
+ protected final static Image errorImage = new Image(Decorator.class.getResourceAsStream("overlay_error.png"));
+
+ protected Control control;
+ protected final EStructuralFeature feature;
+ protected final ShapedPopup shapedPopup;
+ protected Diagnostic diagnostic;
+ protected Text popupText;
+
+
+ public ValidationDecoration(Control control, EStructuralFeature feature) {
+ super();
+ this.control = control;
+ this.feature = feature;
+
+ shapedPopup = new ShapedPopup();
+ shapedPopup.setAutoHide(false);
+ shapedPopup.setInsets(new Insets(20));
+ BalloonPopupOutline popupOutline = new BalloonPopupOutline();
+ popupOutline.setArrowSide(Side.TOP);
+ shapedPopup.setPopupOutline(popupOutline);
+ popupText = new Text();
+ popupText.setWrappingWidth(300);
+ shapedPopup.setPopupContent(popupText);
+ }
+
+ public void handleValidation(Diagnostic diagnostic) {
+
+ Diagnostic newDiagnostic = null;
+
+ if (diagnostic != null) {
+ for (Diagnostic childDiagnostic : diagnostic.getChildren()) {
+ Object feature = childDiagnostic.getData().get(1);
+ if (feature == this.feature) {
+ newDiagnostic = childDiagnostic;
+ break;
+ }
+ }
+ }
+
+ if (newDiagnostic != null && (this.diagnostic == null || !equals(newDiagnostic, this.diagnostic)))
+ popupText.setText(newDiagnostic.getMessage());
+
+ if (newDiagnostic != null && !equals(this.diagnostic, newDiagnostic)) {
+ final Decorator<Node> validationDecorator = new Decorator<Node>(createErrorGraphic(), Pos.TOP_LEFT, new Point2D(0, 0), new Insets(0), AnimationType.BOUNCE_IN);
+ DecorationUtils.install(control, validationDecorator);
+
+ final Node node = validationDecorator.getNode();
+ node.setOpacity(0);
+
+ node.setOnMouseEntered(new EventHandler<MouseEvent>() {
+
+ @Override
+ public void handle(MouseEvent arg0) {
+ if (ValidationDecoration.this.diagnostic != null)
+ shapedPopup.showPopup(node, Pos.BOTTOM_CENTER, 0, 5);
+ }
+
+ });
+
+ node.setOnMouseExited(new EventHandler<MouseEvent>() {
+
+ @Override
+ public void handle(MouseEvent arg0) {
+ if (ValidationDecoration.this.diagnostic != null)
+ shapedPopup.hide();
+ }
+
+ });
+
+ } else if (newDiagnostic == null) {
+ DecorationUtils.uninstall(control);
+ }
+
+ this.diagnostic = newDiagnostic;
+ }
+
+ protected static boolean equals(Diagnostic d1, Diagnostic d2) {
+ if (d1 != null && d2 != null)
+ return Objects.equal(d1.getMessage(), d2.getMessage());
+ else
+ return false;
+ }
+
+ public Node createErrorGraphic() {
+ return new Label(null, new ImageView(errorImage));
+ }
+
+} \ No newline at end of file
diff --git a/bundles/runtime/org.eclipse.fx.javafx/META-INF/MANIFEST.MF b/bundles/runtime/org.eclipse.fx.javafx/META-INF/MANIFEST.MF
index 1a6c905a2..85e5058ad 100755
--- a/bundles/runtime/org.eclipse.fx.javafx/META-INF/MANIFEST.MF
+++ b/bundles/runtime/org.eclipse.fx.javafx/META-INF/MANIFEST.MF
@@ -14,6 +14,7 @@ Export-Package: com.sun.glass.events;version="2.2.0";x-internal:=true,
com.sun.javafx.runtime;version="2.2.0";x-internal:=true,
com.sun.javafx.scene.control.behavior;version="2.2.0";x-internal:=true,
com.sun.javafx.scene.control.skin;version="2.2.0";x-internal:=true,
+ com.sun.javafx.scene.control.skin.resources;version="2.2.0";x-internal:=true,
com.sun.javafx.scene.text;version="2.2.0";x-internal:=true,
com.sun.javafx.scene.traversal;version="2.2.0";x-internal:=true,
com.sun.javafx.tk;version="2.2.0";x-internal:=true,
diff --git a/bundles/runtime/org.eclipse.fx.javafx/src/com/sun/javafx/scene/control/skin/resources/dummy.java b/bundles/runtime/org.eclipse.fx.javafx/src/com/sun/javafx/scene/control/skin/resources/dummy.java
new file mode 100644
index 000000000..abb68e1fe
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.javafx/src/com/sun/javafx/scene/control/skin/resources/dummy.java
@@ -0,0 +1,5 @@
+package com.sun.javafx.scene.control.skin.resources;
+
+public class dummy {
+
+}
diff --git a/bundles/runtime/org.eclipse.fx.javafx/src/com/sun/javafx/scene/control/skin/resources/dummy.txt b/bundles/runtime/org.eclipse.fx.javafx/src/com/sun/javafx/scene/control/skin/resources/dummy.txt
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/bundles/runtime/org.eclipse.fx.javafx/src/com/sun/javafx/scene/control/skin/resources/dummy.txt
diff --git a/demos/org.eclipse.fx.ecp.app.product/org.eclipse.fx.ecp.app.product.product.launch b/demos/org.eclipse.fx.ecp.app.product/org.eclipse.fx.ecp.app.product.product.launch
index e7dbe1975..b068d0365 100644
--- a/demos/org.eclipse.fx.ecp.app.product/org.eclipse.fx.ecp.app.product.product.launch
+++ b/demos/org.eclipse.fx.ecp.app.product/org.eclipse.fx.ecp.app.product.product.launch
@@ -29,7 +29,7 @@
<setEntry value="at.bestsolution.efxclipse.ecp.app.feature:default"/>
</setAttribute>
<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.google.inject.assistedinject@default:false,com.google.inject.multibindings@default:false,com.google.inject@default:default,com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.batik.css@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.commons.logging@default:default,org.apache.log4j@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.ecp.core@default:default,org.eclipse.emf.ecp.edit@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help@default:default,org.eclipse.net4j.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.xtext.logging@default:false,org.hamcrest.core@default:default,org.w3c.css.sac@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.ecp.edit@default:default,org.eclipse.emf.ecp.workspace.core@default:default,org.eclipse.emf.emfstore.examplemodel.edit@default:default,org.eclipse.emf.emfstore.examplemodel@default:default,org.eclipse.fx.core.databinding@default:default,org.eclipse.fx.core.guice@default:default,org.eclipse.fx.core.log4j@default:default,org.eclipse.fx.core@default:default,org.eclipse.fx.ecp.app@default:default,org.eclipse.fx.ecp.ui@default:default,org.eclipse.fx.emf.databinding@default:default,org.eclipse.fx.emf.edit.ui@default:default,org.eclipse.fx.javafx@default:default,org.eclipse.fx.osgi.util@default:default,org.eclipse.fx.osgi@default:false,org.eclipse.fx.ui.animation@default:default,org.eclipse.fx.ui.databinding@default:default,org.eclipse.fx.ui.di@default:default,org.eclipse.fx.ui.dialogs@default:default,org.eclipse.fx.ui.keybindings.e4@default:default,org.eclipse.fx.ui.keybindings.generic@default:default,org.eclipse.fx.ui.keybindings@default:default,org.eclipse.fx.ui.panes@default:default,org.eclipse.fx.ui.services@default:default,org.eclipse.fx.ui.theme@default:default,org.eclipse.fx.ui.workbench.base@default:default,org.eclipse.fx.ui.workbench.fx.controls@default:default,org.eclipse.fx.ui.workbench.fx@default:default,org.eclipse.fx.ui.workbench.renderers.base@default:default,org.eclipse.fx.ui.workbench.renderers.fx@default:default,org.eclipse.osgi@-1:true,org.jfxtras@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="jidefx-common@default:default,jidefx-decoration@default:default,jidefx-fields@default:default,org.eclipse.emf.ecp.edit@default:default,org.eclipse.emf.ecp.workspace.core@default:default,org.eclipse.emf.emfstore.examplemodel.edit@default:default,org.eclipse.emf.emfstore.examplemodel@default:default,org.eclipse.fx.core.databinding@default:default,org.eclipse.fx.core.guice@default:default,org.eclipse.fx.core.log4j@default:default,org.eclipse.fx.core@default:default,org.eclipse.fx.ecp.app@default:default,org.eclipse.fx.ecp.ui@default:default,org.eclipse.fx.emf.databinding@default:default,org.eclipse.fx.emf.edit.ui@default:default,org.eclipse.fx.javafx@default:default,org.eclipse.fx.osgi.util@default:default,org.eclipse.fx.osgi@default:false,org.eclipse.fx.ui.animation@default:default,org.eclipse.fx.ui.databinding@default:default,org.eclipse.fx.ui.di@default:default,org.eclipse.fx.ui.dialogs@default:default,org.eclipse.fx.ui.keybindings.e4@default:default,org.eclipse.fx.ui.keybindings.generic@default:default,org.eclipse.fx.ui.keybindings@default:default,org.eclipse.fx.ui.panes@default:default,org.eclipse.fx.ui.services@default:default,org.eclipse.fx.ui.theme@default:default,org.eclipse.fx.ui.workbench.base@default:default,org.eclipse.fx.ui.workbench.fx.controls@default:default,org.eclipse.fx.ui.workbench.fx@default:default,org.eclipse.fx.ui.workbench.renderers.base@default:default,org.eclipse.fx.ui.workbench.renderers.fx@default:default,org.eclipse.osgi@-1:true,org.jfxtras@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
diff --git a/demos/org.eclipse.fx.ecp.app/META-INF/MANIFEST.MF b/demos/org.eclipse.fx.ecp.app/META-INF/MANIFEST.MF
index c5c945847..31c91332b 100644
--- a/demos/org.eclipse.fx.ecp.app/META-INF/MANIFEST.MF
+++ b/demos/org.eclipse.fx.ecp.app/META-INF/MANIFEST.MF
@@ -27,7 +27,6 @@ Require-Bundle: org.eclipse.e4.ui.model.workbench,
org.eclipse.fx.ecp.ui;bundle-version="1.0.0",
org.eclipse.emf.ecp.edit;bundle-version="1.0.0",
org.eclipse.fx.ui.services;bundle-version="0.8.1",
- org.jfxtras;bundle-version="8.0.0",
org.eclipse.emf.emfstore.examplemodel;bundle-version="1.0.0"
Import-Package: javax.inject;version="1.0.0",
javax.annotation;version="1.0.0",
diff --git a/demos/org.eclipse.fx.ecp.app/src/org/eclipse/fx/ecp/ModelEditorPart2.java b/demos/org.eclipse.fx.ecp.app/src/org/eclipse/fx/ecp/ModelEditorPart2.java
index 71585f8ef..b4aed1f44 100644
--- a/demos/org.eclipse.fx.ecp.app/src/org/eclipse/fx/ecp/ModelEditorPart2.java
+++ b/demos/org.eclipse.fx.ecp.app/src/org/eclipse/fx/ecp/ModelEditorPart2.java
@@ -43,6 +43,7 @@ import org.eclipse.emf.ecp.edit.ECPControlContext;
import org.eclipse.fx.ecp.ui.ECPUtil;
import org.eclipse.fx.ecp.ui.ModelElementEditor;
import org.eclipse.fx.ecp.ui.controls.BreadcrumbBar;
+import org.eclipse.fx.ecp.ui.controls.ControlDecoration;
import org.eclipse.fx.ecp.ui.form.DefaultModelElementForm;
import org.eclipse.fx.ecp.ui.form.ModelElementForm;
@@ -166,7 +167,7 @@ public class ModelEditorPart2 implements ModelElementEditor {
@Override
public void handle(ActionEvent arg0) {
- validate();
+// validate();
}
});
@@ -232,11 +233,6 @@ public class ModelEditorPart2 implements ModelElementEditor {
contextMenu.show(node, x, y);
}
- private void validate() {
- Diagnostic diagnostic = Diagnostician.INSTANCE.validate(controlContext.getModelElement());
- modelElementForm.handleValidation(diagnostic);
- }
-
/**
* Go back and forward in history
*/