@Override
        public void handleEvent(Event e) {
          IEnvironmentVariableManager envManager =
              CCorePlugin.getDefault().getBuildEnvironmentManager();
          IContributedEnvironment contribEnv = envManager.getContributedEnvironment();
          ICConfigurationDescription confdesc = getConfdesc();

          int selectedBoardFile = BoardSelectionPage.this.mControlBoardsTxtFile.getSelectionIndex();
          String boardFile = BoardSelectionPage.this.mControlBoardsTxtFile.getText().trim();
          if (confdesc != null) {
            IEnvironmentVariable var =
                new EnvironmentVariable(Const.ENV_KEY_JANTJE_BOARDS_FILE, boardFile);
            contribEnv.addVariable(var, confdesc);
            IPath platformPath =
                new Path(new File(boardFile).getParent()).append(Const.PLATFORM_FILE_NAME);
            var =
                new EnvironmentVariable(
                    Const.ENV_KEY_JANTJE_PLATFORM_FILE, platformPath.toString());
            contribEnv.addVariable(var, confdesc);
          }

          /*
           * Change the list of available boards
           */
          String CurrentBoard = BoardSelectionPage.this.mcontrolBoardName.getText();
          BoardSelectionPage.this.mcontrolBoardName.removeAll();
          BoardSelectionPage.this.mcontrolBoardName.setItems(
              BoardSelectionPage.this.mAllBoardsFiles[selectedBoardFile].GetArduinoBoards());
          BoardSelectionPage.this.mcontrolBoardName.setText(CurrentBoard);

          BoardSelectionPage.this.BoardModifyListener.handleEvent(null);
        }
 @Override
 public void handleEvent(CProjectDescriptionEvent event) {
   // we are only interested in about to apply
   if (event.getEventType() != CProjectDescriptionEvent.ABOUT_TO_APPLY) return;
   ICProjectDescription projDesc = event.getNewCProjectDescription();
   IEnvironmentVariableManager envManager = CCorePlugin.getDefault().getBuildEnvironmentManager();
   IContributedEnvironment contribEnv = envManager.getContributedEnvironment();
   if (projDesc.getActiveConfiguration() != null) {
     IEnvironmentVariable var =
         contribEnv.getVariable(
             ArduinoConst.ENV_KEY_JANTJE_PLATFORM_FILE, projDesc.getActiveConfiguration());
     if (var != null) {
       IPath platformPath = new Path(var.getValue());
       ArduinoHelpers.setProjectPathVariables(
           projDesc.getProject(), platformPath.removeLastSegments(1));
       ArduinoHelpers.setTheEnvironmentVariables(
           projDesc.getProject(), projDesc.getActiveConfiguration(), false);
       try {
         ArduinoHelpers.addArduinoCodeToProject(
             projDesc.getProject(), projDesc.getActiveConfiguration());
       } catch (CoreException e1) {
         Common.log(
             new Status(
                 IStatus.ERROR, ArduinoConst.CORE_PLUGIN_ID, "Error adding the arduino code", e1));
       }
       ArduinoLibraries.reAttachLibrariesToProject(projDesc.getActiveConfiguration());
     }
   }
 }
        @Override
        public void handleEvent(Event e) {

          int selectedBoardFile = BoardSelectionPage.this.mControlBoardsTxtFile.getSelectionIndex();
          String boardName = BoardSelectionPage.this.mcontrolBoardName.getText();

          for (LabelCombo curLabelCombo : BoardSelectionPage.this.mBoardOptionCombos) {
            curLabelCombo.setItems(
                BoardSelectionPage.this.mAllBoardsFiles[selectedBoardFile].getMenuItemNames(
                    curLabelCombo.getMenuName(), boardName));
          }

          IEnvironmentVariableManager envManager =
              CCorePlugin.getDefault().getBuildEnvironmentManager();
          IContributedEnvironment contribEnv = envManager.getContributedEnvironment();
          ICConfigurationDescription confdesc = getConfdesc();
          if (confdesc != null) {
            IEnvironmentVariable var =
                new EnvironmentVariable(Const.ENV_KEY_JANTJE_BOARD_NAME, boardName);
            contribEnv.addVariable(var, confdesc);
          }
          isPageComplete();
          EnableControls();
        }