Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IFile for objectClass causes CompilationUnitException
IFile for objectClass causes CompilationUnitException [message #148022] Thu, 23 October 2003 03:14 Go to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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
Eclipse UserFriend
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
Previous Topic:CVS: checkout by date
Next Topic:How to include external library jar files while exporting project into an excutable jar?
Goto Forum:
  


Current Time: Sat Jul 27 16:43:07 GMT 2024

Powered by FUDForum. Page generated in 0.03413 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top