[command] Use addCommands in command group templates (#2900)

This makes the Java templates consistent with the C++ templates as well as the documentation

Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
Prateek Machiraju
2020-12-01 23:52:45 -05:00
committed by GitHub
parent 339d7445b3
commit c11d34b26c
4 changed files with 13 additions and 12 deletions

View File

@@ -17,7 +17,8 @@ public class ReplaceMeParallelCommandGroup extends ParallelCommandGroup {
* Creates a new ReplaceMeParallelCommandGroup.
*/
public ReplaceMeParallelCommandGroup() {
// Add your commands in the super() call, e.g.
// super(new FooCommand(), new BarCommand());super();
// Add your commands in the addCommands() call, e.g.
// addCommands(new FooCommand(), new BarCommand());
addCommands();
}
}

View File

@@ -18,9 +18,9 @@ public class ReplaceMeParallelDeadlineGroup extends ParallelDeadlineGroup {
* Creates a new ReplaceMeParallelDeadlineGroup.
*/
public ReplaceMeParallelDeadlineGroup() {
// Add your commands in the super() call. Add the deadline first.
super(
new InstantCommand()
);
// Add the deadline command in the super() call. Add other commands using
// addCommands().
super(new InstantCommand());
// addCommands(new FooCommand(), new BarCommand());
}
}

View File

@@ -17,8 +17,8 @@ public class ReplaceMeParallelRaceGroup extends ParallelRaceGroup {
* Creates a new ReplaceMeParallelRaceGroup.
*/
public ReplaceMeParallelRaceGroup() {
// Add your commands in the super() call, e.g.
// super(new FooCommand(), new BarCommand());
super();
// Add your commands in the addCommands() call, e.g.
// addCommands(new FooCommand(), new BarCommand());
addCommands();
}
}

View File

@@ -17,8 +17,8 @@ public class ReplaceMeSequentialCommandGroup extends SequentialCommandGroup {
* Creates a new ReplaceMeSequentialCommandGroup.
*/
public ReplaceMeSequentialCommandGroup() {
// Add your commands in the super() call, e.g.
// super(new FooCommand(), new BarCommand());
super();
// Add your commands in the addCommands() call, e.g.
// addCommands(new FooCommand(), new BarCommand());
addCommands();
}
}