redhat-developer / redhat-developer/lsp4ij
Forbid rename for keyword/string
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 344
- Forks
- 113
- Avg merge
- 5h 22m
- Merged PRs (30d)
- 15
Description
See https://github.com/redhat-developer/lsp4ij/pull/225#issuecomment-2063373780
To fix that we could use TextMate file info with the following code:
editor.getHighlighter().createIterator(offset).getTextAttributesKeys()[0].getExternalName()
which returns
- DEFAULT_KEYWORD when keyword tries to be renamed
- DEFAULT_STRING when string tries to be renamed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked pull request comment and locating the rename handling that can access editor.getHighlighter().createIterator(offset).getTextAttributesKeys()[0].getExternalName(). Verify the behavior for DEFAULT_KEYWORD and DEFAULT_STRING, then add or update coverage so rename is refused for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100