Skip to content

Instantly share code, notes, and snippets.

@nbhusare
Last active June 1, 2017 18:31
Show Gist options
  • Save nbhusare/50ea7dfbfb9f632a209f66cc4a79537d to your computer and use it in GitHub Desktop.
Save nbhusare/50ea7dfbfb9f632a209f66cc4a79537d to your computer and use it in GitHub Desktop.
Disable notification delivery to the adapters
boolean deliver = resourceSet.eDeliver();
try {
// Disable notification delivery to the adapters
resourceSet.eSetDeliver(false);
// Make change to the resource set
resourceSet.getResources().clear();
} finally {
// Reset the deliver flag to its previous state
resourceSet.eSetDeliver(deliver);
}
// Reference - org.eclipse.xtext.builder.clustering.ClusteringBuilderState#clearResourceSet() API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment