Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 295723 - [General] Improve management of element's customization
Summary: [General] Improve management of element's customization
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Patrick Tessier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 288266
  Show dependency tree
 
Reported: 2009-11-20 10:04 EST by Emilien Perico CLA
Modified: 2009-12-01 05:54 EST (History)
1 user (show)

See Also:


Attachments
mylyn/context/zip (33.32 KB, application/octet-stream)
2009-11-25 11:48 EST, Patrick Tessier CLA
no flags Details
mylyn/context/zip (14.42 KB, application/octet-stream)
2009-12-01 05:53 EST, Patrick Tessier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emilien Perico CLA 2009-11-20 10:04:49 EST
For now if you want to handle element customization, you must inherit from high level classes that manage all the customization features:
NodeNamedElementFigure manages LabelIcon, Stereotypes, QualifiedName, Gradient, etc. This implementation is not flexible enough for all the diagram's figures. It will be too restrictive when complex figures will be implemented.

We must improve this management. A better solution is to use policies like it's already done for stereotypes on edges.
Policies will enable to set up customization we just want to add.

You can add your proposals if you think there is a better solution.
Comment 1 Patrick Tessier CLA 2009-11-23 04:45:34 EST
I will work to add only editpolicies.
	- editPolicy to display stereotype in a label inside of a  node (example inside a class)
	- editPolicy to display stereotype in label attached to a link (already exist, done by Remi)
	- editPolicy to display stereotype in label attached to a border node (example label for a port)  
	
Then I will look for the same mechanism for qualified name.
Comment 2 Patrick Tessier CLA 2009-11-25 11:48:35 EST
Created attachment 153087 [details]
mylyn/context/zip

impacted classes
Comment 3 Patrick Tessier CLA 2009-11-25 11:53:07 EST
I have added edit policy to manage stereotype in a label inside of a node and rename editPolicy to display stereotype in label attached to a link.

Diagrams has not been regenerated. It will be done later when I will add editPolicy to display stereotype in label attached to a border node

So edit policy in usecase and class diagram have been changed in their extends definition
Comment 4 Yann Tanguy CLA 2009-11-26 05:25:40 EST
(In reply to comment #3)
> I have added edit policy to manage stereotype in a label inside of a node and
> rename editPolicy to display stereotype in label attached to a link.
> 
> Diagrams has not been regenerated. It will be done later when I will add
> editPolicy to display stereotype in label attached to a border node
> 
> So edit policy in usecase and class diagram have been changed in their extends
> definition

Patrick I noticed you made changes requiring an update of the gmfgen model (in composite).
For any coming changes you need on the composite gmfgen model, I would prefer that you discuss the point with me first in order to decide whether you or I do the changes.
The reason is that I have some enhancement in progress on the same model, and due to the difficulty to merge this file I'd prefer avoiding concurrent commit on this for the moment.
Comment 5 Patrick Tessier CLA 2009-11-26 10:58:56 EST
Two edit policies have been added:
AppliedStereotypeExternalNodeEditPolicy: display applied stereotype and properties of applied stereotype
on an external node: example label around a node.
AppliedStereotypeIconlDisplayEditPolicy: display only icon of applied stereotypes on a node. 

There is no impact in diagram because this edit policy are not used. 
Nevertheless AppliedStereotypeExternalNodeEditPolicy will be used to display applied stereotyped for Actor in use case diagram or port in composite diagram.
Comment 6 Patrick Tessier CLA 2009-11-27 11:18:58 EST
I have created a editpolicy that has in charge  to display the qualified name : QualifiedNameDisplayEditPolicy.

So in order to have this behavior. it has to be added in the gen model.

I will add set of tool ( click right in node, in order to add automatically previous editpolicy).
Comment 7 Patrick Tessier CLA 2009-12-01 05:53:35 EST
Created attachment 153441 [details]
mylyn/context/zip

impacted classes
Comment 8 Patrick Tessier CLA 2009-12-01 05:54:26 EST
I have added sub menu to create directly nodes or edit policy in order to obtain good behavior.
I have also regenerated class diagram with all these policies.