Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] instance type name?
[Xcore] instance type name? [message #987906] Wed, 28 November 2012 15:56 Go to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
Hi Ed,

I'm trying to create an interface in Xcore that wraps java.lang.Iterable and I'm having problems with the Instance Type Name property.

I specified the interface as:

interface Iterable
{}

and set the Instance Type Name to java.lang.Iterable<EObject>. My class is then specified as:

class MongoCursor extends Iterable
{}

This doesn't seem to work. I get MongoCursor extending the lass Iterable instead of implementing java.lang.Iterable.

Bryan
Re: [Xcore] instance type name? [message #988202 is a reply to message #987906] Wed, 28 November 2012 18:59 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Bryan,<br>
<br>
Comments below.<br>
<br>
<div class="moz-cite-prefix">On 28/11/2012 4:56 PM, Bryan Hunt
wrote:<br>
</div>
<blockquote cite="mid:k95c7s$1n3$1@xxxxxxxxe.org" type="cite">Hi
Ed,
<br>
<br>
I'm trying to create an interface in Xcore that wraps
java.lang.Iterable and I'm having problems with the Instance Type
Name property.
<br>
<br>
I specified the interface as:
<br>
<br>
interface Iterable
<br>
{}
<br>
</blockquote>
Did you try something like this?<br>
<br>
<blockquote>import org.eclipse.emf.ecore.EObject<br>
<br>
interface Iterable wraps Iterable&lt;EObject&gt;<br>
{<br>
    <br>
}<br>
<br>
class Foo extends Iterable<br>
{<br>
    <br>
}<br>
</blockquote>
That works for me (other than that I didn't implement the iterator
method yet).<br>
<blockquote cite="mid:k95c7s$1n3$1@xxxxxxxxe.org" type="cite">
<br>
and set the Instance Type Name to
java.lang.Iterable&lt;EObject&gt;.  My class is then specified as:
<br>
<br>
class MongoCursor extends Iterable
<br>
{}
<br>
<br>
This doesn't seem to work.  I get MongoCursor extending the lass
Iterable instead of implementing java.lang.Iterable.
<br>
<br>
Bryan
<br>
</blockquote>
<br>
</body>
</html>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[EMF] Implementing Instance Model Inheritance
Next Topic:[XSD2ECore] EDataType / AnySimpleType Problem
Goto Forum:
  


Current Time: Thu Apr 25 07:20:13 GMT 2024

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

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

Back to the top