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

Bug 230873

Summary: Make diagram file extension shorter
Product: [Modeling] GMF-Tooling Reporter: Tatiana Fesenko <tatiana.fesenko>
Component: SamplesAssignee: Tatiana Fesenko <tatiana.fesenko>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: borlander
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Simple patch
none
Modified Generator none

Description Tatiana Fesenko CLA 2008-05-07 07:54:03 EDT
The file extension for UML diagrams are rather long. Perhaps an abbreviated form would be better, e.g. *.ucd instead of *umlclass_diagram? Or, even just *.umlclass without _diagram would be better.
Create diagrams in files with shorter extension, however, obsolete diagram files should be supported as well, it should be possible to open and edit them.
Comment 1 Tatiana Fesenko CLA 2008-05-07 08:25:52 EDT
Created attachment 99058 [details]
Simple patch

Changed generated code, that allows to edit both 'umlclass_diagram' and 'umlclass' files, files with extension 'umlclass' are created by wizard.
TODO: Make code generated. 
Xpt templates should be changed n order to generate required code. Gmfgen model should be changed to provide available extensions.
Comment 2 Tatiana Fesenko CLA 2008-05-07 16:22:05 EDT
Created attachment 99172 [details]
Modified Generator

Diagram file extensions rea stored in 'diagramFileExtension' prorperty as comma-separated list. The first one is a default one, it is used for diagram creation.
GMF Generator was modified to solve the problem - xpt templates were changed in 'def' plugin.
ClassD was re-generated.
Comment 3 Michael Golubev CLA 2008-05-12 07:23:22 EDT
Other changes that were made: 
CompD -> .umlcomp
DeployD -> .umldepl
CompositeStructuresD -> .umlcsd
UseCaseD -> .umlusc
ActivityD -> .umlact
StateD -> .umlstm
SequenceD -> .umlseq

All those changes are backward compatible -- we are processing old diagram files correctly, but all new diagrams are created with short extensions 
Comment 4 Michael Golubev CLA 2008-05-13 12:25:18 EDT
Verified in M7 for all diagrams