Skip to content

Commit 8d804d5

Browse files
authored
Merge pull request #1804 from fbricon/intellij-quarkus-oct23
A recap of Quarkus Tools for IntelliJ's latest improvements
2 parents 6360c8b + 1e47d25 commit 8d804d5

28 files changed

+198
-0
lines changed

_data/authors.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,3 +486,10 @@ adietish:
486486
emailhash: "7c51d8659ec615ece71062bbe956470d"
487487
job_title: "Senior Software Engineer"
488488
bio: "Software Engineer, working at Red Hat on Jetbrains IDEA plugins."
489+
fbricon:
490+
name: "Fred Bricon"
491+
492+
emailhash: "a66008162ccd0fdceaa95ed82f4fef65"
493+
job_title: "Principal Software Engineer"
494+
twitter: "fbricon"
495+
bio: "Fred has been working in the Dev Tools team at Red Hat, since 2011, where he develops IDE extensions for Eclipse, VS Code and IntelliJ IDEA."
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
---
2+
layout: post
3+
title: A recap of Quarkus Tools for IntelliJ's latest improvements
4+
date: 2023-10-10
5+
tags: intellij ide
6+
synopsis: Over the past five months, we’ve been really hard at work to improve Quarkus Tools in every possible way. So let’s look in more details at what was accomplished.
7+
author: fbricon
8+
---
9+
:imagesdir: /assets/images/posts/intellij-quarkus-tools-oct23
10+
11+
https://plugins.jetbrains.com/plugin/13234-quarkus-tools[Quarkus Tools for IntelliJ] is a free and open source extension, helping users develop Quarkus applications by providing content-assist, validation, run configurations and many other features right from their favourite IDE.
12+
13+
This extension is based on the https://github.com/eclipse/lsp4mp[LSP4MP] (i.e. MicroProfile) and its https://github.com/redhat-developer/quarkus-ls/tree/master/quarkus.ls.ext[Quarkus] add-on, and the https://github.com/redhat-developer/quarkus-ls/tree/master/qute.ls[Qute language server]. These are all used in our popular https://marketplace.visualstudio.com/items?itemName=redhat.vscode-quarkus[Quarkus Tools extension] for Visual Studio Code.
14+
15+
Over the past five months, we've been *really* hard at work to improve Quarkus Tools in every possible way, averaging about one release every two weeks.
16+
17+
We've been focusing on performance improvements, Quarkus 3.x with JakartaEE namespace support, Qute templating support, and generally trying to keep Quarkus Tools out of your way. So let's look in more details at what was accomplished.
18+
19+
== Increased stability and performance
20+
We've addressed various critical issues in our custom Language Server client (LSP4IJ), that previously caused Language Servers to freeze IntelliJ IDEA. Improvements include:
21+
22+
- Waiting until indexing is finished before launching the language servers.
23+
- Language server requests no longer blocking the editor.
24+
- Debouncing some requests to minimize heavy processing
25+
- New request cancellation support to avoid unnecessary processing.
26+
- Faster validation and lazy loading of quick fixes.
27+
- Reduced quarkus properties completion payload size.
28+
29+
- Pre-emptively fetching Quarkus data in the Quarkus project wizard, in order to avoid waiting after clicking on the `Next` button.
30+
31+
These fixes contribute to a smoother coding experience, better overall performance, and, dare I say it, "developer joy".
32+
33+
34+
== Language Server client improvements
35+
36+
=== Language Servers console
37+
Although not directly useful to users in most cases, the new Language Server console view is extremely important when we need to troubleshoot issues with the language servers.
38+
39+
The state of the servers is visible, stop and restart is available with a right-click, and you can enable different levels of tracing:
40+
41+
image:lsp-console-config.png[Language server configuration]
42+
43+
The communication details between the IDE and the language servers are seen in the "LSP consoles" pane. In `verbose` mode, the messages can be expanded for more details:
44+
45+
image:lsp-console-traces.png[Language server traces]
46+
47+
This feature has proven invaluable in assisting us in diagnosing performance issues with the extension. It will enable users to provide valuable troubleshooting information in case any issues arise.
48+
49+
=== Language Servers preferences
50+
A preference page is now available, under `Preferences | Languages & Frameworks | Language Servers`, allowing power users to configure language servers debugging and tracing:
51+
image:lsp-settings.png[Language servers preferences]
52+
53+
54+
== Application properties support
55+
56+
=== Completion improvements
57+
Properties completion in `application.properties` files now displays icons and documentation (provided `Preferences | Editor | General | Code Completion | Show the documentation popup` is enabled):
58+
image:properties-completion.png[Quarkus properties completion]
59+
60+
Completion is also available for enum values:
61+
image:properties-completion-enum.png[Quarkus properties enum completion]
62+
63+
=== Inlay hints
64+
Properties using expression values are now resolved as inlay hints:
65+
image:properties-inlay-hint.png[Resolved property expression as inlay hint]
66+
67+
Inlay hints can be disabled in `Preferences | Languages & Frameworks | MicroProfile | Properties`
68+
69+
== Java editing improvements
70+
71+
=== New codelens for Vert.x reactive routes
72+
Vert.x reactive routes now show a clickable codelens, that will open the browser to the configured URL, similar to JAX-RS endpoints:
73+
74+
image:reactive-routes.png[Reactive routes]
75+
76+
== Qute improvements
77+
We've spent significant effort on making the best Qute support around.
78+
79+
=== New syntax coloration
80+
The Qute parser has been rewritten to allow for proper syntax coloration:
81+
82+
[frame=none, grid=none]
83+
|===
84+
|image:qute-syntax-coloration-light.png[Qute Syntax coloration - light theme] |image:qute-syntax-coloration-dark.png[Qute Syntax coloration - dark theme]
85+
|===
86+
87+
Coloration settings are available at `Preferences | Editor | Color Scheme | Qute`.
88+
89+
=== Completion redux
90+
Editing Qute templates is now better than ever, with new brackets autoclose, improved HTML integration, new completion icons. In particular, the enhanced snippet completion, that behaves like IntelliJ's live templates, available for different Qute sections:
91+
92+
image:qute-completion-snippets.gif[Qute snippet completion]
93+
94+
Section `{#}` completion now displays user tags contributed by dependencies, like Renarde or Web Bundler:
95+
image:qute-renarde-tags-completion.png[Renarde tags completion]
96+
97+
98+
=== Improved {#insert} and {#include} support
99+
The `{#insert}` and `{#include}` sections can be used to specify the extended template to include in the current template. This release extends the support for these sections with validation, document link, completion, and code lens.
100+
101+
=== Navigation between templates/code
102+
You can navigate by `Ctrl+click` (`Cmd+click` on Mac), from one template to another (referenced as user tags, via `{#include}` or `{#insert}`), or from a template definition from a java file to the actual file:
103+
image:qute-template-navigation.gif[Qute navigation]
104+
105+
=== New template fragment support
106+
Fragment sections define a part of the template that can be treated and rendered as a separate template. Support for fragments includes snippet completion, hover and validation.
107+
In a java class, you can navigate to a referenced `#fragment` via code lens and document link
108+
image:qute-fragment-support.gif[]
109+
110+
=== Renarde support
111+
112+
Quarkus Tools now provides support for the https://docs.quarkiverse.io/quarkus-renarde/dev/index.html[Renarde] web framework:
113+
114+
- Public methods of sub-classes of a Renarde `Controller` automatically show a clickable codelens, even though they're lacking a HTTP method annotation, as they're treated as valid JAX-RS endpoints:
115+
image:qute-renarde-codelens.png[Renarde endpoint codelens]
116+
117+
- Completion on the Renarde `uri` and `uriabs` namespaces lists available Renarde controllers:
118+
image:qute-renarde-completion.png[Renarde uri completion]
119+
120+
- Quick-fix is available to add missing input fields to a `{#form}` section:
121+
image:qute-renarde-form-quickfix.gif[Renarde form quickfix]
122+
123+
124+
=== Type-Safe Message Bundles partial support
125+
126+
We have introduced partial support for Qute type-safe message bundles. If you defined `@MessageBundle` classes in your code, you'll automatically get autocompletion for those messages in your Qute templates, with the messages rendered as inlay hints:
127+
128+
image:qute-message-bundles.png[Message bundle support for Qute templates]
129+
130+
Rendering messages from properties files is not yet supported.
131+
132+
== Validation
133+
134+
=== Java files
135+
Validation has been enhanced with the following features:
136+
137+
- GraphQL `void` operations are now allowed in Quarkus 3.1 and higher and the correct placement of GraphQL directives is now checked:
138+
image:java-validation-graphql-directives.png[GraphQL directives placement validation]
139+
140+
- Quarkus `BuildItem` subclasses are checked whether they're `final` or `abstract`:
141+
image:java-builditem-validation.png[BuildItem validation]
142+
143+
=== Severity mappings
144+
We've tried to bind some Microprofile and Qute diagnostics reported by the language servers to IntelliJ's Inspections settings, as it felt more natural than having specialized preference pages. But, since this is a bit of a hack, the inspections settings are mostly ignored, except for a couple severity settings. The limitations are described in each inspection description:
145+
146+
image:inspections-severity-mapping.png[Inspection severity mapping]
147+
148+
In most cases:
149+
150+
- Scope: values are ignored
151+
- Severity: only Error and (Weak) Warning are respected. Other values mean no errors will be reported
152+
- Highlighting in Editor: values are ignored
153+
154+
=== Quick-fixes updating settings
155+
156+
We've introduced quick fixes that allow you to disable validation for certain errors. Useful, for instance, when you find false-positive errors add too much noise to your development workflow.
157+
158+
Unassigned `@ConfigProperty` properties (i.e not declared in `application.properties`) in java files, or unknown properties (seemingly unused) declared in `application.properties` can now be excluded from validation via a quick-fix, e.g:
159+
160+
image:exclusions-quickfix.png[Quick-fix to exclude property from validation]
161+
162+
You can then update those exclusions in `Preferences | Editor | Inspections | MicroProfile | Java files | Unassigned properties` or `Preferences | Editor | Inspections | MicroProfile | Properties files | Unassigned properties`
163+
164+
image:exclusions-settings.png[Inspections settings]
165+
166+
167+
Similarly you can exclude a particular Qute template from validation, or its entire module
168+
169+
image:exclude-qute-validation.png[Exclude Qute template from validation]
170+
171+
You can then head over to `Preferences | Editor | Inspections | Qute | Templates | Validation`,
172+
173+
image:qute-validation-settings.png[Qute validation settings]
174+
175+
176+
== Miscellaneous improvements
177+
- The Quarkus project wizard, on top of being super snappy, now offers easy (de)selection of extensions by double-clicking on them.
178+
- Projects in WSL2 are now supported.
179+
- Run configurations have been renamed to `Quarkus Dev Mode`, to minimize confusion with IntelliJ Ultimate's built-in Quarkus support.
180+
- Vert.x reactive routes, JAX-RS and Renarde endpoints are now shown as implicitly used, as well as Quarkus `@BuildStep`-annotated classes and `@Observer`-annotated methods.
181+
182+
183+
== Looking forward
184+
185+
Quarkus' "developer joy" mantra obviously applies to your time spent in the IDE and that's what the Red Hat Developer team is vying for. As we reflect on the past five months of releases, we're pretty excited about the progress we've made on the Quarkus development experience, in IntelliJ IDEA.
186+
187+
And we're not going to stop here, so stay tuned for more performance improvements and exciting new features in the coming weeks. We're actually planning to make it easier for you to get those new bits as soon as possible, by publishing updates to the EAP release channel.
188+
189+
Finally, if you haven't done it already, please https://plugins.jetbrains.com/plugin/13234-quarkus-tools[add your review to the JetBrains marketplace]. Your feedback matters!
190+
191+
In case you find bugs or have ideas for some great new features, don't hesitate to head over to our https://github.com/redhat-developer/intellij-quarkus/issues[Github repository] and open a ticket.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)