Hi all,
Some Precisions for the non generated diagrams (SysML diagram,
Package Diagram,…):
Concerning
the diagrams which are not generated, but which inherit from other diagrams :
-
You need to modify the preferences pages for elements with
compartments (look the generated diagrams for the example)
-
You need to call YourElementPreferencePage.initDefault(store) in
your DiagramPreferenceInitializer.initializeDefaultPreferences()
If you don't do that, by default, the visibility of the compartment
will be set to false -> you won't create something inside your element.
I did it for SysML
Diagram and Package Diagram.
Regards,
--
Vincent Lorenzo
De :
mdt-papyrus.dev-bounces@xxxxxxxxxxx
[mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De
la part de LORENZO Vincent
Envoyé : jeudi 16 septembre
2010 14:32
À : Papyrus Project list; GERARD Sebastien 166342
Objet : [mdt-papyrus.dev]
Papyrus Preference
Hi all,
I modified the template and the
generator (minor changes) to allow to choice the visibility of the compartments
in the Papyrus Preferences (bug 325419).
You need to update org.eclipse.papyrus.def and
org.eclipse.papyrus.codegen and regenerate your diagram to provide this
preference.
With this new preference, all Nodes which have
compartments must have the following Custom Behaviour:
key :
org.eclipse.papyrus.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY
class :
org.eclipse.papyrus.diagram.common.editpolicies.ShowHideCompartmentEditPolicy
The concerned nodes must provide this behaviour,
because if a compartment is hided in the preferences, its will be not possible
to show it later.
Regeneration is done for Class, Profile, and
Communication; I posted a specific bug for other diagrams.
Regards,
--
Vincent Lorenzo