apache / apache/grails-intellij-plugin

Feature Request: Grails controller/view namespace suppport

Open
#161 0 comments 0 reactions 0 assignees View on GitHub
enhancement imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

Add support for better handling of namespaces in controllers.

Not sure how this would be handled since the layout is up to the user but given the following example structure:

grails-app/
controllers/
com.somepackage.controllers.somenamespace/
IndexController.groovy = {
static namespace = 'somenamespace'
def afterInterceptor = { model, modelAndView ->
if(modelAndView) {
modelAndView.viewName = "/${namespace}/${modelAndView.viewName}"
}
}
def index() { }
}
views/
somenamspace/
index/
index.gsp

Nice to have features:

- View model variable resolution from action.
- Creating controller would create the path example below.
- Open corresponding view from controller.
- Open corresponding controller from view.
- Refactoring/Renaming of controllers does not corrupt view structure.

---

*Imported from [IDEA-126363](https://youtrack.jetbrains.com/issue/IDEA-126363) · Type: Feature · Votes: 1*
*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 with the example paths under grails-app/controllers and views, especially IndexController.groovy and views/somenamspace/index/index.gsp. Determine how controller namespaces map to views and how the listed navigation, creation, model resolution, and renaming requests should be scoped. Done means the agreed namespace behavior and selected IDE integrations work without corrupting the controller/view structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.