Home » Modeling » TMF (Xtext) » [Xtext] Using Eclipse Modeling tools download for Galileo RC2
[Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #46886] |
Mon, 01 June 2009 18:06  |
Eclipse User |
|
|
|
Hi,
I downloaded the Eclipse Modeling Tools packaging of Galileo RC2 (311MB)
from the main download page to hopefully get all the modeling plug-ins I
typically use without having to install them myself.
Just to verify everything works as I expect, I created an Xtext project
using the defaults (so it has MyDsl as the name etc.) Once the project is
created, I see syntax errors in the following files:
org.xtext.example.mydsl.generator:/src/templates/Extensions. ext,Template.xpt
Hence I have a few questions:
1) Is this expected? Is it supported?
2) Is MWE part of the packaging? When I try to execute the GenerateMyDsl.mwe
file for the project, there appears to be no run configuration for it as if
MWE is not present. Or is there a new way to run the .mwe file?
Thanks in advance!
Derek
|
|
| |
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #46949 is a reply to message #46919] |
Mon, 01 June 2009 18:51   |
Eclipse User |
|
|
|
Well it looks like I spoke too soon!
I first see syntax errors flagged by the editor after I create the default
MyDsl project and but don't generate it:
org.xtext.example.mydsl.generator:/src/templates/Extensions. ext,Template.xpt
For Extensions.ext the error is on the 3rd line:
listSubclasses(Class this)
and it complains about "Class" saying "Type not found: Class"
For Template.xpt the error is on the 7th line:
FOREACH this.elements.typeSelect(Class).sortBy(e|e.name) AS e-
and it complains about "elements" saying "could not find property 'elements'
for type myDsl::Model
Once I generate it, the errors go away. At this point I am happy and want to
try my own grammar. So, then I just paste my grammer into the existing
MyDsl.xtext file and I get the same errors again. As a result, I conclude it
may be my grammar (even though it works fine in other eclipse environments).
After commenting out more and more of my grammar down to just one rule, I
reduced it to something like the default MyDsl.xtext. All I did was make the
first rule as simple as possible and comment out everything else. The
complete MyDsl.ext changes are pasted below. Upon generating the DSL with
this grammar I see the same errors. If I restore the original grammer and
generate again they go away. Any idea what could be wrong? There must be
some minor problem in the Eclipse Galileo Modeling RC2 build or something
(???)
Thanks!
Derek
grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals
generate myDsl "http://www.xtext.org/example/MyDsl"
Model :
'name';
/*
(imports+=Import)*
(elements+=Type)*;
Import :
'import' importURI=STRING;
Type:
DataType | Class;
DataType:
'datatype' name=ID ';'?;
Class :
'class' name=ID ('extends' superClass=[Class])? '{'
properties+=Property*
'}';
Property:
Attribute | Reference;
Attribute:
'attr' name=ID ':' type=[DataType] ';'?;
Reference:
'ref' name=ID ':' type=[Class] ';'?;
*/
"Derek Palma" <derek.palma@gmail.com> wrote in message
news:h01jo5$oov$1@build.eclipse.org...
> Looks like there was some issue in my eclipse installation. Please ignore
> this message.
>
>
> "Derek Palma" <derek.palma@gmail.com> wrote in message
> news:h01jcl$gi9$1@build.eclipse.org...
>> Hi,
>>
>> I downloaded the Eclipse Modeling Tools packaging of Galileo RC2 (311MB)
>> from the main download page to hopefully get all the modeling plug-ins I
>> typically use without having to install them myself.
>>
>> Just to verify everything works as I expect, I created an Xtext project
>> using the defaults (so it has MyDsl as the name etc.) Once the project
>> is created, I see syntax errors in the following files:
>>
>> org.xtext.example.mydsl.generator:/src/templates/Extensions. ext,Template.xpt
>>
>> Hence I have a few questions:
>>
>> 1) Is this expected? Is it supported?
>>
>> 2) Is MWE part of the packaging? When I try to execute the
>> GenerateMyDsl.mwe file for the project, there appears to be no run
>> configuration for it as if MWE is not present. Or is there a new way to
>> run the .mwe file?
>>
>> Thanks in advance!
>> Derek
>
|
|
|
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #46979 is a reply to message #46949] |
Tue, 02 June 2009 02:58   |
Eclipse User |
|
|
|
Hi Derek,
sorry for the confusion.
The markers are there because the generated templates and extension
files expect some EClasses ('Class' and 'Model'). As they are generated
from the *.xtext grammar they are not available until you've generated
the Xtext infrastructure the first time.
If you change the grammar, so that the types 'Class' and 'Model' are no
longer generated the errors will also occure.
Maybe we should remove the proposed templates and extensions as they
seem to confuse first time users. On the other hand we think it's
helpful to have such a starting point. Not sure what's the best solution.
Regarding the missing run configuration. It seems that the run
configuration stuff has general problems, because I also sometimes miss
the run configurations for JUnit and others. We should file a bug.
What helps is open the respective editro and and use the context menu on
the opened editor instead of on the resource in the view.
Cheers,
Sven
Derek Palma schrieb:
> Well it looks like I spoke too soon!
>
> I first see syntax errors flagged by the editor after I create the
> default MyDsl project and but don't generate it:
> org.xtext.example.mydsl.generator:/src/templates/Extensions. ext,Template.xpt
>
>
> For Extensions.ext the error is on the 3rd line:
> listSubclasses(Class this)
> and it complains about "Class" saying "Type not found: Class"
>
> For Template.xpt the error is on the 7th line:
> FOREACH this.elements.typeSelect(Class).sortBy(e|e.name) AS e-
> and it complains about "elements" saying "could not find property
> 'elements' for type myDsl::Model
>
> Once I generate it, the errors go away. At this point I am happy and
> want to try my own grammar. So, then I just paste my grammer into the
> existing MyDsl.xtext file and I get the same errors again. As a result,
> I conclude it may be my grammar (even though it works fine in other
> eclipse environments). After commenting out more and more of my grammar
> down to just one rule, I reduced it to something like the default
> MyDsl.xtext. All I did was make the first rule as simple as possible and
> comment out everything else. The complete MyDsl.ext changes are pasted
> below. Upon generating the DSL with this grammar I see the same errors.
> If I restore the original grammer and generate again they go away. Any
> idea what could be wrong? There must be some minor problem in the
> Eclipse Galileo Modeling RC2 build or something (???)
>
> Thanks!
> Derek
>
> grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals
>
> generate myDsl "http://www.xtext.org/example/MyDsl"
>
>
> Model :
> 'name';
> /*
> (imports+=Import)*
> (elements+=Type)*;
>
> Import :
> 'import' importURI=STRING;
>
> Type:
> DataType | Class;
>
> DataType:
> 'datatype' name=ID ';'?;
>
> Class :
> 'class' name=ID ('extends' superClass=[Class])? '{'
> properties+=Property*
> '}';
>
> Property:
> Attribute | Reference;
>
> Attribute:
> 'attr' name=ID ':' type=[DataType] ';'?;
>
> Reference:
> 'ref' name=ID ':' type=[Class] ';'?;
> */
> "Derek Palma" <derek.palma@gmail.com> wrote in message
> news:h01jo5$oov$1@build.eclipse.org...
>> Looks like there was some issue in my eclipse installation. Please
>> ignore this message.
>>
>>
>> "Derek Palma" <derek.palma@gmail.com> wrote in message
>> news:h01jcl$gi9$1@build.eclipse.org...
>>> Hi,
>>>
>>> I downloaded the Eclipse Modeling Tools packaging of Galileo RC2
>>> (311MB) from the main download page to hopefully get all the modeling
>>> plug-ins I typically use without having to install them myself.
>>>
>>> Just to verify everything works as I expect, I created an Xtext
>>> project using the defaults (so it has MyDsl as the name etc.) Once
>>> the project is created, I see syntax errors in the following files:
>>>
>>> org.xtext.example.mydsl.generator:/src/templates/Extensions. ext,Template.xpt
>>>
>>>
>>> Hence I have a few questions:
>>>
>>> 1) Is this expected? Is it supported?
>>>
>>> 2) Is MWE part of the packaging? When I try to execute the
>>> GenerateMyDsl.mwe file for the project, there appears to be no run
>>> configuration for it as if MWE is not present. Or is there a new way
>>> to run the .mwe file?
>>>
>>> Thanks in advance!
>>> Derek
>>
>
|
|
| |
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #47158 is a reply to message #46979] |
Tue, 02 June 2009 10:21   |
Eclipse User |
|
|
|
I think the files are useful examples and are really part of the sample
grammar (now that I realize why they are their). Disabling them but leaving
them in the generated code seems most useful since these files would be the
starting points for using their respective features. I actually feel this is
more user error than not, since if I new what the files were for I would
have known they'd have to be adjusted to match my grammar. Maybe just
describing the sample Dsl in some detail and showing how the various file
types work together is the most useful in general.
Derek
"Sven Efftinge" <sven.efftinge@itemis.de> wrote in message
news:h02ijc$h6t$1@build.eclipse.org...
> Hi Derek,
>
> sorry for the confusion.
> The markers are there because the generated templates and extension files
> expect some EClasses ('Class' and 'Model'). As they are generated from the
> *.xtext grammar they are not available until you've generated the Xtext
> infrastructure the first time.
>
> If you change the grammar, so that the types 'Class' and 'Model' are no
> longer generated the errors will also occure.
>
> Maybe we should remove the proposed templates and extensions as they seem
> to confuse first time users. On the other hand we think it's helpful to
> have such a starting point. Not sure what's the best solution.
>
> Regarding the missing run configuration. It seems that the run
> configuration stuff has general problems, because I also sometimes miss
> the run configurations for JUnit and others. We should file a bug.
>
> What helps is open the respective editro and and use the context menu on
> the opened editor instead of on the resource in the view.
>
> Cheers,
> Sven
>
>
>
> Derek Palma schrieb:
>> Well it looks like I spoke too soon!
>>
>> I first see syntax errors flagged by the editor after I create the
>> default MyDsl project and but don't generate it:
>> org.xtext.example.mydsl.generator:/src/templates/Extensions. ext,Template.xpt
>> For Extensions.ext the error is on the 3rd line:
>> listSubclasses(Class this)
>> and it complains about "Class" saying "Type not found: Class"
>>
>> For Template.xpt the error is on the 7th line:
>> FOREACH this.elements.typeSelect(Class).sortBy(e|e.name) AS e-
>> and it complains about "elements" saying "could not find property
>> 'elements' for type myDsl::Model
>>
>> Once I generate it, the errors go away. At this point I am happy and want
>> to try my own grammar. So, then I just paste my grammer into the existing
>> MyDsl.xtext file and I get the same errors again. As a result, I conclude
>> it may be my grammar (even though it works fine in other eclipse
>> environments). After commenting out more and more of my grammar down to
>> just one rule, I reduced it to something like the default MyDsl.xtext.
>> All I did was make the first rule as simple as possible and comment out
>> everything else. The complete MyDsl.ext changes are pasted below. Upon
>> generating the DSL with this grammar I see the same errors. If I restore
>> the original grammer and generate again they go away. Any idea what could
>> be wrong? There must be some minor problem in the Eclipse Galileo
>> Modeling RC2 build or something (???)
>>
>> Thanks!
>> Derek
>>
>> grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals
>>
>> generate myDsl "http://www.xtext.org/example/MyDsl"
>>
>>
>> Model :
>> 'name';
>> /*
>> (imports+=Import)*
>> (elements+=Type)*;
>>
>> Import :
>> 'import' importURI=STRING;
>>
>> Type:
>> DataType | Class;
>>
>> DataType:
>> 'datatype' name=ID ';'?;
>>
>> Class :
>> 'class' name=ID ('extends' superClass=[Class])? '{'
>> properties+=Property*
>> '}';
>>
>> Property:
>> Attribute | Reference;
>>
>> Attribute:
>> 'attr' name=ID ':' type=[DataType] ';'?;
>>
>> Reference:
>> 'ref' name=ID ':' type=[Class] ';'?;
>> */
>> "Derek Palma" <derek.palma@gmail.com> wrote in message
>> news:h01jo5$oov$1@build.eclipse.org...
>>> Looks like there was some issue in my eclipse installation. Please
>>> ignore this message.
>>>
>>>
>>> "Derek Palma" <derek.palma@gmail.com> wrote in message
>>> news:h01jcl$gi9$1@build.eclipse.org...
>>>> Hi,
>>>>
>>>> I downloaded the Eclipse Modeling Tools packaging of Galileo RC2
>>>> (311MB) from the main download page to hopefully get all the modeling
>>>> plug-ins I typically use without having to install them myself.
>>>>
>>>> Just to verify everything works as I expect, I created an Xtext project
>>>> using the defaults (so it has MyDsl as the name etc.) Once the project
>>>> is created, I see syntax errors in the following files:
>>>>
>>>> org.xtext.example.mydsl.generator:/src/templates/Extensions. ext,Template.xpt
>>>>
>>>> Hence I have a few questions:
>>>>
>>>> 1) Is this expected? Is it supported?
>>>>
>>>> 2) Is MWE part of the packaging? When I try to execute the
>>>> GenerateMyDsl.mwe file for the project, there appears to be no run
>>>> configuration for it as if MWE is not present. Or is there a new way to
>>>> run the .mwe file?
>>>>
>>>> Thanks in advance!
>>>> Derek
>>>
>>
|
|
|
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #47228 is a reply to message #46979] |
Tue, 02 June 2009 12:05   |
Eclipse User |
|
|
|
I commented out the content of the .ext file. I could not figure out how to
comment out the entire .xpt file. At least the editor did not indicate that
I it understsood the comments (I tried /* */ and // on every line) so I
deleted it.
At this point there were no more syntax errors. So I ran the mydsl plugin to
verify everything is OK. I noticed that the syntax highlighting only has an
entry for "default" so there is effectively only black text. Maybe it is no
longer generated? Regardless, I would like to learn how to control these
entries so I can have good defaults for my own DSLs.
Thanks,
Derek
"Sven Efftinge" <sven.efftinge@itemis.de> wrote in message
news:h02ijc$h6t$1@build.eclipse.org...
> Hi Derek,
>
> sorry for the confusion.
> The markers are there because the generated templates and extension files
> expect some EClasses ('Class' and 'Model'). As they are generated from the
> *.xtext grammar they are not available until you've generated the Xtext
> infrastructure the first time.
>
> If you change the grammar, so that the types 'Class' and 'Model' are no
> longer generated the errors will also occure.
>
> Maybe we should remove the proposed templates and extensions as they seem
> to confuse first time users. On the other hand we think it's helpful to
> have such a starting point. Not sure what's the best solution.
>
> Regarding the missing run configuration. It seems that the run
> configuration stuff has general problems, because I also sometimes miss
> the run configurations for JUnit and others. We should file a bug.
>
> What helps is open the respective editro and and use the context menu on
> the opened editor instead of on the resource in the view.
>
> Cheers,
> Sven
>
>
>
> Derek Palma schrieb:
>> Well it looks like I spoke too soon!
>>
>> I first see syntax errors flagged by the editor after I create the
>> default MyDsl project and but don't generate it:
>> org.xtext.example.mydsl.generator:/src/templates/Extensions. ext,Template.xpt
>> For Extensions.ext the error is on the 3rd line:
>> listSubclasses(Class this)
>> and it complains about "Class" saying "Type not found: Class"
>>
>> For Template.xpt the error is on the 7th line:
>> FOREACH this.elements.typeSelect(Class).sortBy(e|e.name) AS e-
>> and it complains about "elements" saying "could not find property
>> 'elements' for type myDsl::Model
>>
>> Once I generate it, the errors go away. At this point I am happy and want
>> to try my own grammar. So, then I just paste my grammer into the existing
>> MyDsl.xtext file and I get the same errors again. As a result, I conclude
>> it may be my grammar (even though it works fine in other eclipse
>> environments). After commenting out more and more of my grammar down to
>> just one rule, I reduced it to something like the default MyDsl.xtext.
>> All I did was make the first rule as simple as possible and comment out
>> everything else. The complete MyDsl.ext changes are pasted below. Upon
>> generating the DSL with this grammar I see the same errors. If I restore
>> the original grammer and generate again they go away. Any idea what could
>> be wrong? There must be some minor problem in the Eclipse Galileo
>> Modeling RC2 build or something (???)
>>
>> Thanks!
>> Derek
>>
>> grammar org.xtext.example.MyDsl with org.eclipse.xtext.common.Terminals
>>
>> generate myDsl "http://www.xtext.org/example/MyDsl"
>>
>>
>> Model :
>> 'name';
>> /*
>> (imports+=Import)*
>> (elements+=Type)*;
>>
>> Import :
>> 'import' importURI=STRING;
>>
>> Type:
>> DataType | Class;
>>
>> DataType:
>> 'datatype' name=ID ';'?;
>>
>> Class :
>> 'class' name=ID ('extends' superClass=[Class])? '{'
>> properties+=Property*
>> '}';
>>
>> Property:
>> Attribute | Reference;
>>
>> Attribute:
>> 'attr' name=ID ':' type=[DataType] ';'?;
>>
>> Reference:
>> 'ref' name=ID ':' type=[Class] ';'?;
>> */
>> "Derek Palma" <derek.palma@gmail.com> wrote in message
>> news:h01jo5$oov$1@build.eclipse.org...
>>> Looks like there was some issue in my eclipse installation. Please
>>> ignore this message.
>>>
>>>
>>> "Derek Palma" <derek.palma@gmail.com> wrote in message
>>> news:h01jcl$gi9$1@build.eclipse.org...
>>>> Hi,
>>>>
>>>> I downloaded the Eclipse Modeling Tools packaging of Galileo RC2
>>>> (311MB) from the main download page to hopefully get all the modeling
>>>> plug-ins I typically use without having to install them myself.
>>>>
>>>> Just to verify everything works as I expect, I created an Xtext project
>>>> using the defaults (so it has MyDsl as the name etc.) Once the project
>>>> is created, I see syntax errors in the following files:
>>>>
>>>> org.xtext.example.mydsl.generator:/src/templates/Extensions. ext,Template.xpt
>>>>
>>>> Hence I have a few questions:
>>>>
>>>> 1) Is this expected? Is it supported?
>>>>
>>>> 2) Is MWE part of the packaging? When I try to execute the
>>>> GenerateMyDsl.mwe file for the project, there appears to be no run
>>>> configuration for it as if MWE is not present. Or is there a new way to
>>>> run the .mwe file?
>>>>
>>>> Thanks in advance!
>>>> Derek
>>>
>>
|
|
| |
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #47350 is a reply to message #47301] |
Tue, 02 June 2009 15:05   |
Eclipse User |
|
|
|
Hi Sven,
The text highlighting issue occurs with the example DSL project (MyDsl) as
well. It does not seem to be grammar specific. I am using RC2 as it is
packaged in the Eclipse Modeling Tools (311MB) as it is available from the
main download pages for Eclipse.
I noticed that the Eclipse Modeling Tools does not have antlr. So all the
generated code so far has used the default parser (packrat). Can this be
related to the text highlighting issue?
To move forward, I have intalled the antlr plug-in via the update site at
the bottom of the Xtext download page. When I generate the example DSL
(MyDsl) I now get some syntax errors:
plug-in: org.xtext.example.mydsl, file
src-gen/org/xtext/example/parser/antlr/internal/InternalMyDs lParser.java,
line: 52,
registerRules(grammarAccess.getGrammar());
shows registerRules not defined
This seems to happen in all grammers I generate with Antlr as the parser,
not just the example MyDsl project.
Derek
"Sven Efftinge" <sven.efftinge@itemis.de> wrote in message
news:h03rc8$qq2$1@build.eclipse.org...
> Derek Palma schrieb:
>> I commented out the content of the .ext file. I could not figure out how
>> to comment out the entire .xpt file. At least the editor did not indicate
>> that I it understsood the comments (I tried /* */ and // on every line)
>> so I deleted it.
>>
>
> In Xpand comments are written using the REM / ENDREM keywords.
> Example:
>
> <<REM>>
> ..
> <<DEFINE>>
> ..
> <<ENDEFINE>>
>
> ...
>
> <<ENDREM>>
>
>
>> At this point there were no more syntax errors. So I ran the mydsl plugin
>> to verify everything is OK. I noticed that the syntax highlighting only
>> has an entry for "default" so there is effectively only black text. Maybe
>> it is no longer generated?
>
> No, this has nothing to do with the generator project.
> Please provide your grammar and tell us which version you are using.
>
>> Regardless, I would like to learn how to control these entries so I can
>> have good defaults for my own DSLs.
>
> Currently syntax coloring is based on lexing information only. That is you
> can define the coloring for the lexer rules you use (i.e. STRING, ID,
> ML_COMMENT, SL_COMMENT, etc.).
> However Sebastian is working on semantic coloring (see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276618).
>
> Cheers,
> Sven
|
|
|
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #47393 is a reply to message #47350] |
Wed, 03 June 2009 01:18   |
Eclipse User |
|
|
|
Hi Derek,
please ensure that you the version of the installed antlr-integration
and Xtext are in sync. The easiest way to get a valid installation is to
download it from oaw.itemis.com
( http://oaw.itemis.com/openarchitectureware/language=en/660/d ownloads).
You are right with the highlighting issue. The default implementation
relies on the generated lexer which is obviously not present if you
don't have antlr installed.
Sorry for inconvenience,
Sebastian
Please
Am 02.06.2009 21:05 Uhr, schrieb Derek Palma:
> Hi Sven,
>
> The text highlighting issue occurs with the example DSL project (MyDsl)
> as well. It does not seem to be grammar specific. I am using RC2 as it
> is packaged in the Eclipse Modeling Tools (311MB) as it is available
> from the main download pages for Eclipse.
>
> I noticed that the Eclipse Modeling Tools does not have antlr. So all
> the generated code so far has used the default parser (packrat). Can
> this be related to the text highlighting issue?
>
> To move forward, I have intalled the antlr plug-in via the update site
> at the bottom of the Xtext download page. When I generate the example
> DSL (MyDsl) I now get some syntax errors:
>
> plug-in: org.xtext.example.mydsl, file
> src-gen/org/xtext/example/parser/antlr/internal/InternalMyDs lParser.java, line:
> 52,
> registerRules(grammarAccess.getGrammar());
> shows registerRules not defined
>
> This seems to happen in all grammers I generate with Antlr as the
> parser, not just the example MyDsl project.
>
>
> Derek
>
> "Sven Efftinge" <sven.efftinge@itemis.de> wrote in message
> news:h03rc8$qq2$1@build.eclipse.org...
>> Derek Palma schrieb:
>>> I commented out the content of the .ext file. I could not figure out
>>> how to comment out the entire .xpt file. At least the editor did not
>>> indicate that I it understsood the comments (I tried /* */ and // on
>>> every line) so I deleted it.
>>>
>>
>> In Xpand comments are written using the REM / ENDREM keywords.
>> Example:
>>
>> <<REM>>
>> ..
>> <<DEFINE>>
>> ..
>> <<ENDEFINE>>
>>
>> ...
>>
>> <<ENDREM>>
>>
>>
>>> At this point there were no more syntax errors. So I ran the mydsl
>>> plugin to verify everything is OK. I noticed that the syntax
>>> highlighting only has an entry for "default" so there is effectively
>>> only black text. Maybe it is no longer generated?
>>
>> No, this has nothing to do with the generator project.
>> Please provide your grammar and tell us which version you are using.
>>
>>> Regardless, I would like to learn how to control these entries so I
>>> can have good defaults for my own DSLs.
>>
>> Currently syntax coloring is based on lexing information only. That is
>> you can define the coloring for the lexer rules you use (i.e. STRING,
>> ID, ML_COMMENT, SL_COMMENT, etc.).
>> However Sebastian is working on semantic coloring (see
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276618).
>>
>> Cheers,
>> Sven
>
|
|
|
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #47515 is a reply to message #47393] |
Wed, 03 June 2009 11:43   |
Eclipse User |
|
|
|
Thanks Sebastian!
As expected the download from oaw.itemis.com works correctly. I tried to
determine which antlr plug-in is not correct in the Eclipse Tools RC2
download. However, all the plug-ins with "antlr" in their filename seem
identical with the Itemis download. Would you happen to know which plug-in
generates the InternalMyDslParser.java related to the unresolved reference I
mentioned below? I am searching for a procedure to update the Eclipse Tools
RC2 download to work correctly for Xtext since I need access to other tools
beyond Xtext as well as we need to run on Linux 64bit.
Thanks
Derek
"Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
news:h05136$djd$1@build.eclipse.org...
> Hi Derek,
>
> please ensure that you the version of the installed antlr-integration and
> Xtext are in sync. The easiest way to get a valid installation is to
> download it from oaw.itemis.com
> ( http://oaw.itemis.com/openarchitectureware/language=en/660/d ownloads).
>
> You are right with the highlighting issue. The default implementation
> relies on the generated lexer which is obviously not present if you don't
> have antlr installed.
>
> Sorry for inconvenience,
> Sebastian
>
> Please
> Am 02.06.2009 21:05 Uhr, schrieb Derek Palma:
>> Hi Sven,
>>
>> The text highlighting issue occurs with the example DSL project (MyDsl)
>> as well. It does not seem to be grammar specific. I am using RC2 as it
>> is packaged in the Eclipse Modeling Tools (311MB) as it is available
>> from the main download pages for Eclipse.
>>
>> I noticed that the Eclipse Modeling Tools does not have antlr. So all
>> the generated code so far has used the default parser (packrat). Can
>> this be related to the text highlighting issue?
>>
>> To move forward, I have intalled the antlr plug-in via the update site
>> at the bottom of the Xtext download page. When I generate the example
>> DSL (MyDsl) I now get some syntax errors:
>>
>> plug-in: org.xtext.example.mydsl, file
>> src-gen/org/xtext/example/parser/antlr/internal/InternalMyDs lParser.java,
>> line:
>> 52,
>> registerRules(grammarAccess.getGrammar());
>> shows registerRules not defined
>>
>> This seems to happen in all grammers I generate with Antlr as the
>> parser, not just the example MyDsl project.
>>
>>
>> Derek
>>
>> "Sven Efftinge" <sven.efftinge@itemis.de> wrote in message
>> news:h03rc8$qq2$1@build.eclipse.org...
>>> Derek Palma schrieb:
>>>> I commented out the content of the .ext file. I could not figure out
>>>> how to comment out the entire .xpt file. At least the editor did not
>>>> indicate that I it understsood the comments (I tried /* */ and // on
>>>> every line) so I deleted it.
>>>>
>>>
>>> In Xpand comments are written using the REM / ENDREM keywords.
>>> Example:
>>>
>>> <<REM>>
>>> ..
>>> <<DEFINE>>
>>> ..
>>> <<ENDEFINE>>
>>>
>>> ...
>>>
>>> <<ENDREM>>
>>>
>>>
>>>> At this point there were no more syntax errors. So I ran the mydsl
>>>> plugin to verify everything is OK. I noticed that the syntax
>>>> highlighting only has an entry for "default" so there is effectively
>>>> only black text. Maybe it is no longer generated?
>>>
>>> No, this has nothing to do with the generator project.
>>> Please provide your grammar and tell us which version you are using.
>>>
>>>> Regardless, I would like to learn how to control these entries so I
>>>> can have good defaults for my own DSLs.
>>>
>>> Currently syntax coloring is based on lexing information only. That is
>>> you can define the coloring for the lexer rules you use (i.e. STRING,
>>> ID, ML_COMMENT, SL_COMMENT, etc.).
>>> However Sebastian is working on semantic coloring (see
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276618).
>>>
>>> Cheers,
>>> Sven
>>
>
|
|
|
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #47605 is a reply to message #47515] |
Wed, 03 June 2009 14:37   |
Eclipse User |
|
|
|
Hi Derek,
please use the update site
http://xtext.itemis.com/updates/milestones/site.xml
(note: don't forget to add the suffix /site.xml).
It should work with the RC3 of Xtext.
Regards,
Sebastian
Am 03.06.2009 17:43 Uhr, schrieb Derek Palma:
> Thanks Sebastian!
>
> As expected the download from oaw.itemis.com works correctly. I tried to
> determine which antlr plug-in is not correct in the Eclipse Tools RC2
> download. However, all the plug-ins with "antlr" in their filename seem
> identical with the Itemis download. Would you happen to know which
> plug-in generates the InternalMyDslParser.java related to the unresolved
> reference I mentioned below? I am searching for a procedure to update
> the Eclipse Tools RC2 download to work correctly for Xtext since I need
> access to other tools beyond Xtext as well as we need to run on Linux
> 64bit.
>
> Thanks
> Derek
>
> "Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
> news:h05136$djd$1@build.eclipse.org...
>> Hi Derek,
>>
>> please ensure that you the version of the installed antlr-integration
>> and Xtext are in sync. The easiest way to get a valid installation is
>> to download it from oaw.itemis.com
>> ( http://oaw.itemis.com/openarchitectureware/language=en/660/d ownloads).
>>
>> You are right with the highlighting issue. The default implementation
>> relies on the generated lexer which is obviously not present if you
>> don't have antlr installed.
>>
>> Sorry for inconvenience,
>> Sebastian
>>
>> Please
>> Am 02.06.2009 21:05 Uhr, schrieb Derek Palma:
>>> Hi Sven,
>>>
>>> The text highlighting issue occurs with the example DSL project (MyDsl)
>>> as well. It does not seem to be grammar specific. I am using RC2 as it
>>> is packaged in the Eclipse Modeling Tools (311MB) as it is available
>>> from the main download pages for Eclipse.
>>>
>>> I noticed that the Eclipse Modeling Tools does not have antlr. So all
>>> the generated code so far has used the default parser (packrat). Can
>>> this be related to the text highlighting issue?
>>>
>>> To move forward, I have intalled the antlr plug-in via the update site
>>> at the bottom of the Xtext download page. When I generate the example
>>> DSL (MyDsl) I now get some syntax errors:
>>>
>>> plug-in: org.xtext.example.mydsl, file
>>> src-gen/org/xtext/example/parser/antlr/internal/InternalMyDs lParser.java,
>>> line:
>>> 52,
>>> registerRules(grammarAccess.getGrammar());
>>> shows registerRules not defined
>>>
>>> This seems to happen in all grammers I generate with Antlr as the
>>> parser, not just the example MyDsl project.
>>>
>>>
>>> Derek
>>>
>>> "Sven Efftinge" <sven.efftinge@itemis.de> wrote in message
>>> news:h03rc8$qq2$1@build.eclipse.org...
>>>> Derek Palma schrieb:
>>>>> I commented out the content of the .ext file. I could not figure out
>>>>> how to comment out the entire .xpt file. At least the editor did not
>>>>> indicate that I it understsood the comments (I tried /* */ and // on
>>>>> every line) so I deleted it.
>>>>>
>>>>
>>>> In Xpand comments are written using the REM / ENDREM keywords.
>>>> Example:
>>>>
>>>> <<REM>>
>>>> ..
>>>> <<DEFINE>>
>>>> ..
>>>> <<ENDEFINE>>
>>>>
>>>> ...
>>>>
>>>> <<ENDREM>>
>>>>
>>>>
>>>>> At this point there were no more syntax errors. So I ran the mydsl
>>>>> plugin to verify everything is OK. I noticed that the syntax
>>>>> highlighting only has an entry for "default" so there is effectively
>>>>> only black text. Maybe it is no longer generated?
>>>>
>>>> No, this has nothing to do with the generator project.
>>>> Please provide your grammar and tell us which version you are using.
>>>>
>>>>> Regardless, I would like to learn how to control these entries so I
>>>>> can have good defaults for my own DSLs.
>>>>
>>>> Currently syntax coloring is based on lexing information only. That is
>>>> you can define the coloring for the lexer rules you use (i.e. STRING,
>>>> ID, ML_COMMENT, SL_COMMENT, etc.).
>>>> However Sebastian is working on semantic coloring (see
>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276618).
>>>>
>>>> Cheers,
>>>> Sven
>>>
>>
>
|
|
|
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #47665 is a reply to message #47605] |
Wed, 03 June 2009 18:10   |
Eclipse User |
|
|
|
Hi Sebastian,
I tried this on eclipse-modeling-galileo-RC2-linux-gtk-x86_64.tar.gz. The is
not yet an RC3 for this distribution for this (I least I can't find it).
Using the URL you provided to add the antlr support to a fresh installation.
I see no change in behavior.
Derek
"Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
news:h06ft5$rss$1@build.eclipse.org...
> Hi Derek,
>
> please use the update site
> http://xtext.itemis.com/updates/milestones/site.xml
>
> (note: don't forget to add the suffix /site.xml).
>
> It should work with the RC3 of Xtext.
>
> Regards,
> Sebastian
>
> Am 03.06.2009 17:43 Uhr, schrieb Derek Palma:
>> Thanks Sebastian!
>>
>> As expected the download from oaw.itemis.com works correctly. I tried to
>> determine which antlr plug-in is not correct in the Eclipse Tools RC2
>> download. However, all the plug-ins with "antlr" in their filename seem
>> identical with the Itemis download. Would you happen to know which
>> plug-in generates the InternalMyDslParser.java related to the unresolved
>> reference I mentioned below? I am searching for a procedure to update
>> the Eclipse Tools RC2 download to work correctly for Xtext since I need
>> access to other tools beyond Xtext as well as we need to run on Linux
>> 64bit.
>>
>> Thanks
>> Derek
>>
>> "Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
>> news:h05136$djd$1@build.eclipse.org...
>>> Hi Derek,
>>>
>>> please ensure that you the version of the installed antlr-integration
>>> and Xtext are in sync. The easiest way to get a valid installation is
>>> to download it from oaw.itemis.com
>>> ( http://oaw.itemis.com/openarchitectureware/language=en/660/d ownloads).
>>>
>>> You are right with the highlighting issue. The default implementation
>>> relies on the generated lexer which is obviously not present if you
>>> don't have antlr installed.
>>>
>>> Sorry for inconvenience,
>>> Sebastian
>>>
>>> Please
>>> Am 02.06.2009 21:05 Uhr, schrieb Derek Palma:
>>>> Hi Sven,
>>>>
>>>> The text highlighting issue occurs with the example DSL project (MyDsl)
>>>> as well. It does not seem to be grammar specific. I am using RC2 as it
>>>> is packaged in the Eclipse Modeling Tools (311MB) as it is available
>>>> from the main download pages for Eclipse.
>>>>
>>>> I noticed that the Eclipse Modeling Tools does not have antlr. So all
>>>> the generated code so far has used the default parser (packrat). Can
>>>> this be related to the text highlighting issue?
>>>>
>>>> To move forward, I have intalled the antlr plug-in via the update site
>>>> at the bottom of the Xtext download page. When I generate the example
>>>> DSL (MyDsl) I now get some syntax errors:
>>>>
>>>> plug-in: org.xtext.example.mydsl, file
>>>> src-gen/org/xtext/example/parser/antlr/internal/InternalMyDs lParser.java,
>>>> line:
>>>> 52,
>>>> registerRules(grammarAccess.getGrammar());
>>>> shows registerRules not defined
>>>>
>>>> This seems to happen in all grammers I generate with Antlr as the
>>>> parser, not just the example MyDsl project.
>>>>
>>>>
>>>> Derek
>>>>
>>>> "Sven Efftinge" <sven.efftinge@itemis.de> wrote in message
>>>> news:h03rc8$qq2$1@build.eclipse.org...
>>>>> Derek Palma schrieb:
>>>>>> I commented out the content of the .ext file. I could not figure out
>>>>>> how to comment out the entire .xpt file. At least the editor did not
>>>>>> indicate that I it understsood the comments (I tried /* */ and // on
>>>>>> every line) so I deleted it.
>>>>>>
>>>>>
>>>>> In Xpand comments are written using the REM / ENDREM keywords.
>>>>> Example:
>>>>>
>>>>> <<REM>>
>>>>> ..
>>>>> <<DEFINE>>
>>>>> ..
>>>>> <<ENDEFINE>>
>>>>>
>>>>> ...
>>>>>
>>>>> <<ENDREM>>
>>>>>
>>>>>
>>>>>> At this point there were no more syntax errors. So I ran the mydsl
>>>>>> plugin to verify everything is OK. I noticed that the syntax
>>>>>> highlighting only has an entry for "default" so there is effectively
>>>>>> only black text. Maybe it is no longer generated?
>>>>>
>>>>> No, this has nothing to do with the generator project.
>>>>> Please provide your grammar and tell us which version you are using.
>>>>>
>>>>>> Regardless, I would like to learn how to control these entries so I
>>>>>> can have good defaults for my own DSLs.
>>>>>
>>>>> Currently syntax coloring is based on lexing information only. That is
>>>>> you can define the coloring for the lexer rules you use (i.e. STRING,
>>>>> ID, ML_COMMENT, SL_COMMENT, etc.).
>>>>> However Sebastian is working on semantic coloring (see
>>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276618).
>>>>>
>>>>> Cheers,
>>>>> Sven
>>>>
>>>
>>
>
|
|
|
Re: [Xtext] Using Eclipse Modeling tools download for Galileo RC2 [message #47695 is a reply to message #47665] |
Thu, 04 June 2009 01:31  |
Eclipse User |
|
|
|
Hi Derek,
the Antlr plugin is compiled against Xtext RC3. Please use the Xtext
update site to update the Xtext plugin, that ships with EPP RC2.
http://download.eclipse.org/modeling/tmf/updates/milestones/
Hope that helps,
Sebastian
Am 04.06.2009 0:10 Uhr, schrieb Derek Palma:
> Hi Sebastian,
>
> I tried this on eclipse-modeling-galileo-RC2-linux-gtk-x86_64.tar.gz.
> The is not yet an RC3 for this distribution for this (I least I can't
> find it). Using the URL you provided to add the antlr support to a fresh
> installation.
>
> I see no change in behavior.
>
> Derek
>
>
> "Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
> news:h06ft5$rss$1@build.eclipse.org...
>> Hi Derek,
>>
>> please use the update site
>> http://xtext.itemis.com/updates/milestones/site.xml
>>
>> (note: don't forget to add the suffix /site.xml).
>>
>> It should work with the RC3 of Xtext.
>>
>> Regards,
>> Sebastian
>>
>> Am 03.06.2009 17:43 Uhr, schrieb Derek Palma:
>>> Thanks Sebastian!
>>>
>>> As expected the download from oaw.itemis.com works correctly. I tried to
>>> determine which antlr plug-in is not correct in the Eclipse Tools RC2
>>> download. However, all the plug-ins with "antlr" in their filename seem
>>> identical with the Itemis download. Would you happen to know which
>>> plug-in generates the InternalMyDslParser.java related to the unresolved
>>> reference I mentioned below? I am searching for a procedure to update
>>> the Eclipse Tools RC2 download to work correctly for Xtext since I need
>>> access to other tools beyond Xtext as well as we need to run on Linux
>>> 64bit.
>>>
>>> Thanks
>>> Derek
>>>
>>> "Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
>>> news:h05136$djd$1@build.eclipse.org...
>>>> Hi Derek,
>>>>
>>>> please ensure that you the version of the installed antlr-integration
>>>> and Xtext are in sync. The easiest way to get a valid installation is
>>>> to download it from oaw.itemis.com
>>>> ( http://oaw.itemis.com/openarchitectureware/language=en/660/d ownloads).
>>>>
>>>> You are right with the highlighting issue. The default implementation
>>>> relies on the generated lexer which is obviously not present if you
>>>> don't have antlr installed.
>>>>
>>>> Sorry for inconvenience,
>>>> Sebastian
>>>>
>>>> Please
>>>> Am 02.06.2009 21:05 Uhr, schrieb Derek Palma:
>>>>> Hi Sven,
>>>>>
>>>>> The text highlighting issue occurs with the example DSL project
>>>>> (MyDsl)
>>>>> as well. It does not seem to be grammar specific. I am using RC2 as it
>>>>> is packaged in the Eclipse Modeling Tools (311MB) as it is available
>>>>> from the main download pages for Eclipse.
>>>>>
>>>>> I noticed that the Eclipse Modeling Tools does not have antlr. So all
>>>>> the generated code so far has used the default parser (packrat). Can
>>>>> this be related to the text highlighting issue?
>>>>>
>>>>> To move forward, I have intalled the antlr plug-in via the update site
>>>>> at the bottom of the Xtext download page. When I generate the example
>>>>> DSL (MyDsl) I now get some syntax errors:
>>>>>
>>>>> plug-in: org.xtext.example.mydsl, file
>>>>> src-gen/org/xtext/example/parser/antlr/internal/InternalMyDs lParser.java,
>>>>>
>>>>> line:
>>>>> 52,
>>>>> registerRules(grammarAccess.getGrammar());
>>>>> shows registerRules not defined
>>>>>
>>>>> This seems to happen in all grammers I generate with Antlr as the
>>>>> parser, not just the example MyDsl project.
>>>>>
>>>>>
>>>>> Derek
>>>>>
>>>>> "Sven Efftinge" <sven.efftinge@itemis.de> wrote in message
>>>>> news:h03rc8$qq2$1@build.eclipse.org...
>>>>>> Derek Palma schrieb:
>>>>>>> I commented out the content of the .ext file. I could not figure out
>>>>>>> how to comment out the entire .xpt file. At least the editor did not
>>>>>>> indicate that I it understsood the comments (I tried /* */ and // on
>>>>>>> every line) so I deleted it.
>>>>>>>
>>>>>>
>>>>>> In Xpand comments are written using the REM / ENDREM keywords.
>>>>>> Example:
>>>>>>
>>>>>> <<REM>>
>>>>>> ..
>>>>>> <<DEFINE>>
>>>>>> ..
>>>>>> <<ENDEFINE>>
>>>>>>
>>>>>> ...
>>>>>>
>>>>>> <<ENDREM>>
>>>>>>
>>>>>>
>>>>>>> At this point there were no more syntax errors. So I ran the mydsl
>>>>>>> plugin to verify everything is OK. I noticed that the syntax
>>>>>>> highlighting only has an entry for "default" so there is effectively
>>>>>>> only black text. Maybe it is no longer generated?
>>>>>>
>>>>>> No, this has nothing to do with the generator project.
>>>>>> Please provide your grammar and tell us which version you are using.
>>>>>>
>>>>>>> Regardless, I would like to learn how to control these entries so I
>>>>>>> can have good defaults for my own DSLs.
>>>>>>
>>>>>> Currently syntax coloring is based on lexing information only.
>>>>>> That is
>>>>>> you can define the coloring for the lexer rules you use (i.e. STRING,
>>>>>> ID, ML_COMMENT, SL_COMMENT, etc.).
>>>>>> However Sebastian is working on semantic coloring (see
>>>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=276618).
>>>>>>
>>>>>> Cheers,
>>>>>> Sven
>>>>>
>>>>
>>>
>>
>
|
|
|
Goto Forum:
Current Time: Mon Jul 07 19:01:20 EDT 2025
Powered by FUDForum. Page generated in 0.07120 seconds
|