Diagram Customization Retention During Code Synchronization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Software development tools often lose user customization when temporarily removing and replacing code portions, as they automatically synchronize diagrams with underlying code, resulting in lost customization efforts.
Innovation Solution
A method that monitors user edit operations to store representations of diagram elements, allowing them to be recreated with preserved customization when code portions are replaced, using a data structure to retain visual and non-visual characteristics such as position, visibility, and associations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If automatic synchronization between diagram and code is implemented, then diagram accuracy is improved, but user customization is lost when code is temporarily removed and replaced
Solution Approach 1:
The system performs preliminary actions by storing representations of diagram elements and their customizations in a data structure before the code portion is permanently removed. This allows the diagram element to be restored with its customization intact when the code is replaced, preventing loss of user effort while maintaining synchronization accuracy.
2Stability of the object's composition
If diagram elements are automatically removed when code portions are removed, then synchronization is maintained, but user effort and customization are wasted
Solution Approach 1:
The system creates a copy or representation of the diagram element's customization data and stores it in a data structure when the code portion is temporarily removed. This copy allows the original customization to be restored when the code is replaced, maintaining synchronization while preserving user effort without requiring complete removal of the diagram element.
3Loss of information
If diagram elements retain customization after code replacement, then user effort is preserved, but diagram-code synchronization complexity increases
Solution Approach 1:
The system segments the diagram element into two independent parts: the code-bound representation and the user customization data. The customization data is stored separately in a data structure and only reassociated with the diagram element when the code portion is replaced. This segmentation allows customization preservation without complicating the core synchronization mechanism.
Data Source
AI summary
In one embodiment, a method is provided for use in a system in which a user may edit an artifact and a diagram representing the artifact. The method includes acts of temporarily removing, in response to a request by the user, an artifact portion which corresponds to a diagram element on a diagram (e.g., a class diagram); removing the diagram element from the diagram; replacing, in response to a request by the user, the artifact portion in the artifact; and replacing the diagram element in the diagram, wherein the diagram element retains at least a portion of customization performed by the user previous to its removal from the diagram. In one embodiment, the method includes creating a representation of the diagram element which provides an indication of the customization performed by the user, storing the representation in a data structure when the artifact portion is temporarily removed, and retrieving the representation from the data structure to recreate the diagram element when the artifact portion is replaced.


