{"id":16329182,"url":"https://github.com/TypeFox/xtext2langium","last_synced_at":"2025-10-25T21:31:03.062Z","repository":{"id":64057031,"uuid":"558440281","full_name":"TypeFox/xtext2langium","owner":"TypeFox","description":"A tool for migrating an Xtext language to Langium","archived":false,"fork":false,"pushed_at":"2023-11-02T15:24:53.000Z","size":843,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-11T23:17:08.036Z","etag":null,"topics":["langium","migration","xtext"],"latest_commit_sha":null,"homepage":"https://www.typefox.io/blog/xtext-to-langium","language":"Xtend","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TypeFox.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},"funding":{"github":"TypeFox"}},"created_at":"2022-10-27T14:52:32.000Z","updated_at":"2024-09-10T02:45:43.000Z","dependencies_parsed_at":"2023-02-18T07:35:30.202Z","dependency_job_id":null,"html_url":"https://github.com/TypeFox/xtext2langium","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TypeFox%2Fxtext2langium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TypeFox%2Fxtext2langium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TypeFox%2Fxtext2langium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TypeFox%2Fxtext2langium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TypeFox","download_url":"https://codeload.github.com/TypeFox/xtext2langium/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238212380,"owners_count":19434954,"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":["langium","migration","xtext"],"created_at":"2024-10-10T23:14:43.956Z","updated_at":"2025-10-25T21:31:02.658Z","avatar_url":"https://github.com/TypeFox.png","language":"Xtend","readme":"[![Build Xtext2Langium](https://github.com/TypeFox/xtext2langium/actions/workflows/main.yml/badge.svg)](https://github.com/TypeFox/xtext2langium/actions/workflows/main.yml)\n\n# Convert Xtext to Langium\n\n#### Generator Fragment for MWE2 Workflow\n\nThis MWE2 fragment reads your Xtext grammar and converts it to Langium.\nIf you are using a predefined Ecore model (not generated), it will also be converted to Langium as a type definition file. \n\n\n#### How to consume\n\n##### P2 Repository\nAdd the `https://typefox.github.io/xtext2langium/download/updates/v0.4.0/` update site to your `.target` file as an additional location.\n\n```xml\n\u003clocation includeAllPlatforms=\"false\" includeConfigurePhase=\"false\" includeMode=\"planner\" includeSource=\"true\" type=\"InstallableUnit\"\u003e\n   \u003cunit id=\"io.typefox.xtext2langium\" version=\"0.0.0\"/\u003e\n   \u003crepository location=\"https://typefox.github.io/xtext2langium/download/updates/v0.4.0/\"/\u003e\n\u003c/location\u003e\n```\n\n##### Maven\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.typefox.xtext2langium\u003c/groupId\u003e\n    \u003cartifactId\u003eio.typefox.xtext2langium\u003c/artifactId\u003e\n    \u003cversion\u003e0.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n##### Gradle\n\n```\nio.typefox.xtext2langium:io.typefox.xtext2langium:0.4.0\n```\n\n\n#### How to use\n\nAdd the fragment to you Language configuration in the MWE2 file and\nconfigure the output path.\n\n```js\nlanguage = StandardLanguage {\n    name = \"io.typefox.Example\"\n    // ... //\n\n    fragment = io.typefox.xtext2langium.Xtext2LangiumFragment {\n        outputPath = './langium'\n    }\n```\n\nAfter running the workflow you will find the generated Langium output in `./langium` folder.\n\n##### Fragment options\n\n\n- `outputPath` - Target output folder\n- `prefixEnumLiterals` - If `true`, enum literal types will be prefixed with the enum type name to avoid name conflicts with other enum literals. Default is `true`. Example: `enum Color: RED;` will create: `Color returns Color: Color_RED; Color_RED returns string: 'RED';`\n- `useStringAsEnumRuleType` - If `true`, Enum types will be handled as strings. Only relevant for generated metamodels. Default is `false`.\n- `generateEcoreTypes` - If `true`, types from the Ecore metamodel will also be generated. If `false`, ecore data types will be replaced with Langium data types. Types that are not convertible to Langium built in types will be generated as string. Default is `false`.\n- `removeOverridenRules` - In case a rule from the imported grammar was overwritten, Langium will report a duplicate error. If `true`, the super grammar rules will be skipped in favour of the current grammar rules. Default is `false`.\n","funding_links":["https://github.com/sponsors/TypeFox"],"categories":["Xtend"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTypeFox%2Fxtext2langium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTypeFox%2Fxtext2langium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTypeFox%2Fxtext2langium/lists"}