| Summary: | Unconditional Auto-refresh for Diagrams | ||
|---|---|---|---|
| Product: | [Modeling] Graphiti | Reporter: | Michael Wenz <michael.wenz> |
| Component: | Core | Assignee: | Michael Wenz <michael.wenz> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | Flags: | michael.wenz:
juno+
|
| Version: | 0.8.0 | ||
| Target Milestone: | 0.9.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | Juno M3 Theme_round_offs | ||
|
Description
Michael Wenz
Requested by PI Tools and community Targeted for Juno There are 3 situations in which an update can happen (and can be controlled in Graphiti's Diagram type provider isAutoUpdateAt... methods): 1) On opening an editor: controlled by isAutoUpdateAtStartup, default false: when set to true the editor will perform an update of the complete diagram while opening. The standard implementation in DefaultUpdateDiagramFeature gets all direct shape children of the diagram and checks if there is an update feature for them and executes it if returns true on canUpdate and updateNeeded. 2) On external resource changes: some other editor changes one of the resources the diagram editor holds. Controller by isAutoUpdateAtReset, default true. If true the workspace synchronizer will trigger an update of the diagram via the update feature of the diagram (same as in 1)). 3) On EMF object changes from within the same resource set or editing domain. Controlled by isAutoUpdateAtRuntime, default true. An adapter registered by Graphiti will update the affected pictogram elements by calling their update feature if it indicates true with canUpdate and updateNeeded. But this update will only happen when the editor is already dirty, in case of a saved editor the update will not happen! Conclusion: for 1) and 2) we already have an unconditional update available (or the user can establish it), it is missing for 3) in case of a saved editor. I added a switch to let tool builders enable the undconditional auto update also in the case of a saved editor. For this I introduced a new method in IDiagramTypeProvider with the name isAutoUpdateAtRuntimeWhenEditorIsSaved(); the default implementation in AbstractDiagramTypeProvider returns false which resembles the previous behaviour. Checked-in to head: commit ce10134b5ddf050b52bfb806259b6dd197781894 Author: mwenz <michael.wenz@sap.com> 2011-10-27 11:15:51 Committer: mwenz <michael.wenz@sap.com> 2011-10-27 11:15:51 Parent: 970c0ede69424bbb95cfe244aca8b7d111667c4d (Updated to new Orbit repository) Branches: origin/master, master Bookkeeping: Set target release Part of Graphiti 0.9.0 (Eclipse Juno) |