If you want to create plugin for HeapStats Analyzer v2.1 or earlier, please see for2.2 branch.
Sample plugin for HeapStats Analyzer to use as template project.
$ mvn package
- Move sample plugin jar to
lib
in HeapStats Analyzer
$ mv target/heapstats-analyzer-plugin-sample.jar /path/to/HeapStatsAnalyzer/lib/
$ vim /path/to/HeapStatsAnalyzer/heapstats.properties
- Set plugin FQCN to
plugin
entry as below:
plugins=jp.co.ntt.oss.heapstats.plugin.sample
- run HeapStats Analyzer
HeapStats Analyzer provides a tab window per controllers (plugins) as below.
You can create your plugin by the below steps.
- Create a Controller class which is extended
jp.co.ntt.oss.heapstats.plugin.PluginController
like SampleMainController.java. - Create FXML and CSS file to design your view.
- Example: src/main/resources/../sample
If you want to run your plugin as standalone, you need
- a main class to launch your plugin.
- For example, sample plugin includes main class (SamplePlugin.java)
- to set
heapstats-analyzer.jar
in the classpath java -cp .:/path/to/heapstats-analyzer.jar:/path/to/yourplugin.jar <MainClass>
If you want to separate your big controller and FXML file, you can separate the nested FXML file like sample plugin.
See also Oracle's documentation.
You can enable your plugin by below steps.
- Set your plugin (
*.jar
) tolib
directory of HeapStats Analyzer. - Edit
plugins
properties inheapstats.properties
to add a package of your Controller.