Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321171 - [editor] Bidirectional referrences between packages are not resolved.
Summary: [editor] Bidirectional referrences between packages are not resolved.
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.0.1   Edit
Assignee: OCL Inbox CLA
QA Contact: Ed Willink CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-28 15:37 EDT by Ed Willink CLA
Modified: 2011-05-27 03:13 EDT (History)
0 users

See Also:


Attachments
Eliminate qualification blindness (3.54 KB, patch)
2010-08-05 13:11 EDT, Ed Willink CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2010-07-28 15:37:11 EDT
From fabianbrosig@gmx.de's newsgroup message

-----WORKING EXAMPLE----------------------------------------------------------------------
-- This is the working example, it works perfect.
------------------------------------------------------------------------------------------
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/';

package tutorial : tut = 'http://www.eclipse.org/mdt/ocl/oclinecore/tutorial'
{
 class Library
 {
   property books#_'library' : Book[*] { composes };     }
 class Book
 {
   property _'library'#books : Library;
 }
}


-----NOT WORKING--------------------------------------------------------------------------
-- This does not work. The references between p1 and p2 seem not to be resolved. -- For the role opposites <xyz>, the OCLinEcore Editor shows the following error: -- "Couldn't resolve reference to ReferenceCS <xyz>".
------------------------------------------------------------------------------------------
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/';

package tutorial : tut = 'http://www.eclipse.org/mdt/ocl/oclinecore/tutorial'
{
 package pack1 : p1 = 'http://www.eclipse.org/mdt/ocl/oclinecore/tutorial/p1' {
    class Library
    {
      property books#_'library' : tutorial::pack2::Book[*] { composes };        }
 }
 package pack2 : p2 = 'http://www.eclipse.org/mdt/ocl/oclinecore/tutorial/p2' {
   class Book
   {
     property _'library'#books : tutorial::pack1::Library;
   }
 }
}


-----NOT WORKING--------------------------------------------------------------------------
-- This does not work. The references between p1 and the parent package seem not to be resolved. -- For the role opposites <xyz>, the OCLinEcore Editor shows the following error: -- "Couldn't resolve reference to ReferenceCS <xyz>".
------------------------------------------------------------------------------------------
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/';

package tutorial : tut = 'http://www.eclipse.org/mdt/ocl/oclinecore/tutorial'
{
 package pack1 : p1 = 'http://www.eclipse.org/mdt/ocl/oclinecore/tutorial/p1' {
    class Library
    {
      property books#_'library' : Book[*] { composes };        }
 }
 class Book
 {
   property _'library'#books : tutorial::pack1::Library;
 }
}
Comment 1 Ed Willink CLA 2010-08-05 13:11:00 EDT
Created attachment 175963 [details]
Eliminate qualification blindness

Problem was that the reference type was only examined if unqualified, patch uses the polymorphism to accommodate qualified and unqualified types.

Add the following to LoadTests to activate the test

	public void testLoad_Bug321171_oclinecore() throws IOException, InterruptedException {
		doLoad("Bug321171", "oclinecore");
	}
Comment 2 Ed Willink CLA 2010-08-05 13:11:31 EDT
A candidate for 3.0.1.
Comment 3 Ed Willink CLA 2010-08-05 13:22:56 EDT
Getting carried away; not RESOLVED, till committed to CVS.
Comment 4 Ed Willink CLA 2010-08-17 04:24:29 EDT
Committed to HEAD for 3.1.0M2 and to R3_0_maintenance for 3.0.1RC2.
Comment 5 Ed Willink CLA 2011-05-27 03:13:21 EDT
Closing