diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2018-04-19 15:14:53 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-04-19 15:14:53 +0300 |
commit | d543e47becc77e5b18c69a416e6e84122ac10fe1 (patch) | |
tree | 49b4e4e245319b0e93a4b1d3739096eb2d082eea /server/src/main/java/com/vaadin/ui/components | |
parent | bdbb0b4328a36a66bb492973ca72497bfd34f6ad (diff) | |
download | vaadin-framework-d543e47becc77e5b18c69a416e6e84122ac10fe1.tar.gz vaadin-framework-d543e47becc77e5b18c69a416e6e84122ac10fe1.zip |
Enable Maven plugin for Eclipse formatting (#10829)
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/components')
3 files changed, 33 insertions, 31 deletions
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<T> extends AbstractGridExtension<T> 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<T> 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 <T> - * 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<T> extends GridDropEvent<T> { * 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<T> target, Map<String, String> data, DropEffect dropEffect, @@ -91,7 +92,7 @@ public class TreeGridDropEvent<T> extends GridDropEvent<T> { * Tells whether the drop target row is collapsed. * * @return {@code true} if the drop target row is collapsed, {@code false} - * otherwise + * otherwise */ public Optional<Boolean> isDropTargetRowCollapsed() { return Optional.ofNullable(collapsed); |