Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Weird marker error in Domain-Model example
Weird marker error in Domain-Model example [message #1305804] Sun, 20 April 2014 16:54 Go to next message
Stephan Niebling is currently offline Stephan NieblingFriend
Messages: 2
Registered: April 2014
Junior Member
Dear all,

I started experimenting with XText over Easter but I found a mysterious bug in the Domain-Model example:

Steps to reproduce:


  1. Download the Eclipse version from the www.xtext.org/downloads Windows 64-Bit and install it (I'm using Windows 7 with jdk 1.7)
  2. Create the demo project via New->Xtext->Examples->Xtext Domain-Model Example
  3. Generate the classes by launching the GenerateDomainmodelLanguage.mwe2
  4. Start the Runtime Workspace (had to apply -Xmx1024m -XX:MaxPermSize=256m as vm arguments)
  5. Create a Java Project
  6. Create a file 'sample.dmodel' in the src folder


At this point xtext asks to apply the nature which was a good sign.

The language is also recognized. When I enter the following lines

package org.test {
	entity Test {
		one: String
		two: Integer
		op runHere() {
			val test = 4;
			if (test < 5) {
			  // expression of if-clause is marked as error
			}
		}
		
	}
}


an error marker is applied to '<' saying

'<'(int) is undefined


The code completion and everything else works, just the if statements seems to be buggy.

What am I doing wrong?

Have a nice easter weekend,

Stephan
Re: Weird marker error in Domain-Model example [message #1306959 is a reply to message #1305804] Mon, 21 April 2014 08:43 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

did you add xbase lib to the classpath of the project with the dmodel file?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Weird marker error in Domain-Model example [message #1307063 is a reply to message #1306959] Mon, 21 April 2014 10:07 Go to previous messageGo to next message
Stephan Niebling is currently offline Stephan NieblingFriend
Messages: 2
Registered: April 2014
Junior Member
Yes, that solved the problem. Thanks Smile

But I couldn't find anything on the documentation (neither in the tutorials or in the forum). Only the bug ticket Wink

https://bugs.eclipse.org/bugs/show_bug.cgi?id=372025
Re: Weird marker error in Domain-Model example [message #1307155 is a reply to message #1307063] Mon, 21 April 2014 11:24 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
it is meantioned there: http://www.eclipse.org/Xtext/documentation.html#_9

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Xtext definition and instance in same grammar
Next Topic:Disabling auto-insertion of quotes
Goto Forum:
  


Current Time: Sat Apr 20 01:02:58 GMT 2024

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

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

Back to the top