1717import 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}
0 commit comments