Deployed xText IDE does not work [message #1807200] |
Fri, 24 May 2019 14:42 |
J Bouwhuis Messages: 17 Registered: April 2019 |
Junior Member |
|
|
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 14:48] Report message to a moderator
|
|
|
|
|
|
Re: Deployed xText IDE does not work [message #1807206 is a reply to message #1807202] |
Fri, 24 May 2019 15:21 |
J Bouwhuis Messages: 17 Registered: April 2019 |
Junior Member |
|
|
Christian Dietrich wrote on Fri, 24 May 2019 14:49Also have a look if there are plugin.xml_gen files that differ from plugin.xml files
With regards to the plugin.xml_gen and plugin.xml file; I threw them both in an online diff tool and found out that they are completely the same, except for the following lines which can be found in the plugin.xml file, but not in the plugin.xml_gen file. Adding them to the .xml_gen file however did not solve the problem unfortunately:
<extension point="org.eclipse.ui.preferencePages">
<page
category="org.xtext.example.TransformationDSL"
class="org.xtext.example.ui.TransformationDSLExecutableExtensionFactory:org.eclipse.xtext.ui.validation.ValidatorPreferencePage"
id="org.xtext.example.TransformationDSL.validator.preferencePage"
name="Errors/Warnings">
<keywordReference id="org.xtext.example.ui.keyword_TransformationDSL"/>
</page>
</extension>
</extension>
[Updated on: Fri, 24 May 2019 15:22] Report message to a moderator
|
|
|
|
|
Re: Deployed xText IDE does not work [message #1807210 is a reply to message #1807209] |
Fri, 24 May 2019 16:12 |
J Bouwhuis Messages: 17 Registered: April 2019 |
Junior Member |
|
|
By the way, I also see a lot of errors right now in the error log of the Eclipse environment in which I deploy the DSL. They all talk about missing UI handlers (see below for one of the lines that I copied, they all have the "Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers" part in common). The weird thing is that it states java version 11, but I configured it to use Java 10 as default.
eclipse.buildId=4.11.0.I20190307-0500
java.version=11.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=nl_NL
Framework arguments: -product org.eclipse.platform.ide
Command-line arguments: -product org.eclipse.platform.ide -data /Users/jos/eclipse-workspace/../runtime-EclipseXtext -dev file:/Users/jos/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/Launch Runtime Eclipse/dev.properties -os macosx -ws cocoa -arch x86_64
org.eclipse.e4.ui.workbench
Error
Fri May 24 17:17:13 CEST 2019
Unable to retrieve the bundle from the URI: bundleclass://org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.handlers.AutosizeColumnsHandler
[Updated on: Fri, 24 May 2019 16:13] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04055 seconds