Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Xtext 2.1] Problems extending Xbase
[Xtext 2.1] Problems extending Xbase [message #755505] Tue, 08 November 2011 16:39 Go to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 42
Registered: July 2009
Member
Hi,

Trying to migrate my DSLs from 2.0.1 to 2.1.0, I came across new
validation error, which do not make any sense to me.

Here is an example DSL, which only overrides one Xbase rule with the
exact same content as in Xbase.xtext:

------------------------------------------------------------------------
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.xbase.Xbase

import "http://www.eclipse.org/xtext/xbase/Xbase"
import "http://www.eclipse.org/xtext/common/JavaVMTypes" as types
import "http://www.eclipse.org/emf/2002/Ecore" as ecore

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

Model:
{Model};

XCastedExpression returns XExpression:
XMemberFeatureCall (=>({XCastedExpression.target=current} 'as')
type=JvmTypeReference)*;
------------------------------------------------------------------------

This results in the validation error:
Cannot find compatible feature type in sealed EClass XCastedExpression
from imported package http://www.eclipse.org/xtext/xbase/Xbase:
The existing reference 'type' has an incompatible type 'null'.
The expected type is 'JvmTypeReference'.

Do I do anything wrong or is this a recently introduced bug?

I'd appreciate any hints!

Cheers,
Kai
Re: [Xtext 2.1] Problems extending Xbase [message #755507 is a reply to message #755505] Tue, 08 November 2011 16:42 Go to previous messageGo to next message
Goran   is currently offline Goran Friend
Messages: 45
Registered: November 2011
Member
I can confirm this problem.
See http://www.eclipse.org/forums/index.php/t/261672/
Re: [Xtext 2.1] Problems extending Xbase [message #755513 is a reply to message #755507] Tue, 08 November 2011 16:46 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 42
Registered: July 2009
Member
Thanks for the link, I have put myself on cc on this bug.
Have you figured out any workaround? Waiting for 2.1.1 does not sound
like an option to me :-S


Am 11/8/2011 5:42 PM, schrieb Goran:
> I can confirm this problem.
> See http://www.eclipse.org/forums/index.php/t/261672/
Re: [Xtext 2.1] Problems extending Xbase [message #755516 is a reply to message #755513] Tue, 08 November 2011 16:58 Go to previous messageGo to next message
Goran   is currently offline Goran Friend
Messages: 45
Registered: November 2011
Member
Hi,

Unfortunately I don't have not found a workaround.
This is indeed a very nasty bug.
When is the release date for 2.1.1?

[Updated on: Tue, 08 November 2011 16:58]

Report message to a moderator

Re: [Xtext 2.1] Problems extending Xbase [message #755518 is a reply to message #755516] Tue, 08 November 2011 17:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Isnt this a UI Only Problem. At least the Workflow runs through. ~Christian

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xtext 2.1] Problems extending Xbase [message #755521 is a reply to message #755518] Tue, 08 November 2011 17:05 Go to previous messageGo to next message
Goran   is currently offline Goran Friend
Messages: 45
Registered: November 2011
Member
Yes indeed it's a UI only problem. However it's not nice to see a lot of unnecessary errors in the editor when working on a big grammar. Wink
Re: [Xtext 2.1] Problems extending Xbase [message #755526 is a reply to message #755518] Tue, 08 November 2011 17:11 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 42
Registered: July 2009
Member
> Isnt this a UI Only Problem. At least the Workflow runs through. ~Christian

Right, my problems with the workflow (which worked on 2.0.1) seem to be
unrelated to the issue described here.
So the workaround is to "simply ignore" - that will do, thanks.
Re: [Xtext 2.1] Problems extending Xbase [message #755549 is a reply to message #755513] Tue, 08 November 2011 19:10 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Kai,

we'll release 2.1.1 at the end of this week. You may want to try the
latest nightly build and use the new quickfixes on the validation marker
that you'll get on the package import declaration.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

On 08.11.11 17:46, Kai Kreuzer wrote:
> Thanks for the link, I have put myself on cc on this bug.
> Have you figured out any workaround? Waiting for 2.1.1 does not sound
> like an option to me :-S
>
>
> Am 11/8/2011 5:42 PM, schrieb Goran:
>> I can confirm this problem.
>> See http://www.eclipse.org/forums/index.php/t/261672/
>
Re: [Xtext 2.1] Problems extending Xbase [message #755551 is a reply to message #755549] Tue, 08 November 2011 19:17 Go to previous messageGo to next message
Goran   is currently offline Goran Friend
Messages: 45
Registered: November 2011
Member
woow that's really great. Didn't expect it so fast Wink
Re: [Xtext 2.1] Problems extending Xbase [message #755822 is a reply to message #755551] Wed, 09 November 2011 17:03 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
On 08.11.11 20:17, Goran wrote:
> woow that's really great. Didn't expect it so fast ;)

Just to keep you posted: The fix was pushed into the repo.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: [Xtext 2.1] Problems extending Xbase [message #755939 is a reply to message #755822] Thu, 10 November 2011 09:25 Go to previous messageGo to next message
Goran   is currently offline Goran Friend
Messages: 45
Registered: November 2011
Member
Sebastian,

I tried the nightly build however I still got the same problem.
Could it be that I didn't do the update correctly?

From a fresh eclipse-SDK-3.7.1-Xtext-2.1.0-linux-gtk-x86_64 distribution I did:
- Install New Software
- Add
- Choose the downloaded nightly build archive tmf-xtext-Update-N201111081203.zip
- select the "TMF Xtext" and on Next it says that an update will be done
- Next, Finish, etc

Still the problem with the same grammar.

Thanks in advance

[Updated on: Thu, 10 November 2011 09:26]

Report message to a moderator

Re: [Xtext 2.1] Problems extending Xbase [message #755942 is a reply to message #755939] Thu, 10 November 2011 09:29 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 42
Registered: July 2009
Member
Hi Goran,

> - Choose the downloaded nightly build archive
> tmf-xtext-Update-N201111081203.zip

I guess this simply didn't yet have the fix - Sebastian's commit was
only done yesterday (i.e. on the 9th, while your nb was from the 8th):
http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=0416ee275fa7b8786e2624b4b489b7eca7a8d646

Regards,
Kai
Re: [Xtext 2.1] Problems extending Xbase [message #755943 is a reply to message #755942] Thu, 10 November 2011 09:31 Go to previous messageGo to next message
Goran   is currently offline Goran Friend
Messages: 45
Registered: November 2011
Member
ahhhh Of course!!!

Thanks
Re: [Xtext 2.1] Problems extending Xbase [message #755957 is a reply to message #755943] Thu, 10 November 2011 10:17 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
On 10.11.11 10:31, Goran wrote:
> ahhhh Of course!!!
>
> Thanks

You may want to use this update site:

https://hudson.eclipse.org/hudson/job/Xtext-nightly-Maintenance/lastSuccessfulBuild/artifact/xtext.p2.repository/

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: [Xtext 2.1] Problems extending Xbase [message #756005 is a reply to message #755957] Thu, 10 November 2011 13:04 Go to previous messageGo to next message
Goran   is currently offline Goran Friend
Messages: 45
Registered: November 2011
Member
Thanks Sebastian,

I updated and indeed the problem went away for the XVariableDeclaration rule.

However I still get the same error for the name feature when using the following rule in an extension of Xbase:

FullJvmFormalParameter returns jvmTypes::JvmFormalParameter:
	{FullJvmFormalParameter} final ?= 'final'? parameterType=JvmTypeReference name=ValidID;


~Goran

[Updated on: Thu, 10 November 2011 13:05]

Report message to a moderator

Re: [Xtext 2.1] Problems extending Xbase [message #756065 is a reply to message #756005] Thu, 10 November 2011 17:55 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Goran,

I can reproduce this one and will make a fix available soon.
Thanks for the example.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


On 10.11.11 14:04, Goran wrote:
> Thanks Sebastian,
>
> I updated and indeed the problem went away for the XVariableDeclaration
> rule.
>
> However I still get the same error for the name feature when using the
> following rule:
>
>
> FullJvmFormalParameter returns jvmTypes::JvmFormalParameter:
> {FullJvmFormalParameter} final ?= 'final'?
> parameterType=JvmTypeReference name=ValidID;
>
>
> ~Goran
Re: [Xtext 2.1] Problems extending Xbase [message #756096 is a reply to message #756065] Thu, 10 November 2011 20:44 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
On 10.11.11 18:55, Sebastian Zarnekow wrote:
> Hi Goran,
>
> I can reproduce this one and will make a fix available soon.
> Thanks for the example.
>
> Regards,
> Sebastian

The fix is available in next master and maintenance build.

Cheers,
Sebastian
Previous Topic:[xtext2.1] problem implementing custom formatter
Next Topic:Generating "void" methods using JvmTypesBuilder.toMethod.
Goto Forum:
  


Current Time: Fri Apr 19 22:01:15 GMT 2024

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

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

Back to the top