How to hold the attribute value even after xtext resource load. [message #1824419] |
Wed, 15 April 2020 06:49 |
Nagashree KN Messages: 32 Registered: September 2018 |
Member |
|
|
Hi,
I have one grammar rule like this,
Element:
'element' name=ID
(uuid=UUID)?
;
UUID returns ecore::EInt:
INT
;
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.
thanks!!!
|
|
|
Powered by
FUDForum. Page generated in 0.02569 seconds