Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 99890 Details for
Bug 231738
Specialised EClasses need specialised EStructuralFeatures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
JUnit test demonstrating bug
BadSpecialisedReference.java (text/plain), 1.48 KB, created by
Ed Willink
on 2008-05-13 03:23:00 EDT
(
hide
)
Description:
JUnit test demonstrating bug
Filename:
MIME Type:
Creator:
Ed Willink
Created:
2008-05-13 03:23:00 EDT
Size:
1.48 KB
patch
obsolete
>package org.eclipse.gmt.umlx.eqvt.tests.bugs; > >import junit.framework.TestCase; > >import org.eclipse.emf.ecore.EClass; >import org.eclipse.emf.ecore.EReference; > >public class BadSpecialisedReference extends TestCase >{ > public void testBadSpecialisedReference() { > EClass genericTypeType = org.eclipse.ocl.types.TypesPackage.Literals.TYPE_TYPE; > EReference genericTypeType_ReferredType1 = org.eclipse.ocl.types.TypesPackage.Literals.TYPE_TYPE__REFERRED_TYPE; > EReference genericTypeType_ReferredType2 = org.eclipse.ocl.types.TypesPackage.eINSTANCE.getTypeType_ReferredType(); > EReference genericTypeType_ReferredType3 = (EReference) genericTypeType.getEStructuralFeature("referredType"); >// > EClass specialisedTypeType = org.eclipse.ocl.ecore.EcorePackage.Literals.TYPE_TYPE; >// Following lines fail through lack of a definition >// EReference specialisedTypeType_ReferredType1 = org.eclipse.ocl.ecore.EcorePackage.Literals.TYPE_TYPE__REFERRED_TYPE; >// EReference specialisedTypeType_ReferredType2 = org.eclipse.ocl.ecore.EcorePackage.eINSTANCE.getTypeType_ReferredType(); > EReference specialisedTypeType_ReferredType3 = (EReference) specialisedTypeType.getEStructuralFeature("referredType"); >// Following line returns (M7) generic EObject rather than specialised EClassifier > EClass specialisedReferredType = specialisedTypeType_ReferredType3.getEReferenceType(); > assertTrue(org.eclipse.emf.ecore.EcorePackage.Literals.ECLASSIFIER.isSuperTypeOf(specialisedReferredType)); > } >} > > > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 231738
: 99890