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

Bug 330500

Summary: RMAP EMF Editor reorders URI members
Product: z_Archived Reporter: Miles Parker <milesparker>
Component: BuckminsterAssignee: buckminster.core-inbox <buckminster.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: thomas
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Miles Parker CLA 2010-11-17 13:42:42 EST
In:

  Buckminster - Core    1.3.1.r11579   
org.eclipse.buckminster.core.feature.feature.group

To reproduce..

1. Open enclosed rmap.

2. Make small edit, e.g. add a Property Constant. Save.

3. Compare text model with prior version. Note that the order of the members of <rm:uri> changes:

      <rm:uri format="{0}/{1}/plugins/{2}">
        <bc:propertyRef key="workspace.root"/>
        <bc:propertyRef key="buckminster.component"/>
        <bc:replace>
          <bc:propertyRef key="buckminster.component"/>
          <bc:matches pattern="org\.eclipse\.amp\.agf.*" replacement="org.eclipse.amp.agf"/>
          <bc:matches pattern="org\.eclipse\.amp\.axf.*" replacement="org.eclipse.amp.axf"/>
          <bc:matches pattern="org\.eclipse\.amp\.amf.*" replacement="org.eclipse.amp.amf"/>
          <bc:matches pattern="org\.eclipse\.amp\.escape.*" replacement="org.eclipse.amp.escape"/>
          <bc:matches pattern="org\.eclipse\.amp.*" replacement="org.eclipse.amp"/>
        </bc:replace>
      </rm:uri>

To:

	<rm:provider componentTypes="osgi.bundle" readerType="local" mutable="false">
		<rm:uri format="{0}/{1}/plugins/{2}">
			<bc:propertyRef key="workspace.root" />
			<bc:replace>
				<bc:propertyRef key="buckminster.component" />
				<bc:matches pattern="org\.eclipse\.amp\.agf.*" replacement="org.eclipse.amp.agf" />
				<bc:matches pattern="org\.eclipse\.amp\.axf.*" replacement="org.eclipse.amp.axf" />
				<bc:matches pattern="org\.eclipse\.amp\.amf.*" replacement="org.eclipse.amp.amf" />
				<bc:matches pattern="org\.eclipse\.amp\.escape.*" replacement="org.eclipse.amp.escape" />
				<bc:matches pattern="org\.eclipse\.amp.*" replacement="org.eclipse.amp" />
			</bc:replace>
			<bc:propertyRef key="buckminster.component" />
		</rm:uri>
	</rm:provider>

____

This is obviously a big deal, because it breaks the substitution pattern in a non-obvious, unexpected and hard to diagnose way.

Workaround: DOn't use RMAP editor.
Comment 1 Miles Parker CLA 2010-11-17 13:45:44 EST
The first thing to check is simply that the URI member attribute has the "Ordered" flag set in the Ecore model.
Comment 2 Thomas Hallgren CLA 2011-01-26 08:51:32 EST
Uri members now retain their sort order. Fixed when fixing bug 330498.