Skip to content

Commit 51d7984

Browse files
committed
Removed some "Has an invalid arduino board configuration." that do not need logging.
1 parent 3cf446f commit 51d7984

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

it.baeyens.arduino.core/src/it/baeyens/arduino/tools/ArduinoHelpers.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -648,13 +648,16 @@ private static void setTheEnvironmentVariablesAddAFile(IContributedEnvironment c
648648
* The file to parse
649649
*/
650650
private static void setTheEnvironmentVariablesAddtheBoardsTxt(IContributedEnvironment contribEnv, ICConfigurationDescription confDesc,
651-
ArduinoBoards boardsFile, String boardID) {
651+
ArduinoBoards boardsFile, String boardID, boolean warn) {
652652

653653
// Get the boards section and add all entries to the environment variables
654654
Map<String, String> boardSectionMap = boardsFile.getSection(boardID);
655655
if (boardSectionMap == null) {
656-
Common.log(new Status(IStatus.WARNING, ArduinoConst.CORE_PLUGIN_ID, "The project "
657-
+ confDesc.getProjectDescription().getProject().getName() + " Has an invalid arduino board configuration."));
656+
if (warn) {
657+
Common.log(new Status(IStatus.WARNING, ArduinoConst.CORE_PLUGIN_ID, "The project "
658+
+ confDesc.getProjectDescription().getProject().getName() + " Has an invalid arduino board configuration."));
659+
660+
}
658661
return;
659662
}
660663
for (Entry<String, String> currentPair : boardSectionMap.entrySet()) {
@@ -822,12 +825,12 @@ public static void setTheEnvironmentVariables(IProject project, ICConfigurationD
822825
setTheEnvironmentVariablesAddAFile(contribEnv, confDesc, localPlatformFilename);
823826
}
824827
// now process the boards file
825-
setTheEnvironmentVariablesAddtheBoardsTxt(contribEnv, confDesc, boardsFile, boardID);
828+
setTheEnvironmentVariablesAddtheBoardsTxt(contribEnv, confDesc, boardsFile, boardID, true);
826829

827830
// also process the file as part of the plugin
828831
if (arduinoEclipsePluginFile.toFile().exists()) {
829832
ArduinoBoards myBoardsFile = new ArduinoBoards(arduinoEclipsePluginFile.toOSString());
830-
setTheEnvironmentVariablesAddtheBoardsTxt(contribEnv, confDesc, myBoardsFile, boardID);
833+
setTheEnvironmentVariablesAddtheBoardsTxt(contribEnv, confDesc, myBoardsFile, boardID, false);
831834
}
832835

833836
// Do some post processing

0 commit comments

Comments
 (0)