Problems in creating SpecializationType because DefaultContainmentFeatures() aren't set and getCreat [message #222125] |
Fri, 20 March 2009 18:03 |
Eclipse User |
|
|
|
Originally posted by: rholland.igw.tfh-wildau.de
This is a multi-part message in MIME format.
------=_NextPart_000_003E_01C9A98E.8E3332E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I spend hours of finding the reason for my problem, not beeing able to =
create a dynamically registered SpecializationType like the person in =
this post tried before. I have the same problem like him that I get a =
"not-allowed" cursor when I use a dynamically created tool palette =
entry. I used the tutorial from this site. First i thought, the reason =
is, that I didn't use a semanticHint when using the kind =
"org.eclipse.gmf.runtime.emf.type.core.IHintedType" for the =
specializationType of the =
"org.eclipse.gmf.runtime.emf.type.core.elementTypes" extension point. =
Even if i add the semanticHints for the Node viewClass of the =
"org.eclipse.gmf.runtime.diagram.core.viewProviders" extension point in =
the generated diagram code by hand because of the problem described in =
this post it's not working. The request to create a new Element always =
returns an UnexecutableCommand. By comparing the elemant creation =
process of my project and the logic example i found out, that the =
containmentFeature of the CreateElementRequest is not initialized =
correctly in my case. The problem for tis is, that there are no =
DefaultContainmentFeatures are set in the generated EditHelper of the =
highest container. If you take a look into the class =
" org.eclipse.gmf.examples.runtime.diagram.logic.internal.edit helpers.Cont=
ainerElementEditHelper" of the logic example you will find a static call =
inserting the defaultContainmentFeatures in line 33 to 37. This seems to =
be added by hand. So the question is whether these entries should be =
generated automatically.
I tryed to add the DefaultContainmentFeatures by hand but that doesn't =
really solve my problem.
There is something strange I don't understand and what could be the =
reason for my problem. If I look into the method =
"getCreateCommand(CreateElementRequest req)" from class =
" org.eclipse.gmf.examples.runtime.diagram.logic.internal.edit helpers.Cont=
ainerElementEditHelper" it calls "return super.getCreateCommand(req);" =
but if I look into my generated EditHelper for the Container it returns =
null by default for this method.
So I don't really know, what's the real problem. Maybe the logic example =
is based on an old version and the workflow for creating =
specializationTypes is different now!?
I hope someone can help me because i'm stuck in this problem and can't =
go on.
thanking you in anticipation
------=_NextPart_000_003E_01C9A98E.8E3332E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6001.18203" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I spend hours of finding the reason for =
my problem,=20
not beeing able to create a dynamically registered SpecializationType =
like the=20
person in </FONT><A=20
href=3D" http://dev.eclipse.org/newslists/news.eclipse.technology.gmf /msg0=
3951.html"><FONT=20
face=3DArial size=3D2>this post</FONT></A><FONT face=3DArial =
size=3D2> tried=20
before. I have the same problem like him that I get a "not-allowed" =
cursor when=20
I use a dynamically created tool palette entry. I used the tutorial from =
<A=20
href=3D" http://help.eclipse.org/help32/index.jsp?topic=3D/org.eclips e.gmf=
..doc/tutorials/diagram/paletteConfigurationTutorial.html">this=20
site</A>. First i thought, the reason is, that I didn't use a =
semanticHint when=20
using the kind "org.eclipse.gmf.runtime.emf.type.core.IHintedType" for =
the=20
specializationType of=20
the "org.eclipse.gmf.runtime.emf.type.core.elementTypes " extension =
point.=20
Even if i add the semanticHints for the Node viewClass of the=20
"org.eclipse.gmf.runtime.diagram.core.viewProviders" extension =
point in the=20
generated diagram code by hand because of the problem described=20
in </FONT><A=20
href=3D" http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg170=
91.html"><FONT=20
face=3DArial size=3D2>this post</FONT></A><FONT face=3DArial =
size=3D2> it's not=20
working. The request to create a new Element always returns an=20
UnexecutableCommand. By comparing the elemant creation process of my =
project and=20
the logic example i found out, that the containmentFeature of the=20
CreateElementRequest is not initialized correctly in my case. The =
problem for=20
tis is, that there are no DefaultContainmentFeatures are set in the =
generated=20
EditHelper of the highest container. If you take a look into the class =
"<FONT=20
size=3D2> org.eclipse.gmf.examples.runtime.diagram.logic.internal.edit help=
ers.<FONT=20
size=3D2>ContainerElementEditHelper" of the logic example you will find =
a static=20
call inserting the defaultContainmentFeatures in line 33 to 37. This =
seems to be=20
added by hand. So the question is whether these entries should be =
generated=20
automatically.</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I tryed to add the =
DefaultContainmentFeatures by=20
hand but that doesn't really solve my problem.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>There is something strange I don't =
understand and=20
what could be the reason for my problem. If I look into the method =
"<FONT=20
size=3D2>getCreateCommand(CreateElementRequest req)" from class <FONT=20
size=3D2>" org.eclipse.gmf.examples.runtime.diagram.logic.internal.edit hel=
pers.<FONT=20
size=3D2>ContainerElementEditHelper" it calls "<FONT size=3D2><FONT=20
size=3D2>return</FONT></FONT><FONT size=3D2> </FONT><FONT size=3D2><FONT =
size=3D2>super</FONT></FONT><FONT size=3D2>.getCreateCommand(req);" but =
if I=20
look into my generated EditHelper for the Container it returns null by =
default=20
for this method.</FONT></FONT></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So I don't really know, what's the real =
problem.=20
Maybe the logic example is based on an old version and the workflow for =
creating=20
specializationTypes is different now!?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I hope someone can help me because i'm =
stuck in=20
this problem and can't go on.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>thanking you in=20
anticipation</FONT></DIV></BODY></HTML>
------=_NextPart_000_003E_01C9A98E.8E3332E0--
|
|
|
Powered by
FUDForum. Page generated in 0.02090 seconds