Home » Eclipse Projects » Eclipse Platform » Unable to create editor input
|
Re: Unable to create editor input [message #332528 is a reply to message #332526] |
Mon, 27 October 2008 10:34 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Raja,
The problem could be as simple as not exporting all the packages of the
plugin. If you open the MANIFEST.MF, go to the Runtime tab, and use
"Add..." to export more pages, does it suggest any? Generally showing a
full stack trace helps with details you might have omitted. For
example, sometimes the class might be found, but static initialization
for it fails...
Raja Kannappan wrote:
> Hi,
>
> I've an editor (Editor1) in my RCP app which has a button and when user
> clicks on that button in Editor1, I'm trying to open another editor
> (Editor2). However, when I try to instantiate editor2 I always get this
> exception: com.sun.jdi.InvocationException occurred invoking method.
>
> Editor2 is my class and it exists in the same package as editor1. It seems
> like the classloader could not find this class (Editor2). Does anyone know
> why this is happening? Below is my code:
>
> ------------------------------------------------------------ ------------------------------------------------------------ -
>
> IWorkbenchPage page = getEditorSite().getWorkbenchWindow().getActivePage();
>
> Editor2Input editorInput2 = new Editor2Input(); // I could not instantiate
> this class even though this class is in my project in the same package as
> this code is
>
> try {
>
> page.openEditor(editorInput2, Editor2.ID);
>
> }
>
> catch (PartInitException e) {
>
> e.printStackTrace();
>
> }
>
> ------------------------------------------------------------ ---------------------------------------------------------
>
> Thanks in advance,
>
> - Raja.
>
>
>
>
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Unable to create editor input [message #332556 is a reply to message #332528] |
Tue, 28 October 2008 16:39 |
Raja Kannappan Messages: 24 Registered: July 2009 |
Junior Member |
|
|
In this case, both Editor1 and Editor2 reside in the same packge under my
source folder, but still when I try to instantiate Editor2Input class (which
is in the same package also) I get this exception:
com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred
invoking method.
Not sure why this is class not loaded while running my RCP app. Any ideas?
Thanks,
- Raja.
"Ed Merks" <Ed.Merks@gmail.com> wrote in message
news:ge45f2$as6$2@build.eclipse.org...
> Raja,
>
> The problem could be as simple as not exporting all the packages of the
> plugin. If you open the MANIFEST.MF, go to the Runtime tab, and use
> "Add..." to export more pages, does it suggest any? Generally showing a
> full stack trace helps with details you might have omitted. For example,
> sometimes the class might be found, but static initialization for it
> fails...
>
>
> Raja Kannappan wrote:
>> Hi,
>>
>> I've an editor (Editor1) in my RCP app which has a button and when user
>> clicks on that button in Editor1, I'm trying to open another editor
>> (Editor2). However, when I try to instantiate editor2 I always get this
>> exception: com.sun.jdi.InvocationException occurred invoking method.
>>
>> Editor2 is my class and it exists in the same package as editor1. It
>> seems like the classloader could not find this class (Editor2). Does
>> anyone know why this is happening? Below is my code:
>>
>> ------------------------------------------------------------ ------------------------------------------------------------ -
>>
>> IWorkbenchPage page =
>> getEditorSite().getWorkbenchWindow().getActivePage();
>>
>> Editor2Input editorInput2 = new Editor2Input(); // I could not
>> instantiate this class even though this class is in my project in the
>> same package as this code is
>>
>> try {
>>
>> page.openEditor(editorInput2, Editor2.ID);
>>
>> }
>>
>> catch (PartInitException e) {
>>
>> e.printStackTrace();
>>
>> }
>>
>> ------------------------------------------------------------ ---------------------------------------------------------
>>
>> Thanks in advance,
>>
>> - Raja.
>>
>>
>>
>>
>>
>>
>>
|
|
|
Re: Unable to create editor input [message #332557 is a reply to message #332556] |
Tue, 28 October 2008 16:55 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------080309010808010804060405
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Raja,
Maybe you misspelled it in the plugin.xml? The fact that it's not a
class not found exception makes me think there's something going on
you've not mentioned. I.e., that something is failing during the
initialization of the class. Have you tried to step through this in the
debugger?
Raja Kannappan wrote:
> In this case, both Editor1 and Editor2 reside in the same packge under my
> source folder, but still when I try to instantiate Editor2Input class (which
> is in the same package also) I get this exception:
> com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred
> invoking method.
>
> Not sure why this is class not loaded while running my RCP app. Any ideas?
>
> Thanks,
>
> - Raja.
>
>
> "Ed Merks" <Ed.Merks@gmail.com> wrote in message
> news:ge45f2$as6$2@build.eclipse.org...
>
>> Raja,
>>
>> The problem could be as simple as not exporting all the packages of the
>> plugin. If you open the MANIFEST.MF, go to the Runtime tab, and use
>> "Add..." to export more pages, does it suggest any? Generally showing a
>> full stack trace helps with details you might have omitted. For example,
>> sometimes the class might be found, but static initialization for it
>> fails...
>>
>>
>> Raja Kannappan wrote:
>>
>>> Hi,
>>>
>>> I've an editor (Editor1) in my RCP app which has a button and when user
>>> clicks on that button in Editor1, I'm trying to open another editor
>>> (Editor2). However, when I try to instantiate editor2 I always get this
>>> exception: com.sun.jdi.InvocationException occurred invoking method.
>>>
>>> Editor2 is my class and it exists in the same package as editor1. It
>>> seems like the classloader could not find this class (Editor2). Does
>>> anyone know why this is happening? Below is my code:
>>>
>>> ------------------------------------------------------------ ------------------------------------------------------------ -
>>>
>>> IWorkbenchPage page =
>>> getEditorSite().getWorkbenchWindow().getActivePage();
>>>
>>> Editor2Input editorInput2 = new Editor2Input(); // I could not
>>> instantiate this class even though this class is in my project in the
>>> same package as this code is
>>>
>>> try {
>>>
>>> page.openEditor(editorInput2, Editor2.ID);
>>>
>>> }
>>>
>>> catch (PartInitException e) {
>>>
>>> e.printStackTrace();
>>>
>>> }
>>>
>>> ------------------------------------------------------------ ---------------------------------------------------------
>>>
>>> Thanks in advance,
>>>
>>> - Raja.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>
>
>
--------------080309010808010804060405
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Raja,<br>
<br>
Maybe you misspelled it in the plugin.xml? The fact that it's not a
class not found exception makes me think there's something going on
you've not mentioned. I.e., that something is failing during the
initialization of the class. Have you tried to step through this in
the debugger?<br>
<br>
<br>
Raja Kannappan wrote:
<blockquote cite="mid:ge7f8l$hru$1@build.eclipse.org" type="cite">
<pre wrap="">In this case, both Editor1 and Editor2 reside in the same packge under my
source folder, but still when I try to instantiate Editor2Input class (which
is in the same package also) I get this exception:
com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred
invoking method.
Not sure why this is class not loaded while running my RCP app. Any ideas?
Thanks,
- Raja.
"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:Ed.Merks@gmail.com"><Ed.Merks@gmail.com></a> wrote in message
<a class="moz-txt-link-freetext" href="news:ge45f2$as6$2@build.eclipse.org">news:ge45f2$as6$2@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Raja,
The problem could be as simple as not exporting all the packages of the
plugin. If you open the MANIFEST.MF, go to the Runtime tab, and use
"Add..." to export more pages, does it suggest any? Generally showing a
full stack trace helps with details you might have omitted. For example,
sometimes the class might be found, but static initialization for it
fails...
Raja Kannappan wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I've an editor (Editor1) in my RCP app which has a button and when user
clicks on that button in Editor1, I'm trying to open another editor
(Editor2). However, when I try to instantiate editor2 I always get this
exception: com.sun.jdi.InvocationException occurred invoking method.
Editor2 is my class and it exists in the same package as editor1. It
seems like the classloader could not find this class (Editor2). Does
anyone know why this is happening? Below is my code:
------------------------------------------------------------ ------------------------------------------------------------ -
IWorkbenchPage page =
getEditorSite().getWorkbenchWindow().getActivePage();
Editor2Input editorInput2 = new Editor2Input(); // I could not
instantiate this class even though this class is in my project in the
same package as this code is
try {
page.openEditor(editorInput2, Editor2.ID);
}
catch (PartInitException e) {
e.printStackTrace();
}
------------------------------------------------------------ ---------------------------------------------------------
Thanks in advance,
- Raja.
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>
--------------080309010808010804060405--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Goto Forum:
Current Time: Sat Dec 21 11:48:07 GMT 2024
Powered by FUDForum. Page generated in 0.05124 seconds
|