Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New features and fixes #19

Merged
merged 8 commits into from
Jun 21, 2016
Merged

Conversation

ThaBalla1148
Copy link

@ThaBalla1148 ThaBalla1148 commented Jun 15, 2016

Implemented HiddenCommand annotation for CommandExecutor methods

  • Using this annotation allows commands to either be hidden from help command and auto-complete or disabled from being executable. Supports both simultaneously.
  • By default, hidden commands are executable, but are hidden from displaying.

Moved logic for CommandExecutor.print() to Console.printCommands()

  • This was done to better support the new HiddenCommand annotation

Fixed console not being disabled while not using GUIConsole if disabled flag was set

Refactored and updated method and argument determination/parsing code

  • Now supports String, Boolean, Byte, Short, Integer, Long, Float, Double, and their primitive counter-parts

Updated Box2DTest with HiddenCommand methods

Added ConsoleTest

  • Tests all supported Command argument types

Eric Burns and others added 7 commits June 14, 2016 15:07
HiddenCommands can be disabled from execution or displaying with "help"
command

Moved/Replaced logic for CommandExecutor#print to Console#printCommands
HiddenCommand allows Commands to be hidden from help and command
completer.
@ThaBalla1148 ThaBalla1148 reopened this Jun 15, 2016
@@ -115,6 +115,8 @@ public void setCommandExecutor (CommandExecutor commandExec) {
*/
@Override
public void execCommand(String command) {
if(disabled) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious, does this fix some usecase?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enforces the disabled flag, whether it is a GUIConsole, HeadlessConsole, or even a custom Console extended from AbstractConsole, it is disabled from executing commands.

@StrongJoshua StrongJoshua merged commit 5480cc6 into StrongJoshua:master Jun 21, 2016
@StrongJoshua
Copy link
Owner

Thanks again man, this is some good work you're doing

@ThaBalla1148
Copy link
Author

No problem. I appreciate your acceptance of my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants