{"id":19164495,"url":"https://github.com/heapstats/sampleplugin","last_synced_at":"2025-06-12T05:07:34.488Z","repository":{"id":80453083,"uuid":"42555693","full_name":"HeapStats/SamplePlugin","owner":"HeapStats","description":"Sample plugin for HeapStatsFXAnalyzer to use as template project.","archived":false,"fork":false,"pushed_at":"2019-11-11T01:11:34.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-22T23:12:52.024Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HeapStats.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-16T00:51:14.000Z","updated_at":"2019-11-11T01:11:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8e50a65-31c5-4f3c-aa83-ac112f67fda0","html_url":"https://github.com/HeapStats/SamplePlugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HeapStats/SamplePlugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeapStats%2FSamplePlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeapStats%2FSamplePlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeapStats%2FSamplePlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeapStats%2FSamplePlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HeapStats","download_url":"https://codeload.github.com/HeapStats/SamplePlugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeapStats%2FSamplePlugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259402066,"owners_count":22851872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T09:22:23.145Z","updated_at":"2025-06-12T05:07:34.470Z","avatar_url":"https://github.com/HeapStats.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"**If you want to create plugin for HeapStats Analyzer v2.1 or earlier, please see [for2.2](https://github.com/HeapStats/SamplePlugin/tree/for2.2) branch.**\n\n# SamplePlugin\n\nSample plugin for HeapStats Analyzer to use as template project.\n\n## Build\n\n```\n$ mvn package\n```\n\n## How to use\n\n1. Move sample plugin jar to `lib` in HeapStats Analyzer\n\n```\n$ mv target/heapstats-analyzer-plugin-sample.jar /path/to/HeapStatsAnalyzer/lib/\n$ vim /path/to/HeapStatsAnalyzer/heapstats.properties\n```\n \n2. Set plugin FQCN to `plugin` entry as below:\n\n```\nplugins=jp.co.ntt.oss.heapstats.plugin.sample\n```\n\n3. run HeapStats Analyzer\n \n ![Screenshot](https://raw.github.com/wiki/HeapStats/SamplePlugin/image/screenshot.png)\n\n# How to create your plugin\n\nHeapStats Analyzer provides a tab window per controllers (plugins) as below.\n\n![Plugin_And_Window](https://raw.github.com/wiki/HeapStats/SamplePlugin/image/1_tab_is_1_plugin.png)\n\nYou can create your plugin by the below steps.\n\n 1. Create a Controller class which is extended `jp.co.ntt.oss.heapstats.plugin.PluginController` like [SampleMainController.java](https://github.com/HeapStats/SamplePlugin/blob/master/src/main/java/jp/co/ntt/oss/heapstats/plugin/sample/SampleMainController.java).\n 2. Create FXML and CSS file to design your view.\n  * Example: [src/main/resources/../sample](https://github.com/HeapStats/SamplePlugin/tree/master/src/main/resources/jp/co/ntt/oss/heapstats/plugin/sample)\n\n## Tips: Run your plugin as standalone\n\nIf you want to run your plugin as standalone, you need \n\n * a main class to launch your plugin. \n  * For example, sample plugin includes main class ([SamplePlugin.java](https://github.com/HeapStats/SamplePlugin/blob/master/src/main/java/jp/co/ntt/oss/heapstats/plugin/sample/SamplePlugin.java))\n * to set `heapstats-analyzer.jar` in the classpath\n  * `java -cp .:/path/to/heapstats-analyzer.jar:/path/to/yourplugin.jar \u003cMainClass\u003e`\n\n## Tips: Separate Controller \n\nIf you want to separate your big controller and FXML file, you can separate the nested FXML file like sample plugin.\n\n![Controller_And_View](https://raw.github.com/wiki/HeapStats/SamplePlugin/image/controllers.png)\n\n * [MainController](https://github.com/HeapStats/SamplePlugin/tree/master/src/main/java/jp/co/ntt/oss/heapstats/plugin/sample)\n * [TabController](https://github.com/HeapStats/SamplePlugin/tree/master/src/main/java/jp/co/ntt/oss/heapstats/plugin/sample/tabs)\n\nSee also [Oracle's documentation](https://docs.oracle.com/javase/8/javafx/api/javafx/fxml/doc-files/introduction_to_fxml.html#nested_controllers).\n\n# How to enable your plugin\n\nYou can enable your plugin by below steps. \n \n1. Set your plugin ( `*.jar` ) to `lib` directory of HeapStats Analyzer.\n2. Edit `plugins` properties in `heapstats.properties` to add a package of your Controller.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheapstats%2Fsampleplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheapstats%2Fsampleplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheapstats%2Fsampleplugin/lists"}