main
test-branch
| Line | |
|---|
| 1 |
|
|---|
| 2 | 1. edit grammar/Command.g4: add the new option in the rule OPTION_NAME;
|
|---|
| 3 |
|
|---|
| 4 | 2. 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 |
|
|---|
| 11 | 3. 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 |
|
|---|
| 19 | 3. edit the static code in civl.run.common.CIVLCommand.java:
|
|---|
| 20 | add it to CIVLCommand's option categories as it should be,
|
|---|
| 21 | for example, "traceO" is only applicable to replay command so just add it
|
|---|
| 22 | by CIVLCommand.addReplayOption(...).
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.