Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312472 - [Diagrams] Inconsistency in default names of diagrams
Summary: [Diagrams] Inconsistency in default names of diagrams
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-11 13:33 EDT by Tatiana Fesenko CLA
Modified: 2013-06-25 10:46 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tatiana Fesenko CLA 2010-05-11 13:33:05 EDT
New diagrams are named inconsistently:
Activity diagram has 'model' as a default name
Class diagram - 'ClassDiagram'
Composite diagram - 'CompositeDiagram'
Sequence diagram - 'model' 
UseCase diagram - 'UseCaseDiagram'
Comment 1 Cedric Dumoulin CLA 2010-05-11 15:20:11 EDT
This is not a Sash Editor issue :-).
The name of a diagram is set in the diagram creation command. Each diagram has its own creation command, extending a common one.
Comment 2 Tatiana Fesenko CLA 2010-06-07 11:35:50 EDT
(In reply to comment #1)
> This is not a Sash Editor issue :-).
> The name of a diagram is set in the diagram creation command. Each diagram has
> its own creation command, extending a common one.

OK. If the user creates a SequenceDiagram, and then creates an Activity diagram the default name suggestion will be "SequenceDiagram" (for an Activity diagram). The reason is that CreateBehavioredClassifierDiagramCommand overrides runAsTransaction method and in the overriden method name of a container is used as a default value for diagram name:
protected void runAsTransaction(...) {
 if(name == null && container instanceof NamedElement) {
   setName(((NamedElement)container).getName());
...
   name = openDiagramNameDialog(getName());
...
	
The code was put as a fix for a bug 308904 .
Comment 3 Yann Tanguy CLA 2010-06-26 12:49:04 EDT
Default name set to "NewDiagram" in every diagram (r2098).
Comment 4 Camille Letavernier CLA 2013-06-25 10:46:58 EDT
The diagrams are initialized with a consistent name; I close this task