source: CIVL/notes/addNewOption.txt@ 4e86cdd

1.23 2.0 main test-branch
Last change on this file since 4e86cdd was 6e39e13, checked in by Manchun Zheng <zmanchun@…>, 11 years ago

added a step that is missing before to update the CIVLConfiguration class.

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

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