apache / apache/grails-intellij-plugin

Grails: 'Go to' invoked on a plugin tag doesn't work unless source code is downloaded

Open
#403 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

## Problem description
In a GSP, tags in the current project are easily found via the go to declaration command, but tags in Grails plugins are not always found.

For example, the spring security plugin (https://github.com/grails/grails-spring-security-core) has the namespace ‘sec’ and tags like `` aren't found by intellij if you click go to declaration.

In older versions this used to work consistently, but now it's not.

Example project: https://github.com/jdaugherty/intellij-tag-example

I think I figured out the issue. First, if you open the `AssetPipelineGrailsPlugin` class, by default sources won't be downloaded. IntelliJ offers to download the sources, but when you download, you'll get this warning:

_⚠️ attachment `image.png` was not included in the export_{width=50%}

It's like IntelliJ doesn't understand that groovy files are sources. Clicking yes, will still attach the sources. Then tag declarations will work.

## Questions
* Can this attach roots bug be fixed?
* Also do sources have to be always downloaded for tag resolution to work?
* How can I force that to always occur in intellij?

---

*1 attachment(s) referenced here (`image.png`) are not part of the CSV export.*
*Imported from [IDEA-364650](https://youtrack.jetbrains.com/issue/IDEA-364650) · Type: Bug · Votes: 24*
*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 failure with the linked intellij-tag-example project and the spring security plugin's sec:ifAllGranted tag. Inspect AssetPipelineGrailsPlugin and the source attachment behavior, then verify that Go to Declaration resolves plugin tags without manually downloading sources.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.