Skip to content

Fixes #113 add hook to pretty print code to show in diff in atlascode #114

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

marcellourbani
Copy link
Contributor

@marcellourbani marcellourbani commented Feb 13, 2025

Fixes / implements #113

@marcellourbani marcellourbani changed the title Issue113 add hook to pretty print code to show in diff in atlascode Fixes #113 add hook to pretty print code to show in diff in atlascode Feb 17, 2025
@bwieger-atlassian-com
Copy link
Collaborator

Reviewing

Copy link
Collaborator

@bwieger-atlassian-com bwieger-atlassian-com left a comment

Choose a reason for hiding this comment

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

@marcellourbani great to see this PR. I may have missed something, but it doesn't look quite complete.

@marcellourbani marcellourbani force-pushed the issue113-Add-hook-to-pretty-print-code-to-show-in-diff-in-atlascode branch from 4777b70 to d556aa9 Compare April 9, 2025 15:52
@marcellourbani
Copy link
Contributor Author

@bwieger-atlassian-com my apologies, I did the fix almost immediately but forgot to push it
Should be ok now, also merged main

@mubasis
Copy link

mubasis commented May 20, 2025

@bwieger-atlassian-com I believe I resolved the changes required, but github doesn't seem to think so.
I merged the main branch on this, so should only be left with the relevant changes, for this PR which basically:

  • adds an API to register a code formatter for the diff views
    • this is returned from the activate method, so client extensions can use it (see an example implementation here, I use it with my own fork )
  • adds a command atlascode.bb.togglediffNormalize to toggle the pretty printer when registered
  • adds an icon in the diff view to call it
  • adds a parameter to the git content provider to keep track of whether to apply the pretty printer or not before diffing

PS: the final result of this + abaplint is in 113: the ABAP language is case insensitive, so lots of irrelevant changes are shown unless both sides are formatted before being diffed

Thank you
Marcello

@marcellourbani
Copy link
Contributor Author

comment above was from me, I didn't notice I was logged in with the work account

Copy link
Contributor Author

@marcellourbani marcellourbani left a comment

Choose a reason for hiding this comment

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

I believe it's ok now

Copy link
Contributor Author

@marcellourbani marcellourbani left a comment

Choose a reason for hiding this comment

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

hope it's ok now

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