Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Qute template validation breaks when using Gradle #1237

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

angelozerr
Copy link
Contributor

fix: Qute template validation breaks when using Gradle

Fixes #1224

@fbricon
Copy link
Contributor

fbricon commented Oct 18, 2023

Doesn't work. When I put a breakpoint on the calling code, to display the value of templateDir, I get these logged, when opening the java class declaring the template:

grute.test : file:/Users/fbricon/Dev/souk/grute/.idea/src/main/resources/templates/
grute.native-test : file:/Users/fbricon/Dev/souk/grute/.idea/src/main/resources/templates/
grute.main : file:///Users/fbricon/Dev/souk/grute/src/main/resources/templates/
grute.integrationTest : file:/Users/fbricon/Dev/souk/grute/.idea/src/main/resources/templates/

grute is the project name. So the real problem is getting the proper module (grute.main)

public static @NotNull URI toUri(@NotNull Module module) {
VirtualFile[] roots = ModuleRootManager.getInstance(module).getContentRoots();
if (roots.length > 0) {
return toUri(roots[0]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not enough. The generated-sources content root shows up 1st in a myproject.main module

angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 18, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 20, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 20, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 20, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 21, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 22, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 22, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 22, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 22, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 22, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 22, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Oct 22, 2023
@fbricon
Copy link
Contributor

fbricon commented Oct 30, 2023

After moving the file created in the generated source folder to the proper src/main/resources folder, template completion finds stale entries :
Screenshot 2023-10-30 at 17 28 40

@fbricon
Copy link
Contributor

fbricon commented Oct 31, 2023

Please make sure the gradle test projects use gradle 8.4, like the rest. This will minimize downloads, memory usage and will keep the build as fast as possible

angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Nov 3, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Nov 3, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Nov 3, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Nov 3, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Nov 3, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Nov 3, 2023
@angelozerr angelozerr marked this pull request as ready for review November 6, 2023 07:57
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Nov 6, 2023
angelozerr added a commit to angelozerr/intellij-quarkus that referenced this pull request Nov 6, 2023
Copy link

sonarcloud bot commented Nov 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@fbricon fbricon merged commit a43144e into redhat-developer:main Nov 7, 2023
9 checks passed
@fbricon
Copy link
Contributor

fbricon commented Nov 7, 2023

@angelozerr thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Qute template validation breaks when using Gradle
2 participants