Problems developing a plugin based on SSE (ModelHandler Error?!) [message #201115] |
Wed, 03 October 2007 10:35  |
Eclipse User |
|
|
|
Originally posted by: uh5d.rz.uni-karlsruhe.de
This is a multi-part message in MIME format.
------=_NextPart_000_000C_01C805DB.6BD02940
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
i am trying to develop a Plugin (Projectname iswarmide) based on the =
eclipse XML-editor with proprietary content assist ( eclipse 3.3 with =
WST 2.0 ).
To do so, i first extended the content types, so that the sse-xml editor =
gets invoked when opening my own ".mdle2 " xml-fileformat:
<plugin>=20
<extension point=3D"org.eclipse.core.runtime.contentTypes">
<content-type
priority=3D"high"
name=3D"MDLE2 Content Type"
id=3D"mdle2source"=20
base-type=3D"org.eclipse.core.runtime.xml"
default-charset=3D"UTF-8">
<describer =
class=3D" org.eclipse.wst.xml.core.internal.contenttype.ContentDescrib erFo=
rXML" />
</content-type>
</extension>
<extension point=3D"org.eclipse.core.runtime.contentTypes">
<file-association=20
content-type=3D"iswarmide.mdle2source"=20
file-extensions=3D"mdle2"
/>
</extension>
.......
</plugin>=20
This works quite well for me - when i click on a ".mdle2" - file it =
get's opened via the xml editor, no errors occurred up to this point.
Then i proceeded by including my own Model Handler as descibed in =
http://help.eclipse.org/help31/index.jsp?topic=3D/org.eclips e.wst.doc.isv=
/reference/api/overview-summary.html
<extension point=3D"org.eclipse.wst.sse.core.modelHandler">
<modelHandler
default=3D"false"
class=3D"iswarmide.ModelHandlerForMDLE"
=
associatedContentTypeId=3D"iswarmide.mdle2source"
id=3D"mdle2sourcehandler">
</modelHandler>
</extension>=20
I derived the class ModelHandlerForMDLE from AbstractModelHandler =
implementing IModelHandler.
I contributed the following strings in that class:
static String AssociatedContentTypeID =3D "iswarmide.mdle2source"; =
=20
private static String ModelHandlerID =3D =
"iswarm.mdle2sourcehandler"; =20
and implemented getEncodingDetector(), getDocumentLoader(), =
getModelLoader() as done in ModelHandlerForXML.java ( WST class ).
Then i opened my .mdle2 file again, at first everything seems ok - it =
gets opened in the xml editor.
The .mdle2 file has the following content:
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<BEHAVIOUR name=3D"ddd" >=20
blabla
</BEHAVIOUR>
Now the Problem:
when I click on "blabla" with my mousepointer a =
Java.lang.NullPointerException occurs.
There are no additional error messages in the problem view or on the =
error log.
What could cause this exception, how could i debug this exception?
Regards=20
A.Gallus
------=_NextPart_000_000C_01C805DB.6BD02940
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.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>i am trying to develop a Plugin =
(Projectname=20
iswarmide) based on the eclipse XML-editor with proprietary content =
assist (=20
</FONT><FONT face=3DArial size=3D2>eclipse 3.3 with WST 2.0 =
).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>To do so, i first extended the content =
types, so=20
that the sse-xml editor gets invoked when opening my own ".mdle2 "=20
xml-fileformat:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV dir=3Dltr><FONT face=3DArial =
size=3D2><plugin> </FONT></DIV>
<DIV dir=3Dltr><FONT face=3DArial =
size=3D2> =20
<extension =
point=3D"org.eclipse.core.runtime.contentTypes"></FONT ></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =20
<content-type</FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =20
=20
priority=3D"high"</FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =20
name=3D"MDLE2 =
Content=20
Type"</FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> &nbs=
p; &nbs p; &nbs p=
; id=3D"mdle2source"=20
</FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> &nbs=
p; &nbs p; &nbs p=
; base-type=3D"org.eclipse.core.runtime.xml"</FONT ></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =20
=20
default-charset=3D"UTF-8"></FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =20
<describer=20
class=3D" org.eclipse.wst.xml.core.internal.contenttype.ContentDescrib erFo=
rXML"=20
/></FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> &nbs=
p;=20
</content-type></FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =
</extension></FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> <extension=20
point=3D"org.eclipse.core.runtime.contentTypes"></FONT ></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =20
<file-association </FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =20
=20
content-type=3D"iswarmide.mdle2source" </FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =20
=20
file-extensions=3D"mdle2"</FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px" align=3Dleft><FONT =
face=3DArial=20
size=3D2> =20
/></FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px"><FONT face=3DArial=20
size=3D2> </extension&g=
t;</FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px"><FONT face=3DArial=20
size=3D2>......</FONT></DIV>
<DIV dir=3Dltr style=3D"MARGIN-RIGHT: 0px"><FONT face=3DArial =
size=3D2></plugin>=20
</FONT></DIV>
<P><FONT face=3DArial size=3D2>This works quite well for me - when i =
click on a=20
".mdle2" - file it get's opened via the xml editor, no errors =
occurred up=20
to this point.</FONT></P>
<P><FONT face=3DArial size=3D2>Then i proceeded by including my own =
Model Handler as=20
descibed in <A=20
href=3D" http://help.eclipse.org/help31/index.jsp?topic=3D/org.eclips e.wst=
..doc.isv/reference/api/overview-summary.html">http://help.eclipse.org/hel=
p31/index.jsp?topic=3D/org.eclipse.wst.doc.isv/reference/api /overview-sum=
mary.html</A></FONT></P>
<DIV><FONT face=3DArial size=3D2> =
<extension=20
point=3D"org.eclipse.wst.sse.core.modelHandler"></FONT ></DIV>
<DIV><FONT face=3DArial size=3D2> =20
<modelHandler</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
=
=20
default=3D"false"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
=
=20
class=3D"iswarmide.ModelHandlerForMDLE"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
=
=20
associatedContentTypeId=3D"iswarmide.mdle2source"</FONT></DIV >
<DIV><FONT face=3DArial size=3D2> =20
=
=20
id=3D"mdle2sourcehandler"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
</modelHandler></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
</extension></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I derived the class =
ModelHandlerForMDLE=20
from AbstractModelHandler implementing IModelHandler.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I contributed the following strings in =
that=20
class:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>static String =
AssociatedContentTypeID =3D=20
"iswarmide.mdle2source" ;   ; </FONT>=
</DIV>
<DIV><FONT face=3DArial size=3D2>private static String=20
ModelHandlerID &n bsp; =3D=20
"iswarm.mdle2sourcehandler"; </FONT></DIV >
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>and implemented <FONT =
size=3D2>getEncodingDetector(),=20
<FONT size=3D2>getDocumentLoader(), <FONT size=3D2>getModelLoader() as =
done in <FONT=20
size=3D2>ModelHandlerForXML.java ( WST class=20
).</FONT></FONT></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Then i opened my .mdle2 file again, at =
first=20
everything seems ok - it gets opened in the xml =
editor.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The .mdle2 file has the following=20
content:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><?xml version=3D"1.0"=20
encoding=3D"UTF-8"?></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> <BEHAVIOUR =
name=3D"ddd"=20
></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2> blabla </FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
</BEHAVIOUR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Now the Problem:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>when I click on "blabla" with my =
mousepointer=20
a Java.lang.NullPointerException occurs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>There are no additional error messages =
in the=20
problem view or on the error log.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>What could cause this exception, how =
could i debug=20
this exception?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>A.Gallus</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =
</FONT></DIV></BODY></HTML>
------=_NextPart_000_000C_01C805DB.6BD02940--
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04073 seconds