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

feat: apply fix command [IDE-976] #261

Merged

Conversation

acke
Copy link
Contributor

@acke acke commented Feb 25, 2025

Description

Done:

  • AI Fix enabled in Eclipse
  • Applied styling to AI Fix UI
  • Calls the new AI Fix commands; sendCodeFixDiffsCommand and sendCodeApplyAiFixEditCommand

Checklist

  • Tests added and all succeed
  • Linted
  • CHANGELOG.md updated
  • README.md updated, if user-facing

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

public List<Fix> sendCodeFixDiffsCommand(String folderURI, String fileURI, String issueID) {
// TODO: capture and return results
executeCommand(LsConstants.COMMAND_CODE_FIX_DIFFS, List.of(folderURI, fileURI, issueID));
return null;

Check warning

Code scanning / PMD

Return an empty collection rather than null.

Return an empty collection rather than null.
@acke acke force-pushed the feat/IDE-976_apply_fix_command branch from 66c8c9d to 686e8c1 Compare February 26, 2025 18:42
@acke acke force-pushed the feat/IDE-976_apply_fix_command branch 3 times, most recently from 9f136b8 to ee5f71f Compare February 27, 2025 10:33
@acke acke changed the title Feat/ide 976 apply fix command [WIP] feat: apply fix command [IDE-976] Feb 27, 2025
@acke acke marked this pull request as ready for review February 27, 2025 13:38
@acke acke requested a review from a team as a code owner February 27, 2025 13:38
Copy link
Contributor

@andrewrobinsonhodges-snyk andrewrobinsonhodges-snyk left a comment

Choose a reason for hiding this comment

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

I think this is good, but it's a little difficult to review in isolation since it contains some of the changes from #260

Did you intend for this to be a diff on top of that one?

// Language server HTML assumes a base font size of 10px. The default Eclipse font size is 17px (13pt), so we
// apply a scaling factor here. This ensures that HTML fonts scale correctly if the user changes the text size.
// Language server HTML assumes a base font size of 10px. The default Eclipse
// font size is 17px (13pt), so we
Copy link
Contributor

Choose a reason for hiding this comment

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

Odd line lengths here. Why are we limiting the width of comments and not the code?

Copy link
Contributor

Choose a reason for hiding this comment

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

(This is a genuine question and not a criticism by the way; this was clearly done by some linter or script, and I want to make sure we're all being consistent)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm using the Eclipse built-in formatter. It does have a different width on code and comments.

Which formatter do you use?

image

image

Copy link
Contributor

Choose a reason for hiding this comment

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

This was part of your other PR - why is it changed in both?

@@ -73,6 +76,10 @@ class SnykExtendedLanguageClientTest extends LsBaseTest {

private ISnykToolView toolWindowMock;

private URI uri;
private String paramName;
// private SnykLogger loggerMock;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should either use or remove this

@acke acke changed the base branch from main to feat/IDE-957_code_action_opens_issue_panel February 28, 2025 09:44
@acke acke force-pushed the feat/IDE-976_apply_fix_command branch from 56bc98f to 719420e Compare February 28, 2025 09:46
@acke acke force-pushed the feat/IDE-976_apply_fix_command branch from 719420e to 91c3093 Compare February 28, 2025 09:57
@acke acke merged commit 01624d6 into feat/IDE-957_code_action_opens_issue_panel Feb 28, 2025
5 checks passed
@acke acke deleted the feat/IDE-976_apply_fix_command branch February 28, 2025 12:04
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.

2 participants