Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Pivot doesn't support package stereotypes
Pivot doesn't support package stereotypes [message #1218820] Fri, 29 November 2013 12:59 Go to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 59
Registered: August 2013
Member
Hi

There is a stereotyped package in a model
https://github.com/AresEkb/OclToXPath/blob/master/model/OclTest.uml

When I'm trying to read it, the parser throws an exception:
java.lang.ClassCastException: org.eclipse.ocl.examples.pivot.internal.impl.PackageImpl cannot be cast to org.eclipse.ocl.examples.pivot.Type
	at org.eclipse.ocl.examples.pivot.internal.impl.ElementExtensionImpl.getPackage(ElementExtensionImpl.java:540)
	at org.eclipse.ocl.examples.pivot.internal.impl.ElementExtensionImpl.getPackage(ElementExtensionImpl.java:1)
	at org.eclipse.ocl.examples.pivot.manager.PackageManager.getTypeServer(PackageManager.java:488)
	at org.eclipse.ocl.examples.pivot.manager.MetaModelManager.getPartialTypes(MetaModelManager.java:1879)
	at org.eclipse.ocl.examples.pivot.manager.MetaModelManager.getAllInvariants(MetaModelManager.java:1146)
...

Here is a ElementExtensionImpl.getPackage():
	@Override
	public org.eclipse.ocl.examples.pivot.Package getPackage() {
		return ((Type)eContainer()).getPackage();
	}

The code tries to cast a Package into Type.
Re: Pivot doesn't support package stereotypes [message #1219211 is a reply to message #1218820] Mon, 02 December 2013 16:14 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4184
Registered: July 2009
Senior Member
Hi

https://bugs.eclipse.org/bugs/show_bug.cgi?id=422938 raised and fixed.

Build N201312021047 available now from Downloads or nightly Updates.

Regards

Ed Willink


On 29/11/2013 12:59, Denis Nikiforov wrote:
> Hi
>
> There is a stereotyped package in a model
> https://github.com/AresEkb/OclToXPath/blob/master/model/OclTest.uml
>
> When I'm trying to read it, the parser throws an exception:
> java.lang.ClassCastException:
> org.eclipse.ocl.examples.pivot.internal.impl.PackageImpl cannot be
> cast to org.eclipse.ocl.examples.pivot.Type
> at
> org.eclipse.ocl.examples.pivot.internal.impl.ElementExtensionImpl.getPackage(ElementExtensionImpl.java:540)
> at
> org.eclipse.ocl.examples.pivot.internal.impl.ElementExtensionImpl.getPackage(ElementExtensionImpl.java:1)
> at
> org.eclipse.ocl.examples.pivot.manager.PackageManager.getTypeServer(PackageManager.java:488)
> at
> org.eclipse.ocl.examples.pivot.manager.MetaModelManager.getPartialTypes(MetaModelManager.java:1879)
> at
> org.eclipse.ocl.examples.pivot.manager.MetaModelManager.getAllInvariants(MetaModelManager.java:1146)
> ...
> Here is a ElementExtensionImpl.getPackage():
> @Override
> public org.eclipse.ocl.examples.pivot.Package getPackage() {
> return ((Type)eContainer()).getPackage();
> }
> The code tries to cast a Package into Type.
Re: Pivot doesn't support package stereotypes [message #1219279 is a reply to message #1219211] Tue, 03 December 2013 06:34 Go to previous message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 59
Registered: August 2013
Member
Hi

Thanks a lot!
Previous Topic:Multiple Contexts and allInstances Override
Next Topic:Generating Java code for OCL constraints
Goto Forum:
  


Current Time: Wed Dec 17 21:29:48 GMT 2014

Powered by FUDForum. Page generated in 0.01622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software