Skip to main content
summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:47:02 -0500
commit170e654b4796bad1453ae85a427b97317d67a69a (patch)
tree6ca9b8a8fedd5fd25f97eb79c408312e256ff981 /native
parent35996a5c5ca5c254959ba48241eaada6dbf8628d (diff)
downloadorg.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.gz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.xz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.zip
Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Format source code - Remove trailing white spaces on all lines and completing the wizard Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
Diffstat (limited to 'native')
-rw-r--r--native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/BaudRate.java63
-rw-r--r--native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/ByteSize.java23
-rw-r--r--native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/Parity.java19
-rw-r--r--native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java14
-rw-r--r--native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/StopBits.java27
-rw-r--r--native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/internal/Messages.java2
6 files changed, 52 insertions, 96 deletions
diff --git a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/BaudRate.java b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/BaudRate.java
index 6fdc61bc41..ada49ce448 100644
--- a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/BaudRate.java
+++ b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/BaudRate.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
@@ -18,67 +18,44 @@ package org.eclipse.cdt.serial;
*/
public enum BaudRate {
- B110(110),
- B300(300),
- B600(600),
- B1200(1200),
- B2400(2400),
- B4800(4800),
- B9600(9600),
- B14400(14400),
- B19200(19200),
- B38400(38400),
- B57600(57600),
- B115200(115200);
+ B110(110), B300(300), B600(600), B1200(1200), B2400(2400), B4800(4800), B9600(9600), B14400(14400), B19200(19200),
+ B38400(38400), B57600(57600), B115200(115200);
private final int rate;
-
+
private BaudRate(int rate) {
this.rate = rate;
}
-
+
public int getRate() {
return rate;
}
- private static final String[] strings = {
- "110", //$NON-NLS-1$
- "300", //$NON-NLS-1$
- "600", //$NON-NLS-1$
- "1200", //$NON-NLS-1$
- "2400", //$NON-NLS-1$
- "4800", //$NON-NLS-1$
- "9600", //$NON-NLS-1$
- "14400", //$NON-NLS-1$
- "19200", //$NON-NLS-1$
- "38400", //$NON-NLS-1$
- "57600", //$NON-NLS-1$
- "115200" //$NON-NLS-1$
+ private static final String[] strings = { "110", //$NON-NLS-1$
+ "300", //$NON-NLS-1$
+ "600", //$NON-NLS-1$
+ "1200", //$NON-NLS-1$
+ "2400", //$NON-NLS-1$
+ "4800", //$NON-NLS-1$
+ "9600", //$NON-NLS-1$
+ "14400", //$NON-NLS-1$
+ "19200", //$NON-NLS-1$
+ "38400", //$NON-NLS-1$
+ "57600", //$NON-NLS-1$
+ "115200" //$NON-NLS-1$
};
public static String[] getStrings() {
return strings;
}
- private static final BaudRate[] rates = {
- B110,
- B300,
- B600,
- B1200,
- B2400,
- B4800,
- B9600,
- B14400,
- B19200,
- B38400,
- B57600,
- B115200
- };
+ private static final BaudRate[] rates = { B110, B300, B600, B1200, B2400, B4800, B9600, B14400, B19200, B38400,
+ B57600, B115200 };
public static BaudRate fromStringIndex(int rate) {
return rates[rate];
}
-
+
public static int getStringIndex(BaudRate rate) {
for (int i = 0; i < rates.length; ++i) {
if (rate.equals(rates[i])) {
diff --git a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/ByteSize.java b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/ByteSize.java
index 13672700d4..af927af061 100644
--- a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/ByteSize.java
+++ b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/ByteSize.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
@@ -18,10 +18,7 @@ package org.eclipse.cdt.serial;
*/
public enum ByteSize {
- B5(5),
- B6(6),
- B7(7),
- B8(8);
+ B5(5), B6(6), B7(7), B8(8);
private final int size;
@@ -33,23 +30,17 @@ public enum ByteSize {
return size;
}
- private static final String[] strings = {
- "5", //$NON-NLS-1$
- "6", //$NON-NLS-1$
- "7", //$NON-NLS-1$
- "8" //$NON-NLS-1$
+ private static final String[] strings = { "5", //$NON-NLS-1$
+ "6", //$NON-NLS-1$
+ "7", //$NON-NLS-1$
+ "8" //$NON-NLS-1$
};
public static String[] getStrings() {
return strings;
}
- private static final ByteSize[] sizes = {
- B5,
- B6,
- B7,
- B8
- };
+ private static final ByteSize[] sizes = { B5, B6, B7, B8 };
public static ByteSize fromStringIndex(int size) {
return sizes[size];
diff --git a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/Parity.java b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/Parity.java
index 94ea833012..b853c5e803 100644
--- a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/Parity.java
+++ b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/Parity.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
@@ -18,25 +18,18 @@ package org.eclipse.cdt.serial;
*/
public enum Parity {
- None,
- Even,
- Odd;
+ None, Even, Odd;
- private static final String[] strings = {
- "None", //$NON-NLS-1$
- "Even", //$NON-NLS-1$
- "Odd" //$NON-NLS-1$
+ private static final String[] strings = { "None", //$NON-NLS-1$
+ "Even", //$NON-NLS-1$
+ "Odd" //$NON-NLS-1$
};
public static String[] getStrings() {
return strings;
}
- private static final Parity[] parities = {
- None,
- Even,
- Odd
- };
+ private static final Parity[] parities = { None, Even, Odd };
public static Parity fromStringIndex(int index) {
return parities[index];
diff --git a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java
index 02bb6455f1..f81cd60249 100644
--- a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java
+++ b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
@@ -194,7 +194,7 @@ public class SerialPort {
/**
* Create a serial port that connect to the given serial device.
- *
+ *
* @param portName
* name for the serial device.
*/
@@ -236,7 +236,7 @@ public class SerialPort {
/**
* List the available serial ports.
- *
+ *
* @return serial ports
*/
public static String[] list() throws IOException {
@@ -269,7 +269,7 @@ public class SerialPort {
/**
* Return an the SerialPort with the given name or null if it hasn't been allocated yet. This
* would be used by components that need to pause and resume a serial port.
- *
+ *
* @param portName
* @return
* @since 1.1
@@ -298,7 +298,7 @@ public class SerialPort {
/**
* Return the name for this serial port.
- *
+ *
* @return serial port name
*/
public String getPortName() {
@@ -351,7 +351,7 @@ public class SerialPort {
// Sleep for a second since some serial ports take a while to actually close
Thread.sleep(500);
} catch (InterruptedException e) {
- // nothing to do
+ // nothing to do
}
}
}
@@ -359,7 +359,7 @@ public class SerialPort {
public boolean isOpen() {
return isOpen;
}
-
+
public void pause() throws IOException {
if (!isOpen) {
return;
diff --git a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/StopBits.java b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/StopBits.java
index 021a092641..2ddb9d1033 100644
--- a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/StopBits.java
+++ b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/StopBits.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
@@ -18,23 +18,18 @@ package org.eclipse.cdt.serial;
*/
public enum StopBits {
- S1,
- S2;
-
- private static final String[] strings = {
- "1", //$NON-NLS-1$
- "2" //$NON-NLS-1$
+ S1, S2;
+
+ private static final String[] strings = { "1", //$NON-NLS-1$
+ "2" //$NON-NLS-1$
};
-
+
public static String[] getStrings() {
return strings;
}
-
- private static final StopBits[] stopBits = {
- S1,
- S2
- };
-
+
+ private static final StopBits[] stopBits = { S1, S2 };
+
public static StopBits fromStringIndex(int index) {
return stopBits[index];
}
@@ -47,9 +42,9 @@ public enum StopBits {
}
return getStringIndex(getDefault());
}
-
+
public static StopBits getDefault() {
return S1;
}
-
+
}
diff --git a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/internal/Messages.java b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/internal/Messages.java
index ba20e3aed0..33e42901e3 100644
--- a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/internal/Messages.java
+++ b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/internal/Messages.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/

Back to the top