Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348502 - [documentation] flaw regarding OppositeEndFinder customization
Summary: [documentation] flaw regarding OppositeEndFinder customization
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: RC3   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 03:33 EDT by Axel Uhl CLA
Modified: 2012-05-29 13:24 EDT (History)
1 user (show)

See Also:


Attachments
Fixes the corresponding textile (833 bytes, application/octet-stream)
2011-06-07 03:33 EDT, Axel Uhl CLA
no flags Details
Extra tutorial validation (6.36 KB, patch)
2011-06-07 03:47 EDT, Ed Willink CLA
no flags Details | Diff
Cumulative patch, including further test cases (7.76 KB, patch)
2011-06-12 19:02 EDT, Axel Uhl CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Uhl CLA 2011-06-07 03:33:34 EDT
Created attachment 197479 [details]
Fixes the corresponding textile

The customization documentation contains a hint to use OCL.newInstance(OppositeEndFinder) but that constructor doesn't exist anymore. Instead, the specialized EcoreEnvironmentFactoryWithHiddenOpposites needs to be used:

Old:
  OCL ocl = OCL.newInstance(new MyOppositeEndFinder());

New:
  OCL ocl = OCL.newInstance(new EcoreEnvironmentFactoryWithHiddenOpposites(
                   EPackage.Registry.INSTANCE, new MyOppositeEndFinder());

Patch attached.
Comment 1 Ed Willink CLA 2011-06-07 03:47:30 EDT
Created attachment 197482 [details]
Extra tutorial validation

Attached contains extra validation of tutorial text that I couldn't commit at RC3/4 without troubling PMCs for approval.

Please add your source code as a further 'test' so that we are alerted to any API evolution affecting IA documentation.
Comment 2 Axel Uhl CLA 2011-06-12 19:02:22 EDT
Created attachment 197865 [details]
Cumulative patch, including further test cases

See GIT branch bugs/348502. As suggested, I added a test case that asserts the way in which the documentation describes how the OppositeEndFinder can be customized.
Comment 3 Ed Willink CLA 2011-06-13 02:40:46 EDT
+1. A comment on the 'test' indicating where the example usage is in the documentation would be good.
Comment 4 Axel Uhl CLA 2011-06-13 03:39:55 EDT
Done. Merged into master.
Comment 5 Ed Willink CLA 2012-05-29 13:24:17 EDT
Closing all bugs resolved in Indigo.