The Java half of CatchMe. This is an OSGi bundle that runs inside jdt.ls, not a standalone program and not a plain jar.
The TypeScript extension can reach jdt.ls only through LSP, and LSP has no
request for "give me the AST" or "resolve this type binding." Precise Java
answers need exactly those. So this bundle is loaded into the language server,
where it has the full Eclipse JDT API: ASTParser with resolved bindings, the
type hierarchy, the Java model, and JDT's Call Hierarchy.
That's why the repository is polyglot: this directory is Maven/Tycho/OSGi and deliberately isolated from the pnpm workspace next door.
packages/provider-java ──'java.execute.workspaceCommand'──► redhat.java
│
▼
CatchMeDelegateCommandHandler
plugin.xml registers an org.eclipse.jdt.ls.core.delegateCommandHandler for
three command IDs. They must stay in sync with
packages/provider-java/src/index.ts:
catchme.java.resolveThrowSitecatchme.java.suggestExceptionTypescatchme.java.analyzeFlow
Everything returned must be plain JSON matching the model in
@leplusorg/catchme-api.
cd server-java && ./mvnw -B verify # → target/org.leplus.catchme.jdt-*.jarOr from the repository root, which also installs it where the extension expects it:
pnpm run build:server && pnpm run copy:server # → packages/core/server/catchme.jdt.jarThe Maven wrapper belongs in this directory (mvnw, mvnw.cmd, .mvn/),
because mvnw locates .mvn/ by walking up from the current directory.
To exercise the built bundle against a real language server — it starts jdt.ls as a plain Java process and drives the delegate commands over LSP, so it needs neither Visual Studio Code nor a display:
pnpm --filter catchme run test:jdtlsTycho and the Eclipse platform enforce several rules that are easy to trip over:
artifactIdmust equalBundle-SymbolicName(org.leplus.catchme.jdt).- The Maven version must match
Bundle-Version, mapping-SNAPSHOT↔.qualifier(1.0.0-SNAPSHOT↔1.0.0.qualifier). JavaSE-21is the floor. Recent Eclipse platforms require it; building against aJavaSE-17execution environment fails to resolve SWT/UI bundles.project.build.outputTimestampmust always parse. It defaults to a literal instant here; thesource-date-epochprofile substitutes$SOURCE_DATE_EPOCHwhen CI exports it. An unresolved${env...}breaks Tycho'sbuild-qualifiergoal.- Dependencies come from
META-INF/MANIFEST.MF, resolved against the p2 target platform inpom.xml— there is no<dependencies>section, and nothing to version-pin by hand.