Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356838

Summary: [export all] option to prefix diagram name with QN
Product: [Modeling] Papyrus Reporter: Raphael Faudou <raphael.faudou>
Component: CoreAssignee: Mathieu Velten <mathieu.velten>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: faure.tristan, raphael.faudou
Version: 0.8.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch fixing the bug none

Description Raphael Faudou CLA 2011-09-06 12:47:32 EDT
When there are several diagrams with the same name in the model (for instance "context" or "main" or "UC" coming grom different packages, the "exportAll" generates all images in the same directory.
It would be nice to have an option to distinguish those diagrams:
* either by prefixing diagrams with their Qualified Name
* else by creating diagram images in a directory structure that conforms to the model tree structure.
Comment 1 Tristan Faure CLA 2011-09-07 03:18:05 EDT
I think QN is not a solution as :
- the label can be very long and it can be a problem for some OS.
- the export all is generic, it is not based on UML semantic if we want to provide an Export All with QN we shall develop some extension points.

A possible solution : an option to set before the name of the diagram the ItemProvider.getText() (without special character).

For example

+ UseCase useCase1
  - Diagram context
+ UseCase useCase2
  - Diagram context

will generate

UseCase_useCase1_context
UseCase_useCase2_context
Comment 2 Raphael Faudou CLA 2011-09-07 03:21:25 EDT
OK for me, as an option.
Comment 3 RADOUANI anass CLA 2011-09-12 10:09:50 EDT
Created attachment 203162 [details]
patch fixing the bug

I, Anass Radouani, have written 100% of the code contributed to fix this bug.
I have the right to contribute this code and have filled the headers with the appropriate License.
This contribution has been checked by and committed under the responsibility of Mathieu Velten.

The solution I developed use the second part of “ItemProvider.getText()”

For exemple 
+ UseCase useCase1
  - Diagram context

will generate useCase1_context.

A possible evolution of the plug-in in the case of two export at the same folder could be to add an emptiness test of the target folder. If the folder isn’t empty, warn the user before continuing the export.
Comment 4 Raphael Faudou CLA 2011-09-24 05:27:05 EDT
Verified->OK.
Closed