Bug 3333 - JavaCore does not recognize dot notation for inner classes (1GI7GZG)
Summary: JavaCore does not recognize dot notation for inner classes (1GI7GZG)
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0 F3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:53 EDT by Philipe Mulet CLA
Modified: 2002-06-05 05:43 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2001-10-10 22:53:23 EDT
prefix        test
name          180485
reference     
abstract      Linksbuilder does not recognize inner classes
duplicate     

state         open                        priority      investigate         
severity      3                           target                            
age           21                          due                               
product                         hasApar                           

compName      wsa.web.oti                 answer                            
release                                   symptom       io                  
envName                                   phaseFound    fv                  
level                                     phaseInject                       

addDate       2001/07/19 20:25:18         assignDate    2001/07/20 12:39:41 
lastUpdate    2001/07/20 12:39:41         responseDate                      
endDate                                

ownerLogin    decandio                    originLogin   fmhwong             
ownerName     George DeCandio             originName    Wong, Felix (F.)    
ownerArea     9ZVA                        originArea    KC5                 

apar                                      pmr                          
test                                                                                               

tracks: none.

verify: none.

history:
    addDate              action          userLogin (userName)
    -------------------- --------------- ----------------------------------
    2001/07/19 20:25:18  open            fmhwong (Wong, Felix (F.))
    2001/07/20 01:27:19  modify          decandio (George DeCandio)
    2001/07/20 01:27:32  assign          decandio (George DeCandio)
    2001/07/20 12:39:41  assign          matsu (Matsumoto, Hirotaka)

duplicate defects: none.

duplicate features: none.

sizing: none.

notes:
    <Note by fmhwong (Wong, Felix (F.)), 2001/07/19 20:25:18, seq: 1 rel: 0  action: open>
Linksbuilder does not recognize inner classes
010719

The following line from a JSP file refer to an inner class which exists in the
project, but the linksbuilder complains it is broken.

<jsp:useBean id="patientInfo"  class="proxy.patient.generated.findPatientResult.findPatientRow"  scope="session"></jsp:useBean>

findPatientResult.java:
package proxy.patient.generated;

import java.util.*;
import java.text.DateFormat;
import com.ibm.etools.xmlschema.beans.*;

import com.ibm.etools.xmlschema.beans.*;

public class findPatientResult extends IBMXMLElement 
{
  public findPatientResult()
  {
  }
  
  static public class findPatientRow extends IBMXMLElement
  {
    public findPatientRow()
    {
    }
    public void setACCTNO(int ACCTNO)
    {
      setElementValue("ACCTNO", ACCTNO);
    }
    
    public int getACCTNO()
    {
      return new Integer((String) getElementValue("ACCTNO")).intValue();
    }
    
    public void setPATIENTNAME(String PATIENTNAME)
    {
      setElementValue("PATIENTNAME", PATIENTNAME);
    }
    
    public String getPATIENTNAME()
    {
      return (String) getElementValue("PATIENTNAME");
    }
    .............

    <Note by decandio (George DeCandio), 2001/07/20 01:27:19, seq: 2 rel: 0  action: modify>
Old Priority:  
New Priority:  investigate



    <Note by decandio (George DeCandio), 2001/07/20 01:27:32, seq: 3 rel: 0  action: assign>
Old Owner: decandio
New Owner: matsu



    <Note by matsu (Matsumoto, Hirotaka), 2001/07/20 12:39:41, seq: 4 rel: 0  action: assign>
Your <jsp:useBean> is

  <jsp:useBean id="patientInfo" 
    class="proxy.patient.generated.findPatientResult.findPatientRow" 
    scope="session"></jsp:useBean>

and findPatientRow is an inner class. If
proxy.patient.generated.findPatientResult.findPatientRow is passed to
JavaProject class as a class name to see if this class is valid, but
JavaProject returns null, it means this class is invalid. However,
if proxy.patient.generated.findPatientResult$findPatientRow is passed,
JavaProject says it is a correct class. I think this is JavaProject(
com.eclipse.jdt.internal.core.JavaProject) bug so that I'm assigning
to OTI, and I guess changing your code to 

  <jsp:useBean id="patientInfo"
    class="proxy.patient.generated.findPatientResult$findPatientRow"
    scope="session"></jsp:useBean>

is a sort of 'work-around' for you.
Old Component: wsa.web.tooling
New Component: wsa.web.oti






NOTES:

PM (9/28/2001 3:57:15 PM)
	Which Java project API did you use to figure if the class is valid ?
Comment 1 DJ Houghton CLA 2001-10-29 17:10:17 EST
PRODUCT VERSION:

	Win 2000, R09

Comment 2 Philipe Mulet CLA 2002-06-04 09:57:23 EDT
Jerome - do we still have this problem ?
Comment 3 Jerome Lanneluc CLA 2002-06-05 05:43:43 EDT
Verified that IJavaProject.findType(String) works for dot-separated member type 
names.

Added regression test: ClassNameTests.testFindTypeWithDot()