Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Noobie Q: Problem to run the Generated IDE Plug-in of my DSL (Xtext) with Eclipse Juno. (For my termpaper !! deadline end of January ! = PLEASE HELP --- Im about to model a simple library grammar with Xtext. The Xtext language generator is probably not even generating sucessfully. Result)
icon4.gif  Noobie Q: Problem to run the Generated IDE Plug-in of my DSL (Xtext) with Eclipse Juno. [message #997357] Sun, 06 January 2013 22:50 Go to next message
Anna Polovets is currently offline Anna Polovets
Messages: 3
Registered: January 2013
Junior Member
Hello you -(are u my savior?)! PLEASE HELP me getting this project done! Im even open for private (Email/Online) paid tutoring! Just contact me!

I have the following grammar of a little simple library,which im desperatly trying to test. Its not working. I started working with normal Eclipse, but then it didnt worked properly (it hasnt had Xtext or i didn't knew how to start it..), so i downloaded Eclipse juno. Now im stuck!

Here the grammar: (translated from German)

grammar ...

generate library ".xtext.org/example/mydsl2/library"

Medien:
'New User, Name und Number:'
(Borower+=Borower+) '{'

(Aktion+=Aktion+) '}' ;

Borower:
'Name:' name=STRING
'Number:' number=ID;

Aktion:
Borowing | Return ;

Borowing: 'Borowing' (Medium+=Medium+) ;

Return: 'Return' (Medium+=Medium+) ;

Medium:
Book | CD | DVD ;

Buch:
'Booktitle:' booktitle=STRING
'Booknr:' nummer=ID
'Due:' weeknr=INT 'Weeks';
CD: 'CDtitel:' cdtitel=STRING
'CDnumber' nummer=ID
'Due:' weeknr=INT 'Weeks';

DVD: 'DVDtitel:' dvdtitel=STRING
'DVDnumber' nummer=ID
'Due:' weeknr=INT 'Weeks';



The problem is that, if i run this grammar from eclipses context menu, i choose
Run As -> Generate Xtext Artifacts. (The Xtext tutorial which im using says that i need to click on: Run As -> MWE2 Workflow. but there is nothing like that here as option. )
So i click on Generate Xtext Artifacts. That triggers the Xtext language generator and the console is showing several messages. for example its showing:


*ATTENTION*
It is recommended to use the ANTLR 3 parser generator (BSD licence - ...antlr.org/license.html).
Do you agree to download it (size 1MB) from '..download.itemis.com/antlr-generator-3.2.0.jar'? (type 'y' or 'n' and hit enter)y

..... I hit enter and its saying in the end:

23135 [main] INFO text.generator.junit.Junit4Fragment - generating Compare Framework infrastructure
23352 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.

----------- In between the lines of the console there are errors which says: ----

22050 [main] INFO or.validation.JavaValidatorFragment - generating Java-based EValidator API
warning(200): ../org.xtext.example.Buchausleihe.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1: Decision can match input such as "'Ausleihe' 'DVDtitel:' RULE_STRING 'DVDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
warning(200): ../org.xtext.example.Buchausleihe.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1: Decision can match input such as "'Ausleihe' 'CDtitel:' RULE_STRING 'CDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
warning(200): ../org.xtext.example.Buchausleihe.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1: Decision can match input such as "'Ausleihe' 'Buchtitel:' RULE_STRING 'Buchausleihnummer:' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
error(201): ../org.xtext.example.Buchausleihe.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1: The following alternatives can never be matched: 2


And after it is done. The Project manager on the left side of eclipse is showing me errors within the project itself.
In the folder: src-gen / parser and src-gen/ AbstractLibraryRuntimeModule

After this problems it doesnt suprises me, that if i click on Run As -> Launch Runtime Eclipse ... it opens a new workbench, but nothing else is happening. Im not even sure how to successfully create a File in the new Project on the new workbench, which is generated from the DSL.

Also there is a Window opening which is saying:

EGit does not require Git to function, but there may be important settings in the installation directory that EGit needs to know about in order to be compatible with Git. The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in the etc directory of the Git installation. The directory of the Git installation. The directory can be configured in Preferences under Team > Git.

I tried to fix that with the help of this forum, but seems that it doesnt worked. I did all what is said here in the forum.
Anyway, do i really need to fix that? Shouldn't it work just as it is?

What shall I do?
I just wanna run the grammar to test if it works. Nothing else.

I would be greatful for your help! Im willing to pay, if necessary, but please contact me if you think you could help me.

Have a nice day anyway, and thanks for reading =)
Anna
Re: Noobie Q: Problem to run the Generated IDE Plug-in of my DSL (Xtext) with Eclipse Juno. [message #997366 is a reply to message #997357] Mon, 07 January 2013 07:27 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander Nittka
Messages: 1156
Registered: July 2009
Senior Member
Hi,

first you should get Xtext running in general.
a)
1. Make sure, Xtext is installed in your eclipse (e.g. via the composite update site http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/).
2. Use the new project wizard, creating a new Xtext project.
3. Do not make any modifications and generate the Xtext artifacts.
4. If asked to download the recommended antlr version *press "y"* and then enter.
5. If the workflow does not run through without problems, something is messed up big time. Try b).

