Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 120340

Summary: [implementation] Ensure IEditorInput.getAdapter(IJavaElement.class) works
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r, martinae
Version: 3.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 124994    
Bug Blocks:    

Description Dani Megert CLA 2005-12-12 04:14:26 EST
I20051212-0010

At several places we use IEditorInput.getAdapter(IJavaElement.class) to get the editor input as Java element.

This has several problem:
1) for IFile's this only works due to bug 120336
2) it does not work for all currently existing editor inputs
3) it completely fails for multi-page editors

To make it work for existing users of IEditorInput.getAdapter(IJavaElement.class) we have to register an adapter for IEditorInput.

In addition we will provide new API to get the editor input (see bug 111509).
Comment 1 Dani Megert CLA 2006-01-24 11:58:22 EST
Fixed in HEAD.
Available in builds >= N20060125-0010.