diff --git a/_data/authors.yaml b/_data/authors.yaml index c5d6513996..68819504be 100644 --- a/_data/authors.yaml +++ b/_data/authors.yaml @@ -486,3 +486,10 @@ adietish: emailhash: "7c51d8659ec615ece71062bbe956470d" job_title: "Senior Software Engineer" bio: "Software Engineer, working at Red Hat on Jetbrains IDEA plugins." +fbricon: + name: "Fred Bricon" + email: "fbricon@gmail.com" + emailhash: "a66008162ccd0fdceaa95ed82f4fef65" + job_title: "Principal Software Engineer" + twitter: "fbricon" + 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." diff --git a/_posts/2023-10-10-intellij-quarkus-recap.adoc b/_posts/2023-10-10-intellij-quarkus-recap.adoc new file mode 100644 index 0000000000..c17b69afa2 --- /dev/null +++ b/_posts/2023-10-10-intellij-quarkus-recap.adoc @@ -0,0 +1,191 @@ +--- +layout: post +title: A recap of Quarkus Tools for IntelliJ's latest improvements +date: 2023-10-10 +tags: intellij ide +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. +author: fbricon +--- +:imagesdir: /assets/images/posts/intellij-quarkus-tools-oct23 + +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. + +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. + +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. + +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. + +== Increased stability and performance +We've addressed various critical issues in our custom Language Server client (LSP4IJ), that previously caused Language Servers to freeze IntelliJ IDEA. Improvements include: + +- Waiting until indexing is finished before launching the language servers. +- Language server requests no longer blocking the editor. +- Debouncing some requests to minimize heavy processing +- New request cancellation support to avoid unnecessary processing. +- Faster validation and lazy loading of quick fixes. +- Reduced quarkus properties completion payload size. + +- Pre-emptively fetching Quarkus data in the Quarkus project wizard, in order to avoid waiting after clicking on the `Next` button. + +These fixes contribute to a smoother coding experience, better overall performance, and, dare I say it, "developer joy". + + +== Language Server client improvements + +=== Language Servers console +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. + +The state of the servers is visible, stop and restart is available with a right-click, and you can enable different levels of tracing: + +image:lsp-console-config.png[Language server configuration] + +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: + +image:lsp-console-traces.png[Language server traces] + +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. + +=== Language Servers preferences +A preference page is now available, under `Preferences | Languages & Frameworks | Language Servers`, allowing power users to configure language servers debugging and tracing: +image:lsp-settings.png[Language servers preferences] + + +== Application properties support + +=== Completion improvements +Properties completion in `application.properties` files now displays icons and documentation (provided `Preferences | Editor | General | Code Completion | Show the documentation popup` is enabled): +image:properties-completion.png[Quarkus properties completion] + +Completion is also available for enum values: +image:properties-completion-enum.png[Quarkus properties enum completion] + +=== Inlay hints +Properties using expression values are now resolved as inlay hints: +image:properties-inlay-hint.png[Resolved property expression as inlay hint] + +Inlay hints can be disabled in `Preferences | Languages & Frameworks | MicroProfile | Properties` + +== Java editing improvements + +=== New codelens for Vert.x reactive routes +Vert.x reactive routes now show a clickable codelens, that will open the browser to the configured URL, similar to JAX-RS endpoints: + +image:reactive-routes.png[Reactive routes] + +== Qute improvements +We've spent significant effort on making the best Qute support around. + +=== New syntax coloration +The Qute parser has been rewritten to allow for proper syntax coloration: + +[frame=none, grid=none] +|=== +|image:qute-syntax-coloration-light.png[Qute Syntax coloration - light theme] |image:qute-syntax-coloration-dark.png[Qute Syntax coloration - dark theme] +|=== + +Coloration settings are available at `Preferences | Editor | Color Scheme | Qute`. + +=== Completion redux +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: + +image:qute-completion-snippets.gif[Qute snippet completion] + +Section `{#}` completion now displays user tags contributed by dependencies, like Renarde or Web Bundler: +image:qute-renarde-tags-completion.png[Renarde tags completion] + + +=== Improved {#insert} and {#include} support +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. + +=== Navigation between templates/code +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: +image:qute-template-navigation.gif[Qute navigation] + +=== New template fragment support +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. +In a java class, you can navigate to a referenced `#fragment` via code lens and document link +image:qute-fragment-support.gif[] + +=== Renarde support + +Quarkus Tools now provides support for the https://docs.quarkiverse.io/quarkus-renarde/dev/index.html[Renarde] web framework: + +- 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: +image:qute-renarde-codelens.png[Renarde endpoint codelens] + +- Completion on the Renarde `uri` and `uriabs` namespaces lists available Renarde controllers: +image:qute-renarde-completion.png[Renarde uri completion] + +- Quick-fix is available to add missing input fields to a `{#form}` section: +image:qute-renarde-form-quickfix.gif[Renarde form quickfix] + + +=== Type-Safe Message Bundles partial support + +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: + +image:qute-message-bundles.png[Message bundle support for Qute templates] + +Rendering messages from properties files is not yet supported. + +== Validation + +=== Java files +Validation has been enhanced with the following features: + +- GraphQL `void` operations are now allowed in Quarkus 3.1 and higher and the correct placement of GraphQL directives is now checked: +image:java-validation-graphql-directives.png[GraphQL directives placement validation] + +- Quarkus `BuildItem` subclasses are checked whether they're `final` or `abstract`: +image:java-builditem-validation.png[BuildItem validation] + +=== Severity mappings +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: + +image:inspections-severity-mapping.png[Inspection severity mapping] + +In most cases: + +- Scope: values are ignored +- Severity: only Error and (Weak) Warning are respected. Other values mean no errors will be reported +- Highlighting in Editor: values are ignored + +=== Quick-fixes updating settings + +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. + +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: + +image:exclusions-quickfix.png[Quick-fix to exclude property from validation] + +You can then update those exclusions in `Preferences | Editor | Inspections | MicroProfile | Java files | Unassigned properties` or `Preferences | Editor | Inspections | MicroProfile | Properties files | Unassigned properties` + +image:exclusions-settings.png[Inspections settings] + + +Similarly you can exclude a particular Qute template from validation, or its entire module + +image:exclude-qute-validation.png[Exclude Qute template from validation] + +You can then head over to `Preferences | Editor | Inspections | Qute | Templates | Validation`, + +image:qute-validation-settings.png[Qute validation settings] + + +== Miscellaneous improvements +- The Quarkus project wizard, on top of being super snappy, now offers easy (de)selection of extensions by double-clicking on them. +- Projects in WSL2 are now supported. +- Run configurations have been renamed to `Quarkus Dev Mode`, to minimize confusion with IntelliJ Ultimate's built-in Quarkus support. +- 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. + + +== Looking forward + +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. + +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. + +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! + +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. diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/builditems.png b/assets/images/posts/intellij-quarkus-tools-oct23/builditems.png new file mode 100644 index 0000000000..7e648bde24 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/builditems.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/exclude-qute-validation.png b/assets/images/posts/intellij-quarkus-tools-oct23/exclude-qute-validation.png new file mode 100644 index 0000000000..0e69e66ef5 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/exclude-qute-validation.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/exclusions-quickfix.png b/assets/images/posts/intellij-quarkus-tools-oct23/exclusions-quickfix.png new file mode 100644 index 0000000000..531589c8ad Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/exclusions-quickfix.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/exclusions-settings.png b/assets/images/posts/intellij-quarkus-tools-oct23/exclusions-settings.png new file mode 100644 index 0000000000..097b78cc31 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/exclusions-settings.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/inspections-severity-mapping.png b/assets/images/posts/intellij-quarkus-tools-oct23/inspections-severity-mapping.png new file mode 100644 index 0000000000..c79002bf63 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/inspections-severity-mapping.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/java-builditem-validation.png b/assets/images/posts/intellij-quarkus-tools-oct23/java-builditem-validation.png new file mode 100644 index 0000000000..7e648bde24 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/java-builditem-validation.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/java-validation-graphql-directives.png b/assets/images/posts/intellij-quarkus-tools-oct23/java-validation-graphql-directives.png new file mode 100644 index 0000000000..46f05f7d59 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/java-validation-graphql-directives.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/lsp-console-config.png b/assets/images/posts/intellij-quarkus-tools-oct23/lsp-console-config.png new file mode 100644 index 0000000000..254a197090 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/lsp-console-config.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/lsp-console-traces.png b/assets/images/posts/intellij-quarkus-tools-oct23/lsp-console-traces.png new file mode 100644 index 0000000000..1ac359e181 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/lsp-console-traces.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/lsp-settings.png b/assets/images/posts/intellij-quarkus-tools-oct23/lsp-settings.png new file mode 100644 index 0000000000..0d58e60c7d Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/lsp-settings.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/properties-completion-enum.png b/assets/images/posts/intellij-quarkus-tools-oct23/properties-completion-enum.png new file mode 100644 index 0000000000..c671f4fdc5 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/properties-completion-enum.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/properties-completion.png b/assets/images/posts/intellij-quarkus-tools-oct23/properties-completion.png new file mode 100644 index 0000000000..77c513f910 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/properties-completion.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/properties-inlay-hint.png b/assets/images/posts/intellij-quarkus-tools-oct23/properties-inlay-hint.png new file mode 100644 index 0000000000..cdef25f1b1 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/properties-inlay-hint.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-completion-snippets.gif b/assets/images/posts/intellij-quarkus-tools-oct23/qute-completion-snippets.gif new file mode 100644 index 0000000000..3362cd0973 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-completion-snippets.gif differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-fragment-codelens.png b/assets/images/posts/intellij-quarkus-tools-oct23/qute-fragment-codelens.png new file mode 100644 index 0000000000..243dc49908 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-fragment-codelens.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-fragment-support.gif b/assets/images/posts/intellij-quarkus-tools-oct23/qute-fragment-support.gif new file mode 100644 index 0000000000..cb5f6fb4e7 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-fragment-support.gif differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-message-bundles.png b/assets/images/posts/intellij-quarkus-tools-oct23/qute-message-bundles.png new file mode 100644 index 0000000000..98995906c9 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-message-bundles.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-codelens.png b/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-codelens.png new file mode 100644 index 0000000000..e519cbd5da Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-codelens.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-completion.png b/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-completion.png new file mode 100644 index 0000000000..bb40068085 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-completion.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-form-quickfix.gif b/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-form-quickfix.gif new file mode 100644 index 0000000000..a7bb94cb23 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-form-quickfix.gif differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-tags-completion.png b/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-tags-completion.png new file mode 100644 index 0000000000..ab2c4b2bf9 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-renarde-tags-completion.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-syntax-coloration-dark.png b/assets/images/posts/intellij-quarkus-tools-oct23/qute-syntax-coloration-dark.png new file mode 100644 index 0000000000..7dc0ddfde7 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-syntax-coloration-dark.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-syntax-coloration-light.png b/assets/images/posts/intellij-quarkus-tools-oct23/qute-syntax-coloration-light.png new file mode 100644 index 0000000000..d4b4cef35b Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-syntax-coloration-light.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-template-navigation.gif b/assets/images/posts/intellij-quarkus-tools-oct23/qute-template-navigation.gif new file mode 100644 index 0000000000..3f8a032513 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-template-navigation.gif differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/qute-validation-settings.png b/assets/images/posts/intellij-quarkus-tools-oct23/qute-validation-settings.png new file mode 100644 index 0000000000..4d2febaa9c Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/qute-validation-settings.png differ diff --git a/assets/images/posts/intellij-quarkus-tools-oct23/reactive-routes.png b/assets/images/posts/intellij-quarkus-tools-oct23/reactive-routes.png new file mode 100644 index 0000000000..54b6b59033 Binary files /dev/null and b/assets/images/posts/intellij-quarkus-tools-oct23/reactive-routes.png differ