From d543e47becc77e5b18c69a416e6e84122ac10fe1 Mon Sep 17 00:00:00 2001 From: Ilia Motornyi Date: Thu, 19 Apr 2018 15:14:53 +0300 Subject: Enable Maven plugin for Eclipse formatting (#10829) --- .../com/vaadin/ui/components/grid/EditorImpl.java | 13 +++++----- .../vaadin/ui/components/grid/GridRowDragger.java | 22 ++++++++-------- .../ui/components/grid/TreeGridDropEvent.java | 29 +++++++++++----------- 3 files changed, 33 insertions(+), 31 deletions(-) (limited to 'server/src/main/java/com/vaadin/ui/components') diff --git a/server/src/main/java/com/vaadin/ui/components/grid/EditorImpl.java b/server/src/main/java/com/vaadin/ui/components/grid/EditorImpl.java index e9663eb5ac..d252cfed99 100644 --- a/server/src/main/java/com/vaadin/ui/components/grid/EditorImpl.java +++ b/server/src/main/java/com/vaadin/ui/components/grid/EditorImpl.java @@ -273,15 +273,16 @@ public class EditorImpl extends AbstractGridExtension if (!isEnabled()) { throw new IllegalStateException("Item editor is not enabled"); } - T beanToEdit = getParent().getDataCommunicator(). - fetchItemsWithRange(rowNumber, 1). - stream().findFirst().orElseThrow(() -> new IllegalArgumentException( - "Row number " + rowNumber+ "did not yield any item from data provider")); + T beanToEdit = getParent().getDataCommunicator() + .fetchItemsWithRange(rowNumber, 1).stream().findFirst() + .orElseThrow(() -> new IllegalArgumentException( + "Row number " + rowNumber + + "did not yield any item from data provider")); if (!beanToEdit.equals(edited)) { if (isBuffered() && edited != null) { throw new IllegalStateException("Editing item " + beanToEdit - + " failed. Item editor is already editing item " - + edited); + + " failed. Item editor is already editing item " + + edited); } else { rpc.bind(rowNumber); } diff --git a/server/src/main/java/com/vaadin/ui/components/grid/GridRowDragger.java b/server/src/main/java/com/vaadin/ui/components/grid/GridRowDragger.java index 02fab10174..5e4a4c96f6 100644 --- a/server/src/main/java/com/vaadin/ui/components/grid/GridRowDragger.java +++ b/server/src/main/java/com/vaadin/ui/components/grid/GridRowDragger.java @@ -489,17 +489,17 @@ public class GridRowDragger implements Serializable { private static void throwUnsupportedOperationExceptionForUnsupportedDataProvider( boolean sourceGrid) { - throw new UnsupportedOperationException( - new StringBuilder().append(sourceGrid ? "Source " : "Target ") - .append("grid does not have a ListDataProvider, cannot automatically ") - .append(sourceGrid ? "remove " : "add ") - .append("items. Use GridRowDragger.set") - .append(sourceGrid ? "Source" : "Target") - .append("DataProviderUpdater(...) ") - .append(sourceGrid ? "" - : "and setDropIndexCalculator(...) " - + "to customize how to handle updating the data provider.") - .toString()); + throw new UnsupportedOperationException(new StringBuilder() + .append(sourceGrid ? "Source " : "Target ") + .append("grid does not have a ListDataProvider, cannot automatically ") + .append(sourceGrid ? "remove " : "add ") + .append("items. Use GridRowDragger.set") + .append(sourceGrid ? "Source" : "Target") + .append("DataProviderUpdater(...) ") + .append(sourceGrid ? "" + : "and setDropIndexCalculator(...) " + + "to customize how to handle updating the data provider.") + .toString()); } private static void throwUnsupportedOperationExceptionForUnsupportedCollectionInListDataProvider( diff --git a/server/src/main/java/com/vaadin/ui/components/grid/TreeGridDropEvent.java b/server/src/main/java/com/vaadin/ui/components/grid/TreeGridDropEvent.java index 6ad98ae7aa..19010d1715 100644 --- a/server/src/main/java/com/vaadin/ui/components/grid/TreeGridDropEvent.java +++ b/server/src/main/java/com/vaadin/ui/components/grid/TreeGridDropEvent.java @@ -29,7 +29,7 @@ import com.vaadin.ui.dnd.DragSourceExtension; * Drop event on an HTML5 drop target {@link TreeGrid} row. * * @param - * The TreeGrid bean type. + * The TreeGrid bean type. * @author Vaadin Ltd. * @see TreeGridDropTarget#addTreeGridDropListener(TreeGridDropListener) * @since 8.1 @@ -43,27 +43,28 @@ public class TreeGridDropEvent extends GridDropEvent { * Creates a TreeGrid row drop event. * * @param target - * TreeGrid that received the drop. + * TreeGrid that received the drop. * @param data - * Map containing all types and corresponding data from the {@code + * Map containing all types and corresponding data from the + * {@code * DataTransfer} object. * @param dropEffect - * the desired drop effect + * the desired drop effect * @param dragSourceExtension - * Drag source extension of the component that initiated the drop - * event. + * Drag source extension of the component that initiated the drop + * event. * @param dropTargetRow - * Target row that received the drop, or {@code null} if dropped on - * empty grid + * Target row that received the drop, or {@code null} if dropped + * on empty grid * @param dropLocation - * Location of the drop within the target row. + * Location of the drop within the target row. * @param mouseEventDetails - * Mouse event details object containing information about the drop - * event + * Mouse event details object containing information about the + * drop event * @param depth - * depth of the row in the hierarchy + * depth of the row in the hierarchy * @param collapsed - * whether the target row is collapsed + * whether the target row is collapsed */ public TreeGridDropEvent(TreeGrid target, Map data, DropEffect dropEffect, @@ -91,7 +92,7 @@ public class TreeGridDropEvent extends GridDropEvent { * Tells whether the drop target row is collapsed. * * @return {@code true} if the drop target row is collapsed, {@code false} - * otherwise + * otherwise */ public Optional isDropTargetRowCollapsed() { return Optional.ofNullable(collapsed); -- cgit v1.2.3