Bug 527267 - [Class Diagram] update diagram from model
Summary: [Class Diagram] update diagram from model
Status: UNCONFIRMED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 3.1.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-14 13:41 EST by Francesco Sibilla CLA
Modified: 2017-11-17 10:20 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Sibilla CLA 2017-11-14 13:41:21 EST
As a new feature, on demand update the existing diagram from the current model structure. Would it be nice the possibility to choose which category of elements to update, such as classes, properties, operations, relations, ... all. Apply to all model or a subset.

This is useful when reverse engineering either never generated code or generated but enriched code.

I agree with "Diagrams are only views on the model. They don't need to be complete. You choose what you want to display" as in https://bugs.eclipse.org/bugs/show_bug.cgi?id=419471.

But this doesn't mean that this has to be done only by hand.

Please consider the drawing of dozens of classes with hundreds of members.
Comment 1 Camille Letavernier CLA 2017-11-17 10:18:10 EST
Hi Francesco,

There is a property on diagrams and diagram elements, in the Apperance tab of the properties view, to "Sync with model". This is what you are looking for.

Since it's a graphical property, you can also apply it via a CSS Stylesheet, where you can define some rules to choose the elements that should be synchronized.

For example:

ClassDiagram {
    canonical: true;
}

Class {
    canonical: true;
}

Or, to synchronize everything, recursively (!):

* {
	canonical: true;
}