Introduction
CDI Inspector is set of tools to visualize and inspect CDI components and their dependencies. It's aimed to help Java EE developer to orient in large project. The goal is to create an interactive oriented graph where node represents a CDI component and edge a relation "being injected into".
The Inspector can retrieve information about CDI components either about
projects opened in IDE or about running applications deployed in JBoss
AS server.The result graph can be viewed either in IDE window or in web
browser.
Use cases
There are two key use cases for this tool. First, it is a brief inspection of running application, even in production mode. Web interface is used in this case.
Second, it is make it easy to get view from above of the project and navigate around the project while development. IDE plugin is used in this case. Thanks to integration with Eclipse it is possible to inspect just a selected package or single class or open class in source code editor from the graph.
Architecture
Following figure shows information flows of CDI Inspector. Yellow modules are part of the project.
The part running in Eclipse IDE (JBDS)consists of three Eclipse plugins. Two of them retrieve CDI metadata either about local projects using JavaEE Tools (part of JBoss Tools) or about deployed applications via REST protocol from application server. The third plugin manages graph view and IDE integration. Visualization can be activated from context menu of various nodes of 'Package Explorer' view. Plugin can show class represented by graph node in 'Package Explorer' view or open it in source editor. Node details are displayed in 'Properties' view. If one decides to inspect local projects only, this pars can work on its own.
JBoss AS hosts extension that collects information about CDI components in running applications and provide it to other Inspector module. This module runs as a standard application and publishs passed information using REST protocol alongside a simple client web application that can display the graph.
CDI Inspector is hosted on
GitHub and currently is available in very preliminary version.