b)
Download the itemis Xtext distro http://xtext.itemis.com/xtext/language=en/36553/downloads instead!

Regarding the other errors, your grammar compiles (in my setup). So in case you do not get your grammar to work, please post the complete original grammar as well as the mwe file.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: Noobie Q: Problem to run the Generated IDE Plug-in of my DSL (Xtext) with Eclipse Juno. [message #997614 is a reply to message #997357] Mon, 07 January 2013 00:35 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2500
Registered: July 2009
Senior Member
Not sure about the mwe vs "generate xtext artifacts" mis-match, maybe
that is something that has recently changed. It used to be that you ran
a mwe workflow (that was generated as a standard workflow when the xtext
project was created). Typically one needs to edit this workflow to suite
the needs of the language being implemented; but the auto generated
should be fine to start with.

Not surprising that you can not run anything; the generator(s) that
tried to produce things from your grammar failed (it reported errors).
You need to first get your grammar error free (and warning free, as
those warnings are telling you things you want to address).

You can't get to the next stage of actually running / doing anything
until you got those fixed.

Suggest that you start with a simple example (a grammar known to be
working) - this to make sure you have everything installed as you should.

Also, to get help on a grammar, you need to post the entire grammar
including the terminals. (Matching the shown errors with the grammar
translated into English is difficult - it is possible to guess (I know a
bit of German), but... hard to see what would cause the errors you are
getting without there being issues in the terminals.

Think it would work better if you post the original German grammar.
(after all .. the Itemis people are mostly from Germany anyway :)).

If you are in a hurry, just contact Itemis and have them help you for a fee.

Best Regards
- henrik


On 2013-07-01 24:38, Anna Polovets wrote:
> Hello you -(are u my savior?)! PLEASE HELP me getting this project done!
> Im even open for private (Email/Online) paid tutoring! Just contact me!
> I have the following grammar of a little simple library,which im
> desperatly trying to test. Its not working. I started working with
> normal Eclipse, but then it didnt worked properly (it hasnt had Xtext or
> i didn't knew how to start it..), so i downloaded Eclipse juno. Now im
> stuck!
>
> Here the grammar: (translated from German)
> grammar ...
>
> generate library ".xtext.org/example/mydsl2/library"
>
> Medien:
> 'New User, Name und Number:'
> (Borower+=Borower+) '{'
>
> (Aktion+=Aktion+) '}' ;
>
> Borower:
> 'Name:' name=STRING
> 'Number:' number=ID;
>
> Aktion: Borowing | Return ;
>
> Borowing: 'Borowing' (Medium+=Medium+) ;
>
> Return: 'Return' (Medium+=Medium+) ;
>
> Medium:
> Book | CD | DVD ;
>
> Buch:
> 'Booktitle:' booktitle=STRING 'Booknr:' nummer=ID
> 'Due:' weeknr=INT 'Weeks';
> CD: 'CDtitel:' cdtitel=STRING 'CDnumber' nummer=ID
> 'Due:' weeknr=INT 'Weeks';
>
> DVD: 'DVDtitel:' dvdtitel=STRING 'DVDnumber' nummer=ID
> 'Due:' weeknr=INT 'Weeks';
>
>
>
> The problem is that, if i run this grammar from eclipses context menu, i
> choose
> Run As -> Generate Xtext Artifacts. (The Xtext tutorial which im using
> says that i need to click on: Run As -> MWE2 Workflow. but there is
> nothing like that here as option. )
> So i click on Generate Xtext Artifacts. That triggers the Xtext language
> generator and the console is showing several messages. for example its
> showing:
>
>
> *ATTENTION*
> It is recommended to use the ANTLR 3 parser generator (BSD licence -
> ...antlr.org/license.html).
> Do you agree to download it (size 1MB) from
> '..download.itemis.com/antlr-generator-3.2.0.jar'? (type 'y' or 'n' and
> hit enter)y
>
> ..... I hit enter and its saying in the end:
>
> 23135 [main] INFO text.generator.junit.Junit4Fragment - generating
> Compare Framework infrastructure
> 23352 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.
>
> ----------- In between the lines of the console there are errors which
> says: ----
>
> 22050 [main] INFO or.validation.JavaValidatorFragment - generating
> Java-based EValidator API
> warning(200):
> ../org.xtext.example.Buchausleihe.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1:
> Decision can match input such as "'Ausleihe' 'DVDtitel:' RULE_STRING
> 'DVDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using
> multiple alternatives: 1, 2
> As a result, alternative(s) 2 were disabled for that input
> warning(200):
> ../org.xtext.example.Buchausleihe.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1:
> Decision can match input such as "'Ausleihe' 'CDtitel:' RULE_STRING
> 'CDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using
> multiple alternatives: 1, 2
> As a result, alternative(s) 2 were disabled for that input
> warning(200):
> ../org.xtext.example.Buchausleihe.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1:
> Decision can match input such as "'Ausleihe' 'Buchtitel:' RULE_STRING
> 'Buchausleihnummer:' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using
> multiple alternatives: 1, 2
> As a result, alternative(s) 2 were disabled for that input
> error(201):
> ../org.xtext.example.Buchausleihe.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1:
> The following alternatives can never be matched: 2
>
>
> And after it is done. The Project manager on the left side of eclipse is
> showing me errors within the project itself. In the folder: src-gen /
> parser and src-gen/ AbstractLibraryRuntimeModule
>
> After this problems it doesnt suprises me, that if i click on Run As ->
> Launch Runtime Eclipse ... it opens a new workbench, but nothing else is
> happening. Im not even sure how to successfully create a File in the new
> Project on the new workbench, which is generated from the DSL.
> Also there is a Window opening which is saying:
> EGit does not require Git to function, but there may be important
> settings in the installation directory that EGit needs to know about in
> order to be compatible with Git. The most important of these settings is
> core.autocrlf. Git for Windows by default sets this parameter to true in
> the etc directory of the Git installation. The directory of the Git
> installation. The directory can be configured in Preferences under Team
> > Git.
>
> I tried to fix that with the help of this forum, but seems that it
> doesnt worked. I did all what is said here in the forum.
> Anyway, do i really need to fix that? Shouldn't it work just as it is?
> What shall I do? I just wanna run the grammar to test if it works.
> Nothing else.
> I would be greatful for your help! Im willing to pay, if necessary, but
> please contact me if you think you could help me.
> Have a nice day anyway, and thanks for reading =) Anna
Re: Noobie Q: Problem to run the Generated IDE Plug-in of my DSL (Xtext) with Eclipse Juno. [message #998265 is a reply to message #997366] Wed, 09 January 2013 17:31 Go to previous messageGo to next message
Anna Polovets is currently offline Anna Polovets
Messages: 3
Registered: January 2013
Junior Member
Hello you two! And thanks to both of you for the quick reply!!! THANK YOU SO MUCH!

It didn't really help though.
Alexander, i tried both a and b and it didnt changed the problem, that i couldn't start the grammar.
Henrik, you're right - my grammar seems to be wrong. So im gonna post the original grammar below.

The thing is im a noobie in this field. So im making also noobie-mistakes!!! For example i've got a test gramma working and realised that i did the start process wrong: here is how it seems to be right.
So first i click on the grammar itself and say, run as..-> generate XText Artifacts. Then in the same folder there is a file called Generate(MyfileName).mwe2. I click with the right mouse on it and say run as.. -> MWE2 Workflow. Only then i click on the project and run it as a Eclipse application. In the new window im making a new project with a new file and the file extention, i choose in the beginning. THIS PROCEDURE worked for the standard "Hello" Project. It actually showed me hello!
THis is the right way? RIGHT? ?

SO IT NEEDS TO BE A PROBLEM WITH THE GRAMMAR. I hope someone can help me with finding the failure. What does the Errors tells you?
Thanks in advance for any further comment!!!!!! =)

Here the Grammar in German:
grammar org.xtext.example.mydsl2.Buchausleihe with org.eclipse.xtext.common.Terminals

generate buchausleihe "ww.xtext.org/example/mydsl2/Buchausleihe"

Medienausleihe:
'Neuer User, Name und Nutzernummer:'
(Ausleiher+=Ausleiher+) '{'

(Aktion+=Aktion+) '}' ;

Ausleiher:
'Name:' name=STRING
'Ausweisnummer:' ausweisnummer=ID;

Aktion:
Ausleihe | Rueckgabe ;

Ausleihe: 'Ausleihe' (Medium+=Medium+) ;

Rueckgabe: 'Ausleihe' (Medium+=Medium+) ;

Medium:
Buch | CD | DVD ;

Buch:
'Buchtitel:' buchtitel=STRING
'Buchausleihnummer:' nummer=ID
'Ausleihdauer:' wochenanzahl=INT 'Wochen';
CD: 'CDtitel:' cdtitel=STRING
'CDausleihnummer' nummer=ID
'Ausleihdauer:' wochenanzahl=INT 'Wochen';

DVD: 'DVDtitel:' dvdtitel=STRING
'DVDausleihnummer' nummer=ID
'Ausleihdauer:' wochenanzahl=INT 'Wochen';


------- Here is what the console say, when i click on Generate Xtext Artifacts --------------------

0 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering platform uri 'D:\Benutzer\Anna\workspace'
2093 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Adding generated EPackage 'org.eclipse.xtext.xbase.XbasePackage'
2312 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'ww.eclipse.org/Xtext/Xbase/XAnnotations' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
2328 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'ww.eclipse.org/xtext/xbase/Xtype' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
2328 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'ww.eclipse.org/xtext/xbase/Xbase' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
2328 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'www.eclipse.org/xtext/common/JavaVMTypes' from 'platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel'
2812 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning D:\Benutzer\Anna\workspace\org.xtext.example.mydsl5\..\org.xtext.example.mydsl5\src-gen
2844 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning D:\Benutzer\Anna\workspace\org.xtext.example.mydsl5\..\org.xtext.example.mydsl5.ui\src-gen
2984 [main] INFO ipse.xtext.generator.LanguageConfig - generating infrastructure for org.xtext.example.mydsl2.Buchausleihe with fragments : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment, EcoreGeneratorFragment, SerializerFragment, ResourceFactoryFragment, XtextAntlrGeneratorFragment, JavaValidatorFragment, ImportNamespacesScopingFragment, QualifiedNamesFragment, BuilderIntegrationFragment, GeneratorFragment, FormatterFragment, LabelProviderFragment, OutlineTreeProviderFragment, QuickOutlineFragment, QuickfixProviderFragment, JavaBasedContentAssistFragment, XtextAntlrUiGeneratorFragment, Junit4Fragment, RefactorElementNameFragment, TypesGeneratorFragment, XbaseGeneratorFragment, CodetemplatesGeneratorFragment, CompareFragment
4606 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'www.xtext.org/example/mydsl2/Buchausleihe' from 'platform:/resource/org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/Buchausleihe.genmodel'
warning(200): ../org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/parser/antlr/internal/InternalBuchausleihe.g:214:1: Decision can match input such as "'Ausleihe' 'CDtitel:' RULE_STRING 'CDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
warning(200): ../org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/parser/antlr/internal/InternalBuchausleihe.g:214:1: Decision can match input such as "'Ausleihe' 'Buchtitel:' RULE_STRING 'Buchausleihnummer:' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
warning(200): ../org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/parser/antlr/internal/InternalBuchausleihe.g:214:1: Decision can match input such as "'Ausleihe' 'DVDtitel:' RULE_STRING 'DVDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
error(201): ../org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/parser/antlr/internal/InternalBuchausleihe.g:214:1: The following alternatives can never be matched: 2

6935 [main] ERROR enerator.CompositeGeneratorFragment - java.io.FileNotFoundException: ..\org.xtext.example.mydsl5\src-gen\org\xtext\example\mydsl2\parser\antlr\internal\InternalBuchausleiheLexer.java (Das System kann die angegebene Datei nicht finden)
org.eclipse.emf.common.util.WrappedException: java.io.FileNotFoundException: ..\org.xtext.example.mydsl5\src-gen\org\xtext\example\mydsl2\parser\antlr\internal\InternalBuchausleiheLexer.java (Das System kann die angegebene Datei nicht finden)
at org.eclipse.xtext.util.Files.readFileIntoString(Files.java:129)
at org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarningsImpl(AbstractAntlrGeneratorFragment.java:132)
at org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarnings(AbstractAntlrGeneratorFragment.java:142)
at org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarnings(AbstractAntlrGeneratorFragment.java:138)
at org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment.generate(XtextAntlrGeneratorFragment.java:49)
at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:92)
at org.eclipse.xtext.generator.LanguageConfig.generate(LanguageConfig.java:113)
at org.eclipse.xtext.generator.Generator.generate(Generator.java:361)
at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:128)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
Caused by: java.io.FileNotFoundException: ..\org.xtext.example.mydsl5\src-gen\org\xtext\example\mydsl2\parser\antlr\internal\InternalBuchausleiheLexer.java (Das System kann die angegebene Datei nicht finden)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at org.eclipse.xtext.util.Files.readFileIntoString(Files.java:126)
... 18 more
6935 [main] INFO or.validation.JavaValidatorFragment - generating Java-based EValidator API
warning(200): ../org.xtext.example.mydsl5.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1: Decision can match input such as "'Ausleihe' 'DVDtitel:' RULE_STRING 'DVDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
warning(200): ../org.xtext.example.mydsl5.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1: Decision can match input such as "'Ausleihe' 'CDtitel:' RULE_STRING 'CDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
warning(200): ../org.xtext.example.mydsl5.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1: Decision can match input such as "'Ausleihe' 'Buchtitel:' RULE_STRING 'Buchausleihnummer:' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
error(201): ../org.xtext.example.mydsl5.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1: The following alternatives can never be matched: 2

7373 [main] ERROR enerator.CompositeGeneratorFragment - java.io.FileNotFoundException: ..\org.xtext.example.mydsl5.ui\src-gen\org\xtext\example\mydsl2\ui\contentassist\antlr\internal\InternalBuchausleiheLexer.java (Das System kann die angegebene Datei nicht finden)
org.eclipse.emf.common.util.WrappedException: java.io.FileNotFoundException: ..\org.xtext.example.mydsl5.ui\src-gen\org\xtext\example\mydsl2\ui\contentassist\antlr\internal\InternalBuchausleiheLexer.java (Das System kann die angegebene Datei nicht finden)
at org.eclipse.xtext.util.Files.readFileIntoString(Files.java:129)
at org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarningsImpl(AbstractAntlrGeneratorFragment.java:132)
at org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarnings(AbstractAntlrGeneratorFragment.java:142)
at org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarnings(AbstractAntlrGeneratorFragment.java:138)
at org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment.generate(XtextAntlrUiGeneratorFragment.java:53)
at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:92)
at org.eclipse.xtext.generator.LanguageConfig.generate(LanguageConfig.java:113)
at org.eclipse.xtext.generator.Generator.generate(Generator.java:361)
at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:128)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
Caused by: java.io.FileNotFoundException: ..\org.xtext.example.mydsl5.ui\src-gen\org\xtext\example\mydsl2\ui\contentassist\antlr\internal\InternalBuchausleiheLexer.java (Das System kann die angegebene Datei nicht finden)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at org.eclipse.xtext.util.Files.readFileIntoString(Files.java:126)
... 18 more
7388 [main] INFO text.generator.junit.Junit4Fragment - generating Junit4 Test support classes
7404 [main] INFO text.generator.junit.Junit4Fragment - generating Compare Framework infrastructure
7544 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.
Re: Noobie Q: Problem to run the Generated IDE Plug-in of my DSL (Xtext) with Eclipse Juno. [message #998267 is a reply to message #998265] Wed, 09 January 2013 17:33 Go to previous messageGo to next message
Anna Polovets is currently offline Anna Polovets
Messages: 3
Registered: January 2013
Junior Member
Here is also the mwe file, which you asked for alex. =)

