Waiting for Resource Descriptions to be updated after modification [message #1153656] |
Thu, 24 October 2013 19:19 |
Philip Alldredge Messages: 20 Registered: February 2013 |
Junior Member |
|
|
I have a scenario where I need to modify a model managed by xtext. When the model is open in the xtexteditor, I retrieve the IXtextDocument from the editor and call modify() to make my semantic changes. This works wonderfully.
If the model is not open, I retrieve the model from the emf index using ResourceDescriptionsProvider, make changes, and then save the changes to the resource. Normally, this works well. However, after I save the resource, there is a delay before the EMF index is updated. If another part of my code tries to access the index, they receive an older version. The issue can be hacked around by injecting a sleep in my code. I presume the index is being updated in the background. Is there any way to block until that is done?
Thank You,
|
|
|
Powered by
FUDForum. Page generated in 0.01642 seconds