Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:15 Go to next message
kolchanov Mising name is currently offline kolchanov Mising nameFriend
Messages: 20
Registered: October 2011
Junior Member
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 09:49 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

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 17:32 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 157
Registered: February 2016
Senior Member
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 19:53 Go to previous messageGo to next message
kolchanov Mising name is currently offline kolchanov Mising nameFriend
Messages: 20
Registered: October 2011
Junior Member
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 06:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
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)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: UI module generation with '-' sign in name [message #1832520 is a reply to message #1832504] Sun, 20 September 2020 05:20 Go to previous message
kolchanov Mising name is currently offline kolchanov Mising nameFriend
Messages: 20
Registered: October 2011
Junior Member
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 Apr 19 06:22:24 GMT 2024

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

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

Back to the top