Skip to content

Commit 23d9d49

Browse files
author
jantje
committed
#475 #686 - replaced by ? as separator c and cpp added as extensions
1 parent ac33793 commit 23d9d49

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

io.sloeber.core/src/io/sloeber/core/api/BoardsManager.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
public class BoardsManager {
4646
private static final String INO = "ino"; //$NON-NLS-1$
4747
private static final String PDE = "pde";//$NON-NLS-1$
48+
private static final String CPP = "cpp";//$NON-NLS-1$
49+
private static final String C = "c";//$NON-NLS-1$
4850

4951
public static String getUpdateJasonFilesKey() {
5052
return ConfigurationPreferences.getUpdateJasonFilesKey();
@@ -274,9 +276,10 @@ private static TreeMap<String, IPath> getExamplesFromFolder(String prefix, IPath
274276
Path pt = new Path(exampleFolder.toString());
275277
String extension = pt.getFileExtension();
276278
if (exampleFolder.isDirectory()) {
277-
examples.putAll(getExamplesFromFolder(prefix + location.lastSegment() + '-',
279+
examples.putAll(getExamplesFromFolder(prefix + ' ' + location.lastSegment() + '?',
278280
new Path(exampleFolder.toString())));
279-
} else if (INO.equalsIgnoreCase(extension) || PDE.equalsIgnoreCase(extension)) {
281+
} else if (INO.equalsIgnoreCase(extension) || PDE.equalsIgnoreCase(extension)
282+
|| CPP.equalsIgnoreCase(extension) || C.equalsIgnoreCase(extension)) {
280283
examples.put(prefix + location.lastSegment(), location);
281284
}
282285
}

io.sloeber.core/src/io/sloeber/core/tools/Helpers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,8 @@ private static void addPlatformFileTools(ArduinoPlatform platform, IContributedE
678678
Tool theTool = tool.getTool();
679679
if (theTool == null) {
680680
Common.log(new Status(IStatus.WARNING, Const.CORE_PLUGIN_ID,
681-
"Error adding platformFileTools while processing tool " + tool.getName()
682-
+ "Installpath is null"));
681+
"Error adding platformFileTools while processing tool " + tool.getName() + " version "
682+
+ tool.getVersion() + " Installpath is null"));
683683
return;
684684
}
685685
String valueString = new Path(theTool.getInstallPath().toString()).toString();

io.sloeber.core/src/jUnit/CreateAndCompile.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public CreateAndCompile(String jsonFileName, String packageName, String platform
5353
@Parameters(name = "{index}: {0} {1} {2} {3} {4}")
5454
public static Collection boards() {
5555
return Arrays.asList(new Object[][] {
56+
{ "package_redbear_index.json", "RedBear", "RedBear Duo (32-bits ARM Cortex-M3)", "RedBear_Duo_native",
57+
"" }, //
58+
{ "package_redbear_index.json", "RedBear", "RedBear Duo (32-bits ARM Cortex-M3)", "RedBear_Duo", "" }, //
5659

5760
// package_quirkbot.com_index.json
5861
{ "package_quirkbot.com_index.json", "quirkbot", "Quirkbot AVR Boards", "quirkbot", "" }, //

io.sloeber.ui/src/io/sloeber/ui/wizard/newsketch/SampleSelector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void AddAllExamples(BoardDescriptor platformPath, ArrayList<Path> arrayLi
125125

126126
// Add the examples to the tree
127127
for (Map.Entry<String, IPath> entry : this.examples.entrySet()) {
128-
String keys[] = entry.getKey().split("-"); //$NON-NLS-1$
128+
String keys[] = entry.getKey().split("\\?"); //$NON-NLS-1$
129129
TreeItem curItems[] = this.sampleTree.getItems();
130130
TreeItem curItem = findItem(curItems, keys[0]);
131131
if (curItem == null) {

0 commit comments

Comments
 (0)