Skip to content

Commit d41a878

Browse files
committed
Private hardware path does not work on linux
It seems : is used instead of ;
1 parent f6f0692 commit d41a878

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

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

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package it.baeyens.arduino.common;
22

3+
import java.io.File;
34
import java.util.HashMap;
45
import java.util.Map;
56
import java.util.Map.Entry;
@@ -16,8 +17,7 @@
1617
import org.osgi.service.prefs.BackingStoreException;
1718

1819
/**
19-
* ArduinoPreferences is a class containing only static methods that help
20-
* managing the preferences.
20+
* ArduinoPreferences is a class containing only static methods that help managing the preferences.
2121
*
2222
* @author jan Baeyens
2323
*
@@ -41,12 +41,10 @@ public static void setAutomaticallyIncludeLibraries(boolean value) {
4141
}
4242

4343
/***
44-
* get the stored option whether a build before the upload is wanted or not.
45-
* If nothing is stored the option is ask and this method will pop up a
44+
* 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
4645
* dialogbox
4746
*
48-
* @return true if a build is wanted before upload false if no build is
49-
* wanted before upload
47+
* @return true if a build is wanted before upload false if no build is wanted before upload
5048
*/
5149
public static boolean getBuildBeforeUploadOption() {
5250

@@ -90,8 +88,7 @@ public void run() {
9088
}
9189

9290
/**
93-
* This method reads the name of the last used arduino board from the
94-
* instance preferences
91+
* This method reads the name of the last used arduino board from the instance preferences
9592
*
9693
* @return the Arduino Board name
9794
* @author Jan Baeyens
@@ -162,8 +159,7 @@ public static void setGlobalValue(String key, String Value) {
162159
try {
163160
myScope.flush();
164161
} catch (BackingStoreException e) {
165-
Common.log(
166-
new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type string " + key)); //$NON-NLS-1$
162+
Common.log(new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type string " + key)); //$NON-NLS-1$
167163
e.printStackTrace();
168164
}
169165
}
@@ -185,8 +181,7 @@ protected static void setGlobalValue(String key, boolean Value) {
185181
try {
186182
myScope.flush();
187183
} catch (BackingStoreException e) {
188-
Common.log(new Status(IStatus.WARNING, CORE_PLUGIN_ID,
189-
"failed to set global variable of type boolean " + key)); //$NON-NLS-1$
184+
Common.log(new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type boolean " + key)); //$NON-NLS-1$
190185
e.printStackTrace();
191186
}
192187
}
@@ -197,15 +192,13 @@ protected static void setGlobalValue(String key, long Value) {
197192
try {
198193
myScope.flush();
199194
} catch (BackingStoreException e) {
200-
Common.log(
201-
new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type long " + key)); //$NON-NLS-1$
195+
Common.log(new Status(IStatus.WARNING, CORE_PLUGIN_ID, "failed to set global variable of type long " + key)); //$NON-NLS-1$
202196
e.printStackTrace();
203197
}
204198
}
205199

206200
/**
207-
* This method returns the index of the last used line ending options are CR
208-
* LF CR+LF none
201+
* This method returns the index of the last used line ending options are CR LF CR+LF none
209202
*
210203
* @return the index of the last used setting
211204
*/
@@ -214,8 +207,7 @@ public static int GetLastUsedSerialLineEnd() {
214207
}
215208

216209
/**
217-
* This method returns the index of the last used line ending options are CR
218-
* LF CR+LF none
210+
* This method returns the index of the last used line ending options are CR LF CR+LF none
219211
*
220212
* @return the index of the last used setting
221213
*/
@@ -272,8 +264,7 @@ public static void setConfigured() {
272264
}
273265

274266
/**
275-
* This method returns boolean whether the plugin is properly configured The
276-
* plugin is configured properly if a board has been installed
267+
* This method returns boolean whether the plugin is properly configured The plugin is configured properly if a board has been installed
277268
*
278269
* @return
279270
*/
@@ -330,15 +321,15 @@ public static void setLastUsedExamples(String[] exampleNames) {
330321
}
331322

332323
public static String[] getPrivateLibraryPaths() {
333-
return getGlobalString(KEY_PRIVATE_LIBRARY_PATHS, Common.getDefaultPrivateLibraryPath()).split(";"); //$NON-NLS-1$
324+
return getGlobalString(KEY_PRIVATE_LIBRARY_PATHS, Common.getDefaultPrivateLibraryPath()).split(File.pathSeparator);
334325
}
335326

336327
public static void setPrivateLibraryPaths(String[] folderName) {
337328
setGlobalValue(KEY_PRIVATE_LIBRARY_PATHS, String.join("\n", folderName)); //$NON-NLS-1$
338329
}
339330

340331
public static String[] getPrivateHardwarePaths() {
341-
return getGlobalString(KEY_PRIVATE_HARDWARE_PATHS, Common.getDefaultPrivateHardwarePath()).split(";"); //$NON-NLS-1$
332+
return getGlobalString(KEY_PRIVATE_HARDWARE_PATHS, Common.getDefaultPrivateHardwarePath()).split(File.pathSeparator);
342333
}
343334

344335
public static void setPrivateHardwarePaths(String[] folderName) {

0 commit comments

Comments
 (0)