Skip to main content



      Home
Home » Modeling » TMF (Xtext) » How to implement scoping and validation for an element at same time
How to implement scoping and validation for an element at same time [message #1795617] Wed, 26 September 2018 05:00 Go to next message
Eclipse UserFriend
Hi,
I have Implemented scoping for an element
contentRef<Dropdown list which match some condition >

element in drop down list has implementation with a value for USED as : USED True/False

drop down list will contain elements with USED as True

So in contentRef dropdown it is contain elements with USED as True

Now if in future , if user changes the USED from True to False it should throw error from validation but it is not throwing


Eg :
Correct Example:
abc {
contentRef measureVal
}

measureVal {
USED True

}
measureValue2{
USED False
}

Now user changes the value of USED in measureVal from True to False then contentRef should throw an error from validation but it is not throwing error from validation.Instead it is just throwing a general error as : "Couldn't resolve reference to EObject 'measureVal'."

Wrong example :

abc {
contentRef measureVal //it will throw error as "Couldn't resolve reference to EObject 'measureVal" but I want customized error message
}

measureVal {
USED False

}
measureValue2{
USED False
}



Re: How to implement scoping and validation for an element at same time [message #1795635 is a reply to message #1795617] Wed, 26 September 2018 06:25 Go to previous message
Eclipse UserFriend
To customize the message customize the binding for ILinkingDiagnosticMessageProvider
Previous Topic:JAVA HEAP SPACE (OUT OF MEMEORY)
Next Topic:Cloning/Copying Xtext Resource including node model
Goto Forum:
  


Current Time: Wed Nov 05 04:02:22 EST 2025

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

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

Back to the top