Source:
static public PreferencesMap getBoardPreferences() { TargetBoard board = getTargetBoard(); if (board == null) return null; String boardId = board.getId(); PreferencesMap prefs = new PreferencesMap(board.getPreferences()); String extendedName = prefs.get("name"); for (String menuId : board.getMenuIds()) { if (!board.hasMenu(menuId)) continue; String entry = PreferencesData.get("custom_" + menuId); if (entry != null && entry.startsWith(boardId)) { String selectionId = entry.substring(boardId.length() + 1); prefs.putAll(board.getMenuPreferences(menuId, selectionId)); extendedName += ", " + board.getMenuLabel(menuId, selectionId); } } prefs.put("name", extendedName); List<ContributedTool> requiredTools = new ArrayList<>(); ContributedPlatform platform = indexer.getContributedPlaform(getTargetPlatform()); if (platform != null) requiredTools.addAll(platform.getResolvedTools()); String core = prefs.get("build.core"); if (core != null && core.contains(":")) { String split[] = core.split(":"); TargetPlatform referenced = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); if (referenced != null) { ContributedPlatform referencedPlatform = indexer.getContributedPlaform(referenced); if (referencedPlatform != null) requiredTools.addAll(referencedPlatform.getResolvedTools()); } } String prefix = "runtime.tools."; for (ContributedTool tool : requiredTools) { File folder = tool.getDownloadableContribution(getPlatform()).getInstalledFolder(); if (folder == null) { continue; } String toolPath = folder.getAbsolutePath(); prefs.put(prefix + tool.getName() + ".path", toolPath); PreferencesData.set(prefix + tool.getName() + ".path", toolPath); PreferencesData.set(prefix + tool.getName() + "-" + tool.getVersion() + ".path", toolPath); } return prefs; }

Target:
static public PreferencesMap getBoardPreferences() { TargetBoard board = getTargetBoard(); if (board == null) return null; String boardId = board.getId(); PreferencesMap prefs = new PreferencesMap(board.getPreferences()); String extendedName = prefs.get("name"); for (String menuId : board.getMenuIds()) { if (!board.hasMenu(menuId)) continue; String entry = PreferencesData.get("custom_" + menuId); if (entry != null && entry.startsWith(boardId)) { String selectionId = entry.substring(boardId.length() + 1); prefs.putAll(board.getMenuPreferences(menuId, selectionId)); extendedName += ", " + board.getMenuLabel(menuId, selectionId); } } prefs.put("name", extendedName); List<ContributedTool> requiredTools = new ArrayList<>(); ContributedPlatform platform = indexer.getContributedPlaform(getTargetPlatform()); if (platform != null) requiredTools.addAll(platform.getResolvedTools()); String core = prefs.get("build.core"); if (core != null && core.contains(":")) { String split[] = core.split(":"); TargetPlatform referenced = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); if (referenced != null) { ContributedPlatform referencedPlatform = indexer.getContributedPlaform(referenced); if (referencedPlatform != null) requiredTools.addAll(referencedPlatform.getResolvedTools()); } else { String msg = tr("The current selected board needs the core '{0}' that is not installed."); System.out.println(I18n.format(msg, core)); } } String prefix = "runtime.tools."; for (ContributedTool tool : requiredTools) { File folder = tool.getDownloadableContribution(getPlatform()).getInstalledFolder(); if (folder == null) { continue; } String toolPath = folder.getAbsolutePath(); prefs.put(prefix + tool.getName() + ".path", toolPath); PreferencesData.set(prefix + tool.getName() + ".path", toolPath); PreferencesData.set(prefix + tool.getName() + "-" + tool.getVersion() + ".path", toolPath); } return prefs; }