Add Bundle Graph visualization view to bndtools#7106
Merged
chrisrueger merged 1 commit intomasterfrom Feb 25, 2026
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add Bundle Graph visualization feature to bndtools
Add Bundle Graph view for visualizing OSGi bundle dependencies in bndtools
Feb 20, 2026
Copilot
AI
changed the title
Add Bundle Graph view for visualizing OSGi bundle dependencies in bndtools
Bundle Graph: compute dependency edges from JAR manifest Import/Export-Package headers
Feb 20, 2026
Copilot
AI
changed the title
Bundle Graph: compute dependency edges from JAR manifest Import/Export-Package headers
Add Bundle Graph view for visualizing OSGi bundle dependencies in bndtools
Feb 21, 2026
Copilot
AI
changed the title
Add Bundle Graph view for visualizing OSGi bundle dependencies in bndtools
Add Bundle Graph visualization for OSGi bundle dependencies in bndtools
Feb 21, 2026
Copilot
AI
changed the title
Add Bundle Graph visualization for OSGi bundle dependencies in bndtools
bndtools Bundle Graph view: new feature
Feb 21, 2026
Copilot
AI
changed the title
bndtools Bundle Graph view: new feature
bndtools: Add Bundle Graph view for visualizing OSGi bundle dependencies
Feb 22, 2026
b140277 to
2564eec
Compare
Copilot
AI
changed the title
bndtools: Add Bundle Graph view for visualizing OSGi bundle dependencies
bndtools: Add Bundle Graph view for OSGi bundle dependency visualization
Feb 22, 2026
6c2f2e6 to
99e27e2
Compare
Copilot
AI
changed the title
bndtools: Add Bundle Graph view for OSGi bundle dependency visualization
Bundle Graph: add "Include optional imports" filter checkbox
Feb 22, 2026
Copilot
AI
changed the title
Bundle Graph: EdgeFilter combo, optional edge styling, and disconnected-node hiding
Add Bundle Graph visualization to bndtools (Eclipse view for OSGi bundle dependencies)
Feb 23, 2026
Copilot
AI
changed the title
Add Bundle Graph visualization to bndtools (Eclipse view for OSGi bundle dependencies)
Add Bundle Graph visualization view to bndtools Eclipse plugin
Feb 23, 2026
Copilot
AI
changed the title
Add Bundle Graph visualization view to bndtools Eclipse plugin
Add Bundle Graph visualization to bndtools Eclipse plugin
Feb 23, 2026
Copilot
AI
changed the title
Add Bundle Graph visualization to bndtools Eclipse plugin
Add Bundle Graph view to bndtools: visualize workspace/repository bundle dependencies
Feb 23, 2026
Copilot
AI
changed the title
Add Bundle Graph view to bndtools: visualize workspace/repository bundle dependencies
Add Bundle Graph visualization view to bndtools Eclipse plugin
Feb 23, 2026
0346581 to
3f257dd
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new Bundle Graph visualization feature to the bndtools.core Eclipse plugin, including a model layer, universe providers (workspace projects, .bndrun, repositories), manifest-based dependency calculation, and MermaidJS-based rendering inside an SWT Browser.
Changes:
- Introduces bundle graph model types (
BundleNode,BundleEdge,BundleGraphModel) plus closure utilities for dependencies/dependants. - Implements universe providers and a view (
BundleGraphView) with drag-and-drop, repository loading, edge filtering, and zoom. - Adds Mermaid rendering + unit tests for closures, rendering modes, and manifest dependency optionality.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| bndtools.core/test/bndtools/views/bundlegraph/MermaidRendererTest.java | Unit tests for Mermaid rendering modes, styling, and edge filtering |
| bndtools.core/test/bndtools/views/bundlegraph/ManifestDependencyCalculatorTest.java | Unit tests for dependency calculation and optional-edge behavior |
| bndtools.core/test/bndtools/views/bundlegraph/GraphClosuresTest.java | Unit tests for dependency/dependant closure logic and node identity semantics |
| bndtools.core/src/bndtools/views/bundlegraph/render/MermaidRenderer.java | Converts graph subsets into Mermaid definitions (styling + filters) |
| bndtools.core/src/bndtools/views/bundlegraph/render/EdgeFilter.java | Defines edge filtering options (all/mandatory/optional) |
| bndtools.core/src/bndtools/views/bundlegraph/model/SimpleBundleGraphModel.java | Concrete model implementation storing nodes/edges/jar map |
| bndtools.core/src/bndtools/views/bundlegraph/model/GraphClosures.java | BFS closure helper over dependencies/dependants |
| bndtools.core/src/bndtools/views/bundlegraph/model/BundleNode.java | Node identity semantics (bsn+version) with projectName metadata |
| bndtools.core/src/bndtools/views/bundlegraph/model/BundleGraphModel.java | Model interface, with default edges() and nodeToJar() |
| bndtools.core/src/bndtools/views/bundlegraph/model/BundleEdge.java | Edge type including optionality flag |
| bndtools.core/src/bndtools/views/bundlegraph/RepositoryUniverseProvider.java | Builds a model from selected bnd repositories |
| bndtools.core/src/bndtools/views/bundlegraph/RepositorySelectionDialog.java | UI dialog to select repositories to import into the universe |
| bndtools.core/src/bndtools/views/bundlegraph/ProjectUniverseProvider.java | Builds a model from selected Eclipse projects |
| bndtools.core/src/bndtools/views/bundlegraph/ManifestDependencyCalculator.java | Manifest-driven Import/Export-Package dependency + optionality computation |
| bndtools.core/src/bndtools/views/bundlegraph/BundleGraphView.java | Eclipse view: selection builder + embedded Mermaid browser renderer |
| bndtools.core/src/bndtools/views/bundlegraph/BundleGraphDropAdapter.java | Drag-and-drop support for .bndrun, projects, and repository items |
| bndtools.core/src/bndtools/views/bundlegraph/BndrunUniverseProvider.java | Builds a model from -runbundles in a .bndrun |
| bndtools.core/src/bndtools/command/ShowBundleGraphHandler.java | Command handler to open/populate the Bundle Graph view |
| bndtools.core/resources/unprocessed/mermaid/LICENSE-mermaid.txt | Adds Mermaid MIT license text for bundled MermaidJS |
| bndtools.core/_plugin.xml | Registers the view, command, handler, and context-menu contributions |
bndtools.core/src/bndtools/views/bundlegraph/render/MermaidRenderer.java
Outdated
Show resolved
Hide resolved
bndtools.core/src/bndtools/views/bundlegraph/BndrunUniverseProvider.java
Outdated
Show resolved
Hide resolved
bndtools.core/src/bndtools/views/bundlegraph/ManifestDependencyCalculator.java
Show resolved
Hide resolved
Add manifest-based dependency calculation to Bundle Graph view. Graph entities can be populated by DragnDrop from Repos, Projects or .bndrun files fixing code review points: - use bndrun resolved bundle version instead of range - repo: use all bundle versions - Support multiple exporters per package (split packages) in ManifestDependencyCalculator Signed-off-by: Christoph Rueger <chrisrueger@gmail.com> only DragnDrop Co-Authored-By: chrisrueger <188422+chrisrueger@users.noreply.github.com>
Contributor
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds a new Bundle Graph Eclipse ViewPart that renders a MermaidJS dependency graph of OSGi bundles in a bndtools workspace, with an interactive dual-list selection builder.
Model layer (
bndtools.views.bundlegraph.model)BundleNode— record keyed onbsn + version(identity excludesprojectNamemetadata so cross-provider nodes compare equal)BundleEdge(from, to, boolean optional)— edge is optional iff all contributingImport-Packageentries carryresolution:=optionalBundleGraphModelinterface —nodes(),edges(),nodeToJar();SimpleBundleGraphModelis the single concrete implementationGraphClosures— BFS transitive closure for dependencies / dependantsDependency calculation (
ManifestDependencyCalculator)Reads
MANIFEST.MFfrom each bundle's generated JAR viaaQute.bnd.osgi.Jar.getManifest()+Domain.domain():package → Set<BundleNode>exporter map (supports split packages / fragments — all co-exporters receive edges)BundleEdgeper (importer, exporter) pair, tracking optionality per contributing importnodeToJar: Map<BundleNode, File>in the model;mergeIntoUniverse()always recomputes edges over the full merged jar map so cross-provider edges (e.g. project node added to a repo universe) are never missedUniverse providers
ProjectUniverseProviderList<IProject>Project.getOutputFile()BndrunUniverseProviderIFile(.bndrun)-runbundlesvia existing bnd APIsRepositoryUniverseProviderList<RepositoryPlugin>repo.get()for all BSN/version pairsView (
BundleGraphView)SashForm: top = selection builder, bottom = embedded SWTBrowser(MermaidJS bundled locally atresources/unprocessed/mermaid/mermaid.min.js— no CDN required)Delete/Remove button; Selected bundles list with double-click-to-remove andCtrl+CcopyALL, nodes with no visible edges are hidden, and secondary↔secondary edges are suppressed (only edges touching a primary/seed node are shown)classDef; optional edges rendered as dotted arrows (-.->)−/ combo (25 %–200 %) /+, implemented viawindow.setZoom(scale)scaling a#scalerdiv inside a scrollable#viewportDrag-and-drop
Both lists accept drops from:
.bndrunfiles →BndrunUniverseProvider;IProjectresources →ProjectUniverseProviderRepositoryBundleVersion,RepositoryBundle(latest version),RepositoryPlugin(whole repo)Drop on Available → merges into universe; drop on Selected → merges into universe and adds to selected set. After any merge the full edge set is recomputed over the combined jar map.
Context-menu integration (
ShowBundleGraphHandler).bndrun→ Show Bundle Graph (seeds universe + selection from-runbundles)allowMultiple="true"— each invocation opens a new instance with a unique secondary IDRendering (
MermaidRenderer)Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
bndtools.jfrog.io/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xms1024m -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en(dns block)scans-in.gradle.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xms1024m -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en(dns block)If you need me to access, download, or install something from one of these locations, you can either:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.