For (Your) Eyes Only
Christian W. Damus
The M6 milestone of the Luna release of Eclipse Papyrus will provide some improvements in the handling of read-only model resources in the diagram editor, the Properties view, and the Model Explorer.
There are two main themes in the enhancement of read-only resources:
- better protection against unwanted/inappropriate changes to read-only resources
- treating all dependencies of the model open in the editor as read-only for usability reasons, even if they are managed in the Eclipse workspace
On the former subject, more of the editing tools (palette tools in the diagram editor, context menu actions in the explorer, property sheet widgets) are sensitive to read-only objects and disable editing functions on them. But, there are two classes of read-only object: those that can be made writable (in the workspace, by changing file permissions or checking out from source control) and those that cannot (e.g., library models deployed in Eclipse plug-ins). Editing actions are enabled on objects in resources that can be made writable subject to a user prompt to make them writable. If denied by the user, these operations do not proceed.
The other prong of this enhancement is considering models imported or otherwise referenced by the model opened in the editor as "libraries" and, therefore, read-only by default. This helps users to avoid editing operations that would change these resources which, because they also are in the workspace, could potentially be opened in their own editors, resulting in confusing conflicting edits in multiple editors.
See a brief demonstration of all these changes in the video below:
For the grisly details of the internal implementation, see the discussion in bug 323802. Download and install the latest nightly build to try it out for yourself!