apache / apache/grails-intellij-plugin

Grails: autocompletion of resource bundle keys in <g:message/> tags doesn't find entries from plugin dependencies

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

Description

There is a problem with the autocompletion of resource bundle keys inside .gsp files in a grails project: when I have a main project, which depends on a grails plugin project, the resource bundles inside the plugin are not considered. Autocompletion only finds the resource keys inside the same project, but not the ones in the plugin dependency.

This also affects the code highlighting inside .gsp files.
In the following snippet, IntelliJ will mark the key "my.example.key" as "Cannot resolve property key", when the key is inside the plugin project:
```

```
However, if I use groovy expressions instead of the tag syntax, the autocompletion works fine and IntelliJ also doesn't report an error:
```
${message(code: 'default.search.noResults')}
```
**I have the following project setup:**

- gradle multi-project build
- a grails web subproject
- a grails plugin subproject
- the web project depends on the plugin project
- both grails projects have resource bundles

I observed this in IntelliJ 2017.1 using different grails versions (3.2.9, 3.1.10).

---

*Imported from [IDEA-174720](https://youtrack.jetbrains.com/issue/IDEA-174720) · Type: Bug · Votes: 0*
*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

Reproduce the issue in IntelliJ IDEA 2017.1 with the described Gradle multi-project setup: a Grails web project depending on a Grails plugin project, each with resource bundles. Trace how keys are resolved versus Groovy-expression message calls; done means plugin dependency keys autocomplete and no longer show an unresolved-property highlight in GSP files.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.