IFile for objectClass causes CompilationUnitException [message #148022] |
Thu, 23 October 2003 03:14 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jgangemi.yahoo.com
hello -
i've added a popupMenu for an objectContribution so that i can toggle the
read-only status of a file w/o having to go to the file properties window
first.
if i specify the objectClass as an IFile, everything works fine under the
navigator view, but when i switch to the java perspective, i get the following
exception:
Unhandled exception caught in event loop.
Reason:
org.eclipse.jdt.internal.core.CompilationUnit
if i change the reference to an IResource, everything works fine in all
perpsectives.
can anyone help shed some light on this? pls let me know if you need any
additional info.
thx!!
-jae
|
|
|
Re: IFile for objectClass causes CompilationUnitException [message #150428 is a reply to message #148022] |
Tue, 28 October 2003 23:53 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: John_Arthorne.oti.com_
What is the exception stack trace (should be in your log file)? I
suspect it is because JDT does not register an adapter factory for IFile.
-
jae wrote:
> hello -
>
> i've added a popupMenu for an objectContribution so that i can toggle the
> read-only status of a file w/o having to go to the file properties window
> first.
>
> if i specify the objectClass as an IFile, everything works fine under the
> navigator view, but when i switch to the java perspective, i get the following
> exception:
>
> Unhandled exception caught in event loop.
> Reason:
> org.eclipse.jdt.internal.core.CompilationUnit
>
> if i change the reference to an IResource, everything works fine in all
> perpsectives.
>
> can anyone help shed some light on this? pls let me know if you need any
> additional info.
>
> thx!!
>
> -jae
|
|
|
Re: IFile for objectClass causes CompilationUnitException [message #150771 is a reply to message #150428] |
Wed, 29 October 2003 15:12 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jgangemi.yahoo.com
i actually figured out a way around this, so i don't have that stack trace
anymore, but i could revert back the changes temporarily if you still wanted to
see it.
after reading some other threads in the retired "tools" group, i figured out
that i need to check if the "element" is an instance of an ICompilationUnit and
from there i can extract the IResource and cast it to an IFile.
is there further documentation somewhere on the how the whole adapter
thing works? i've read the javadocs and the help section, but i'm still a
little fuzzy on it.
thx!!!
-jae
On Tue, 28 Oct 2003 18:53:21 -0500, John Arthorne <John_Arthorne@oti.com_>
wrote:
>What is the exception stack trace (should be in your log file)? I
>suspect it is because JDT does not register an adapter factory for IFile.
>-
>
>
>jae wrote:
>> hello -
>>
>> i've added a popupMenu for an objectContribution so that i can toggle the
>> read-only status of a file w/o having to go to the file properties window
>> first.
>>
>> if i specify the objectClass as an IFile, everything works fine under the
>> navigator view, but when i switch to the java perspective, i get the following
>> exception:
>>
>> Unhandled exception caught in event loop.
>> Reason:
>> org.eclipse.jdt.internal.core.CompilationUnit
>>
>> if i change the reference to an IResource, everything works fine in all
>> perpsectives.
>>
>> can anyone help shed some light on this? pls let me know if you need any
>> additional info.
>>
>> thx!!
>>
>> -jae
|
|
|
Powered by
FUDForum. Page generated in 0.02470 seconds