Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 10. Java Lombok
This section shows how to enable Lombok support in your Java projects. By default, the lombok.jar
file is available in all Java plug-ins provided by CodeReady Workspaces.
To enable Lombok in a CodeReady Workspaces workspace, see the instructions below.
Prerequisites
A workspace or a devfile with:
-
One of the Java-based plug-ins enabled (
redhat/java
,redhat/java11
,redhat/java8
,redhat/quarkus-java8
orredhat/quarkus-java11
) - A valid Lombok project to import
-
One of the Java-based plug-ins enabled (
Procedure
- Open the workspace devfile.
Edit the existing Java plug-in section, adding the preference:
- id: redhat/java/latest preferences: java.jdt.ls.vmargs: '-javaagent:/lombok.jar'
- id: redhat/java/latest preferences: java.jdt.ls.vmargs: '-javaagent:/lombok.jar'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
- Start or restart the workspace.
- Open a file containing Lombok annotations.
Verify that the Class outline contains the Lombok generated methods.
Additional resources
- For more details, see the Project Lombok website.