From 4d9b3417c0ea93a31cc3c4bf1ba37da3323008aa Mon Sep 17 00:00:00 2001 From: Ishan Taldekar Date: Fri, 14 Feb 2025 16:14:46 -0500 Subject: [PATCH] Fix checkstyle issues --- .../eclipse/amazonq/views/AmazonQChatWebview.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatWebview.java b/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatWebview.java index 236c743f..37d69326 100644 --- a/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatWebview.java +++ b/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatWebview.java @@ -233,7 +233,8 @@ private String generateCss() { mask-position: center; scale: 60%; } - .mynah-button.mynah-button-secondary.fill-state-always.code-snippet-close-button.mynah-ui-clickable-item + .mynah-button.mynah-button-secondary.fill-state-always.code-snippet-close-button + .mynah-ui-clickable-item .mynah-ui-icon-cancel { -webkit-mask-size: 187.5% !important; mask-size: 187.5% !important; @@ -310,7 +311,8 @@ private String generateJS(final String jsEntrypoint) { const textarea = document.querySelector('textarea.mynah-chat-prompt-input'); if (textarea) { textarea.addEventListener("keydown", (event) => { - if (((isMacOs() && event.metaKey) || (!isMacOs() && event.ctrlKey)) && event.key === 'a') { + if (((isMacOs() && event.metaKey) || (!isMacOs() && event.ctrlKey)) + && event.key === 'a') { textarea.select(); event.preventDefault(); event.stopPropagation(); @@ -339,12 +341,16 @@ private String generateJS(final String jsEntrypoint) { mutation.addedNodes.forEach((node) => { if (node.nodeType === 1) { // Check if it's an element node // Check for direct match - if (node.matches('.mynah-button.mynah-button-secondary.mynah-button-border.fill-state-always.mynah-chat-item-followup-question-option.mynah-ui-clickable-item')) { + if (node.matches('.mynah-button.mynah-button-secondary + .mynah-button-border.fill-state-always.mynah-chat-item-followup-question-option + .mynah-ui-clickable-item')) { attachEventListeners(node); } // Check for nested matches - const buttons = node.querySelectorAll('.mynah-button.mynah-button-secondary.mynah-button-border.fill-state-always.mynah-chat-item-followup-question-option.mynah-ui-clickable-item'); + const buttons = node.querySelectorAll('.mynah-button.mynah-button-secondary + .mynah-button-border.fill-state-always.mynah-chat-item-followup-question-option + .mynah-ui-clickable-item'); buttons.forEach(attachEventListeners); } });