Bug 87627 - [1.5][search] references to type variable yield non-existent elements in search view
Summary: [1.5][search] references to type variable yield non-existent elements in sear...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-10 06:26 EST by Markus Keller CLA
Modified: 2005-05-12 04:27 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 Markus Keller CLA 2005-03-10 06:26:06 EST
HEAD

- open type java.uil.List from 1.5 rt.jar
- select 'E' in 'public interface List<E>' and search for references
-> two matches in methods addAll(..) have '?' as icon; opening the context menu
on these matches gives:

Error 2005-03-10 12:18:07.438 Internal Error
Java Model Exception: Java Model Status [addAll(int, java.util.Collection) [in
List [in List.class [in java.util [in C:\java\jdk1.5.0_01\jre\lib\rt.jar [in
JUnit]]]]] does not exist]
at
org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:467)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:498)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:231)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:217)
at org.eclipse.jdt.internal.core.BinaryMethod.getFlags(BinaryMethod.java:130)
at
org.eclipse.jdt.internal.debug.ui.MethodActionFilter.testAttribute(MethodActionFilter.java:30)
at
org.eclipse.ui.internal.ActionExpression$ObjectStateExpression.preciselyMatches(ActionExpression.java:467)
at
org.eclipse.ui.internal.ActionExpression$ObjectStateExpression.isEnabledFor(ActionExpression.java:435)
at
org.eclipse.ui.internal.ActionExpression$SingleExpression.isEnabledFor(ActionExpression.java:308)
at
org.eclipse.ui.internal.ActionExpression$NotExpression.isEnabledFor(ActionExpression.java:340)
at
org.eclipse.ui.internal.ActionExpression$SingleExpression.isEnabledFor(ActionExpression.java:308)
at org.eclipse.ui.internal.ActionExpression.isEnabledFor(ActionExpression.java:121)
at
org.eclipse.ui.internal.ObjectActionContributor$ObjectContribution.isApplicableTo(ObjectActionContributor.java:303)
at
org.eclipse.ui.internal.ObjectActionContributor.isApplicableTo(ObjectActionContributor.java:205)
at
org.eclipse.ui.internal.ObjectContributorManager.isApplicableTo(ObjectContributorManager.java:275)
at
org.eclipse.ui.internal.ObjectActionContributorManager.contributeObjectActions(ObjectActionContributorManager.java:125)
at
org.eclipse.ui.internal.PopupMenuExtender.addObjectActions(PopupMenuExtender.java:195)
at
org.eclipse.ui.internal.PopupMenuExtender.menuAboutToShow(PopupMenuExtender.java:220)
at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:285)
at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:372)
at org.eclipse.jface.action.MenuManager.access$0(MenuManager.java:369)
at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:386)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:116)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:866)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847)
at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:3322)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3050)
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1493)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3466)
at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method)
at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:225)
at org.eclipse.swt.widgets.Display.runPopups(Display.java:2920)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2521)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1514)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1478)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:297)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:338)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:268)
at org.eclipse.core.launcher.Main.basicRun(Main.java:260)
at org.eclipse.core.launcher.Main.run(Main.java:887)
at org.eclipse.core.launcher.Main.main(Main.java:871)
Comment 1 Martin Aeschlimann CLA 2005-05-04 10:42:56 EDT
when I try that in 20050504 HEAD I get no matches to choose from.

(List<E> is binary, select 'E', choose 'References->Workspace')
Comment 2 Markus Keller CLA 2005-05-06 04:48:28 EDT
Martin, I guess you trapped into bug 68011.
Comment 3 Martin Aeschlimann CLA 2005-05-09 08:45:16 EDT
The elements that get returned from the core java search seem not to exist:
element.getFlags() throws a 'not-exists' exception.

Moving to jdt.core
Comment 4 Frederic Fusier CLA 2005-05-09 12:13:28 EDT
Search match associated method handle was wrongly created when parameter types
were parameterized types.
Comment 5 Frederic Fusier CLA 2005-05-09 17:44:15 EDT
Fixed and released in HEAD.

The handle was in fact created but without type arguments for method parameters
which are parameterized types.

[jdt-core-internal]
Changes done in MatchLocator.createHandle(AbstractMethodDeclaration,IJavaElement).

Test case added in JavaSearchBugsTests
Comment 6 Maxime Daniel CLA 2005-05-12 03:52:42 EDT
Verified for 3.1 M7 using build I20050509-2010 + jdt.core HEAD.