## Modifying the workspace

In the course of performing its function, your plug-in may need to make changes to resources in the workspace. The workspace is an important data model for many plug-ins in the system, many of which rely on keeping up with the current state of the workspace. Plug-ins may even be concurrently updating the workspace. It's important for your plug-in to act as a responsible workspace citizen when making changes to resources. What makes a plug-in a good workspace citizen?

- Batching of changes where possible to avoid flooding the system with unnecessary events or triggering unnecessary processing on an interim state.
- Listening to resource change events and updating models as the workspace changes.
- Fine-grained locking of the workspace when making modifications instead of locking the entire workspace.

The next few sections look at these concepts in more detail.