module org.xtext.example.mydsl5.GenerateMyDsl

import org.eclipse.emf.mwe.utils.*
import org.eclipse.xtext.generator.*
import org.eclipse.xtext.ui.generator.*

var grammarURI = "classpath:/org/xtext/example/mydsl5/MyDsl.xtext"
var file.extensions = "mydsl5"
var projectName = "org.xtext.example.mydsl5"
var runtimeProject = "../${projectName}"

Workflow {
bean = StandaloneSetup {
scanClassPath = true
platformUri = "${runtimeProject}/.."
// The following two lines can be removed, if Xbase is not used.
registerGeneratedEPackage = "org.eclipse.xtext.xbase.XbasePackage"
registerGenModelFile = "platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel"
}

component = DirectoryCleaner {
directory = "${runtimeProject}/src-gen"
}

component = DirectoryCleaner {
directory = "${runtimeProject}.ui/src-gen"
}

component = Generator {
pathRtProject = runtimeProject
pathUiProject = "${runtimeProject}.ui"
pathTestProject = "${runtimeProject}.tests"
projectNameRt = projectName
projectNameUi = "${projectName}.ui"
language = {
uri = grammarURI
fileExtensions = file.extensions

// Java API to access grammar elements (required by several other fragments)
fragment = grammarAccess.GrammarAccessFragment {}

// generates Java API for the generated EPackages
fragment = ecore.EcoreGeneratorFragment {
// referencedGenModels = "
// platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel,
// platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel
// "
}

// Serializer 2.0
fragment = serializer.SerializerFragment {
generateStub = false
}

// the serialization component (1.0)
// fragment = parseTreeConstructor.ParseTreeConstructorFragment {}

// a custom ResourceFactory for use with EMF
fragment = resourceFactory.ResourceFactoryFragment {
fileExtensions = file.extensions
}

// The antlr parser generator fragment.
fragment = parser.antlr.XtextAntlrGeneratorFragment {
// options = {
// backtrack = true
// }
}

// java-based API for validation
fragment = validation.JavaValidatorFragment {
// composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
}

// scoping and exporting API
// fragment = scoping.ImportURIScopingFragment {}
// fragment = exporting.SimpleNamesFragment {}

// scoping and exporting API
fragment = scoping.ImportNamespacesScopingFragment {}
fragment = exporting.QualifiedNamesFragment {}
fragment = builder.BuilderIntegrationFragment {}

// generator API
fragment = generator.GeneratorFragment {
generateMwe = false
generateJavaMain = false
}

// formatter API
fragment = formatting.FormatterFragment {}

// labeling API
fragment = labeling.LabelProviderFragment {}

// outline API
fragment = outline.OutlineTreeProviderFragment {}
fragment = outline.QuickOutlineFragment {}

// quickfix API
fragment = quickfix.QuickfixProviderFragment {}

// content assist API
fragment = contentAssist.JavaBasedContentAssistFragment {}

// generates a more lightweight Antlr parser and lexer tailored for content assist
fragment = parser.antlr.XtextAntlrUiGeneratorFragment {}

// generates junit test support classes into Generator#pathTestProject
fragment = junit.Junit4Fragment {}

// project wizard (optional)
// fragment = projectWizard.SimpleProjectWizardFragment {
// generatorProjectName = "${projectName}"
// modelFileExtension = file.extensions
// }

// rename refactoring
fragment = refactoring.RefactorElementNameFragment {}

// provides the necessary bindings for java types integration
fragment = types.TypesGeneratorFragment {}

// generates the required bindings only if the grammar inherits from Xbase
fragment = xbase.XbaseGeneratorFragment {}

// provides a preference page for template proposals
fragment = templates.CodetemplatesGeneratorFragment {}

// provides a compare view
fragment = compare.CompareFragment {
fileExtensions = file.extensions
}

}
}
}

