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

Bug 348502

Summary: [documentation] flaw regarding OppositeEndFinder customization
Product: [Modeling] OCL Reporter: Axel Uhl <eclipse>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ed
Version: 3.1.0   
Target Milestone: RC3   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Fixes the corresponding textile
none
Extra tutorial validation
none
Cumulative patch, including further test cases none

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.