Community
Participate
Working Groups
Created attachment 261192 [details] Sample project The Activator package and class name are wrongly generated, when i change the project names from the standard org.company.mydsl to for example company-dsl and change the plugin project names accordingly. The name of the Activator becomes: Company-lang-uiActivator instead of LangActivator. I've included a sample project as attachment. The configuration looks like this: configuration = { project = StandardProjectConfig { baseName = "company-lang" rootPath = rootPath genericIde = { name = "company-lang-ide" } eclipsePlugin = { enabled = true name = "company-lang-ui" } createEclipseMetaData = true } code = { encoding = "UTF-8" fileHeader = "/*\n * generated by Xtext \${version}\n */" } }
Created attachment 264299 [details] Screenshot This shows what is generated.
A basic problem is here that the UI Activator is generated only once and there could be multiple languages defined in the workflow. The method that computes the activator name is org.eclipse.xtext.xtext.generator.XtextGeneratorNaming.getEclipsePluginActivator() It is the only naming method that is not grammar dependent. One possible solution is to provide a grammar specific version of the method and use always the grammar of the first language defined.
@Karsten what do you think about new TypeReference(pluginName.replaceAll("-","_") + '.internal', activatorName.replaceAll("-","_")) as proposed here: https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html