From a630406ca0910bea1ceda8bb3c79c6b39bea0b5d Mon Sep 17 00:00:00 2001 From: crissnb Date: Mon, 12 Feb 2024 01:23:11 +0100 Subject: [PATCH 1/5] fixes region scaling --- .../ScaleBlockViewModelElementAction.java | 6 ++-- src/main/java/org/gecko/tools/CursorTool.java | 32 ++++++++++--------- .../org/gecko/tools/RegionCreatorTool.java | 5 +-- .../views/viewelement/EdgeViewElement.java | 3 +- .../views/viewelement/RegionViewElement.java | 4 +-- .../views/viewelement/StateViewElement.java | 4 --- .../SystemConnectionViewElement.java | 3 +- .../views/viewelement/SystemViewElement.java | 9 +----- .../viewelement/VariableBlockViewElement.java | 4 --- .../view/views/viewelement/ViewElement.java | 5 ++- .../decorator/ElementScalerBlock.java | 14 ++++---- .../decorator/ViewElementDecorator.java | 4 +-- .../viewmodel/BlockViewModelElement.java | 12 ++++++- .../PositionableViewModelElement.java | 8 ----- 14 files changed, 56 insertions(+), 57 deletions(-) diff --git a/src/main/java/org/gecko/actions/ScaleBlockViewModelElementAction.java b/src/main/java/org/gecko/actions/ScaleBlockViewModelElementAction.java index 2aa11c50..d3d615aa 100644 --- a/src/main/java/org/gecko/actions/ScaleBlockViewModelElementAction.java +++ b/src/main/java/org/gecko/actions/ScaleBlockViewModelElementAction.java @@ -42,8 +42,10 @@ boolean run() throws GeckoException { element.setSize(oldSizeCopy); element.setPosition(oldPosCopy); } else { - elementScalerBlock.getDecoratorTarget() - .setEdgePoint(elementScalerBlock.getIndex(), elementScalerBlock.getCenter()); + if (!elementScalerBlock.getDecoratorTarget() + .setEdgePoint(elementScalerBlock.getIndex(), elementScalerBlock.getCenter())) { + return false; + } } editorViewModel.updateRegions(); diff --git a/src/main/java/org/gecko/tools/CursorTool.java b/src/main/java/org/gecko/tools/CursorTool.java index 6ba538be..a402d3c6 100644 --- a/src/main/java/org/gecko/tools/CursorTool.java +++ b/src/main/java/org/gecko/tools/CursorTool.java @@ -139,12 +139,9 @@ private void setBlockScalerElementHandlers(ElementScalerBlock scaler) { return; } Point2D newPosition = scaler.localToParent(scaler.sceneToLocal(event.getSceneX(), event.getSceneY())); - scaler.setCenter(newPosition); - PositionableViewModelElement target = scaler.getDecoratorTarget().getTarget(); - if (target.getArea() < PositionableViewModelElement.MIN_AREA) { - scaler.setCenter(previousDragPosition); - } else { - previousDragPosition = newPosition; + + if (!scaler.setCenter(newPosition)) { + cancelDrag(scaler); } }); @@ -166,9 +163,7 @@ private void setBlockScalerElementHandlers(ElementScalerBlock scaler) { (BlockViewModelElement) scaler.getDecoratorTarget().getTarget(), scaler); actionManager.run(resizeAction); - scaler.setDragging(false); - oldPosition = null; - oldSize = null; + cancelDrag(scaler); }); } @@ -210,9 +205,7 @@ private void setConnectionScalerElementsHandlers(ElementScalerBlock scaler) { } actionManager.run(moveAction); - startDragPosition = null; - draggedElement = null; - scaler.setDragging(false); + cancelDrag(scaler); }); } @@ -252,7 +245,6 @@ private void stopDraggingElementHandler(MouseEvent event) { if (!isDragging) { return; } - isDragging = false; Point2D endWorldPos = getWorldCoordinates(draggedElement).add(new Point2D(event.getX(), event.getY())); selectionManager.getCurrentSelection().forEach(element -> { element.setCurrentlyModified(false); @@ -261,8 +253,7 @@ private void stopDraggingElementHandler(MouseEvent event) { Action moveAction = actionManager.getActionFactory() .createMoveBlockViewModelElementAction(endWorldPos.subtract(startDragPosition)); actionManager.run(moveAction); - startDragPosition = null; - draggedElement = null; + cancelDrag(); } private void selectElement(ViewElement viewElement, boolean newSelection) { @@ -293,4 +284,15 @@ private Point2D getWorldCoordinates(Node node, Point2D point) { return editorViewModel.transformViewPortToWorldCoordinates( new Point2D(parentX + point.getX(), parentY + point.getY()).multiply(editorViewModel.getZoomScale())); } + + private void cancelDrag(ElementScalerBlock scaler) { + scaler.setDragging(false); + cancelDrag(); + } + + private void cancelDrag() { + startDragPosition = null; + draggedElement = null; + isDragging = false; + } } diff --git a/src/main/java/org/gecko/tools/RegionCreatorTool.java b/src/main/java/org/gecko/tools/RegionCreatorTool.java index e5d14980..fbdb1541 100644 --- a/src/main/java/org/gecko/tools/RegionCreatorTool.java +++ b/src/main/java/org/gecko/tools/RegionCreatorTool.java @@ -6,6 +6,7 @@ import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; import org.gecko.actions.ActionManager; +import org.gecko.viewmodel.BlockViewModelElement; import org.gecko.viewmodel.PositionableViewModelElement; public class RegionCreatorTool extends AreaTool { @@ -26,12 +27,12 @@ Rectangle createNewArea() { @Override void onAreaCreated(MouseEvent event, Bounds worldAreaBounds) { - if (worldAreaBounds.getWidth() * worldAreaBounds.getHeight() < PositionableViewModelElement.MIN_AREA) { + if (worldAreaBounds.getWidth() < BlockViewModelElement.MIN_WIDTH + || worldAreaBounds.getHeight() < BlockViewModelElement.MIN_HEIGHT) { return; } actionManager.run(actionManager.getActionFactory() .createCreateRegionViewModelElementAction(new Point2D(worldAreaBounds.getMinX(), worldAreaBounds.getMinY()), new Point2D(worldAreaBounds.getWidth(), worldAreaBounds.getHeight()), color)); - } } diff --git a/src/main/java/org/gecko/view/views/viewelement/EdgeViewElement.java b/src/main/java/org/gecko/view/views/viewelement/EdgeViewElement.java index 8eda396e..ebb0dbb5 100644 --- a/src/main/java/org/gecko/view/views/viewelement/EdgeViewElement.java +++ b/src/main/java/org/gecko/view/views/viewelement/EdgeViewElement.java @@ -190,8 +190,9 @@ public ObservableList> getEdgePoints() { } @Override - public void setEdgePoint(int index, Point2D point) { + public boolean setEdgePoint(int index, Point2D point) { edgeViewModel.setEdgePoint(index, point); + return true; } @Override diff --git a/src/main/java/org/gecko/view/views/viewelement/RegionViewElement.java b/src/main/java/org/gecko/view/views/viewelement/RegionViewElement.java index 800148f6..46c35579 100644 --- a/src/main/java/org/gecko/view/views/viewelement/RegionViewElement.java +++ b/src/main/java/org/gecko/view/views/viewelement/RegionViewElement.java @@ -52,8 +52,8 @@ public Node drawElement() { } @Override - public void setEdgePoint(int index, Point2D point) { - regionViewModel.manipulate( + public boolean setEdgePoint(int index, Point2D point) { + return regionViewModel.manipulate( getEdgePoints().get((index + getEdgePoints().size() / 2) % getEdgePoints().size()).getValue(), point); } diff --git a/src/main/java/org/gecko/view/views/viewelement/StateViewElement.java b/src/main/java/org/gecko/view/views/viewelement/StateViewElement.java index 86fc0739..ed781d42 100644 --- a/src/main/java/org/gecko/view/views/viewelement/StateViewElement.java +++ b/src/main/java/org/gecko/view/views/viewelement/StateViewElement.java @@ -54,10 +54,6 @@ public Node drawElement() { return this; } - @Override - public void setEdgePoint(int index, Point2D point) { - } - @Override public StateViewModel getTarget() { return stateViewModel; diff --git a/src/main/java/org/gecko/view/views/viewelement/SystemConnectionViewElement.java b/src/main/java/org/gecko/view/views/viewelement/SystemConnectionViewElement.java index b2313e0f..42005566 100644 --- a/src/main/java/org/gecko/view/views/viewelement/SystemConnectionViewElement.java +++ b/src/main/java/org/gecko/view/views/viewelement/SystemConnectionViewElement.java @@ -44,8 +44,9 @@ public ObservableList> getEdgePoints() { } @Override - public void setEdgePoint(int index, Point2D point) { + public boolean setEdgePoint(int index, Point2D point) { systemConnectionViewModel.setEdgePoint(index, point); + return true; } @Override diff --git a/src/main/java/org/gecko/view/views/viewelement/SystemViewElement.java b/src/main/java/org/gecko/view/views/viewelement/SystemViewElement.java index 1c1781b1..f8219bbd 100644 --- a/src/main/java/org/gecko/view/views/viewelement/SystemViewElement.java +++ b/src/main/java/org/gecko/view/views/viewelement/SystemViewElement.java @@ -50,10 +50,6 @@ public SystemViewElement(SystemViewModel systemViewModel) { this.inputPortsAligner = new VBox(); this.outputPortsAligner = new VBox(); - inputPortsAligner.layoutBoundsProperty() - .addListener((observable, oldValue, newValue) -> updatePortViewModels()); - outputPortsAligner.layoutBoundsProperty() - .addListener((observable, oldValue, newValue) -> updatePortViewModels()); bindViewModel(); constructVisualization(); } @@ -63,10 +59,6 @@ public Node drawElement() { return this; } - @Override - public void setEdgePoint(int index, Point2D point) { - } - @Override public SystemViewModel getTarget() { return systemViewModel; @@ -141,6 +133,7 @@ private void updatePortViewModels() { private void addPort(PortViewModel portViewModel) { portViewModel.getVisibilityProperty().addListener(this::onVisibilityChanged); PortViewElement portViewElement = new PortViewElement(portViewModel); + portViewElement.layoutYProperty().addListener((observable, oldValue, newValue) -> updatePortViewModels()); portViewElements.add(portViewElement); if (portViewModel.getVisibility() == Visibility.INPUT) { inputPortsAligner.getChildren().add(portViewElement); diff --git a/src/main/java/org/gecko/view/views/viewelement/VariableBlockViewElement.java b/src/main/java/org/gecko/view/views/viewelement/VariableBlockViewElement.java index 765ab3af..6bba76ba 100644 --- a/src/main/java/org/gecko/view/views/viewelement/VariableBlockViewElement.java +++ b/src/main/java/org/gecko/view/views/viewelement/VariableBlockViewElement.java @@ -42,10 +42,6 @@ public Node drawElement() { return this; } - @Override - public void setEdgePoint(int index, Point2D point) { - } - @Override public PortViewModel getTarget() { return portViewModel; diff --git a/src/main/java/org/gecko/view/views/viewelement/ViewElement.java b/src/main/java/org/gecko/view/views/viewelement/ViewElement.java index 9c0b00a9..88c60ec3 100644 --- a/src/main/java/org/gecko/view/views/viewelement/ViewElement.java +++ b/src/main/java/org/gecko/view/views/viewelement/ViewElement.java @@ -32,8 +32,11 @@ public interface ViewElement> { * * @param index the index * @param point new point + * @return true if the edge point was set, false if the edge point could not be set due to size limitations */ - void setEdgePoint(int index, Point2D point); + default boolean setEdgePoint(int index, Point2D point) { + return true; + } /** * Set the selected state of the element. diff --git a/src/main/java/org/gecko/view/views/viewelement/decorator/ElementScalerBlock.java b/src/main/java/org/gecko/view/views/viewelement/decorator/ElementScalerBlock.java index a6604dd0..8f6ddd78 100644 --- a/src/main/java/org/gecko/view/views/viewelement/decorator/ElementScalerBlock.java +++ b/src/main/java/org/gecko/view/views/viewelement/decorator/ElementScalerBlock.java @@ -70,12 +70,14 @@ public void setPosition(Point2D point) { * * @param point The new center of the scaler block. */ - public void setCenter(Point2D point) { - Point2D center = new Point2D(point.getX() - (getWidth() / 2), point.getY() - (getHeight() / 2)); - setLayoutX(center.getX()); - setLayoutY(center.getY()); - - decoratorTarget.setEdgePoint(index, point); + public boolean setCenter(Point2D point) { + if (decoratorTarget.setEdgePoint(index, point)) { + Point2D center = new Point2D(point.getX() - (getWidth() / 2), point.getY() - (getHeight() / 2)); + setLayoutX(center.getX()); + setLayoutY(center.getY()); + return true; + } + return false; } /** diff --git a/src/main/java/org/gecko/view/views/viewelement/decorator/ViewElementDecorator.java b/src/main/java/org/gecko/view/views/viewelement/decorator/ViewElementDecorator.java index ba463dfb..f5b05023 100644 --- a/src/main/java/org/gecko/view/views/viewelement/decorator/ViewElementDecorator.java +++ b/src/main/java/org/gecko/view/views/viewelement/decorator/ViewElementDecorator.java @@ -39,7 +39,7 @@ public ObservableList> getEdgePoints() { } @Override - public void setEdgePoint(int index, Point2D point) { - getDecoratorTarget().setEdgePoint(index, point); + public boolean setEdgePoint(int index, Point2D point) { + return getDecoratorTarget().setEdgePoint(index, point); } } diff --git a/src/main/java/org/gecko/viewmodel/BlockViewModelElement.java b/src/main/java/org/gecko/viewmodel/BlockViewModelElement.java index 322f09e6..99fff182 100644 --- a/src/main/java/org/gecko/viewmodel/BlockViewModelElement.java +++ b/src/main/java/org/gecko/viewmodel/BlockViewModelElement.java @@ -15,6 +15,9 @@ @Getter public abstract class BlockViewModelElement extends PositionableViewModelElement implements Renamable { + public static final double MIN_WIDTH = 100; + public static final double MIN_HEIGHT = 100; + private final StringProperty nameProperty; BlockViewModelElement(int id, @NonNull T target) { @@ -40,13 +43,20 @@ public void setName(@NonNull String name) { * @param firstCornerPoint the first corner point * @param secondCornerPoint the second corner point that is diagonally opposite to the first corner point */ - public void manipulate(@NonNull Point2D firstCornerPoint, @NonNull Point2D secondCornerPoint) { + public boolean manipulate(@NonNull Point2D firstCornerPoint, @NonNull Point2D secondCornerPoint) { Point2D newStartPosition = new Point2D(Math.min(firstCornerPoint.getX(), secondCornerPoint.getX()), Math.min(firstCornerPoint.getY(), secondCornerPoint.getY())); Point2D newEndPosition = new Point2D(Math.max(firstCornerPoint.getX(), secondCornerPoint.getX()), Math.max(firstCornerPoint.getY(), secondCornerPoint.getY())); + + if (Math.abs(newEndPosition.getX() - newStartPosition.getX()) < MIN_WIDTH + || Math.abs(newEndPosition.getY() - newStartPosition.getY()) < MIN_HEIGHT) { + return false; + } + setPosition(newStartPosition); setSize(newEndPosition.subtract(newStartPosition)); + return true; } @Override diff --git a/src/main/java/org/gecko/viewmodel/PositionableViewModelElement.java b/src/main/java/org/gecko/viewmodel/PositionableViewModelElement.java index 187a5c4e..3534974b 100644 --- a/src/main/java/org/gecko/viewmodel/PositionableViewModelElement.java +++ b/src/main/java/org/gecko/viewmodel/PositionableViewModelElement.java @@ -18,10 +18,6 @@ @Getter @Setter public abstract class PositionableViewModelElement extends AbstractViewModelElement { - /** - * The minimum area of a {@link PositionableViewModelElement} that can be resized. - */ - public static final double MIN_AREA = 10000; protected final Property positionProperty; protected final Property sizeProperty; private boolean isCurrentlyModified; @@ -62,8 +58,4 @@ public void setCenter(@NonNull Point2D point) { } public abstract Object accept(@NonNull PositionableViewModelElementVisitor visitor); - - public double getArea() { - return getSize().getX() * getSize().getY(); - } } From 8e01307599e90d3f5571e747b767baef7f1c959c Mon Sep 17 00:00:00 2001 From: crissnb Date: Mon, 12 Feb 2024 01:36:30 +0100 Subject: [PATCH 2/5] fix parent system view switch --- src/main/java/org/gecko/actions/ViewSwitchAction.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/gecko/actions/ViewSwitchAction.java b/src/main/java/org/gecko/actions/ViewSwitchAction.java index 9ad0b952..cd762198 100644 --- a/src/main/java/org/gecko/actions/ViewSwitchAction.java +++ b/src/main/java/org/gecko/actions/ViewSwitchAction.java @@ -20,6 +20,9 @@ public class ViewSwitchAction extends Action { @Override boolean run() throws GeckoException { + if (systemViewModel == null) { + return false; + } geckoViewModel.switchEditor(systemViewModel, isAutomaton); return true; } From 002679b70bf639ef1d04530cdfbd8385beaf1940 Mon Sep 17 00:00:00 2001 From: crissnb Date: Mon, 12 Feb 2024 01:49:42 +0100 Subject: [PATCH 3/5] set source/destination from a loop fix --- .../gecko/view/views/viewelement/EdgeViewElement.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gecko/view/views/viewelement/EdgeViewElement.java b/src/main/java/org/gecko/view/views/viewelement/EdgeViewElement.java index ebb0dbb5..d04ab207 100644 --- a/src/main/java/org/gecko/view/views/viewelement/EdgeViewElement.java +++ b/src/main/java/org/gecko/view/views/viewelement/EdgeViewElement.java @@ -151,7 +151,9 @@ private ListChangeListener updateMaskPathSourceListeners( private void maskPathSource() { // If source and destination are the same, draw a loop if (edgeViewModel.getSource().equals(edgeViewModel.getDestination()) && getEdgePoints().size() == 2) { - setLoop(true); + if (!isLoop()) { + setLoop(true); + } setEdgePoint(0, edgeViewModel.getSource().getPosition()); setEdgePoint(getEdgePoints().size() - 1, edgeViewModel.getSource() .getPosition() @@ -161,6 +163,11 @@ private void maskPathSource() { return; } + if (isLoop()) { + setLoop(false); + updatePathVisualization(); + } + double sourceEdgeOffset = edgeViewModel.getSource().getEdgeOffset(edgeViewModel); Point2D firstPoint = maskBlock(edgeViewModel.getSource().getPosition(), edgeViewModel.getSource().getSize(), edgeViewModel.getDestination().getCenter(), edgeViewModel.getSource().getCenter(), sourceEdgeOffset); From 2094392642f0289df347c32369469ccc44a0d87e Mon Sep 17 00:00:00 2001 From: crissnb Date: Mon, 12 Feb 2024 02:46:36 +0100 Subject: [PATCH 4/5] adds missing interface --- src/main/java/org/gecko/viewmodel/ViewModelFactory.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/org/gecko/viewmodel/ViewModelFactory.java b/src/main/java/org/gecko/viewmodel/ViewModelFactory.java index 44cdec55..d5551225 100644 --- a/src/main/java/org/gecko/viewmodel/ViewModelFactory.java +++ b/src/main/java/org/gecko/viewmodel/ViewModelFactory.java @@ -140,6 +140,15 @@ public SystemConnectionViewModel createSystemConnectionViewModelFrom( return result; } + /** + * Expects the source and destination of the system connection to be in the view model. + */ + public SystemConnectionViewModel createSystemConnectionViewModelFrom( + SystemConnection systemConnection) throws MissingViewModelElementException { + return createSystemConnectionViewModelFrom(geckoViewModel.getCurrentEditor().getCurrentSystem().getTarget(), + systemConnection); + } + public SystemViewModel createSystemViewModelIn(SystemViewModel parentSystem) throws ModelException { System system = modelFactory.createSystem(parentSystem.getTarget()); SystemViewModel result = new SystemViewModel(getNewViewModelElementId(), system); From 8ffc9e9075292028f4291eecc6f78736eac8f84b Mon Sep 17 00:00:00 2001 From: crissnb Date: Mon, 12 Feb 2024 03:16:07 +0100 Subject: [PATCH 5/5] checkstyle fixes --- .../element/container/InspectorVisibilityPicker.java | 5 ++++- src/main/java/org/gecko/view/views/EditorView.java | 4 ++-- .../views/shortcuts/SystemEditorViewShortcutHandler.java | 3 ++- src/main/java/org/gecko/viewmodel/GeckoViewModel.java | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/gecko/view/inspector/element/container/InspectorVisibilityPicker.java b/src/main/java/org/gecko/view/inspector/element/container/InspectorVisibilityPicker.java index 5e08801e..6658ac7a 100644 --- a/src/main/java/org/gecko/view/inspector/element/container/InspectorVisibilityPicker.java +++ b/src/main/java/org/gecko/view/inspector/element/container/InspectorVisibilityPicker.java @@ -6,7 +6,10 @@ import org.gecko.view.inspector.element.label.InspectorLabel; import org.gecko.viewmodel.PortViewModel; -/** Represents a type of {@link LabeledInspectorElement}. Contains an {@link InspectorLabel} and an {@link InspectorVisibilityComboBox}. */ +/** + * Represents a type of {@link LabeledInspectorElement}. Contains an {@link InspectorLabel} and an + * {@link InspectorVisibilityComboBox}. + */ public class InspectorVisibilityPicker extends LabeledInspectorElement { public InspectorVisibilityPicker(ActionManager actionManager, PortViewModel viewModel) { diff --git a/src/main/java/org/gecko/view/views/EditorView.java b/src/main/java/org/gecko/view/views/EditorView.java index bdd4370f..db123070 100644 --- a/src/main/java/org/gecko/view/views/EditorView.java +++ b/src/main/java/org/gecko/view/views/EditorView.java @@ -108,8 +108,8 @@ public EditorView( this.currentView = new Tab("Error_Name", currentViewPane); currentView.textProperty().bind(Bindings.createStringBinding(() -> { String name = viewModel.getCurrentSystem().getName(); - return name + (viewModel.isAutomatonEditor() ? " (" + ResourceHandler.getString("View", "automaton") + ")" : - " (" + ResourceHandler.getString("View", "system") + ")"); + return name + (viewModel.isAutomatonEditor() ? " (" + ResourceHandler.getString("View", "automaton") + ")" + : " (" + ResourceHandler.getString("View", "system") + ")"); }, viewModel.getCurrentSystem().getNameProperty())); this.worldSizeUpdateListener = (observable, oldValue, newValue) -> { diff --git a/src/main/java/org/gecko/view/views/shortcuts/SystemEditorViewShortcutHandler.java b/src/main/java/org/gecko/view/views/shortcuts/SystemEditorViewShortcutHandler.java index 62a957de..0863a9b3 100644 --- a/src/main/java/org/gecko/view/views/shortcuts/SystemEditorViewShortcutHandler.java +++ b/src/main/java/org/gecko/view/views/shortcuts/SystemEditorViewShortcutHandler.java @@ -29,7 +29,8 @@ private void addNavigateSystemShortcuts() { try { SystemViewModel systemViewModel = (SystemViewModel) focusedElement; actionManager.run(actionFactory.createViewSwitchAction(systemViewModel, false)); - } catch (ClassCastException ignored) { + } catch (ClassCastException e) { + e.printStackTrace(); } }); } diff --git a/src/main/java/org/gecko/viewmodel/GeckoViewModel.java b/src/main/java/org/gecko/viewmodel/GeckoViewModel.java index eb640f2b..1816867d 100644 --- a/src/main/java/org/gecko/viewmodel/GeckoViewModel.java +++ b/src/main/java/org/gecko/viewmodel/GeckoViewModel.java @@ -72,7 +72,8 @@ private void setupNewEditorViewModel(SystemViewModel nextSystemViewModel, boolea if (nextSystemViewModel.getTarget().getParent() != null) { parent = (SystemViewModel) getViewModelElement(nextSystemViewModel.getTarget().getParent()); } - EditorViewModel editorViewModel = viewModelFactory.createEditorViewModel(nextSystemViewModel, parent, isAutomatonEditor); + EditorViewModel editorViewModel = + viewModelFactory.createEditorViewModel(nextSystemViewModel, parent, isAutomatonEditor); openedEditorsProperty.add(editorViewModel); setCurrentEditor(editorViewModel); }