Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] problem on IJavaProject.findType

Technical questions and discussions about using eclipse and eclipse-based
tools, and developing plug-in tools should be posted to the newsgroups.
Mailing lists at eclipse.org are intended for use by developers actually
working on or otherwise contributing to day-to-day development. The
development mailing lists are the way design and implementation issues are
discussed and decisions voted on by the committers.

Having said that, it sounds like you're trying to find a secondary type.
This is not supported in Eclipse 3.1. This is supported in the upcoming
Eclipse 3.2.

Jerome



                                                                           
             "黄开彬"                                                      
             <nanhuan5525@gmai                                             
             l.com>                                                     To 
             Sent by:                  jdt-core-dev@xxxxxxxxxxx            
             jdt-core-dev-boun                                          cc 
             ces@xxxxxxxxxxx                                               
                                                                   Subject 
                                       [jdt-core-dev] problem on           
             04/18/2006 06:33          IJavaProject.findType               
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             "Eclipse JDT Core                                             
             developers list."                                             
             <jdt-core-dev@ecl                                             
                 ipse.org>                                                 
                                                                           
                                                                           




hi,all

    I am doing migration for my plugins from eclipse2.0 to eclipse3.1
recently,and I have a problem on the IJavaProject.findType API as
following.
   I have two projects created in the workspace,one called
"project1",another called "project2",and a java source file named
"test.TestClass" created in project1.After all that done,I open the
test.TestClass  in the Editor and execute the following code.

               IJavaProject project2 = ......; //the handler of project2
               IType type = project2.findType("test.TestClass");  //find
tye TestClass Type
               assert(type == null); //I except the type would be null,for
there is no any source file or binary class file in project2
                                                 //but it is not null in
fact,the findType method returns the test.TestClass IType in project1
   As the code shows,the project2.findType("test.TestClass") returns not
null if the test.TestClass source file left open in the editor(no matter
what editor it is),but returns null if I closed this source file in the
editor.So,that is the problem,can anyone help me.I except the
project2.findType to return null even if I have the test.TestClass source
file opened in the editor.

 _______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev

Back to the top