File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
io.sloeber.core/src/io/sloeber/core/listeners Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 55 * for instance you can have a project with 2 configurations
66 * one for teensy
77 * one for arduino uno
8- *
9- *
8+ *
9+ *
1010 * when you use the spi library the library is a completely different library
1111 * this code takes care that you use the correct library when switching configuration
12- *
12+ *
1313 */
1414
1515import org .eclipse .cdt .core .settings .model .CProjectDescriptionEvent ;
@@ -91,8 +91,10 @@ public void run() {
9191 }
9292
9393 // We have a arduino project so we are safe.
94+ ICProjectDescription oldprojDesc = event .getOldCProjectDescription ();
9495
95- if (projDesc .getActiveConfiguration () != null ) {
96+ if (!projDesc .getName ().equals (oldprojDesc .getName ())) {
97+ // only act upon switching configurations
9698
9799 Helpers .setTheEnvironmentVariables (projDesc .getProject (), projDesc .getActiveConfiguration (),
98100 (InternalBoardDescriptor ) BoardDescriptor .makeBoardDescriptor (projDesc .getActiveConfiguration ()));
You can’t perform that action at this time.
0 commit comments