Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] Re: CompilationUnit outside classpath - second warning

1. will work. The getResource() method is a handle-only API. This allows to
get the IResource handle of an ICompilationUnit that is not on the
classpath of its project.
2. would even be better as you would not have to worry if the IJavaElement
is on the classpath or not.

The only difference with the old getUnderlyingResource() behavior is that
getResource() won't check if the IResource exists. But looking at your
code, it doesn't seem that you need to worry about that as the IResource
always exist in the workspace.

Note that getCorrespondingResource() is also affected. You should also
change those references.

Jerome



                                                                                                                                              
                      "Adam Kiezun"                                                                                                           
                      <Adam_Kiezun@oti.         To:      <jdt-ui-dev@xxxxxxxxxxx>                                                             
                      com>                      cc:                                                                                           
                      Sent by:                  Subject: [jdt-ui-dev] Re: CompilationUnit outside classpath - second warning                  
                      jdt-ui-dev-admin@                                                                                                       
                      eclipse.org                                                                                                             
                                                                                                                                              
                                                                                                                                              
                      10/29/2002 11:36                                                                                                        
                      AM                                                                                                                      
                      Please respond to                                                                                                       
                      jdt-ui-dev                                                                                                              
                                                                                                                                              
                                                                                                                                              



i guess our code is not ready for it and will be hurt.

i have 2 questions:
1. do we only need to change from getUnderlyingResource  to getResource for
ICompilationUnits?

2. and if not, then is it ok to change all getUnderlyingResource calls to
getResource calls?

a.


_______________________________________________
jdt-ui-dev mailing list
jdt-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-ui-dev






Back to the top