Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » greetig example does not work(Xtext J2SE Problem)
greetig example does not work [message #673409] Mon, 23 May 2011 14:31 Go to next message
herwig  is currently offline herwig Friend
Messages: 5
Registered: May 2011
Junior Member
Starting eclipse and generating an xtext project
with the grammer:
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals

generate myDsl " ...://www.xtext.org/example/mydsl/MyDsl"

Model:
greetings+=Greeting*;

Greeting:
'Hello' name=ID '!';


gives 6 warnings:
Description Resource Path Location Type
Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. org.xtext.example.mydsl Build path JRE System Library Problem

Description Resource Path Location Type
The file "plugin.xml" does not exist in the workspace build.properties /org.xtext.example.mydsl.ui line 5 Plug-in Problem


The newest versions of
eclipse, Xtext and Java are installed.

What's the reason ? incompatible Java?

Thanks

Herwig
Re: greetig example does not work [message #673428 is a reply to message #673409] Mon, 23 May 2011 15:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

there is a difference between "does not work" and these warnings.

so did you run the workflow of the dsl? did you get any errors there. what are the problems you are facing?

the
Quote:

The file "plugin.xml" does not exist in the workspace build.properties /org.xtext.example.mydsl.ui


error message indicates that you didn't run the workflow.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Mon, 23 May 2011 15:48]

Report message to a moderator

Re: greetig example does not work [message #673440 is a reply to message #673428] Mon, 23 May 2011 16:31 Go to previous messageGo to next message
herwig  is currently offline herwig Friend
Messages: 5
Registered: May 2011
Junior Member
Hi,
thanks

running the workflow generates the output:
0 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering platform uri 'C:\Daten11102010\FH\Eclipse\workbenchXT'
720 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning C:\Daten11102010\FH\Eclipse\workbenchXT\org.xtext.example.mydsl\..\org.xtext.example.mydsl\src-gen
721 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning C:\Daten11102010\FH\Eclipse\workbenchXT\org.xtext.example.mydsl\..\org.xtext.example.mydsl.ui\src-gen
882 [main] INFO ipse.xtext.generator.LanguageConfig - generating infrastructure for org.xtext.example.mydsl.MyDsl with fragments : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment, EcoreGeneratorFragment, ParseTreeConstructorFragment, ResourceFactoryFragment, XtextAntlrGeneratorFragment, JavaValidatorFragment, ImportNamespacesScopingFragment, QualifiedNamesFragment, BuilderIntegrationFragment, FormatterFragment, LabelProviderFragment, TransformerFragment, OutlineNodeAdapterFactoryFragment, QuickOutlineFragment, QuickfixProviderFragment, JavaBasedContentAssistFragment, XtextAntlrUiGeneratorFragment
6648 [main] INFO or.validation.JavaValidatorFragment - executing generate for org.eclipse.xtext.generator.validation.JavaValidatorFragment
7172 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.


There are 6 Warnings:
Description Resource Path Location Type
Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. org.xtext.example.mydsl Build path JRE System Library Problem

Description Resource Path Location Type
Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. org.xtext.example.mydsl.generator Build path JRE System Library Problem

Description Resource Path Location Type
Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. org.xtext.example.mydsl.ui Build path JRE System Library Problem

Description Resource Path Location Type
The file "plugin.xml" does not exist in the workspace build.properties /org.xtext.example.mydsl.generator line 5 Plug-in Problem

Description Resource Path Location Type
The type DefaultContentOutlineNodeAdapterFactory is deprecated MyDslOutlineNodeAdapterFactory.java /org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/outline line 6 Java Problem

Description Resource Path Location Type
The type DefaultContentOutlineNodeAdapterFactory is deprecated MyDslOutlineNodeAdapterFactory.java /org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui/outline line 8 Java Problem


Trying to export it to eclipse there is no new plugin in the directory
therefore I can't find it by retarting eclipse (project new other ...).

Herwig
Re: greetig example does not work [message #673442 is a reply to message #673440] Mon, 23 May 2011 16:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

are you sure there is nothing exported? Xtexct Plugins are just normal plugins so with the export there is nothing Xtext specific.
Btw there is no new project wizard by default for the dsl so no wonder you cannot find it.

To test your dsl you can simply run a new eclipse application from your host eclipse.

Update: And if you export the plugins you should usually place them into the dropins folder of your eclipse.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Mon, 23 May 2011 16:45]

Report message to a moderator

Re: greetig example does not work [message #673446 is a reply to message #673442] Mon, 23 May 2011 16:45 Go to previous messageGo to next message
herwig  is currently offline herwig Friend
Messages: 5
Registered: May 2011
Junior Member
Hi,
perhaps all works well and I don't find it.
I tried the example described in
...://www.openarchitectureware.org/pub/documentation/4.3/html/contents/xtext_tutorial.html
after exporting (3 Files) as described
I restarted eclipse and tried
Select File > New... > Other... > mydsl Project to create a new mydsl project.
but I could not chosse a mydsl Project.
Is this OK?

Herwig
Re: greetig example does not work [message #673447 is a reply to message #673446] Mon, 23 May 2011 16:50 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

you are using ther docs oAW 4.3.1 Xtext? - you did not mention this before. oAW 4.3.1 Xtext is a bit outdated. You find the docs TMF Xtext 1.0.x here:
http://www.eclipse.org/Xtext/documentation/1_0_1/xtext.html

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: greetig example does not work [message #673452 is a reply to message #673447] Mon, 23 May 2011 17:05 Go to previous messageGo to next message
herwig  is currently offline herwig Friend
Messages: 5
Registered: May 2011
Junior Member
Thanks Christian,
I'll try it tomorrow.

Herwig
Re: greetig example does not work [message #673666 is a reply to message #673447] Tue, 24 May 2011 12:35 Go to previous message
herwig  is currently offline herwig Friend
Messages: 5
Registered: May 2011
Junior Member
Hi,
it works. The reason of the problem was that I did not expect
that the only thing to use the grammer was to create a project
and add a file xyz.mydsl. i. e. the conjunction was the name of
the file ... .mydsl.

Thanks

Herwig
Previous Topic:Extracting common grammar rule parts
Next Topic:Xtext Job in Switzerland
Goto Forum:
  


Current Time: Thu Apr 25 22:34:52 GMT 2024

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

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

Back to the top