Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356838 - [export all] option to prefix diagram name with QN
Summary: [export all] option to prefix diagram name with QN
Status: CLOSED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Mathieu Velten CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-06 12:47 EDT by Raphael Faudou CLA
Modified: 2011-09-24 05:27 EDT (History)
2 users (show)

See Also:


Attachments
patch fixing the bug (14.61 KB, application/octet-stream)
2011-09-12 10:09 EDT, RADOUANI anass CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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