{"id":16559896,"url":"https://github.com/jaguililla/mrbean","last_synced_at":"2026-05-20T10:01:40.369Z","repository":{"id":30010177,"uuid":"33558308","full_name":"jaguililla/mrbean","owner":"jaguililla","description":"Let MrBean generate most of the boiler plate for you!","archived":false,"fork":false,"pushed_at":"2019-05-29T22:10:40.000Z","size":1060,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T03:20:06.608Z","etag":null,"topics":["code","generator","intellij-idea","intellij-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaguililla.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-07T17:37:21.000Z","updated_at":"2025-01-04T07:20:49.000Z","dependencies_parsed_at":"2022-09-07T08:50:20.800Z","dependency_job_id":null,"html_url":"https://github.com/jaguililla/mrbean","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jaguililla/mrbean","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaguililla%2Fmrbean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaguililla%2Fmrbean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaguililla%2Fmrbean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaguililla%2Fmrbean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaguililla","download_url":"https://codeload.github.com/jaguililla/mrbean/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaguililla%2Fmrbean/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265067628,"owners_count":23706308,"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":["code","generator","intellij-idea","intellij-plugin"],"created_at":"2024-10-11T20:27:29.871Z","updated_at":"2026-05-20T10:01:35.324Z","avatar_url":"https://github.com/jaguililla.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nMrBean\n======\n\nLet MrBean generate most of the boiler plate for you!\n\n![logo-teddy.jpg](logo-teddy.jpg)\n\nBased on the open source plugin: [Guava Generators](https://github.com/seanlandsman/guavagenerators)\n\n# Install\n\n1. Download the [plugin binary](mrbean.zip)\n2. Go to: `File \u003e Settings... \u003e Plugins \u003e Install plugin from disk...` and select `mrbean.zip`\n\n# Usage\n\nExecute the `Code \u003e Generate...` action (`alt + insert`) and select the method(s) that you want to\ngenerate.\n\n# Configuration\n\nTo change the templates, open the plugin settings panel: `File \u003e Settings... \u003e Other Settings \u003e \nMrBean`. There you can edit them to suit your needs.\n\nIf you want to reset a template, just press the big ugly `Default` button at its right.\n\nYou can generate several utility methods for one single field using `##~` as a separator in the templates. Ie:\n\n```java\nprivate List\u003cString\u003e list;\nprivate Optional\u003cLocalDate\u003e optional;\nprivate Set\u003cDouble\u003e set;\nprivate Map\u003cInteger, Locale\u003e map;\n\n/** @see #list */\npublic void setList (List\u003cString\u003e list) {\n    this.list = list;\n}\n\n/** @see #list */\npublic void setList (String... list) {\n    setList (Arrays.asList (list));\n}\n\n/** @see #optional */\npublic void setOptional (Optional\u003cLocalDate\u003e optional) {\n    this.optional = optional;\n}\n\n/** @see #optional */\npublic void setOptional (LocalDate optional) {\n    setOptional (Optional.ofNullable (optional));\n}\n\n/** @see #set */\npublic void setSet (Set\u003cDouble\u003e set) {\n    this.set = set;\n}\n\n/** @see #set */\npublic void setSet (Double... set) {\n    setSet (new HashSet\u003c\u003e (Arrays.asList (set)));\n}\n\n/** @see #map */\npublic void setMap (Map\u003cInteger, Locale\u003e map) {\n    this.map = map;\n}\n\n/** @see #map */\npublic void setMap (Map.Entry\u003cInteger, Locale\u003e... map) {\n    setMap (Stream.of (map).collect (Collectors.toMap (Map.Entry::getKey, Map.Entry::getValue)));\n}\n```\n\n# Some ideas (TODO)\n\n* Add tests\n* Port to Kotlin\n* Rearrange methods in class after generating code\n* Add support for 'EnumSet' in 'with' and 'set'\n* Add 'toString' version to avoid 'nulls' like:\n\n```java\nStream.of (\n  new AbstractMap.SimpleEntry\u003c\u003e (\"field1\", field1),\n  new AbstractMap.SimpleEntry\u003c\u003e (\"field2\", field2)\n)\n.filter (e -\u003e e.getValue () != null)\n.map (e -\u003e e.getKey () + \": \" + e.getValue ())\n.collect (joining (\", \", this.getClass().getSimpleName() + \" {\", \"}\"))\n```\n\n* Add comparator, constructor and all together.\n* Add actions dinamically depending on templates in settings. Check [the action system].\n* Change settings for a table that opens method details when one is selected.\n* Refactor the '##~' hack to have multiple methods per generator.\n* Call other generators. Ie: constructor with parameters.\n* Use code editors to change the templates.\n\n[the action system]: https://www.jetbrains.com/idea/plugins/action_system.html\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaguililla%2Fmrbean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaguililla%2Fmrbean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaguililla%2Fmrbean/lists"}