Skip to main content



      Home
Home » Modeling » TMF (Xtext) » UI module generation with '-' sign in name
UI module generation with '-' sign in name [message #1832284] Tue, 15 September 2020 05:15 Go to next message
Eclipse UserFriend
Hello,

I have mwe2 configuration

configuration = {
project = StandardProjectConfig {
baseName = "my-validation-dsl"
rootPath = rootPath
runtimeTest = {
enabled = true
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = true
}
web = {
enabled = true
}
mavenLayout = true
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
preferXtendStubs = false

}
}

I must use '-' sign in module name it is corporate requirement.

XtextGenertor generates not valid ExecutableExtensionFactory and dslActivator code in this case. Is it possible to extend generator to override these classes generation?
Re: UI module generation with '-' sign in name [message #1832285 is a reply to message #1832284] Tue, 15 September 2020 05:49 Go to previous messageGo to next message
Eclipse UserFriend
You would need to override org.eclipse.xtext.xtext.generator.XtextGeneratorNaming.getEclipsePluginExecutableExtensionFactory(Grammar) and bind it in a subclass of DefaultGeneratorModule. Use that module for the XtextGenerator component in the workflow and set it with the "configuration" property.
Re: UI module generation with '-' sign in name [message #1832300 is a reply to message #1832285] Tue, 15 September 2020 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Hello

The Eclipse GEF DOT component also contains some kind of naming customization.

You can take a look at the DotGeneratorModule as a starting point to get some inspiration:

https://github.com/eclipse/gef/blob/master/org.eclipse.gef.dot.generator/xtext-generator-extensions/org/eclipse/gef/dot/internal/generator/DotGeneratorModule.java

Hope that helps,
Tamás
Re: UI module generation with '-' sign in name [message #1832489 is a reply to message #1832300] Fri, 18 September 2020 15:53 Go to previous messageGo to next message
Eclipse UserFriend
Thank you!
I've created module REGeneratorModule and all is ok within eclipse.

But when i'm trying to use gradle with gradlew assemble I get

[main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher - [XtextLinkingDiagnostic: null:8 Couldn't resolve reference to JvmType 'REGeneratorModule'., XtextLinkingDiagnostic: null:9 Couldn't resolve reference to JvmIdentifiableElement 'project'., XtextLinkingDiagnostic: null:27 Couldn't resolve reference to JvmIdentifiableElement 'code'., XtextLinkingDiagnostic: null:28 Couldn't resolve reference to JvmIdentifiableElement 'encoding'., XtextLinkingDiagnostic: null:29 Couldn't resolve reference to JvmIdentifiableElement 'lineDelimiter'., XtextLinkingDiagnostic: null:30 Couldn't resolve reference to JvmIdentifiableElement 'fileHeader'., XtextLinkingDiagnostic: null:31 Couldn't resolve reference to JvmIdentifiableElement 'preferXtendStubs'.]
....
Re: UI module generation with '-' sign in name [message #1832504 is a reply to message #1832489] Sat, 19 September 2020 02:01 Go to previous messageGo to next message
Eclipse UserFriend
you need to either compile the module in an earlier phase https://github.com/eclipse/xtext-web/blob/b25391425ae966e865a1073e619686f14c288b0d/org.eclipse.xtext.web.example.entities/build.gradle#L8

or move it to a separate module (project)
Re: UI module generation with '-' sign in name [message #1832520 is a reply to message #1832504] Sun, 20 September 2020 01:20 Go to previous message
Eclipse UserFriend
Thank you.
It is obvious after your comment.
Previous Topic:Language Server Project with implicit Environment-Resources
Next Topic:Problems with installing Xtext from update site
Goto Forum:
  


Current Time: Fri Jul 04 12:48:12 EDT 2025

Powered by FUDForum. Page generated in 0.45470 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top