{"id":15134518,"url":"https://github.com/vanco/sequenceplugin","last_synced_at":"2025-05-15T03:08:53.475Z","repository":{"id":30553049,"uuid":"34107809","full_name":"Vanco/SequencePlugin","owner":"Vanco","description":"SequencePlugin for IntelliJ IDEA","archived":false,"fork":false,"pushed_at":"2024-11-16T01:55:28.000Z","size":3183,"stargazers_count":700,"open_issues_count":24,"forks_count":200,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-15T03:08:46.613Z","etag":null,"topics":["intellij","java","kotlin","scala","sequence-diagram"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vanco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-04-17T09:20:16.000Z","updated_at":"2025-05-02T04:00:18.000Z","dependencies_parsed_at":"2023-02-17T16:45:56.857Z","dependency_job_id":"7d00154e-77b3-47e8-8fbc-2858669b6f22","html_url":"https://github.com/Vanco/SequencePlugin","commit_stats":{"total_commits":201,"total_committers":11,"mean_commits":"18.272727272727273","dds":"0.22388059701492535","last_synced_commit":"e8c74d323563a34eadba6acb8b9ed988900e44cf"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanco%2FSequencePlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanco%2FSequencePlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanco%2FSequencePlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanco%2FSequencePlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vanco","download_url":"https://codeload.github.com/Vanco/SequencePlugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264770,"owners_count":22041794,"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":["intellij","java","kotlin","scala","sequence-diagram"],"created_at":"2024-09-26T05:22:05.429Z","updated_at":"2025-05-15T03:08:48.452Z","avatar_url":"https://github.com/Vanco.png","language":"Java","readme":"[![GitHub release](https://img.shields.io/github/v/release/Vanco/SequencePlugin)](https://github.com/Vanco/SequencePlugin/releases)\n[![JetBrains Plugins](https://img.shields.io/jetbrains/plugin/v/8286)](https://plugins.jetbrains.com/plugin/8286-sequencediagram)\n\n# SequenceDiagram\n\u003c!-- Plugin description --\u003e\nSequence Diagram is tool to generate simple sequence diagram(UML) from java, kotlin, scala(Beta) and groovy(limited) code.\nhttps://vanco.github.io/SequencePlugin.\n\nwith this plugin, you can\n+ generate Simple Sequence Diagram.\n+ Navigate the code by click the diagram shape.\n+ Delete Class from diagram.\n+ Export the diagram as image(SVG, JPEG, PNG, TIFF).\n+ Export the diagram as PlantUML, Mermaid format file.\n+ Exclude classes from diagram by Settings \u003e Tools \u003e Sequence Diagram\n+ Smart Interface(experimental)\n+ Lambda Expression(experimental)\n+ Kotlin Support(Experimental)\n+ Scala support(Experimental, Beta)\n+ Groovy Support(Experimental, limited)\n\u003c!-- Plugin description end --\u003e\n\n## Experimental features\n**The experimental features created by myself, which is not part of UML standard. Use this feature in your own risk.**\n\n### UAST support (since version 3.x)\nSequenceDiagram version 3.x will use UAST api to generate sequence diagram.\n\nRefer to ['The UAST description from IntelliJ Platform SDK'](https://plugins.jetbrains.com/docs/intellij/uast.html)\n\n\u003e UAST (Unified Abstract Syntax Tree) is an abstraction layer on the PSI of different programming languages targeting the \n\u003e JVM (Java Virtual Machine). It provides a unified API for working with common language elements like classes and method \n\u003e declarations, literal values, and control flow operators.\n\u003e \n\u003e Which languages are supported?\n\u003e - Java: full support\n\u003e - Kotlin: full support\n\u003e - Scala: beta, but full support\n\u003e - Groovy: declarations only, method bodies not supported\n\n\u003e **Note**\n: There are some limitation when generate from scala or groovy code. Refer to the list of [known issues](#known-issue).\n\n### Smart Interface\nFind the implementation of the interface smartly.  e.g.\n```java\npublic interface Fruit {\n    int eat();\n}\n\npublic class Apple implements Fruit {\n    @Override\n    public int eat() {\n        return 5;\n    }\n}\n```\n`Apple` implemented the `Fruit` interface. When we generate sequence diagram for the `eatFruit` method:\n```java\npublic class People {\n    \n    private Fruit fruit = new Apple();\n\n    public void eatFruit() {\n        fruit.eat();\n    }\n}\n```\nI draw dummy `implementation call` in dash line.\n\n![Smart Interface](imges/smart_interface.png)\n\nFor the interface or abstract class, if there is only one implementation found, it will draw in diagram automatically. \nMore than one implementation, you need to choose one to draw. this is an option in settings.\n\n### Lambda Expression\nNo standard for the lambda expression in the sequence diagram yet. So I create mine. e.g.\n```java\npublic interface Service\u003cInt, String\u003e {\n\n    String invoke(Int a);\n}\n```\n I need draw the sequence diagram for `hello` method:\n```java\npublic class Lambda {\n\n    public Service\u003cInteger, String\u003e hello() {\n        return a -\u003e {\n            Fruit fruit = new Apple();\n            fruit.eat();\n            return \"I'm good!\";\n        };\n    }\n}\n```\nI draw a dummy `() -\u003e` self call in diagram.\n\n![Lambda Expression](imges/lambda_expr.png)\n\n## How to use\nSequence Diagram can generate sequence diagram from JAVA, Kotlin, Scala, Groovy File.\n1. Open Java/Kotlin/Scala/Groovy file\n2. Generate SequenceDiagram with shortcut `Alt S` for windows, `Option S` for macOS\n\nPlease try to experience it and find what happen. \n\nHave fun!\n\n## Version History\nCurrent Version\n\n[![JetBrains Plugins](https://img.shields.io/jetbrains/plugin/v/8286)](https://plugins.jetbrains.com/plugin/8286-sequencediagram)\n\n### Version and API comparison\n\n| Open API          | v2.x.x                                          | v3.x                      |\n|-------------------|-------------------------------------------------|---------------------------|\n| IGenerator        | SequenceGenerator \u003cbr\u003e KtSequenceGenerator      | UastSequenceGenerator     |\n| GeneratorFactory  | JavaGeneratorFactory \u003cbr\u003e KtGeneratorFactory    | UastGeneratorFactory      |\n| ElementTypeFinder | JavaElementTypeFinder  \u003cbr\u003e KtElementTypeFinder |                           |\n| ActionFinder      | JavaActionFinder  \u003cbr\u003e  KtActionFinder          | UastActionFinder          |\n| SequenceNavigable | JavaSequenceNavigable  \u003cbr\u003e KtSequenceNavigable | JavaSequenceNavigable[^1] |\n\n[^1]: `JavaSequenceNavigable` work for Java, Kotlin, Scala, Groovy\n\n### Function comparison\n\n|                                                        | v2.x.x                     | 3.x              |\n|--------------------------------------------------------|----------------------------|------------------|\n| **Language:**                                          |                            |                  |\n| Java                                                   | \u0026#x2713;                   | \u0026#x2713;         |\n| Kotlin                                                 | \u0026#x2713; Partial           | \u0026#x2713;         |\n| Scala                                                  |                            | \u0026#x2713;         |\n| Groovy                                                 |                            | \u0026#x2713; Partial |\n| **Entry:**                                             |                            |                  |\n| Navigation Bar                                         | \u0026#x2713;                   |                  |\n| Tools Menu                                             | \u0026#x2713;                   | \u0026#x2713;         |\n| Editor Context Menu                                    | \u0026#x2713;                   | \u0026#x2713;         |\n| Shortcut `Alt S` for windows \u003cbr\u003e `Option S` for macOS |                            | \u0026#x2713;         |\n| Project view popup menu                                |                            |                  |\n| Structure view popup menu                              |                            |                  |\n| **Feature:**                                           |                            |                  |\n| Smart Interface[^2]                                    | \u0026#x2713; EXC: 2.2.4, 2.2.5 | \u0026#x2713;         |\n| Smart Interface configuration                          |                            | \u0026#x2713;         |\n| Lambda call configuration                              | \u0026#x2713;                   | \u0026#x2713;         |\n\n[^2]: `Smart interface` will scan entire file and spend more generate time.\n\n### versions history:\n[Changelog](CHANGELOG.md)\n\n## Known issue\n\n#### 1. Scala for comprehension calls is not supported\nFor example:\n```scala\nclass B() {\n  def bar() = Option(\"bar\")\n}\n\nclass A(b: B) {\n  def foo() = {\n    val r = \"foo\" + b.bar().getOrElse(\"?\")\n    r\n  }\n\n  def foo2() = {\n    val r = for {\n      x \u003c- b.bar()\n    } yield \"foo\" + x\n    r.getOrElse(\"?\")\n  }\n}\n```\nthe for comprehension call\n```scala\nval r = for {\n      x \u003c- b.bar()\n    } yield \"foo\" + x\n```\nit's UAST tree is `UastEmptyexpression`.\n```\n UMethod (name = foo2)\n            UBlockExpression\n                UDeclarationsExpression\n                    ULocalVariable (name = r)\n                        UastEmptyExpression(type = PsiType:Option\u003cString\u003e)\n                UReturnExpression\n                    UQualifiedReferenceExpression\n                        USimpleNameReferenceExpression (identifier = r)\n                        UMethodCall(name = getOrElse)\n                            UIdentifier (Identifier (getOrElse))\n                            ULiteralExpression (value = \"?\")\n```\nso the `b.bar()` method call will not generate base on `UastEmptyexpression`. Hopefully, the UAST api will solve this problem sooner.\n\n#### 2. Groovy method body is not supported\nFor example:\n```groovy\n/**\n * A Class description\n */\nclass Student {\n    /** the name of the person */\n    String name\n\n    /**\n     * Creates a greeting method for a certain person.\n     *\n     * @param otherPerson the person to greet\n     * @return a greeting message\n     */\n    //known issue: groovy method will not generate in UAST\n    String greet(String otherPerson) {\n        \"Hello ${otherPerson}\"\n        // call java\n        Fruit fruit = new Banana()\n        fruit.eat()\n\n    }\n}\n```\nBased on UAST api limitation, it's UAST tree is no method body mappings.\n```\nUFile (package = van.demo.grovvy)\n    UClass (name = Student)\n        UMethod (name = greet)\n            UParameter (name = otherPerson)\n```\nWhen generate sequence of method `greet`, the calls in the method body will not generate (the call java code in the body of `greet`).\n```groovy\n        \"Hello ${otherPerson}\"\n        // call java\n        Fruit fruit = new Banana()\n        fruit.eat()\n```\n## Acknowledgement\n\n#### Name history\n+ **SequencePlugin** Maintained by Kentaur(Kesh Sibilev, ksibilve@yahoo.com) until 2011\n+ **SequencePluginReload** Maintained by Vanhg(Evan Fan, fanhuagang@gmail.com) 2011 - 2015\n+ **SequenceDiagram** Maintained by Vanco(Evan Fan, fanhuagang@gmail.com) since 2016 \n  ![new](imges/new.svg){:height=\"32px\" width=\"32px\"}\n\n#### Why change name?\nSince 2011, I found a solution of NPE of original **SequencePlugin**, so I write email to Kentaur with my solution,\nHe said he was not coding anymore. Instead, he sent me the code. I fix the NPE issue and publish to plugin\nrepository with new name **SequencePluginReload**.\n\nIn 2015, the IntelliJ change the login system, and I lost my account, cannot continue to publish new version to\nthe repository.\n\nIn 2016, I change the Name again to **SequenceDiagram** and host the source code on [github](https://github.com/Vanco/SequencePlugin).\nNow it is open source.\n\nThanks Kentaur for the great work on the original source.\n\n---","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanco%2Fsequenceplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanco%2Fsequenceplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanco%2Fsequenceplugin/lists"}