|
Re: copier.copyReferences() causes stack overflow [message #71545 is a reply to message #71507] |
Wed, 14 February 2007 19:47 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------060107030400010303050208
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Mark,
It's bouncing back and forth between these
public boolean eIsSet(EStructuralFeature eFeature)
{
int featureID = eDerivedStructuralFeatureID(eFeature);
if (featureID >= 0)
{
return *eIsSet(featureID);*
}
else
{
return eOpenIsSet(eFeature);
}
}
public boolean eIsSet(int featureID)
{
EStructuralFeature eFeature =
eClass().getEStructuralFeature(featureID);
int dynamicFeatureID = featureID - eStaticFeatureCount();
return dynamicFeatureID < 0 ?
*eIsSet(eFeature)* /* backward compatibility with old
generated overrides */ :
eSettingDelegate(eFeature).dynamicIsSet(this, eSettings(),
dynamicFeatureID);
}
This suggests to me that you have a class that's generated with the new
ID-based pattern but has a base class that's generated with the old
feature-based pattern.
mark wrote:
> I have the following code...trying to copy a resource.
> I have no idea how to proceed at this point..??
>
> Copier copier = new Copier();
> RootObj newRoot = (RootObj) copier.copy(oldRoot);
> copier.copyReferences();
>
> The call to copyReferences() produces a stackoverflow with the following
> repeated many many time...
>
> java.lang.StackOverflowError
> at
> org.eclipse.emf.ecore.impl.EObjectImpl.eClass(EObjectImpl.ja va:210)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:828)
>
> at srd.impl.LinkImpl.eIsSet(LinkImpl.java:201)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:818)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:832)
>
> at srd.impl.LinkImpl.eIsSet(LinkImpl.java:201)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:818)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:832)
>
> at srd.impl.LinkImpl.eIsSet(LinkImpl.java:201)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:818)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:832)
>
> at srd.impl.LinkImpl.eIsSet(LinkImpl.java:201)
>
>
--------------060107030400010303050208
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Mark,<br>
<br>
It's bouncing back and forth between these <br>
<blockquote><small>
|
|
|
|
Re: copier.copyReferences() causes stack overflow [message #71620 is a reply to message #71601] |
Wed, 14 February 2007 20:32 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------000504040500020506060005
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Mark,
Is there a base class generated with the old pattern that was not being
regenerated? If the whole model *and *all its base classes are
consistently regenerated using the new pattern you definitely shouldn't
see this problem...
mark wrote:
> Ed,
>
> Thanks for the quick reply.
>
> I did make a minor model change recently. If I delete all the
> generated code and re-generate will that fix this issue.??
>
> Mark.
>
--------------000504040500020506060005
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Mark,<br>
<br>
Is there a base class generated with the old pattern that was not being
regenerated?
|
|
|
|
Re: copier.copyReferences() causes stack overflow [message #602537 is a reply to message #71507] |
Wed, 14 February 2007 19:47 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------060107030400010303050208
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Mark,
It's bouncing back and forth between these
public boolean eIsSet(EStructuralFeature eFeature)
{
int featureID = eDerivedStructuralFeatureID(eFeature);
if (featureID >= 0)
{
return *eIsSet(featureID);*
}
else
{
return eOpenIsSet(eFeature);
}
}
public boolean eIsSet(int featureID)
{
EStructuralFeature eFeature =
eClass().getEStructuralFeature(featureID);
int dynamicFeatureID = featureID - eStaticFeatureCount();
return dynamicFeatureID < 0 ?
*eIsSet(eFeature)* /* backward compatibility with old
generated overrides */ :
eSettingDelegate(eFeature).dynamicIsSet(this, eSettings(),
dynamicFeatureID);
}
This suggests to me that you have a class that's generated with the new
ID-based pattern but has a base class that's generated with the old
feature-based pattern.
mark wrote:
> I have the following code...trying to copy a resource.
> I have no idea how to proceed at this point..??
>
> Copier copier = new Copier();
> RootObj newRoot = (RootObj) copier.copy(oldRoot);
> copier.copyReferences();
>
> The call to copyReferences() produces a stackoverflow with the following
> repeated many many time...
>
> java.lang.StackOverflowError
> at
> org.eclipse.emf.ecore.impl.EObjectImpl.eClass(EObjectImpl.ja va:210)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:828)
>
> at srd.impl.LinkImpl.eIsSet(LinkImpl.java:201)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:818)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:832)
>
> at srd.impl.LinkImpl.eIsSet(LinkImpl.java:201)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:818)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:832)
>
> at srd.impl.LinkImpl.eIsSet(LinkImpl.java:201)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:818)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:832)
>
> at srd.impl.LinkImpl.eIsSet(LinkImpl.java:201)
>
>
--------------060107030400010303050208
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Mark,<br>
<br>
It's bouncing back and forth between these <br>
<blockquote><small>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: copier.copyReferences() causes stack overflow [message #602564 is a reply to message #71601] |
Wed, 14 February 2007 20:32 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------000504040500020506060005
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Mark,
Is there a base class generated with the old pattern that was not being
regenerated? If the whole model *and *all its base classes are
consistently regenerated using the new pattern you definitely shouldn't
see this problem...
mark wrote:
> Ed,
>
> Thanks for the quick reply.
>
> I did make a minor model change recently. If I delete all the
> generated code and re-generate will that fix this issue.??
>
> Mark.
>
--------------000504040500020506060005
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Mark,<br>
<br>
Is there a base class generated with the old pattern that was not being
regenerated?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.04066 seconds