Skip to content

Conversation

@Njeriiii
Copy link
Owner

What does this implement/fix? Explain your changes.

This class implements LocalQuickFix to create a custom quick fix that shows a tooltip with a recommendation text and a link to the Azure SDK for Java documentation.

Any relevant logs, screenshots, error output, etc.?

image

Any other comments?

Has this been tested?

  • Tested -- I extended tests in all rules to verify the tooltip class is part of the problem registered

"antiPatternMessage": "Single operation found in loop. This SDK provides a batch operation API, use it to perform multiple actions in a single request: "
"antiPatternMessage": "Single operation found in loop. This SDK provides a batch operation API, use it to perform multiple actions in a single request: ",
"recommendationText": "A a batch operation API exists in the SDK that can handle multiple actions in one request.",
"recommendationLink": ""
Copy link
Owner Author

Choose a reason for hiding this comment

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

will ask for link from Shawn

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this still pending?

Copy link
Owner Author

Choose a reason for hiding this comment

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

yes-- I messaged him about it, so just waiting to hear back

Please refer to
the [KeyCredential Class documentation](https://learn.microsoft.com/java/api/com.azure.core.credential.keycredential?view=azure-java-stable)
for more information.
for more information.
Copy link
Owner Author

Choose a reason for hiding this comment

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

these strings are the exact same, including number of spaces so I'm not sure how it's in the diff

Copy link
Owner Author

Choose a reason for hiding this comment

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

figured out it comes from the line break so its not problematic

@Njeriiii Njeriiii requested a review from samvaity July 29, 2024 19:17
import javax.swing.text.html.StyleSheet;

/**
* This class is used to create a custom quick fix that shows a tooltip with a recommendation text and a link to the Azure SDK for Java documentation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* This class is used to create a custom quick fix that shows a tooltip with a recommendation text and a link to the Azure SDK for Java documentation.
* This class is used to create a tooltip with a recommendation text and a link to the Azure SDK for Java documentation.

* @return The name of the quick fix.
*/
@Override
public @NotNull String getName() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this be updated in the future to get "the respective quick fix action" lookup?

Copy link
Owner Author

Choose a reason for hiding this comment

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

this is the "show details" you click on to bring up on the additional info. When I'm working on the action stretch goal I'll find an alternative so the hover popup isn't too busy

@Njeriiii Njeriiii requested a review from samvaity August 2, 2024 00:06
* The HTML content is styled using the styles.css file.
* One of the uses of this class is to create a tooltip with a recommendation text and a link to the Azure SDK for Java documentation.
*/
class QuickFixPanelConfigurations {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be renamed inline with the CustomHoverTip.
I would rename to HoverTipPanel

editorPane.setText(htmlContent);
editorPane.setEditable(false);
editorPane.setBackground(panel.getBackground());
editorPane.setForeground(JBColor.LIGHT_GRAY);
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you add comments to where we made acccessibility improvements.
Include in javadocs for reference

Comment on lines 132 to +136
List<String> servicesToCheck = new ArrayList<>();
Map<String, String> antiPatternMessageMap = new HashMap<>();
List<String> listedItemsToCheck = new ArrayList<>();
Map<String, String> recommendationTextMap = new HashMap<>();
Map<String, String> recommendationLinkMap = new HashMap<>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can these all now be updated to a better data structure?

Copy link
Owner Author

Choose a reason for hiding this comment

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

discussed offline

@Njeriiii Njeriiii requested a review from samvaity August 7, 2024 22:14
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.

3 participants