Closed NiccoMlt closed 4 years ago
I got this hint by email from professor:
Sembra un problema con gli internals di Xtext. Forse manca qualche risorsa nel classpath
sì, parrebbe... https://stackoverflow.com/questions/38043360/error-when-validating-xtext-dsl-in-standalone-java-project
I also think these solutions could be helpful for my issue:
Create a
plugin.properties
file and jar it. The content should contain this entry:_UI_DiagnosticRoot_diagnostic=_UI_DiagnosticRoot_diagnostic
from: https://www.eclipse.org/forums/index.php?t=msg&th=440750&goto=988308&#msg_988308
Found it:
Adding org.eclipse.emf.ecore/runtime/ecore.resources.jar to the classpath will work. See http://www.eclipse.org/emf/faq/faq.php#dnl20050114-120205 for more details.
from: https://www.eclipse.org/forums/index.php?t=msg&th=130128&goto=402682&#msg_402682
I did the following:
create a new xtext project.
adapt workflow to generate java main for generator
generate lang
run generated java main once
use the export as runnable jar file, tell it to create a ant file
copy the ant file to the project
adapted the ant file to include another file at the end
<fileset dir="${dir.workspace}/org.xtext.example.mydsl2/"> <include name="plugin.properties"/> </fileset>
create org.xtext.example.mydsl2/plugin.properties as follows
_UI_DiagnosticRoot_diagnostic=Dont Care
well i was too lazy to look up the real values and the other key value pairs
rerun ant file
have fun
if I'd be an ant wizard i would somehow adapt the
build.xml
to create aplugin.properties
that contains allplugin.properties
of the unpacked files merged unfortunately i am not an ant wizard
and
What I ended up doing was using the extract option and simply adding the
_UI_Diagnostic
line to theplugin.properties
file, slightly annoying that simply trying to use a DSL in a standalone project is this troublesome, thank you for the assistance nonetheless.
from: https://www.eclipse.org/forums/index.php?t=msg&th=1078740&goto=1738088&#msg_1738088
You need a plugin.properties file on you class path/your jar root
<echo file="${binJarTemp}/plugin.properties">_UI_DiagnosticRoot_diagnostic=_UI_DiagnosticRoot_diagnostic</echo>
from: https://www.eclipse.org/forums/index.php?t=msg&th=487563&goto=1058824&#msg_1058824
When running code with
runShadow
Gradle task (provided by Vert.x plugin for Gradle and using Gradle Shadow plugin), during simulation creation IllegalArgumentException is thrown:This error does not happen when code is run with
vertxRun
task, so it's probably related to something missing in packetized shadow JAR.