Re: Noobie Q: Problem to run the Generated IDE Plug-in of my DSL (Xtext) with Eclipse Juno. [message #998284 is a reply to message #998267] Wed, 09 January 2013 18:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

there are warnings. these say your grammar is ambigous!!!!

Ausleihe: 'Ausleihe' (Medium+=Medium+) ;

Rueckgabe: 'Ausleihe' (Medium+=Medium+) ;

makes not sense for me

fixing the problem makes the grammar workflow running successful

~Christian
Re: Noobie Q: Problem to run the Generated IDE Plug-in of my DSL (Xtext) with Eclipse Juno. [message #998432 is a reply to message #998265] Thu, 10 January 2013 00:50 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2500
Registered: July 2009
Senior Member
On 2013-09-01 18:32, Anna Polovets wrote:
> Hello you two! And thanks to both of you for the quick reply!!! THANK
> YOU SO MUCH!
> It didn't really help though. Alexander, i tried both a and b and it
> didnt changed the problem, that i couldn't start the grammar. Henrik,
> you're right - my grammar seems to be wrong. So im gonna post the
> original grammar below.
>
> The thing is im a noobie in this field. So im making also
> noobie-mistakes!!! For example i've got a test gramma working and
> realised that i did the start process wrong: here is how it seems to be
> right.
> So first i click on the grammar itself and say, run as..-> generate
> XText Artifacts. Then in the same folder there is a file called
> Generate(MyfileName).mwe2. I click with the right mouse on it and say
> run as.. -> MWE2 Workflow. Only then i click on the project and run it
> as a Eclipse application. In the new window im making a new project with
> a new file and the file extention, i choose in the beginning. THIS
> PROCEDURE worked for the standard "Hello" Project. It actually showed me
> hello! THis is the right way? RIGHT? ?
>
I just edit my files, and then run the mwe2 to regenerate. I do not
recall ever running "Generate Xtext Artifacts" - but maybe that is in a
later version.

After that, the simplest is to launch Eclipse itself with everything
enabled (I do have a more streamlined launch config to make it start
faster when I am testing my DSL, but that is for later, when you have
things working).

Next step - you need to run mwe2 to generate everything without any
errors. You also want no warnings as those typically signal something
that will behave in an unpredictable (and unwated) way.

Not meaningful to continue after an error - it will not run, things may
be missing etc. (The crashed attempt is telling you there is no lexer,
probably because it could not be generated due to the earlier error).

I found what I think is one error in your grammar (see below).

A suggestion; start by changing the working example until you understand
how that works. Add one small piece at a time so you really understand
what is happening. Writing a complete grammar usually ends with a slew
of warnings and errors, and it is quite hard to find the problem. So...
here doing it slowly means you will be moving faster :)

Hope this helps.

Regards
- henrik

> SO IT NEEDS TO BE A PROBLEM WITH THE GRAMMAR. I hope someone can help me
> with finding the failure. What does the Errors tells you?
> Thanks in advance for any further comment!!!!!! =)
> Here the Grammar in German:
> grammar org.xtext.example.mydsl2.Buchausleihe with
> org.eclipse.xtext.common.Terminals
>
> generate buchausleihe "ww.xtext.org/example/mydsl2/Buchausleihe"
>
> Medienausleihe:
> 'Neuer User, Name und Nutzernummer:'
> (Ausleiher+=Ausleiher+) '{'
>
> (Aktion+=Aktion+) '}' ;
>
> Ausleiher:
> 'Name:' name=STRING
> 'Ausweisnummer:' ausweisnummer=ID;
>
> Aktion: Ausleihe | Rueckgabe ;
>
> Ausleihe: 'Ausleihe' (Medium+=Medium+) ;
>
> Rueckgabe: 'Ausleihe' (Medium+=Medium+) ;
>
This looks wrong, both "Ausleihe" and "Rueckgabe" has 'Ausleihe' as
first token - no way to differentiate between those. When parsing an
"Action", what should happen when seeing the token 'Ausleihe' ?


