Skip to content

Commit b2bf7f4

Browse files
Item 8: docs + version 1.4.2
- READMEs: tool count 71 -> 75 (intro, architecture diagram, section tables); Analysis section grows to 20 tools with the four new tools and the extended analyze_change_impact / analyze_data_flow descriptions; LSP comparison gains the reachability and affected-tests rows; npm README feature summaries updated. - CHANGELOG: 1.4.2 entry (reachability graph + three impact capabilities, interprocedural data flow, framework extractors, the two cap-contract fixes) and compare link. - Version 1.4.1 -> 1.4.2 via tycho-versions:set-version.
1 parent 4d78406 commit b2bf7f4

16 files changed

Lines changed: 44 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## [1.4.2] - 2026-06-10
4+
5+
### Added
6+
7+
- Whole-program reachability graph (built lazily per loaded project, cached until reload) powering three impact-analysis capabilities:
8+
- `find_unreachable_code`: project-wide dead code — types, methods, and fields unreachable from any `main` method or test (disabled tests still count as roots; a call through an interface or superclass reaches every override). Results mean "unreachable from declared entry points", not "safe to delete" — reflection/DI entry points are invisible to the graph.
9+
- `find_affected_tests`: the test methods (JUnit 4/5, TestNG) that exercise a symbol, directly or transitively through non-test helpers and interface dispatch — the set to run after changing it. Disabled covering tests are flagged.
10+
- `analyze_change_impact` gains `transitive=true`: the full reverse closure over the project graph (no depth ceiling, crosses override declarations) as `affectedMethods` + `affectedFiles`. The depth-mode contract is unchanged.
11+
- `analyze_data_flow` gains opt-in interprocedural tracking (`followCalls`, bounded by `maxCallDepth`): null facts followed through argument-to-parameter hops to dereference sinks in callees, and parameter-taint facts propagated through aliases and concatenation to escape points into non-project callees. May-analysis; returned values are not tracked back.
12+
- Framework-semantic extractors: `get_jpa_model` (entities with table names, id fields, and relationships — targets resolved through collection type arguments, mappedBy sides) and `get_http_endpoints` (route table with class-prefix/method-path composition for Spring verb shortcuts and JAX-RS). Frameworks absent from the classpath return empty results.
13+
14+
### Fixed
15+
16+
- `get_diagnostics` flagged `truncated` whenever the collected count reached `maxResults`, even when nothing was dropped. The flag now means items were actually dropped.
17+
- `suggest_imports` overflowed its internal collection budget at `maxResults=Integer.MAX_VALUE` and silently returned nothing.
18+
319
## [1.4.1] - 2026-06-09
420

521
### Added
@@ -321,6 +337,7 @@ Initial release of JavaLens MCP Server.
321337
- Maven and Gradle project support
322338
- 347 tests
323339

