Community
Participate
Working Groups
While the readOnly() method is used very often, the modify() method should be used in framework internal classes only as it does not update the node model. (Users should rather use the IDocumentEditor in these cases). Also, we cannot provide read access only which would satisfy most usecases.
Created attachment 180436 [details] Patch movinf modify() methd Proposed patch, please review. Moved modify method to XtextDocument, as it is kind of internal API. Unfortunately, this requires some casts. We could also move it to IXtextDocument, exposing it a bit more but getting rid of the casts. Anybody still needs (I)EObjectHandle?
Sorry, wrong patch. Please ignore, I am reworking it anyway.
Pushed the following changes to master: - IStateAccess has been split up into IReadAccess and IWriteAccess - IStateAccess.AbstractImpl is now AbstractReadWriteAccss - Removed IEObjectHandle and EObjectHandle, as we don't use it anywhere. To avoid more intantiations of the same model in memory, clients should either use the XtextDocument's read/write access or refer to IEObjectDescriptions. - Former XtextDocument.modify() renamed to XtextDocument.internalModify() - XtextDoucment.modify() now invokes the code form the DefaultDocumentEditor. That way, the API of the document gets more symmetric to the user and the formerly hidden IDocumentEditor/DefaultDocumentEditor have become obsolete and have been removed. - Intordcued constructor injection for XtextDocument. I guess, the resulting API is far easier to understand.
Closing all bugs that were set to RESOLVED before Neon.0