apache / apache/grails-intellij-plugin
add a 'extract GSP template' refactoring to GSP editor
- Dominant language
- Java
- Stars
- 17
- Forks
- 4
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
Suggestion for a new refactoring: to support the DRY principle it would be useful to have a 'extract GSP template' refactoring.
In a gsp file the user highlights the snippet to be extracted. When selecting the refactoring the following actions should occur:
- ask for the name of the gsp template to be created
- insert the snippet into a newly created template gsp
- remove the snippet from the current page by a `` tag
See [http://www.grails.org/doc/latest/guide/6.%20The%20Web%20Layer.html#6.2.3%20Views%20and%20Templates](http://www.grails.org/doc/latest/guide/6.%20The%20Web%20Layer.html#6.2.3%20Views%20and%20Templates) for some doc on this.
In a more advanced version, IntelliJ could probably also take care of the other attributes of the render tag.
---
*Imported from [IDEA-66286](https://youtrack.jetbrains.com/issue/IDEA-66286) · Type: Feature · Votes: 6*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the GSP editor's refactoring entry point and read the linked Grails Views and Templates documentation. Verify the flow for naming a template, creating it with the selected snippet, replacing the selection with a g:render tag, and handling the specified template name; the issue does not identify files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100