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

Method initParameters

arduino-core/src/processing/app/BaseNoGui.java:817–835  ·  view source on GitHub ↗
(String args[])

Source from the content-addressed store, hash-verified

815 }
816
817 static public void initParameters(String args[]) throws Exception {
818 String preferencesFile = null;
819
820 // Do a first pass over the commandline arguments, the rest of them
821 // will be processed by the Base constructor. Note that this loop
822 // does not look at the last element of args, to prevent crashing
823 // when no parameter was specified to an option. Later, Base() will
824 // then show an error for these.
825 for (int i = 0; i < args.length - 1; i++) {
826 if (args[i].equals("--preferences-file")) {
827 ++i;
828 preferencesFile = args[i];
829 continue;
830 }
831 }
832
833 // run static initialization that grabs all the prefs
834 PreferencesData.init(absoluteFile(preferencesFile));
835 }
836
837 /**
838 * Produce a sanitized name that fits our standards for likely to work.

Callers 1

BaseMethod · 0.95

Calls 3

initMethod · 0.95
absoluteFileMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected