From 5e793f5179ccb17228e31f8a15f49f46ca13d3fa Mon Sep 17 00:00:00 2001 From: Jonathan Breedlove Date: Thu, 26 Sep 2024 15:36:37 -0700 Subject: [PATCH] Fix Checkstyle issues --- plugin/pom.xml | 11 +++++------ .../amazonq/chat/ChatCommunicationManager.java | 2 +- .../eclipse/amazonq/chat/ChatMessageProvider.java | 2 +- .../eclipse/amazonq/util/QInvocationSession.java | 4 ++-- .../views/AmazonQChatViewActionHandler.java | 2 +- .../eclipse/amazonq/views/FeedbackDialog.java | 15 ++++++++------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index a460e2b1..9a688ca6 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -221,16 +221,15 @@ 10.17.0 + + checkstyle.xml + true + true + checkstyle-validation validate - - checkstyle.xml - true - true - src/**/*.java - check diff --git a/plugin/src/software/aws/toolkits/eclipse/amazonq/chat/ChatCommunicationManager.java b/plugin/src/software/aws/toolkits/eclipse/amazonq/chat/ChatCommunicationManager.java index 2c229bce..123dd04b 100644 --- a/plugin/src/software/aws/toolkits/eclipse/amazonq/chat/ChatCommunicationManager.java +++ b/plugin/src/software/aws/toolkits/eclipse/amazonq/chat/ChatCommunicationManager.java @@ -57,4 +57,4 @@ public void sendMessageToChatUI(final Browser browser, final ChatUIInboundComman }); } -} \ No newline at end of file +} diff --git a/plugin/src/software/aws/toolkits/eclipse/amazonq/chat/ChatMessageProvider.java b/plugin/src/software/aws/toolkits/eclipse/amazonq/chat/ChatMessageProvider.java index d8287739..5470cd5f 100644 --- a/plugin/src/software/aws/toolkits/eclipse/amazonq/chat/ChatMessageProvider.java +++ b/plugin/src/software/aws/toolkits/eclipse/amazonq/chat/ChatMessageProvider.java @@ -22,7 +22,7 @@ public static CompletableFuture createAsync() { .thenApply(ChatMessageProvider::new); } - private ChatMessageProvider(AmazonQLspServer amazonQLspServer) { + private ChatMessageProvider(final AmazonQLspServer amazonQLspServer) { this.amazonQLspServer = amazonQLspServer; } diff --git a/plugin/src/software/aws/toolkits/eclipse/amazonq/util/QInvocationSession.java b/plugin/src/software/aws/toolkits/eclipse/amazonq/util/QInvocationSession.java index 0f353758..3bf81d23 100644 --- a/plugin/src/software/aws/toolkits/eclipse/amazonq/util/QInvocationSession.java +++ b/plugin/src/software/aws/toolkits/eclipse/amazonq/util/QInvocationSession.java @@ -339,8 +339,8 @@ public void executeCallbackForCodeReference() { codeReferenceAcceptanceCallback.onCallback(selectedSuggestion, startLine); } } - - public void setVerticalIndent(int line, int height) { + + public void setVerticalIndent(final int line, final int height) { var widget = viewer.getTextWidget(); widget.setLineVerticalIndent(line, height); unsetVerticalIndent = () -> { diff --git a/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatViewActionHandler.java b/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatViewActionHandler.java index 8c65cee9..2e15f79d 100644 --- a/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatViewActionHandler.java +++ b/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatViewActionHandler.java @@ -61,4 +61,4 @@ public final void handleCommand(final ParsedCommand parsedCommand, final Browser } } -} \ No newline at end of file +} diff --git a/plugin/src/software/aws/toolkits/eclipse/amazonq/views/FeedbackDialog.java b/plugin/src/software/aws/toolkits/eclipse/amazonq/views/FeedbackDialog.java index 400a194b..6b8931b2 100644 --- a/plugin/src/software/aws/toolkits/eclipse/amazonq/views/FeedbackDialog.java +++ b/plugin/src/software/aws/toolkits/eclipse/amazonq/views/FeedbackDialog.java @@ -217,16 +217,16 @@ private void createQuestionSection(final Composite container) { CustomRadioButton negativeSentimentButton = createCustomRadioButton(sentimentContainer, "icons/FrownyFace.png", "Unsatisfied", SWT.NONE, false); positiveSentimentButton.getRadioButton().addSelectionListener(new SelectionAdapter() { @Override - public void widgetSelected(SelectionEvent e) { - negativeSentimentButton.getRadioButton().setSelection(false); - selectedSentiment = Sentiment.POSITIVE; + public void widgetSelected(final SelectionEvent e) { + negativeSentimentButton.getRadioButton().setSelection(false); + selectedSentiment = Sentiment.POSITIVE; } }); negativeSentimentButton.getRadioButton().addSelectionListener(new SelectionAdapter() { @Override - public void widgetSelected(SelectionEvent e) { - positiveSentimentButton.getRadioButton().setSelection(false); - selectedSentiment = Sentiment.NEGATIVE; + public void widgetSelected(final SelectionEvent e) { + positiveSentimentButton.getRadioButton().setSelection(false); + selectedSentiment = Sentiment.NEGATIVE; } }); @@ -280,7 +280,8 @@ private void createSeparator(final Composite parent) { separatorLabel.setLayoutData(separatorGithubLayout); } - private CustomRadioButton createCustomRadioButton(final Composite parent, final String imagePath, final String text, final int style, final boolean isSelected) { + private CustomRadioButton createCustomRadioButton(final Composite parent, final String imagePath, + final String text, final int style, final boolean isSelected) { CustomRadioButton button = new CustomRadioButton(parent, loadImage(imagePath), text, style); button.getRadioButton().setSelection(isSelected); return button;