Deployed xText IDE does not work [message #1807200] |
Fri, 24 May 2019 10:42  |
Eclipse User |
|
|
|
I want to create two DSLs; one for describing a functional behaviour, and one for describing resource demands. I want to import the first dsl into the second dsl (using an import statement). I had some problems before where compiling the second dsl gave some problems. I fixed this by adding a reference in the mwe2 workflow of the second language. Everything works fine now (no compilation erros anymore). However, when I deploy the second dsl in a new Eclipse environment and create a new text file in order to use my dsl , the editor does not recognize the dsl language (that is; no grammar checks, no auto-fill etc.). It just handles the text file as a plain text file with no programming context (I checked 10 times to make sure I used the right extension for the file; .transformationdsl). So to make everything clear --> I have two DSLs; one called finalDSL and one called transformationDSL. I am referring in the transformationDSL grammar (see xText code below, don't mind the semantics as this is just for testing purpose) to the finalDSL grammar. I am referring to the finalDSL not only in the xText grammar below, but also in the Mwe2 workflow file (see bottom of my post). The problem is that after deploying the DSL in a new Eclipse environment, it doesn't work (no grammar checking whatsoever, it just sees my 'texfile'.transformationdsl file as a plain text file). I have no idea what I am doing wrong, since the xText compiler gives absolutely no errors when running the Mwe2 workflow. However, when I boot up the TransformationDSL in a new Eclipse environment it works, but it does however give the following redlined messages in the console:
2019-05-24 16:26:15.853 java[29175:754081] -[NSView clearDeferFlushing]: unrecognized selector sent to instance 0x7f821f64a7c0
2019-05-24 16:26:15.913 java[29175:754081] -[NSView clearDeferFlushing]: unrecognized selector sent to instance 0x7f821f64a7c0
2019-05-24 16:26:15.973 java[29175:754081] -[NSView clearDeferFlushing]: unrecognized selector sent to instance 0x7f821f64a7c0
2019-05-24 16:26:16.009 java[29175:754081] -[NSView clearDeferFlushing]: unrecognized selector sent to instance 0x7f821f64a7c0
2019-05-24 16:26:16.015 java[29175:754081] -[NSView clearDeferFlushing]: unrecognized selector sent to instance 0x7f821f64a7c0
2019-05-24 16:26:16.021 java[29175:754081] -[NSView clearDeferFlushing]: unrecognized selector sent to instance 0x7f821f64a7c0
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://633.fwk860798122:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://633.fwk860798122:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
2019-05-24 16:26:16.375 java[29175:754081] -[NSView clearDeferFlushing]: unrecognized selector sent to instance 0x7f821f64a7c0
TransformationDSL xText grammar.
grammar org.xtext.example.TransformationDSL with org.eclipse.xtext.common.Terminals
generate transformationDSL "http://www.xtext.org/example/TransformationDSL"
import "http://www.xtext.org/example/mydsl/FinalDsl" as finalDSL
Model:
greetings+=Greeting*;
Greeting:
'use' definition=[finalDSL::LibraryBusinessMethodStatement]
Check = check
;
check:
check = [finalDSL::ClassOperationName]
;
The Mwe2 workflow file of the TransformationDSL is structured as follows (mind the referencedResource statement which I added manually in order to solve the problems with reference resolving to the finalDSL language).
module org.xtext.example.GenerateTransformationDSL
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
var rootPath = ".."
Workflow {
component = XtextGenerator {
configuration = {
project = StandardProjectConfig {
baseName = "org.xtext.example.transformationDSL"
rootPath = rootPath
runtimeTest = {
enabled = true
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = true
}
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
}
}
language = StandardLanguage {
name = "org.xtext.example.TransformationDSL"
referencedResource = "platform:/resource/org.xtext.example.finaldsl/model/generated/FinalDsl.genmodel"//"platform:/resource/org.xtext.example.finaldsl/model/generated/FinalDsl.genmodel"
fileExtensions = "transformationdsl"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
junitSupport = {
junitVersion = "5"
}
}
}
}
[Updated on: Fri, 24 May 2019 10:48] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08253 seconds