{"id":19564346,"url":"https://github.com/antlr/jetbrains-plugin-sample","last_synced_at":"2025-04-27T00:32:59.111Z","repository":{"id":48672387,"uuid":"48067984","full_name":"antlr/jetbrains-plugin-sample","owner":"antlr","description":"A sample plugin for jetbrains IDEs that uses an ANTLR grammar for a nontrivial custom language.","archived":false,"fork":false,"pushed_at":"2021-07-15T15:22:18.000Z","size":3338,"stargazers_count":119,"open_issues_count":7,"forks_count":35,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-04T19:11:09.526Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antlr.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}},"created_at":"2015-12-15T20:44:14.000Z","updated_at":"2024-11-21T13:34:40.000Z","dependencies_parsed_at":"2022-08-24T08:10:41.888Z","dependency_job_id":null,"html_url":"https://github.com/antlr/jetbrains-plugin-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlr%2Fjetbrains-plugin-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlr%2Fjetbrains-plugin-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlr%2Fjetbrains-plugin-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlr%2Fjetbrains-plugin-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antlr","download_url":"https://codeload.github.com/antlr/jetbrains-plugin-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251073596,"owners_count":21532005,"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-11T05:21:35.767Z","updated_at":"2025-04-27T00:32:58.703Z","avatar_url":"https://github.com/antlr.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample IntelliJ plugin using ANTLR grammar\n\nThis is a demonstration of [ANTLRv4 library for IntelliJ plugins](https://github.com/antlr/antlr4-intellij-adaptor/), \nwhich makes it easy to create plugins for IntelliJ-based IDEs based on an ANTLRv4 grammar.\n\n\u003cimg src=screenshot.png\u003e\n\n## Running the plugin for the first time\n\nMake sure the Gradle plugin is installed in your IDE, go to `File -\u003e Open`, select the `build.gradle` file\nand choose `Open as Project`. \n\nIf you already imported the project when it was not based on Gradle, then choose the option to delete the existing \nproject and reimport it.\n\nOnce the IDE is done downloading dependencies and refreshing the project, you can use the `Gradle` tool window\nand use the following `Tasks`:\n* `build \u003e assemble` to build the project\n* `intellij \u003e runIde` to run the plugin in a sandboxed instance\n\n## Noteworthy things\n\n### Gradle build\nThe build is based on Gradle, and uses the [gradle-intellij-plugin](https://github.com/JetBrains/gradle-intellij-plugin),\nwhich makes it easy to:\n\n* pull dependencies, especially the IntelliJ SDK and `antlr4-intellij-adaptor`\n* build and run tests in a CI environment on different versions of the SDK\n* generate lexers \u0026 parsers from your grammars, thanks to the [ANTLR plugin for Gradle](https://docs.gradle.org/current/userguide/antlr_plugin.html)\n* publish plugins to the [JetBrains Plugins Repository](https://plugins.jetbrains.com/)\n* configure the project for occasional contributors 🙂\n\n### ANTLRPsiNode\n\nPSI nodes defined in the plugin extend `ANTLRPsiNode` and `IdentifierDefSubtree`, which automatically\nmakes them `PsiNameIdentifierOwner`s.\n\n### Error highlighting\n\nErrors are shown by `SampleExternalAnnotator`, which makes use of `org.antlr.intellij.adaptor.xpath.XPath` to\ndetect references to unknown functions.\n\n### ParserDefinition\n\n`SampleParserDefinition` uses several handy classes from the adaptor library:\n\n* `PSIElementTypeFactory` to generate `IElementType`s from tokens and rules defined in your ANTLRv4 grammar\n* `ANTLRLexerAdaptor` to bind generated lexers to a `com.intellij.lexer.Lexer`\n* `ANTLRParserAdaptor` to bind generated parsers to a `com.intellij.lang.PsiParser`\n\n## Misc\n\n**WARNING**. Turn on Dragon speech recognition for Mac and do a rename.\nGUI deadlocks.  Every time. Turn off dragon. No problem ever.\nSee [JetBrains forum](https://devnet.jetbrains.com/message/5566967#5566967).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantlr%2Fjetbrains-plugin-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantlr%2Fjetbrains-plugin-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantlr%2Fjetbrains-plugin-sample/lists"}