source: CIVL/mods/dev.civl.com/notes/addNewOption.txt@ 1aaefd4

main test-branch
Last change on this file since 1aaefd4 was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 988 bytes
Line 
1
21. edit grammar/Command.g4: add the new option in the rule OPTION_NAME;
3
42. in civl.config.IF.CIVLConstants:
5(1) add the new Option object:
6 e.g.: public final static Option showTransitionsO =
7 Option.newScalarOption("showTransitions", BOOLEAN, "print transitions", false);
8(2) modify the method getAllOptions by adding the new option
9 to the return array
10
113. in civl.config.IF.CIVLConfiguration:
12(1) add a new field to store the value of the new option, e.g.,
13 private boolean showTransitions = false;
14(2) add a line in the constructor to initialize the value of
15 the new field from GMCConfiguratio, e.g.,
16 this.showTransitions = config.isTrue(CIVLConstants.showTransitionsO);
17(3) add getter and setter for the new field.
18
193. edit the static code in civl.run.common.CIVLCommand.java:
20add it to CIVLCommand's option categories as it should be,
21for example, "traceO" is only applicable to replay command so just add it
22by CIVLCommand.addReplayOption(...).
Note: See TracBrowser for help on using the repository browser.