Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325448 - [Sequence Diagram] [Preferences] Regenerate Diagram to add the Compartments Preferences
Summary: [Sequence Diagram] [Preferences] Regenerate Diagram to add the Compartments P...
Status: CLOSED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Vincent Lorenzo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 325419
  Show dependency tree
 
Reported: 2010-09-16 08:17 EDT by Vincent Lorenzo CLA
Modified: 2011-04-20 03:09 EDT (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 Vincent Lorenzo CLA 2010-09-16 08:17:56 EDT
According with the bug 325419, the templates have been modified. Now we can define the visibility of the compartments in the Papyrus preferences.

With these new preferences, all Nodes which have compartments must have the following Custom Behavior : 
	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 behavior, because if a compartment is hided in the preferences, its will be not possible to show it later. 

Nodes with compartments in Sequence Diagram don't have this behavior (bug 320363)

You need to update the plugins org.eclipse.papyrus.codegen and org.eclipse.papyrus.def before regenerating your diagram.
Comment 1 Vincent Lorenzo CLA 2010-09-30 09:10:40 EDT
Done in r2840 : 
In gmfgen : 
	Add the custom Behavior ShowHideCompartment for : 
		- InteractionEditPart 
		- Combined Fragment EditPart
		- ConsiderIgnoreFragmentEditPart
	+ Regeneration

In UMLViewProvider (Generated NOT)
	Add these lines for the corresponding elements (because generated NOT)
		PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "CombinedFragment");
		PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ConsiderIgnoreFragment");

Preferences Pages : (Generated NOT)
	The child nodes CombinedFragmentEditPart and CombinedFragment2EditPArt reference the same UML Element : CombinedFragment > First have compartment and the second doesn't have compartment  --> The Preference Page is not correctly generated. We modify it.
	ConsiderIgnoreFramentPreferencePage
	CombinedFragmentPreferencePage
Comment 2 Vincent Lorenzo CLA 2011-04-20 03:09:14 EDT
This bug can be marked as closed.