Skip to content

Commit

Permalink
added quarkus.http.root-path property retrieval to Quarkus JaxRs Code…
Browse files Browse the repository at this point in the history
…Lens

Signed-off-by: Alexander Chen <alchen@redhat.com>
  • Loading branch information
Alexander Chen committed Sep 2, 2021
1 parent d931b17 commit e0b9587
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit e0b9587

Please sign in to comment.