Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsinheritance from own defined EDataType
https://www.eclipse.org/forums/index.php/mv/msg/198008/631360/#msg_631360
I try to define a inheritance in class A from class B. Class B is a EDataType by my self.
See the class B from the ecore sniped
<eClassifiers xsi:type="ecore:EDataType" name="DefaultClient"
instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "
serializable="false"/>
<eClassifiers xsi:type="ecore:EClass" name="OtClientIf"/>
Unfortunately I am not able to define a inheritance in class A from class B. I am using the ecore
diagram to design my model.
Is it not possible to do such kind of inheritance or what do I wrong?
BR, Martin]]>Martin Jacob2010-10-07T08:54:26-00:00Re: inheritance from own defined EDataType
https://www.eclipse.org/forums/index.php/mv/msg/198008/631368/#msg_631368
I fear it's only possible to define inheritance between EClasses.
Am 07.10.2010 10:54, schrieb Martin Jacob:
> Hi,
>
> I try to define a inheritance in class A from class B. Class B is a EDataType by my self.
> See the class B from the ecore sniped
> <eClassifiers xsi:type="ecore:EDataType" name="DefaultClient" instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "
> serializable="false"/>
> <eClassifiers xsi:type="ecore:EClass" name="OtClientIf"/>
>
> Unfortunately I am not able to define a inheritance in class A from class B. I am using the ecore diagram to design my model.
>
> Is it not possible to do such kind of inheritance or what do I wrong?
>
> BR, Martin
>]]>Eike Stepper2010-10-07T09:46:42-00:00Re: inheritance from own defined EDataType
https://www.eclipse.org/forums/index.php/mv/msg/198008/631387/#msg_631387
thanks for the hint. I defined an EClass as follows:
<eClassifiers xsi:type="ecore:EClass" name="DefaultClient"
instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "/>
Now I can use this EClass for inheritance but the generated code implements and not extends the
EClass from above:
public class DefaultClientImpl extends EObjectImpl implements DefaultClient {
....
}
How can I generate the code that DefaultClientImpl extends DefaultClient?
Martin
Eike Stepper wrote, On 07.10.2010 11:46:
> Hi Martin,
>
> I fear it's only possible to define inheritance between EClasses.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 07.10.2010 10:54, schrieb Martin Jacob:
>> Hi,
>>
>> I try to define a inheritance in class A from class B. Class B is a EDataType by my self.
>> See the class B from the ecore sniped
>> <eClassifiers xsi:type="ecore:EDataType" name="DefaultClient"
>> instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "
>> serializable="false"/>
>> <eClassifiers xsi:type="ecore:EClass" name="OtClientIf"/>
>>
>> Unfortunately I am not able to define a inheritance in class A from class B. I am using the ecore
>> diagram to design my model.
>>
>> Is it not possible to do such kind of inheritance or what do I wrong?
>>
>> BR, Martin
>>]]>Martin Jacob2010-10-07T10:59:43-00:00Re: inheritance from own defined EDataType
https://www.eclipse.org/forums/index.php/mv/msg/198008/631388/#msg_631388
> Hi Eike,
>
> thanks for the hint. I defined an EClass as follows:
> <eClassifiers xsi:type="ecore:EClass" name="DefaultClient" instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "/>
>
> Now I can use this EClass for inheritance but the generated code implements and not extends the EClass from above:
>
> public class DefaultClientImpl extends EObjectImpl implements DefaultClient {
> ....
> }
>
> How can I generate the code that DefaultClientImpl extends DefaultClient?
I have no experience with EClasses who's objects are not instances of EObjectImpl ;-(
>
> Martin
>
> Eike Stepper wrote, On 07.10.2010 11:46:
>> Hi Martin,
>>
>> I fear it's only possible to define inheritance between EClasses.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Am 07.10.2010 10:54, schrieb Martin Jacob:
>>> Hi,
>>>
>>> I try to define a inheritance in class A from class B. Class B is a EDataType by my self.
>>> See the class B from the ecore sniped
>>> <eClassifiers xsi:type="ecore:EDataType" name="DefaultClient"
>>> instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "
>>> serializable="false"/>
>>> <eClassifiers xsi:type="ecore:EClass" name="OtClientIf"/>
>>>
>>> Unfortunately I am not able to define a inheritance in class A from class B. I am using the ecore
>>> diagram to design my model.
>>>
>>> Is it not possible to do such kind of inheritance or what do I wrong?
>>>
>>> BR, Martin
>>>]]>Eike Stepper2010-10-07T11:25:06-00:00Re: inheritance from own defined EDataType
https://www.eclipse.org/forums/index.php/mv/msg/198008/631435/#msg_631435
You should set abstract and interface to true on that EClass.
Martin Jacob wrote:
> Hi Eike,
>
> thanks for the hint. I defined an EClass as follows:
> <eClassifiers xsi:type="ecore:EClass" name="DefaultClient"
> instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "/>
>
> Now I can use this EClass for inheritance but the generated code
> implements and not extends the EClass from above:
>
> public class DefaultClientImpl extends EObjectImpl implements
> DefaultClient {
> ...
> }
>
> How can I generate the code that DefaultClientImpl extends
> DefaultClient?
>
> Martin
>
> Eike Stepper wrote, On 07.10.2010 11:46:
>> Hi Martin,
>>
>> I fear it's only possible to define inheritance between EClasses.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Am 07.10.2010 10:54, schrieb Martin Jacob:
>>> Hi,
>>>
>>> I try to define a inheritance in class A from class B. Class B is a
>>> EDataType by my self.
>>> See the class B from the ecore sniped
>>> <eClassifiers xsi:type="ecore:EDataType" name="DefaultClient"
>>> instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "
>>> serializable="false"/>
>>> <eClassifiers xsi:type="ecore:EClass" name="OtClientIf"/>
>>>
>>> Unfortunately I am not able to define a inheritance in class A from
>>> class B. I am using the ecore
>>> diagram to design my model.
>>>
>>> Is it not possible to do such kind of inheritance or what do I wrong?
>>>
>>> BR, Martin
>>>]]>Ed Merks2010-10-07T13:54:35-00:00Re: inheritance from own defined EDataType
https://www.eclipse.org/forums/index.php/mv/msg/198008/632204/#msg_632204
sorry for late reply but I was busy with other things.
I tried as u suggested and set the EClass to abstract and as interface:
<eClassifiers xsi:type="ecore:EClass" name="DefaultClient"
instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "
abstract="true" interface="true"/>
From this class I derived class X:
<eClassifiers xsi:type="ecore:EClass" name="X" eSuperTypes="#//DefaultClient"/>
unfortunately the generated code was not able to compile. The problem is as follow in X.java:
public interface X extends EObject, DefaultClient: but DefaultClient is not a interface it is a class
Do u have any suggestion how to extend a existing class with a class in my ecore model?
Martin
Ed Merks wrote, On 07.10.2010 15:54:
> Martin,
>
> You should set abstract and interface to true on that EClass.
>
>
> Martin Jacob wrote:
>> Hi Eike,
>>
>> thanks for the hint. I defined an EClass as follows:
>> <eClassifiers xsi:type="ecore:EClass" name="DefaultClient"
>> instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "/>
>>
>> Now I can use this EClass for inheritance but the generated code implements and not extends the
>> EClass from above:
>>
>> public class DefaultClientImpl extends EObjectImpl implements DefaultClient {
>> ...
>> }
>>
>> How can I generate the code that DefaultClientImpl extends DefaultClient?
>>
>> Martin
>>
>> Eike Stepper wrote, On 07.10.2010 11:46:
>>> Hi Martin,
>>>
>>> I fear it's only possible to define inheritance between EClasses.
>>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://www.esc-net.de
>>> http://thegordian.blogspot.com
>>> http://twitter.com/eikestepper
>>>
>>>
>>>
>>> Am 07.10.2010 10:54, schrieb Martin Jacob:
>>>> Hi,
>>>>
>>>> I try to define a inheritance in class A from class B. Class B is a EDataType by my self.
>>>> See the class B from the ecore sniped
>>>> <eClassifiers xsi:type="ecore:EDataType" name="DefaultClient"
>>>> instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "
>>>> serializable="false"/>
>>>> <eClassifiers xsi:type="ecore:EClass" name="OtClientIf"/>
>>>>
>>>> Unfortunately I am not able to define a inheritance in class A from class B. I am using the ecore
>>>> diagram to design my model.
>>>>
>>>> Is it not possible to do such kind of inheritance or what do I wrong?
>>>>
>>>> BR, Martin
>>>>]]>Martin Jacob2010-10-12T05:58:02-00:00Re: inheritance from own defined EDataType
https://www.eclipse.org/forums/index.php/mv/msg/198008/632277/#msg_632277
EClass instances must implement the EObject/InternalEObject interfaces
which they must do by extending some derivative of BasicEObjectImpl.
Therefore you can't just extend some existing plain old class.
Martin Jacob wrote:
> Hi Ed,
>
> sorry for late reply but I was busy with other things.
>
> I tried as u suggested and set the EClass to abstract and as interface:
> <eClassifiers xsi:type="ecore:EClass" name="DefaultClient"
> instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "
> abstract="true" interface="true"/>
>
> From this class I derived class X:
> <eClassifiers xsi:type="ecore:EClass" name="X"
> eSuperTypes="#//DefaultClient"/>
>
> unfortunately the generated code was not able to compile. The problem
> is as follow in X.java:
> public interface X extends EObject, DefaultClient: but DefaultClient
> is not a interface it is a class
>
> Do u have any suggestion how to extend a existing class with a class
> in my ecore model?
>
> Martin
>
>
>
> Ed Merks wrote, On 07.10.2010 15:54:
>> Martin,
>>
>> You should set abstract and interface to true on that EClass.
>>
>>
>> Martin Jacob wrote:
>>> Hi Eike,
>>>
>>> thanks for the hint. I defined an EClass as follows:
>>> <eClassifiers xsi:type="ecore:EClass" name="DefaultClient"
>>> instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "/>
>>>
>>> Now I can use this EClass for inheritance but the generated code
>>> implements and not extends the
>>> EClass from above:
>>>
>>> public class DefaultClientImpl extends EObjectImpl implements
>>> DefaultClient {
>>> ...
>>> }
>>>
>>> How can I generate the code that DefaultClientImpl extends
>>> DefaultClient?
>>>
>>> Martin
>>>
>>> Eike Stepper wrote, On 07.10.2010 11:46:
>>>> Hi Martin,
>>>>
>>>> I fear it's only possible to define inheritance between EClasses.
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>> ----
>>>> http://www.esc-net.de
>>>> http://thegordian.blogspot.com
>>>> http://twitter.com/eikestepper
>>>>
>>>>
>>>>
>>>> Am 07.10.2010 10:54, schrieb Martin Jacob:
>>>>> Hi,
>>>>>
>>>>> I try to define a inheritance in class A from class B. Class B is
>>>>> a EDataType by my self.
>>>>> See the class B from the ecore sniped
>>>>> <eClassifiers xsi:type="ecore:EDataType" name="DefaultClient"
>>>>> instanceClassName="de.bahntechnik.dd.util.net.http.DefaultClient "
>>>>> serializable="false"/>
>>>>> <eClassifiers xsi:type="ecore:EClass" name="OtClientIf"/>
>>>>>
>>>>> Unfortunately I am not able to define a inheritance in class A
>>>>> from class B. I am using the ecore
>>>>> diagram to design my model.
>>>>>
>>>>> Is it not possible to do such kind of inheritance or what do I wrong?
>>>>>
>>>>> BR, Martin
>>>>>]]>Ed Merks2010-10-12T12:06:46-00:00