Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340512 - classHierarchy.lookupClass("<Extension,Lorg/eclipse/core/expressions/Expression>") leads to null
Summary: classHierarchy.lookupClass("<Extension,Lorg/eclipse/core/expressions/Expressi...
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Recommenders (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Marcel Bruch CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-20 11:32 EDT by Andreas Kaluza CLA
Modified: 2019-07-24 14:35 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kaluza CLA 2011-03-20 11:32:55 EDT
classHierarchy.lookupClass("<Extension,Lorg/eclipse/core/expressions/Expression>") leads to null
Comment 1 Marcel Bruch CLA 2011-03-20 13:10:53 EDT
Sorry, need a bit more details on this :-)

Is this class in the project's classpath? Can you attach/name the sample project?
Comment 2 Andreas Kaluza CLA 2011-03-20 13:33:25 EDT
You need a TypeReference which has a <Extension,Lorg/eclipse/core/expressions/Expression> content. Then use the method lookupClass from the IClassHierarchy. This leads to null, which should not.

in the MethodChainElement class in line 70 extend following

        } else {
          type = classHierarchy.lookupClass(resultingType);
          if (type != null) {
            type = type.getClassLoader().lookupClass(type.getReference().getInnermostElementType().getName());
          } 
        }
to this:
        } else {
          if (completion.equals("getExpression")) {
            System.out.println(); // --> set break point here!!!!!!!
          }
          type = classHierarchy.lookupClass(resultingType);
          if (type != null) {
            type = type.getClassLoader().lookupClass(type.getReference().getInnermostElementType().getName());
          } 
        }

Now, use the CompletionOnThisAndLocal to get to break point. The next step should lookup the class, which leads to null.
Comment 3 Marcel Bruch CLA 2012-01-15 05:22:30 EST
this is obsolete for m5. closing. Andreas, please reopen this bug report if the same error occurs again.