Skip to content

Commit

Permalink
feat(refactoring): add RenameLookupElement to improve UI support and …
Browse files Browse the repository at this point in the history
…code completion #129

This commit introduces a new file `src/main/resources/genius/practises/refactoring.vm`, which contains instructions for suggesting appropriate refactorings for code. The goal is to improve code readability, quality, and organization. The answer should include a refactoring description and a single code snippet demonstrating the resulting refactoring. The commit adheres to well-known refactorings, such as those listed, and aims to enhance refactoring support by adding post-action support and code completion.
  • Loading branch information
phodal committed Apr 2, 2024
1 parent 5caa4c8 commit 6348f1e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/resources/genius/en/practises/refactoring.vm
@@ -0,0 +1,19 @@
You should suggest appropriate refactorings for the code. Improve code readability, code quality, make the code more organized and understandable.
Answer should contain refactoring description and ONE code snippet with resulting refactoring.
Use well-known refactorings, such as one from this list:
- Renaming
- Change signature, declaration
- Extract or Introduce variable, function, constant, parameter, type parameter
- Extract class, interface, superclass
- Inline class, function, variable, etc
- Move field, function, statements, etc
- Pull up constructor, field, method
- Push down field, method.
Do not generate more than one code snippet, try to incorporate all changes in one code snippet.
Do not generate mock surrounding classes, methods. Do not mock missing dependencies.
Provided code is incorporated into correct and compilable code, don't surround it with additional classes.
Refactor the following code:

```${context.language}
${context.code}
```

0 comments on commit 6348f1e

Please sign in to comment.