Skip to content

Commit

Permalink
Makes adjustment for various checkstyle items
Browse files Browse the repository at this point in the history
  • Loading branch information
dingfeli committed Sep 17, 2024
1 parent 0b993c5 commit ce88910
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ public final boolean isEnabled() {
&& qInvocationSessionInstance.isPreviewingSuggestions();
}

/**
* Executes the command when the user triggers the handler.
* <p>
* Subclasses overriding this method should ensure that the following conditions are met:
* </p>
* <ul>
* <li>The method should make sure to set a direction of toggle</li>
* <li>The method should make sure to call the super's counter part of this method</li>
* </ul>
*
* @param event The execution event that triggered the handler.
* @return The result of the execution, or <code>null</code> if there is no result.
*
* @implSpec
* Implementations should call {@code super.execute(event)} at the end to delegate the actual movement.
*/
@Override
public Object execute(final ExecutionEvent event) {
QInvocationSession qInvocationSessionInstance = QInvocationSession.getInstance();
Expand All @@ -32,12 +48,14 @@ public Object execute(final ExecutionEvent event) {
case BACKWARD:
qInvocationSessionInstance.decrementCurrentSuggestionIndex();
break;
default:
qInvocationSessionInstance.incrementCurentSuggestionIndex();
}

return null;
}

protected void setCommandDirection(final Direction direction) {
protected final void setCommandDirection(final Direction direction) {
this.direction = direction;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ public void verifyKey(final VerifyEvent event) {
break;
}
}

leadingWhitespaceSkipped += newWs;
qInvocationSessionInstance.setLeadingWhitespaceSkipped(leadingWhitespaceSkipped);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public void incrementCurentSuggestionIndex() {
}
}

public void setHasBeenTypedahead(boolean hasBeenTypedahead) {
public void setHasBeenTypedahead(final boolean hasBeenTypedahead) {
this.hasBeenTypedahead = hasBeenTypedahead;
}

Expand Down

0 comments on commit ce88910

Please sign in to comment.