|
16 | 16 | import org.eclipse.core.filesystem.URIUtil;
|
17 | 17 | import org.eclipse.core.resources.IProject;
|
18 | 18 | import org.eclipse.core.resources.ResourcesPlugin;
|
| 19 | +import org.eclipse.core.runtime.CoreException; |
19 | 20 | import org.eclipse.core.runtime.IPath;
|
20 | 21 | import org.eclipse.core.runtime.IProgressMonitor;
|
21 | 22 | import org.eclipse.core.runtime.IStatus;
|
@@ -70,10 +71,21 @@ private static void generateDumpFiles(IProgressMonitor monitor) {
|
70 | 71 | Set<String> boardsSet = new HashSet<String>();
|
71 | 72 | for (IProject project : projects) {
|
72 | 73 | if (project.isOpen()) {
|
73 |
| - String boardName = Common.getBuildEnvironmentVariable(project, ArduinoConst.ENV_KEY_JANTJE_BOARD_ID, ""); |
74 |
| - String PackageName = Common.getBuildEnvironmentVariable(project, ArduinoConst.ENV_KEY_JANTJE_PACKAGE_ID, ""); |
75 |
| - String ArchitectureName = Common.getBuildEnvironmentVariable(project, ArduinoConst.ENV_KEY_JANTJE_ARCITECTURE_ID, ""); |
76 |
| - boardsSet.add(PackageName + ":" + ArchitectureName + ":" + boardName); |
| 74 | + try { |
| 75 | + if (project.hasNature(ArduinoConst.ArduinoNatureID)) { |
| 76 | + String boardName = Common.getBuildEnvironmentVariable(project, ArduinoConst.ENV_KEY_JANTJE_BOARD_ID, ""); |
| 77 | + String PackageName = Common.getBuildEnvironmentVariable(project, ArduinoConst.ENV_KEY_JANTJE_PACKAGE_ID, ""); |
| 78 | + String ArchitectureName = Common.getBuildEnvironmentVariable(project, ArduinoConst.ENV_KEY_JANTJE_ARCITECTURE_ID, ""); |
| 79 | + if (boardName.isEmpty() || PackageName.isEmpty() || ArchitectureName.isEmpty()) { |
| 80 | + Common.log(new Status(IStatus.WARNING, ArduinoConst.CORE_PLUGIN_ID, "Skipping project \"" + project.getName() |
| 81 | + + "\" due to missin configuration.")); |
| 82 | + } else { |
| 83 | + boardsSet.add(PackageName + ":" + ArchitectureName + ":" + boardName); |
| 84 | + } |
| 85 | + } |
| 86 | + } catch (CoreException e) { |
| 87 | + e.printStackTrace(); |
| 88 | + } |
77 | 89 | }
|
78 | 90 | }
|
79 | 91 | for (String board : boardsSet) {
|
|
0 commit comments