Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » xtext check annotation issue(xtext check annotation issue)
xtext check annotation issue [message #1000278] Mon, 14 January 2013 12:30 Go to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
Hi,

I'm using the @Check annotation in order to validate my dsl. my dsl is for json.

at first the method was invoked for a specific object and once per change
but it suddenly doesn't work in the same way anymore (and i'm not sure what i've done that effected it)
the method signature is:

@Check
public void validateJson(ObjectValue object) {...}

now its entering this method for each node in the gui although i'm editing only one node
Re: xtext check annotation issue [message #1000665 is a reply to message #1000278] Tue, 15 January 2013 07:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6499
Registered: July 2009
Senior Member
Hi,

what Xtext (partially) Parses/Constructs while Editing depends on the Grammar. Did you change the Grammar?

~Christian
Re: xtext check annotation issue [message #1000676 is a reply to message #1000665] Tue, 15 January 2013 08:28 Go to previous messageGo to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
no :\
Re: xtext check annotation issue [message #1000759 is a reply to message #1000676] Tue, 15 January 2013 11:43 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6499
Registered: July 2009
Senior Member
Btw why is this a problem?
Re: xtext check annotation issue [message #1000761 is a reply to message #1000759] Tue, 15 January 2013 11:48 Go to previous messageGo to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
cause when i'm changing one object it runs the validation on all of them, but they other were already validated.
it's a waste of time for something that already calculated and some of my files that need to be check are very big and each change takes too much time
Re: xtext check annotation issue [message #1000763 is a reply to message #1000761] Tue, 15 January 2013 11:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6499
Registered: July 2009
Senior Member
You may try a @Check(CheckType.NORMAL)
Re: xtext check annotation issue [message #1000777 is a reply to message #1000763] Tue, 15 January 2013 12:23 Go to previous messageGo to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
thank you, but it still validating each object in any change.
Re: xtext check annotation issue [message #1000784 is a reply to message #1000777] Tue, 15 January 2013 12:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6499
Registered: July 2009
Senior Member
but it will only validate when saving
Re: xtext check annotation issue [message #1000837 is a reply to message #1000784] Tue, 15 January 2013 14:02 Go to previous messageGo to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
i noticed, but it still validate each object in the file
Re: xtext check annotation issue [message #1000867 is a reply to message #1000837] Tue, 15 January 2013 15:10 Go to previous messageGo to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
do you know what can cause this kind of change?
cause it used to work fine, validate only the object which was changed in the gui.
Re: xtext check annotation issue [message #1000869 is a reply to message #1000867] Tue, 15 January 2013 15:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6499
Registered: July 2009
Senior Member
no,

i guess you have to look what you have changed - e.g. by starting a new grammar and copy&paste add your changes
Re: xtext check annotation issue [message #1000871 is a reply to message #1000869] Tue, 15 January 2013 15:19 Go to previous message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
ok thank you and thank you for the patience! Smile
Previous Topic:What is best way to get reference of JvmAnnotationType in inference?
Next Topic:IJvmModelInferrer invoked for invalid model
Goto Forum:
  


Current Time: Fri Nov 28 17:10:58 GMT 2014

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

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