Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 491783 - [ElementTypes] Ordering constraints should reference identifiers, not class names
Summary: [ElementTypes] Ordering constraints should reference identifiers, not class n...
Status: CLOSED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.0.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 514790
  Show dependency tree
 
Reported: 2016-04-15 08:53 EDT by Christian Damus CLA
Modified: 2017-06-19 06:54 EDT (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 Christian Damus CLA 2016-04-15 08:53:51 EDT
The model of element-type advice provides for constraints on the ordering of advice invocation, via the 'before' and 'after' attributes.  These are not Ecore references but string-valued attributes, and evidently they are the names of the classes implementing advices that the declaring advice should precede or follow, respectively.

You can see this in the JUnit test for ordering:

    oep.infra.types.tests.ElementEditHelperAdviceTests::testValidAdvicesOrder

in which the test element-types model has advices clearly indicating 'before' and 'after' constraints by class name, not the advice identifier that are very different to the class names.

This is unintuitive.  These attributes should indicate advices by identifier, for several reasons:

* advice identifiers are API, not the classes implementing them.  Class names are hidden behind the IDs
* many different advices are implemented by a single class.  The standard modelled advices for setting properties, applying stereotypes, etc. are all implemented by a single class which patently is not API.  So none of these advices can be specifically referenced by an ordering constraint
Comment 1 Eclipse Genie CLA 2016-05-20 06:00:52 EDT
New Gerrit change created: https://git.eclipse.org/r/73260
Comment 2 Eclipse Genie CLA 2016-07-07 08:29:10 EDT
New Gerrit change created: https://git.eclipse.org/r/76844
Comment 4 Florian Noyrit CLA 2017-03-07 12:49:06 EST
Merged