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

Create easy-to-discover-and-use upgrade refactoring UI for the move from annotations to keyword fields. #392

Open
jurgenvinju opened this issue Jun 12, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@jurgenvinju
Copy link
Member

The update functionality in lang::rascal::upgrade::* on the current branch (remove-tree-loc-annotations) that refactors uses of annotation syntax to keyword parameter syntax is a candidate for inclusion in the Rascal LSP server:

  • as a lense
  • as a refactoring?

It has to run on the entire project to make sense as the refactoring is "dumb"; it does not follow name resolution links it just replaces all syntactical constructs in a consistent manner.

Originally posted by @jurgenvinju in usethesource/rascal#1974 (comment)

@DavyLandman
Copy link
Member

Agreed, but I would be really interested in if we could do something where we don't bother users that are either not using annotations, or have already done the migration for a specific project.

@DavyLandman DavyLandman added the enhancement New feature or request label Jun 12, 2024
@jurgenvinju
Copy link
Member Author

We could add a lense at the top of every module that still uses annotations, and otherwise not at all. And optionally also add the same lense command near every use of annotation syntax?

The hover help should be insightful enough to explain that the lense will rewrite the entire project. @DavyLandman Do we have hover help on lenses already?

I've already integrated a file-by-file based progress bar (it could take a few seconds if the project is big).

@DavyLandman
Copy link
Member

DavyLandman commented Jun 13, 2024

Yes, lets do that, only a top-level for modules that themselves use annotations (either define or use).

The hover help should be insightful enough to explain that the lense will rewrite the entire project. @DavyLandman Do we have hover help on lenses already?

Sadly -- at least the LSP -- code lenses only have a title. No way to add a hover information, so we're going to have to put that info in the title.

(If we do it using the raw VS Code api (so outside of LSP) we can give a tooltip, but that's not available via LSP.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants