summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorIlia Motornyi <elmot@vaadin.com>2018-04-19 15:14:53 +0300
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-04-19 15:14:53 +0300
commitd543e47becc77e5b18c69a416e6e84122ac10fe1 (patch)
tree49b4e4e245319b0e93a4b1d3739096eb2d082eea /shared
parentbdbb0b4328a36a66bb492973ca72497bfd34f6ad (diff)
downloadvaadin-framework-d543e47becc77e5b18c69a416e6e84122ac10fe1.tar.gz
vaadin-framework-d543e47becc77e5b18c69a416e6e84122ac10fe1.zip
Enable Maven plugin for Eclipse formatting (#10829)
Diffstat (limited to 'shared')
-rw-r--r--shared/pom.xml9
-rw-r--r--shared/src/main/java/com/vaadin/shared/Range.java3
-rw-r--r--shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java9
-rw-r--r--shared/src/main/java/com/vaadin/shared/extension/PartInformationState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dnd/DropTargetRpc.java11
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetClientRpc.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetRpc.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dnd/FileParameters.java12
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/dnd/criteria/Payload.java6
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java8
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/notification/NotificationState.java7
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java3
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/treegrid/TreeGridDropTargetRpc.java19
16 files changed, 56 insertions, 43 deletions
diff --git a/shared/pom.xml b/shared/pom.xml
index 4fab22a343..56b17a1ee8 100644
--- a/shared/pom.xml
+++ b/shared/pom.xml
@@ -37,6 +37,15 @@
<build>
<plugins>
+ <plugin>
+ <groupId>net.revelc.code.formatter</groupId>
+ <artifactId>formatter-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>com.github.dantwining.whitespace-maven-plugin</groupId>
+ <artifactId>whitespace-maven-plugin</artifactId>
+ </plugin>
+
<!-- Generated Version.java -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
diff --git a/shared/src/main/java/com/vaadin/shared/Range.java b/shared/src/main/java/com/vaadin/shared/Range.java
index 24fe0e6799..18939596fc 100644
--- a/shared/src/main/java/com/vaadin/shared/Range.java
+++ b/shared/src/main/java/com/vaadin/shared/Range.java
@@ -298,8 +298,7 @@ public final class Range implements Serializable {
*
* @param other
* the other range to compare against
- * @return <code>true</code> if this range ends after the
- * <code>other</code>
+ * @return <code>true</code> if this range ends after the <code>other</code>
*/
public boolean endsAfter(final Range other) {
return getEnd() > other.getEnd();
diff --git a/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java b/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java
index 39cd086a6b..f41c4ef39e 100644
--- a/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java
+++ b/shared/src/main/java/com/vaadin/shared/communication/MethodInvocation.java
@@ -115,9 +115,12 @@ public class MethodInvocation implements Serializable {
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ((connectorId == null) ? 0 : connectorId.hashCode());
- result = prime * result + ((interfaceName == null) ? 0 : interfaceName.hashCode());
- result = prime * result + ((methodName == null) ? 0 : methodName.hashCode());
+ result = prime * result
+ + ((connectorId == null) ? 0 : connectorId.hashCode());
+ result = prime * result
+ + ((interfaceName == null) ? 0 : interfaceName.hashCode());
+ result = prime * result
+ + ((methodName == null) ? 0 : methodName.hashCode());
result = prime * result + Arrays.hashCode(parameters);
return result;
}
diff --git a/shared/src/main/java/com/vaadin/shared/extension/PartInformationState.java b/shared/src/main/java/com/vaadin/shared/extension/PartInformationState.java
index 59bd787fca..a240e8506a 100644
--- a/shared/src/main/java/com/vaadin/shared/extension/PartInformationState.java
+++ b/shared/src/main/java/com/vaadin/shared/extension/PartInformationState.java
@@ -20,7 +20,7 @@ import com.vaadin.shared.communication.SharedState;
/**
* Shared state for {@code AbstractEventTriggerExtensionConnector} extension.
*
- * @since 8.4
+ * @since 8.4
*/
public class PartInformationState extends SharedState {
diff --git a/shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldState.java b/shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldState.java
index 9437785f53..575ef59e73 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/datefield/AbstractDateFieldState.java
@@ -122,7 +122,7 @@ public class AbstractDateFieldState extends AbstractFieldState {
/**
* Map of custom style names that correspond with given dates. Each date
* must be set to midnight for the handling logic to work correctly.
- *
+ *
* @since 8.3
*/
public Map<String, String> dateStyles = new HashMap<String, String>();
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java b/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java
index 32ac95a482..a6cd19d893 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceRpc.java
@@ -35,7 +35,7 @@ public interface DragSourceRpc extends ServerRpc {
* Called when dragend event happens on client side.
*
* @param dropEffect
- * Drop effect of the dragend event, extracted from {@code
+ * Drop effect of the dragend event, extracted from {@code
* DataTransfer.dropEffect} parameter.
*/
public void dragEnd(DropEffect dropEffect);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dnd/DropTargetRpc.java b/shared/src/main/java/com/vaadin/shared/ui/dnd/DropTargetRpc.java
index c3600bf943..7170254311 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dnd/DropTargetRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dnd/DropTargetRpc.java
@@ -34,15 +34,16 @@ public interface DropTargetRpc extends ServerRpc {
* Called when drop event happens on client side.
*
* @param types
- * List of data types from {@code DataTransfer.types} object.
+ * List of data types from {@code DataTransfer.types} object.
* @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 mouseEventDetails
- * mouse event details object containing information about the drop
- * event
+ * mouse event details object containing information about the
+ * drop event
*/
public void drop(List<String> types, Map<String, String> data,
String dropEffect, MouseEventDetails mouseEventDetails);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetClientRpc.java
index 97ad4a64d5..8ee0417430 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetClientRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetClientRpc.java
@@ -31,7 +31,7 @@ public interface FileDropTargetClientRpc extends ClientRpc {
* Sends the of upload URLs mapped to the generated file ID.
*
* @param urls
- * File IDs and URLs for uploading files to the server.
+ * File IDs and URLs for uploading files to the server.
*/
void sendUploadUrl(Map<String, String> urls);
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetRpc.java b/shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetRpc.java
index 50d34f3820..b9d1e2ca80 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dnd/FileDropTargetRpc.java
@@ -31,7 +31,7 @@ public interface FileDropTargetRpc extends ServerRpc {
* Called when files are dropped onto the file drop target.
*
* @param fileParams
- * Generated file IDs and file parameters of dropped files.
+ * Generated file IDs and file parameters of dropped files.
*/
public void drop(Map<String, FileParameters> fileParams);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dnd/FileParameters.java b/shared/src/main/java/com/vaadin/shared/ui/dnd/FileParameters.java
index 24d2407bdc..0e648a70c0 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dnd/FileParameters.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dnd/FileParameters.java
@@ -39,11 +39,11 @@ public class FileParameters implements Serializable {
* Creates a file parameters object.
*
* @param name
- * Name of the file.
+ * Name of the file.
* @param size
- * Size of the file.
+ * Size of the file.
* @param mime
- * Mime type of the file.
+ * Mime type of the file.
*/
public FileParameters(String name, long size, String mime) {
this.name = name;
@@ -64,7 +64,7 @@ public class FileParameters implements Serializable {
* Sets the file name.
*
* @param name
- * Name of the file.
+ * Name of the file.
*/
public void setName(String name) {
this.name = name;
@@ -83,7 +83,7 @@ public class FileParameters implements Serializable {
* Sets the file size.
*
* @param size
- * Size of the file.
+ * Size of the file.
*/
public void setSize(long size) {
this.size = size;
@@ -102,7 +102,7 @@ public class FileParameters implements Serializable {
* Sets the mime type.
*
* @param mime
- * Mime type of the file.
+ * Mime type of the file.
*/
public void setMime(String mime) {
this.mime = mime;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dnd/criteria/Payload.java b/shared/src/main/java/com/vaadin/shared/ui/dnd/criteria/Payload.java
index 4e3f901185..701879ae4b 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/dnd/criteria/Payload.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/dnd/criteria/Payload.java
@@ -79,7 +79,7 @@ public class Payload implements Serializable {
* Sets the key of this payload.
*
* @param key
- * key that identifies the payload
+ * key that identifies the payload
*/
public void setKey(String key) {
this.key = key;
@@ -98,7 +98,7 @@ public class Payload implements Serializable {
* Sets the value of this payload.
*
* @param value
- * value of the payload
+ * value of the payload
*/
public void setValue(String value) {
this.value = value;
@@ -117,7 +117,7 @@ public class Payload implements Serializable {
* Sets the value type of this payload.
*
* @param valueType
- * type of the payload value
+ * type of the payload value
*/
public void setValueType(ValueType valueType) {
this.valueType = valueType;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java
index 9b6fde9c33..b3467d0267 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java
@@ -34,7 +34,7 @@ public class ColumnState extends AbstractGridExtensionState {
/**
* Sets whether Grid should handle events from Widgets from this column or
* not.
- *
+ *
* @since 8.3
*/
public boolean handleWidgetEvents = false;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java b/shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java
index 7f6f52e0ed..7bed238fdd 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/grid/HeightMode.java
@@ -16,10 +16,10 @@
package com.vaadin.shared.ui.grid;
/**
- * The modes for height calculation that are supported by Grid (
- * client ({@code com.vaadin.client.widgets.Grid}),
- * server ({@code com.vaadin.ui.Grid server}), and
- * Escalator ({@code com.vaadin.client.widgets.Escalator Escalator}).
+ * The modes for height calculation that are supported by Grid ( client
+ * ({@code com.vaadin.client.widgets.Grid}), server
+ * ({@code com.vaadin.ui.Grid server}), and Escalator
+ * ({@code com.vaadin.client.widgets.Escalator Escalator}).
*
* @since 7.4
* @author Vaadin Ltd
diff --git a/shared/src/main/java/com/vaadin/shared/ui/notification/NotificationState.java b/shared/src/main/java/com/vaadin/shared/ui/notification/NotificationState.java
index 1ea913c73a..8823836e64 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/notification/NotificationState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/notification/NotificationState.java
@@ -39,7 +39,8 @@ public class NotificationState extends SharedState {
public String description;
/**
- * Whether texts are interpreted as HTML ({@code true}) or not ({@code false}).
+ * Whether texts are interpreted as HTML ({@code true}) or not
+ * ({@code false}).
*/
public boolean htmlContentAllowed;
@@ -49,8 +50,8 @@ public class NotificationState extends SharedState {
public String styleName;
/**
- * The {@link Position} of the {@link com.vaadin.ui.Notification},
- * can not be {@code null}.
+ * The {@link Position} of the {@link com.vaadin.ui.Notification}, can not
+ * be {@code null}.
*/
public Position position = Position.MIDDLE_CENTER;
diff --git a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java
index 34e0ea77d4..5bee6076d9 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/orderedlayout/AbstractOrderedLayoutServerRpc.java
@@ -17,7 +17,6 @@ package com.vaadin.shared.ui.orderedlayout;
import com.vaadin.shared.ui.LayoutClickRpc;
-public interface AbstractOrderedLayoutServerRpc
- extends LayoutClickRpc {
+public interface AbstractOrderedLayoutServerRpc extends LayoutClickRpc {
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/treegrid/TreeGridDropTargetRpc.java b/shared/src/main/java/com/vaadin/shared/ui/treegrid/TreeGridDropTargetRpc.java
index 2ac0137c68..b915461518 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/treegrid/TreeGridDropTargetRpc.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/treegrid/TreeGridDropTargetRpc.java
@@ -35,23 +35,24 @@ public interface TreeGridDropTargetRpc extends ServerRpc {
* Called when drop event happens on client side.
*
* @param types
- * list of data types from {@code DataTransfer.types} object
+ * list of data types from {@code DataTransfer.types} object
* @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 rowKey
- * key of the row on which the drop event occurred
+ * key of the row on which the drop event occurred
* @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
* @param dropLocation
- * location of the drop within the row
+ * location of the drop within the row
* @param mouseEventDetails
- * Mouse event details object containing information about the drop
- * event
+ * Mouse event details object containing information about the
+ * drop event
*/
public void drop(List<String> types, Map<String, String> data,
String dropEffect, String rowKey, Integer depth, Boolean collapsed,