Skip to content

Commit 93ec49c

Browse files
author
jantje
committed
Removing warnings
1 parent fd1f209 commit 93ec49c

File tree

14 files changed

+1518
-1452
lines changed

14 files changed

+1518
-1452
lines changed

it.baeyens.arduino.common/src/it/baeyens/arduino/common/Common.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import java.util.HashSet;
55
import java.util.List;
66
import java.util.Set;
7-
import java.util.Vector;
87

98
import org.eclipse.cdt.core.CCorePlugin;
109
import org.eclipse.cdt.core.envvar.EnvironmentVariable;

it.baeyens.arduino.common/src/it/baeyens/arduino/common/InstancePreferences.java

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
import org.osgi.service.prefs.BackingStoreException;
1818

1919
/**
20-
* ArduinoPreferences is a class containing only static methods that help managing the preferences.
20+
* ArduinoPreferences is a class containing only static methods that help
21+
* managing the preferences.
2122
*
2223
* @author jan Baeyens
2324
*
@@ -46,10 +47,12 @@ public static void setAutomaticallyIncludeLibraries(boolean value) {
4647
}
4748

4849
/***
49-
* get the stored option whether a build before the upload is wanted or not. If nothing is stored the option is ask and this method will pop up a
50+
* get the stored option whether a build before the upload is wanted or not.
51+
* If nothing is stored the option is ask and this method will pop up a
5052
* dialogbox
5153
*
52-
* @return true if a build is wanted before upload false if no build is wanted before upload
54+
* @return true if a build is wanted before upload false if no build is
55+
* wanted before upload
5356
*/
5457
public static boolean getBuildBeforeUploadOption() {
5558

@@ -93,7 +96,8 @@ public void run() {
9396
}
9497

9598
/**
96-
* This method reads the name of the last used arduino board from the instance preferences
99+
* This method reads the name of the last used arduino board from the
100+
* instance preferences
97101
*
98102
* @return the Arduino Board name
99103
* @author Jan Baeyens
@@ -164,7 +168,8 @@ public static void setGlobalValue(String key, String Value) {
164168
try {
165169
myScope.flush();
166170
} catch (BackingStoreException e) {
167-
Common.log(new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type string " + key)); //$NON-NLS-1$
171+
Common.log(
172+
new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type string " + key)); //$NON-NLS-1$
168173
e.printStackTrace();
169174
}
170175
}
@@ -186,7 +191,8 @@ protected static void setGlobalValue(String key, boolean Value) {
186191
try {
187192
myScope.flush();
188193
} catch (BackingStoreException e) {
189-
Common.log(new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type boolean " + key)); //$NON-NLS-1$
194+
Common.log(new Status(IStatus.WARNING, CORE_PLUGIN_ID,
195+
"failed to set global variable of type boolean " + key)); //$NON-NLS-1$
190196
e.printStackTrace();
191197
}
192198
}
@@ -197,13 +203,15 @@ protected static void setGlobalValue(String key, long Value) {
197203
try {
198204
myScope.flush();
199205
} catch (BackingStoreException e) {
200-
Common.log(new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type long " + key)); //$NON-NLS-1$
206+
Common.log(
207+
new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type long " + key)); //$NON-NLS-1$
201208
e.printStackTrace();
202209
}
203210
}
204211

205212
/**
206-
* This method returns the index of the last used line ending options are CR LF CR+LF none
213+
* This method returns the index of the last used line ending options are CR
214+
* LF CR+LF none
207215
*
208216
* @return the index of the last used setting
209217
*/
@@ -212,7 +220,8 @@ public static int GetLastUsedSerialLineEnd() {
212220
}
213221

214222
/**
215-
* This method returns the index of the last used line ending options are CR LF CR+LF none
223+
* This method returns the index of the last used line ending options are CR
224+
* LF CR+LF none
216225
*
217226
* @return the index of the last used setting
218227
*/
@@ -269,7 +278,8 @@ public static void setConfigured() {
269278
}
270279

271280
/**
272-
* This method returns boolean whether the plugin is properly configured The plugin is configured properly if a board has been installed
281+
* This method returns boolean whether the plugin is properly configured The
282+
* plugin is configured properly if a board has been installed
273283
*
274284
* @return
275285
*/
@@ -326,15 +336,17 @@ public static void setLastUsedExamples(String[] exampleNames) {
326336
}
327337

328338
public static String[] getPrivateLibraryPaths() {
329-
return getGlobalString(KEY_PRIVATE_LIBRARY_PATHS, Common.getDefaultPrivateLibraryPath()).split(File.pathSeparator);
339+
return getGlobalString(KEY_PRIVATE_LIBRARY_PATHS, Common.getDefaultPrivateLibraryPath())
340+
.split(File.pathSeparator);
330341
}
331342

332343
public static void setPrivateLibraryPaths(String[] folderName) {
333-
setGlobalValue(KEY_PRIVATE_LIBRARY_PATHS, String.join(File.pathSeparator, folderName)); //$NON-NLS-1$
344+
setGlobalValue(KEY_PRIVATE_LIBRARY_PATHS, String.join(File.pathSeparator, folderName));
334345
}
335346

336347
public static String[] getPrivateHardwarePaths() {
337-
return getGlobalString(KEY_PRIVATE_HARDWARE_PATHS, Common.getDefaultPrivateHardwarePath()).split(File.pathSeparator);
348+
return getGlobalString(KEY_PRIVATE_HARDWARE_PATHS, Common.getDefaultPrivateHardwarePath())
349+
.split(File.pathSeparator);
338350
}
339351

340352
public static void setPrivateHardwarePaths(String[] folderName) {
@@ -347,8 +359,8 @@ public static void setPrivateHardwarePaths(String[] folderName) {
347359
* @return a list of all the folder locations that can contain hardware
348360
*/
349361
public static String[] getHardwarePaths() {
350-
return (getGlobalString(KEY_PRIVATE_HARDWARE_PATHS, EMPTY_STRING) + File.pathSeparator + ConfigurationPreferences.getInstallationPath())
351-
.split(File.pathSeparator);
362+
return (getGlobalString(KEY_PRIVATE_HARDWARE_PATHS, EMPTY_STRING) + File.pathSeparator
363+
+ ConfigurationPreferences.getInstallationPath()).split(File.pathSeparator);
352364
}
353365

354366
}

it.baeyens.arduino.core/src/it/baeyens/arduino/managers/Library.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import java.util.ArrayList;
88
import java.util.Collection;
99
import java.util.Collections;
10-
import java.util.Comparator;
1110
import java.util.List;
1211

1312
import org.apache.commons.io.FileUtils;
@@ -17,8 +16,8 @@
1716
import org.eclipse.core.runtime.IStatus;
1817
import org.eclipse.core.runtime.Status;
1918

20-
import it.baeyens.arduino.common.Const;
2119
import it.baeyens.arduino.common.ConfigurationPreferences;
20+
import it.baeyens.arduino.common.Const;
2221
import it.baeyens.arduino.ui.Activator;
2322

2423
public class Library implements Comparable<Library> {
@@ -151,8 +150,8 @@ public void setChecksum(String checksum) {
151150
}
152151

153152
public Path getInstallPath() {
154-
return Paths.get(ConfigurationPreferences.getInstallationPath().append(Const.LIBRARY_PATH_SUFFIX).append(this.name.replace(' ', '_'))
155-
.append(this.version).toString());
153+
return Paths.get(ConfigurationPreferences.getInstallationPath().append(Const.LIBRARY_PATH_SUFFIX)
154+
.append(this.name.replace(' ', '_')).append(this.version).toString());
156155
}
157156

158157
public boolean isInstalled() {
@@ -222,7 +221,8 @@ public IStatus remove(IProgressMonitor monitor) {
222221
try {
223222
FileUtils.deleteDirectory(getInstallPath().toFile());
224223
} catch (IOException e) {
225-
return new Status(IStatus.ERROR, Activator.getId(), "Failed to remove folder" + getInstallPath().toString(), e); //$NON-NLS-1$
224+
return new Status(IStatus.ERROR, Activator.getId(), "Failed to remove folder" + getInstallPath().toString(), //$NON-NLS-1$
225+
e);
226226
}
227227

228228
return Status.OK_STATUS;

0 commit comments

Comments
 (0)