340+
[1.4.2]: https://github.com/pzalutski-pixel/javalens-mcp/compare/v1.4.1...v1.4.2
324341
[1.4.1]: https://github.com/pzalutski-pixel/javalens-mcp/compare/v1.4.0...v1.4.1
325342
[1.4.0]: https://github.com/pzalutski-pixel/javalens-mcp/compare/v1.3.6...v1.4.0
326343
[1.3.6]: https://github.com/pzalutski-pixel/javalens-mcp/compare/v1.3.5...v1.3.6

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
55
[![Java 21](https://img.shields.io/badge/Java-21-orange.svg)](https://openjdk.org/projects/jdk/21/)
66

7-
An MCP server providing 71 semantic analysis tools for Java, built directly on Eclipse JDT for compiler-accurate code understanding.
7+
An MCP server providing 75 semantic analysis tools for Java, built directly on Eclipse JDT for compiler-accurate code understanding.
88

99
## Built for AI Agents
1010

@@ -80,6 +80,8 @@ Language Server Protocol was designed for IDE autocomplete and basic navigation
8080
| Calculate cyclomatic complexity |||
8181
| Find unused private methods |||
8282
| Detect possible null pointer bugs |||
83+
| Project-wide dead-code reachability from entry points |||
84+
| Find the tests that exercise a symbol, transitively |||
8385

8486
JavaLens wraps **Eclipse JDT Core** directly via OSGi, providing:
8587

@@ -232,7 +234,7 @@ These use JDT's unique reference type constants—not available through LSP:
232234
| `find_type_arguments` | Find all `List<Type>` usages |
233235
| `find_reflection_usage` | Find `Class.forName()`, `Method.invoke()`, and other reflection calls |
234236

235-
### Analysis (16 tools)
237+
### Analysis (20 tools)
236238

237239
| Tool | Description |
238240
|------|-------------|
@@ -243,15 +245,19 @@ These use JDT's unique reference type constants—not available through LSP:
243245
| `find_field_writes` | Find where fields are mutated |
244246
| `find_tests` | Discover JUnit/TestNG test methods |
245247
| `find_unused_code` | Find unused private members |
248+
| `find_unreachable_code` | Project-wide dead code — members unreachable from any main method or test, over the whole-program call graph |
249+
| `find_affected_tests` | The tests that exercise a symbol, directly or transitively — the set to run after changing it |
246250
| `find_possible_bugs` | Detect null risks, empty catches, resource leaks |
247251
| `get_hover_info` | Get documentation/signature for symbol |
248252
| `get_javadoc` | Get parsed Javadoc |
249253
| `get_signature_help` | Get method signature at call site |
250254
| `get_enclosing_element` | Get containing method/class at position |
251-
| `analyze_change_impact` | Blast radius — all files and call sites affected by changing a symbol |
252-
| `analyze_data_flow` | Variable read/write/declaration tracking within a method |
255+
| `analyze_change_impact` | Blast radius — direct call sites by depth, or the full transitive closure over the project graph (`transitive=true`) |
256+
| `analyze_data_flow` | Variable read/write/declaration tracking within a method; opt-in `followCalls` tracks null/taint facts across calls to sinks |
253257
| `analyze_control_flow` | Branching, loops, return/throw points, nesting depth |
254258
| `get_di_registrations` | Find Spring DI registrations (@Component, @Bean, @Autowired, @Inject) |
259+
| `get_jpa_model` | Assembled JPA entity model — tables, id fields, relationships with resolved targets and mappedBy sides |
260+
| `get_http_endpoints` | Assembled HTTP route table — Spring and JAX-RS paths composed from class prefixes, mapped to handler methods |
255261

256262
### Compound Analysis (4 tools)
257263

@@ -437,7 +443,7 @@ Build-system coverage is structured as focused per-bug tests plus realistic end-
437443
```mermaid
438444
flowchart TD
439445
Client["<b>MCP Client</b>"]
440-
MCP["<b>org.javalens.mcp</b><br/>McpProtocolHandler → ToolRegistry → 71 Tools"]
446+
MCP["<b>org.javalens.mcp</b><br/>McpProtocolHandler → ToolRegistry → 75 Tools"]
441447
Core["<b>org.javalens.core</b><br/>JdtServiceImpl → WorkspaceManager, SearchService"]
442448
JDT["<b>Eclipse JDT Core</b> (via OSGi / Equinox)<br/>IWorkspace, IJavaProject, SearchEngine, ASTParser"]
443449

npm/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![npm](https://img.shields.io/npm/v/javalens-mcp.svg)](https://www.npmjs.com/package/javalens-mcp)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/pzalutski-pixel/javalens-mcp/blob/master/LICENSE)
66

7-
An MCP server providing **71 semantic analysis tools** for Java, built directly on Eclipse JDT for compiler-accurate code understanding.
7+
An MCP server providing **75 semantic analysis tools** for Java, built directly on Eclipse JDT for compiler-accurate code understanding.
88

99
## Requirements
1010

@@ -54,8 +54,8 @@ Search symbols, go to definition, find references, find implementations, type hi
5454
### Fine-Grained Reference Search (9 tools)
5555
JDT-unique capabilities not available through LSP: find annotation usages, type instantiations, casts, instanceof checks, throws declarations, catch blocks, method references, type arguments, and reflection usage detection.
5656

57-
### Analysis (16 tools)
58-
Diagnostics, syntax validation, call hierarchy (incoming/outgoing), field write tracking, test discovery, unused code detection, possible bug detection, change impact analysis, data flow analysis, control flow analysis, and Spring DI registration scanning.
57+
### Analysis (20 tools)
58+
Diagnostics, syntax validation, call hierarchy (incoming/outgoing), field write tracking, test discovery, unused code detection, project-wide unreachable-code detection over the whole-program call graph, affected-test discovery (which tests exercise a symbol, transitively), possible bug detection, change impact analysis (with a full transitive mode), data flow analysis (with opt-in cross-method null/taint tracking), control flow analysis, Spring DI registration scanning, JPA entity-model assembly, and HTTP route-table assembly (Spring and JAX-RS).
5959

6060
### Compound Analysis (4 tools)
6161
Combine multiple queries to reduce round-trips: analyze file, analyze type, analyze method, and type usage summary.

org.javalens.core.tests/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: JavaLens Core Tests
44
Bundle-SymbolicName: org.javalens.core.tests
5-
Bundle-Version: 1.4.1
5+
Bundle-Version: 1.4.2
66
Bundle-Vendor: JavaLens
77
Fragment-Host: org.javalens.core;bundle-version="1.3.0"
88
Bundle-RequiredExecutionEnvironment: JavaSE-21

org.javalens.core.tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.javalens</groupId>
99
<artifactId>org.javalens.parent</artifactId>
10-
<version>1.4.1</version>
10+
<version>1.4.2</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313

org.javalens.core/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: JavaLens Core
44
Bundle-SymbolicName: org.javalens.core
5-
Bundle-Version: 1.4.1
5+
Bundle-Version: 1.4.2
66
Bundle-Vendor: JavaLens
77
Bundle-RequiredExecutionEnvironment: JavaSE-21
88
Bundle-ActivationPolicy: lazy

org.javalens.core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.javalens</groupId>
99
<artifactId>org.javalens.parent</artifactId>
10-
<version>1.4.1</version>
10+
<version>1.4.2</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313

org.javalens.launcher/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.javalens</groupId>
99
<artifactId>org.javalens.parent</artifactId>
10-
<version>1.4.1</version>
10+
<version>1.4.2</version>
1111
</parent>
1212

1313
<artifactId>org.javalens.launcher</artifactId>

org.javalens.mcp.tests/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: JavaLens MCP Tests
44
Bundle-SymbolicName: org.javalens.mcp.tests
5-
Bundle-Version: 1.4.1
5+
Bundle-Version: 1.4.2
66
Bundle-Vendor: JavaLens
77
Fragment-Host: org.javalens.mcp;bundle-version="1.3.0"
88
Bundle-RequiredExecutionEnvironment: JavaSE-21

org.javalens.mcp.tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.javalens</groupId>
99
<artifactId>org.javalens.parent</artifactId>
10-
<version>1.4.1</version>
10+
<version>1.4.2</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313

0 commit comments

Comments
 (0)