Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Fixed ids for UML Element type

Hi

Absolutely, but I would future proof by considering that ALL xmi types rather than just element types may one day have shorter more readable ids. One way is a Hungarian prefix, so EAbstraction or ET_Abstraction.

(For the OCL Pivot model

org.eclipse.ocl.pivot.internal.resource.PivotSaveImpl
org.eclipse.ocl.pivot.internal.utilities.AS2XMIid
org.eclipse.ocl.pivot.utilities.AS2XMIidVisitor

allocates nice determinstic xmi:ids to all referenceable elements during the standard EMF Save phase.)

You might even consider using Strings after all using a custom xmi:id compresssion.

If some xmi root element declaration maps e.g. "ETConfigs" to "platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations" your String could be "ETConfigs#ET_Abstraction".


I suspect that some more advanced form of XMI might support an xmi:alias that does exactly this.

        Regards

                Ed Willink

On 04/05/2017 07:30, MAGGI Benoit wrote:

Hi everyone,

 

One of the major change in oxygen is the use of references instead of String to “consume” elementtypes.

 

Basically <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>

will be replaced by

    <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href=""background:white;mso-highlight:white">org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_ScP1oVYCEeS0WsAAtVmToA"/>

in all model ( elementype, palette, new child…)

 

This change was made for good reason but one of the drawback is that we lose human readability of ids

My main concern is the loss of easy Gerrit reviews for use cases such as add an element in palette or new child.

 

I propose to replace uuid (_ScP1oVYCEeS0WsAAtVmToA) by fixed ones (Abstraction)

 

So:

<specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href=""background:white;mso-highlight:white">org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_ScP1oVYCEeS0WsAAtVmToA"/>

will become

<specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href=""background:white;mso-highlight:white">org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#Abstraction "/>

 

What are your thoughts on the subject?

 

Regards,

Benoît

 

Full example, this

 

  <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_ScP1oVYCEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.uml.Abstraction" name="UML::Abstraction" hint="UML::Abstraction" editHelperClassName="org.eclipse.papyrus.uml.service.types.helper.DependencyEditHelper">

    <iconEntry xmi:id="_ScP1olYCEeS0WsAAtVmToA" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>

    <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Abstraction"/>

  </elementTypeConfigurations>

 

 

  <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_eu3zwNx0EeWVxMf7SXAfhg" identifier="org.eclipse.papyrus.umldi.Abstraction_Edge" name="Abstraction Edge" hint="Abstraction_Edge">

    <iconEntry xmi:id="_sWEXUNx2EeWVxMf7SXAfhg" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>

    <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_ScP1oVYCEeS0WsAAtVmToA"/>

  </elementTypeConfigurations>

 

will become:

 

  <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="Abstraction" identifier="org.eclipse.papyrus.uml.Abstraction" name="UML::Abstraction" hint="UML::Abstraction" editHelperClassName="org.eclipse.papyrus.uml.service.types.helper.DependencyEditHelper">

    <iconEntry xmi:id="_ScP1olYCEeS0WsAAtVmToA" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>

    <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Abstraction"/>

  </elementTypeConfigurations>

 

 

  <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="Abstraction_Edge" identifier="org.eclipse.papyrus.umldi.Abstraction_Edge" name="Abstraction Edge" hint="Abstraction_Edge">

    <iconEntry xmi:id="_sWEXUNx2EeWVxMf7SXAfhg" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>

    <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#Abstraction"/>

  </elementTypeConfigurations>

 

 

 

 

 

 

 



_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev


Virus-free. www.avast.com

Back to the top