Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to hold the attribute value even after xtext resource load.
How to hold the attribute value even after xtext resource load. [message #1824419] Wed, 15 April 2020 06:49
Nagashree KN is currently offline Nagashree KNFriend
Messages: 32
Registered: September 2018

I have one grammar rule like this,

'element' name=ID
UUID returns ecore::EInt:
I have manually maintained metamodel. I am using uuid for my use, so i does not want to show it to the user in the xtext editor. For that what i have done is before opening the editor i am setting the uuid value and i am setting default value with the same uuid value. because of this uuid will not be shown in xtext editor. The problem what i am facing is, by taking the string from document i am loading the xtext resource like this -
InputStream inputStream = new ByteArrayInputStream(embeddedEditor.getDocument().get().getBytes());
xtextResource.load(inputStream , Collections.EMPTY_MAP);

after loading the resource the uuid value is being removed, because the inputstream will not have the uuid value this is what i have observed.

Please can any one suggest how i can hold the value which has been set even after the resource loading.
Previous Topic:Suppressing the "Do you want to Add Xtext Nature" popup
Next Topic:Matching end string for each begin
Goto Forum:

Current Time: Tue Jan 19 06:40:53 GMT 2021

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

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

Back to the top