Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315368 - [documentation] Document the order or elements in CSPEX: alterGroups
Summary: [documentation] Document the order or elements in CSPEX: alterGroups
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 05:57 EDT by Johannes Tysiak CLA
Modified: 2019-02-25 14:41 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Tysiak CLA 2010-06-02 05:57:00 EDT
Build Identifier: 

Currently, it seems that there is no way to add new attributes to groups when changing existing groups from a CSPEX.

The following XML snippet from a CSPEX is currently not valid, but I hope it clarifies what I am trying to do.

<alterGroups>
  <public name="some.existing.group">
    <alterAttribute name="some.existing.attribute" filter="(something=true)"/>
    <attribute name="some.new.attribute" />
  </public>
</alterGroups

Adding the "some.new.attribute" to "some.existing.group" will not work this way. Is there any other way to accomplish this? If not, please add this feature.

Reproducible: Always
Comment 1 Johannes Tysiak CLA 2010-06-02 09:57:25 EDT
(In reply to comment #0)

Answering to my own issue: The following indeed does not work:
> <alterGroups>
>   <public name="some.existing.group">
>     <alterAttribute name="some.existing.attribute" filter="(something=true)"/>
>     <attribute name="some.new.attribute" />
>   </public>
> </alterGroups

However, changing the order of alterAttribute and attribute will do the job:
> <alterGroups>
>   <public name="some.existing.group">
>     <attribute name="some.new.attribute" />
>     <alterAttribute name="some.existing.attribute" filter="(something=true)"/>
>   </public>
> </alterGroups

This is not really clear when reading the documentation. So instead, please improve the documentation in this respect.

(Also changing the title of this issue.)
Comment 2 Henrik Lindberg CLA 2010-06-03 13:08:09 EDT
moved the issue to documentation
Comment 3 Henrik Lindberg CLA 2011-03-05 18:47:43 EST
I added a note in the documentation, and referenced this bug (will appear in the documentation revision following 0.8).

I think this is more than a documentation issue - seems odd that the order is significant, and that it silently ignores adding attributes. Moving this to be a non documentation issue.
Comment 4 Thomas Hallgren CLA 2011-03-06 03:41:21 EST
This is per design. The XML stipulates the order in which the elements must be added and since the XML inheritance (alterGroups is inherited from groups) doesn't allow adding to an unordered set of elements, the alterAttribute elements must come after the attribute elements.

There's a misunderstanding regarding "silent ignore". Nothing is ignored. Putting things in the wrong order yields a parse error.