MCPcopy
hub / github.com/arduino/Arduino / loadPreferences

Method loadPreferences

arduino-core/src/cc/arduino/Compiler.java:211–224  ·  view source on GitHub ↗
(TargetBoard board, TargetPlatform platform, TargetPackage aPackage, String vidpid)

Source from the content-addressed store, hash-verified

209 }
210
211 private PreferencesMap loadPreferences(TargetBoard board, TargetPlatform platform, TargetPackage aPackage, String vidpid) throws RunnerException, IOException {
212 ByteArrayOutputStream stdout = new ByteArrayOutputStream();
213 ByteArrayOutputStream stderr = new ByteArrayOutputStream();
214 MessageConsumerOutputStream err = new MessageConsumerOutputStream(new I18NAwareMessageConsumer(new PrintStream(stderr), Compiler.this), "\n");
215 try {
216 callArduinoBuilder(board, platform, aPackage, vidpid, BuilderAction.DUMP_PREFS, stdout, err);
217 } catch (RunnerException e) {
218 System.err.println(new String(stderr.toByteArray()));
219 throw e;
220 }
221 PreferencesMap prefs = new PreferencesMap();
222 prefs.load(new ByteArrayInputStream(stdout.toByteArray()));
223 return prefs;
224 }
225
226 private void addPathFlagIfPathExists(List<String> cmd, String flag, File folder) {
227 if (folder.exists()) {

Callers 1

buildMethod · 0.95

Calls 2

callArduinoBuilderMethod · 0.95
loadMethod · 0.95

Tested by

no test coverage detected