Skip to main content
diff options
authorChristian W. Damus2015-02-24 17:45:21 +0000
committerChristian W. Damus2015-03-25 12:43:24 +0000
commit076626232757a6cc017b64d4d9d9d3cbe31906a1 (patch)
tree4d6410896a66ad939b0fd3ab90705d1ec5a7772c /plugins/infra/gmfdiag/css/
parent424a1bc00a5f57be8b3ea59165333fa0db45ba71 (diff)
Bug 433206: Papyrus shall enable local synchronization between graphical element and element in the model (1) Refactor the 'uml.diagram.synchronizeview' plug-in: * remove the UML dependency (supplied by a UML-specific default children strategy) * move into infra.gmfdiag component * rename for GMF-standard 'canonical' terminology * API types, extension points, etc. renamed for 'canonical' terminology * fix parsing of priorities and other problems in the extension-point loading * support listening to multiple dependent model elements for canonical refresh * add a notion of default semantic children strategies for edit-parts that don't have specific requirements but can rely on a generic implementation (2) Implement a canonical request wrapper to pass through the drop request to default drop edit policy provided by the diagram, by-passing the pluggable strategies to which the CustomizableDopEditPolicy delegates. (3) Implement a toggle action in the various diagram filter menus to toggle canonical synchronization. (4) Enable the canonical edit policy provider. This requires additional changes: * only activate the canonical edit policy when the style is applied and is enabled because otherwise GMF assumes that canonical mode is on and treats connections as canonical (GMF run-time only checks that the edit policy is installed and is active) * listen for changes to the canonical style to disable/enable the canonical edit policy on the fly (5) Fix undo/redo of canonical view creation and of canonical enablement. (6) Properties view support for model/view synchronization (canonical edit policy). (7) Adapt SysML test utility to account for possible inclusion of ToggleCanonicalModeCommand by GMF in drop commands. (8) Implement deferred loading of synch child strategies and XML enablement expressions. (9) Fix problems in handling of connections incoming and outgoing canonical top shapes. (10) Support for a CSS 'canonical' style attribute. (11) Initial simple canonical synchronization scenarios for JUnit test cases. (12) Integrate canonical edit policy tests into the build. (13) Test cases for toggling canonical on/off, with undo/redo. Test cases for adding elements to the semantic model, with undo/redo. Test cases for deleting elements from the semantic model (including by simple remove, which unlike destroy does not also deletes dependent views anyways), with undo/redo. (14) Add regression tests for creation/deletion of elements and views together per the usual diagram editing scenarios, in the context of canonical diagrams. (15) Fix problems in canonical creation (with undo and redo) of connection views for non-owned relationship elements. (16) Add tests for CSS control of canonical synchronization. Fix inability to override CSS canonical style to turn synchronization off on selected views. Bug 461629: [CSS] Diagram refresh undo/redo problems Implement new DiagramHelper refresh APIs to fix a few problems: - encapsulate synchronous (forced) and asynchronous refresh in new API methods. Deprecate the old methods that required clients to follow several steps. Update various client call sites to use the new API instead of the deprecated API - add corresponding APIs for refresh of individual DiagramEditParts, with similar heuristic for dropping redundant refresh requests - re-implement asynchronous refresh to use a new TransactionalEditingDomain executor that runs tasks as pre-commit trigger commands, to capture any undo/redo information for model changes - implement a new transaction option in the Papyrus editing domain that prevents runExclusive calls creating read-only transactions nested within a write transaction, so that canonical changes ensuing from edit-part refresh during refresh tasks can be properly recorded (without unprotected writes nested in the read-only context) Bug 433206: Papyrus shall enable local synchronization between graphical element and element in the model (17) Enable test cases unblocked by the fix for undo/redo problems in diagram refresh (being bug 461629). (18) Do not record the edit-part but the view in the SetCanonicalCommand to support undo/redo even if the diagram has been closed and re-opened in the mean-time. To refresh the CanonicalEditPolicy's activation state after execute/undo/redo, the command now searches on the fly for all edit-parts (in all open diagram editors) that present the view in question. (19) Implement a new 'semi-active' state in the PapyrusCanonicalEditPolicy that is its minimally active state. This allows the edit policy to react to semantic model changes to delete views for deleted model elements, where such views are ones that it had originally created by canonical refresh. This relies on new tracking of canonically- created views, which in turn relies on a new utility for digging through complex command tree structures to get the views that were created by them. Includes automated tests for non-transactional refresh creating canonical views, with undo and redo in the semantic model undoing and redoing creationg of the elements that had been canonically created, after the canonical edit policy was (non-transactionally) disabled. (20) Don't forget about views that were created canonically if the diagram happens to be closed and then re-opened. (21) Rework the CanonicalStateListener to support injection of refresh 'pokes' to trigger updates in other dependents, such as the Properties view, when change in canonical activation is detected for any reason. (22) New JUnit tests for: - undo of semantic model change that created a canonical view after canonical edit policy disabled by CSS and close/reopen of the diagram - canonical edit policy's book-keeping does not leak diagram views nor model elements (23) CanonicalStateListener should be auto-retained because it automatically installs itself, and it won't be uninstalled except when successfully released. (24) Fix layout (margins etc.) of Synchronization properties group. (25) Fix concurrent modification in iteration over diagram edit part tree. Rationalize state-transition logic in canonical edit policy. (26) Fix some problems in canonical composite structures (incomplete): - manage connections canonically on border items as well as top shapes - do not include connectors as semantic children of structured classifiers but only as connections/edges of their connected elements - do not create parts of Association type when dropping an Association onto a structured classifier - include notation context in children-strategy query to account for structures such as part-with-port in connectors to disambiguate repeated semantic elements - add canonical composite structure tests (one still failing) (27) Refactor the canonical children strategies extension point ID to make it more meaningful and less redundant. Shave some execution time off the execution of the canonical edit policy tests in the automated build environment where we don't need to see what is happening in the diagrams. This involves a refactoring of earlier infrastructure that detects the build server or local Maven/Tycho build environment. (28) Fix failure to create canonical connection views because source/target nodes that were created canonically don't yet have their edit-parts. The canonical creation of connections is now deferred using the transaction pre-commit executor, exposed as a new DiagramHelper::submit(...) API. Several JUnit tests need updating, both to correct erroneous assumptions on latent bugs now fixed, and also to add UI event-processing in undo/redo scenarios to account for deferred connection creation. Use a DeferredLayoutCommand to improve the layout of the contents added to shape compartments by canonical 'drop', which otherwise would all be stacked on top of one another. Add a new pluggable strategy for determination of the edit-part that should handle creation of views, for cases such as flows in activities where connections must be dropped into contents compartments, not onto either the source or target node shape. (29) Fix canonical presentation of activity flows on pins. Implement basics of canonical synchronization of state machine diagrams. (30) Communication diagram synchronization of messages between lifelines. Requires a new extension interface for pluggable view-children strategies, to complement the semantic-children strategies, because the views that need to be synchronized are labels of connected edges, not the edges themselves. The semantic-children strategy interface is refactored to align with the new visual-children strategy interface, and likewise the determination of existing semantic and visual children in the PapyrusCanonicalEditPolicy. This also removes redundant re-calculation on semantic node children in the second-phase processing of connections. (31) Fix exceptions in synchronization and layout of communication diagrams. Fix regression in canonical deletion of edges. (32) Fix spurious deactivation of canonical edit policy in edit-parts that had had canonical mode (refresh enablement) toggled during execution of some user command. Change-Id: I9c39f74638cb55455e2d8bc42b07e49501ec3ea7
Diffstat (limited to 'plugins/infra/gmfdiag/css/')
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/infra/gmfdiag/css/ b/plugins/infra/gmfdiag/css/
index dbff70390b3..2e1beec4696 100644
--- a/plugins/infra/gmfdiag/css/
+++ b/plugins/infra/gmfdiag/css/
@@ -1,5 +1,5 @@
- * Copyright (c) 2014 CEA LIST.
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) - Initial API and implementation
* Gabriel Pascual (ALL4TEC) - Initial API and implementation
+ * Christian W. Damus - bug 461629
@@ -1073,8 +1074,7 @@ public class ThemePreferencesPage extends FieldEditorPreferencePage implements I
boolean result = super.performOk();
if (needsRefresh) {
- DiagramHelper.setNeedsRefresh();
- DiagramHelper.refreshDiagrams();
+ DiagramHelper.forceRefresh();

Back to the top