> Medium:
> Buch | CD | DVD ;
>
> Buch:
> 'Buchtitel:' buchtitel=STRING 'Buchausleihnummer:' nummer=ID
> 'Ausleihdauer:' wochenanzahl=INT 'Wochen';
> CD: 'CDtitel:' cdtitel=STRING 'CDausleihnummer' nummer=ID
> 'Ausleihdauer:' wochenanzahl=INT 'Wochen';
>
> DVD: 'DVDtitel:' dvdtitel=STRING 'DVDausleihnummer' nummer=ID
> 'Ausleihdauer:' wochenanzahl=INT 'Wochen';
>
>
> ------- Here is what the console say, when i click on Generate Xtext
> Artifacts --------------------
>
> 0 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering
> platform uri 'D:\Benutzer\Anna\workspace'
> 2093 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Adding
> generated EPackage 'org.eclipse.xtext.xbase.XbasePackage'
> 2312 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered
> GenModel 'ww.eclipse.org/Xtext/Xbase/XAnnotations' from
> 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
> 2328 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered
> GenModel 'ww.eclipse.org/xtext/xbase/Xtype' from
> 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
> 2328 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered
> GenModel 'ww.eclipse.org/xtext/xbase/Xbase' from
> 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
> 2328 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered
> GenModel 'www.eclipse.org/xtext/common/JavaVMTypes' from
> 'platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel'
>
> 2812 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning
> D:\Benutzer\Anna\workspace\org.xtext.example.mydsl5\..\org.xtext.example.mydsl5\src-gen
>
> 2844 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning
> D:\Benutzer\Anna\workspace\org.xtext.example.mydsl5\..\org.xtext.example.mydsl5.ui\src-gen
>
> 2984 [main] INFO ipse.xtext.generator.LanguageConfig - generating
> infrastructure for org.xtext.example.mydsl2.Buchausleihe with fragments
> : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment,
> EcoreGeneratorFragment, SerializerFragment, ResourceFactoryFragment,
> XtextAntlrGeneratorFragment, JavaValidatorFragment,
> ImportNamespacesScopingFragment, QualifiedNamesFragment,
> BuilderIntegrationFragment, GeneratorFragment, FormatterFragment,
> LabelProviderFragment, OutlineTreeProviderFragment,
> QuickOutlineFragment, QuickfixProviderFragment,
> JavaBasedContentAssistFragment, XtextAntlrUiGeneratorFragment,
> Junit4Fragment, RefactorElementNameFragment, TypesGeneratorFragment,
> XbaseGeneratorFragment, CodetemplatesGeneratorFragment, CompareFragment
> 4606 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered
> GenModel 'www.xtext.org/example/mydsl2/Buchausleihe' from
> 'platform:/resource/org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/Buchausleihe.genmodel'
>
> warning(200):
> ../org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/parser/antlr/internal/InternalBuchausleihe.g:214:1:
> Decision can match input such as "'Ausleihe' 'CDtitel:' RULE_STRING
> 'CDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using
> multiple alternatives: 1, 2
> As a result, alternative(s) 2 were disabled for that input
> warning(200):
> ../org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/parser/antlr/internal/InternalBuchausleihe.g:214:1:
> Decision can match input such as "'Ausleihe' 'Buchtitel:' RULE_STRING
> 'Buchausleihnummer:' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using
> multiple alternatives: 1, 2
> As a result, alternative(s) 2 were disabled for that input
> warning(200):
> ../org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/parser/antlr/internal/InternalBuchausleihe.g:214:1:
> Decision can match input such as "'Ausleihe' 'DVDtitel:' RULE_STRING
> 'DVDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using
> multiple alternatives: 1, 2
> As a result, alternative(s) 2 were disabled for that input
> error(201):
> ../org.xtext.example.mydsl5/src-gen/org/xtext/example/mydsl2/parser/antlr/internal/InternalBuchausleihe.g:214:1:
> The following alternatives can never be matched: 2
>
> 6935 [main] ERROR enerator.CompositeGeneratorFragment -
> java.io.FileNotFoundException:
> ..\org.xtext.example.mydsl5\src-gen\org\xtext\example\mydsl2\parser\antlr\internal\InternalBuchausleiheLexer.java
> (Das System kann die angegebene Datei nicht finden)
> org.eclipse.emf.common.util.WrappedException:
> java.io.FileNotFoundException:
> ..\org.xtext.example.mydsl5\src-gen\org\xtext\example\mydsl2\parser\antlr\internal\InternalBuchausleiheLexer.java
> (Das System kann die angegebene Datei nicht finden)
> at org.eclipse.xtext.util.Files.readFileIntoString(Files.java:129)
> at
> org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarningsImpl(AbstractAntlrGeneratorFragment.java:132)
>
> at
> org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarnings(AbstractAntlrGeneratorFragment.java:142)
>
> at
> org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarnings(AbstractAntlrGeneratorFragment.java:138)
>
> at
> org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment.generate(XtextAntlrGeneratorFragment.java:49)
>
> at
> org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:92)
>
> at
> org.eclipse.xtext.generator.LanguageConfig.generate(LanguageConfig.java:113)
>
> at org.eclipse.xtext.generator.Generator.generate(Generator.java:361)
> at
> org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:128)
> at
> org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
>
> at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
> at
> org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
>
> at
> org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
>
> at
> org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
> Caused by: java.io.FileNotFoundException:
> ..\org.xtext.example.mydsl5\src-gen\org\xtext\example\mydsl2\parser\antlr\internal\InternalBuchausleiheLexer.java
> (Das System kann die angegebene Datei nicht finden)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(Unknown Source)
> at java.io.FileInputStream.<init>(Unknown Source)
> at org.eclipse.xtext.util.Files.readFileIntoString(Files.java:126)
> ... 18 more
> 6935 [main] INFO or.validation.JavaValidatorFragment - generating
> Java-based EValidator API
> warning(200):
> ../org.xtext.example.mydsl5.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1:
> Decision can match input such as "'Ausleihe' 'DVDtitel:' RULE_STRING
> 'DVDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using
> multiple alternatives: 1, 2
> As a result, alternative(s) 2 were disabled for that input
> warning(200):
> ../org.xtext.example.mydsl5.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1:
> Decision can match input such as "'Ausleihe' 'CDtitel:' RULE_STRING
> 'CDausleihnummer' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using
> multiple alternatives: 1, 2
> As a result, alternative(s) 2 were disabled for that input
> warning(200):
> ../org.xtext.example.mydsl5.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1:
> Decision can match input such as "'Ausleihe' 'Buchtitel:' RULE_STRING
> 'Buchausleihnummer:' RULE_ID 'Ausleihdauer:' RULE_INT 'Wochen'" using
> multiple alternatives: 1, 2
> As a result, alternative(s) 2 were disabled for that input
> error(201):
> ../org.xtext.example.mydsl5.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalBuchausleihe.g:316:1:
> The following alternatives can never be matched: 2
>
> 7373 [main] ERROR enerator.CompositeGeneratorFragment -
> java.io.FileNotFoundException:
> ..\org.xtext.example.mydsl5.ui\src-gen\org\xtext\example\mydsl2\ui\contentassist\antlr\internal\InternalBuchausleiheLexer.java
> (Das System kann die angegebene Datei nicht finden)
> org.eclipse.emf.common.util.WrappedException:
> java.io.FileNotFoundException:
> ..\org.xtext.example.mydsl5.ui\src-gen\org\xtext\example\mydsl2\ui\contentassist\antlr\internal\InternalBuchausleiheLexer.java
> (Das System kann die angegebene Datei nicht finden)
> at org.eclipse.xtext.util.Files.readFileIntoString(Files.java:129)
> at
> org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarningsImpl(AbstractAntlrGeneratorFragment.java:132)
>
> at
> org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarnings(AbstractAntlrGeneratorFragment.java:142)
>
> at
> org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.suppressWarnings(AbstractAntlrGeneratorFragment.java:138)
>
> at
> org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment.generate(XtextAntlrUiGeneratorFragment.java:53)
>
> at
> org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:92)
>
> at
> org.eclipse.xtext.generator.LanguageConfig.generate(LanguageConfig.java:113)
>
> at org.eclipse.xtext.generator.Generator.generate(Generator.java:361)
> at
> org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:128)
> at
> org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
>
> at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
> at
> org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
>
> at
> org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
>
> at
> org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
> at
> org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
> Caused by: java.io.FileNotFoundException:
> ..\org.xtext.example.mydsl5.ui\src-gen\org\xtext\example\mydsl2\ui\contentassist\antlr\internal\InternalBuchausleiheLexer.java
> (Das System kann die angegebene Datei nicht finden)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(Unknown Source)
> at java.io.FileInputStream.<init>(Unknown Source)
> at org.eclipse.xtext.util.Files.readFileIntoString(Files.java:126)
> ... 18 more
> 7388 [main] INFO text.generator.junit.Junit4Fragment - generating
> Junit4 Test support classes
> 7404 [main] INFO text.generator.junit.Junit4Fragment - generating
> Compare Framework infrastructure
> 7544 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.
>
Re: Noobie Q: Problem to run the Generated IDE Plug-in of my DSL (Xtext) with Eclipse Juno. [message #1005653 is a reply to message #997357] Mon, 28 January 2013 04:34 Go to previous message
Girish Kumar is currently offline Girish Kumar
Messages: 26
Registered: May 2011
Junior Member
Hi,

I tried the same with Eclipse Juno and is working fine..

Please see the attachment for the grammar and screenshot of the editor.

I have some things to recommend to you
Firstly, (Borower+=Borower+)
make it (borower+=Borrower+)
use small case, AS in Modeling framework small case is used to represn attributes, refrences, associations. So also readability increases.

Secondly, Design you Grammar , keeping in mind of user.
The DSL is not easily understandable.


index.php/fa/13119/0/
Previous Topic:include Xtext in Rcp app
Next Topic:Removing hidden nodes via API
Goto Forum:
  


Current Time: Sat Oct 25 14:42:59 GMT 2014

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

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