From e0b95872e1d64f3465087b56eaf5a267456bd9f9 Mon Sep 17 00:00:00 2001 From: Alexander Chen Date: Thu, 2 Sep 2021 14:16:07 -0400 Subject: [PATCH] added quarkus.http.root-path property retrieval to Quarkus JaxRs CodeLens Signed-off-by: Alexander Chen --- .../quarkus/jaxrs/java/QuarkusJaxRsCodeLensParticipant.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quarkus.jdt.ext/com.redhat.microprofile.jdt.quarkus/src/main/java/com/redhat/microprofile/jdt/internal/quarkus/jaxrs/java/QuarkusJaxRsCodeLensParticipant.java b/quarkus.jdt.ext/com.redhat.microprofile.jdt.quarkus/src/main/java/com/redhat/microprofile/jdt/internal/quarkus/jaxrs/java/QuarkusJaxRsCodeLensParticipant.java index faac58481..680190964 100644 --- a/quarkus.jdt.ext/com.redhat.microprofile.jdt.quarkus/src/main/java/com/redhat/microprofile/jdt/internal/quarkus/jaxrs/java/QuarkusJaxRsCodeLensParticipant.java +++ b/quarkus.jdt.ext/com.redhat.microprofile.jdt.quarkus/src/main/java/com/redhat/microprofile/jdt/internal/quarkus/jaxrs/java/QuarkusJaxRsCodeLensParticipant.java @@ -35,6 +35,7 @@ public class QuarkusJaxRsCodeLensParticipant implements IJavaCodeLensParticipant private static final String QUARKUS_DEV_HTTP_PORT = "%dev.quarkus.http.port"; private static final String QUARKUS_HTTP_PORT = "quarkus.http.port"; + private static final String QUARKUS_HTTP_ROOT_PATH = "quarkus.http.root-path"; @Override public void beginCodeLens(JavaCodeLensContext context, IProgressMonitor monitor) throws CoreException { @@ -46,6 +47,9 @@ public void beginCodeLens(JavaCodeLensContext context, IProgressMonitor monitor) int serverPort = mpProject.getPropertyAsInteger(QUARKUS_HTTP_PORT, JaxRsContext.DEFAULT_PORT); int devServerPort = mpProject.getPropertyAsInteger(QUARKUS_DEV_HTTP_PORT, serverPort); JaxRsContext.getJaxRsContext(context).setServerPort(devServerPort); + + String httpRootPath = mpProject.getProperty(QUARKUS_HTTP_ROOT_PATH); + JaxRsContext.getJaxRsContext(context).setRootPath(httpRootPath); } @Override