Bug 476836 - EditorUtility.getEditorID(IEditorInput) should pass on the EditorInput
Summary: EditorUtility.getEditorID(IEditorInput) should pass on the EditorInput
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.5   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2015-09-08 02:52 EDT by Sven Efftinge CLA
Modified: 2022-09-17 20:32 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Efftinge CLA 2015-09-08 02:52:42 EDT
In EditorUtility.getEditorID(IEditorInput) only the simple file name is passed on to
IDE.getEditorDescriptor(name). As a result clients of the IEditorAssociationOverride extension point get insufficient information about the to be opened type, as it's not possible to make a decision for simple name conflicts.

It should rather pass on the EditorInput such that 
  org.eclipse.ui.ide.IEditorAssociationOverride.overrideDefaultEditor(IEditorInput, IContentType, IEditorDescriptor)
get's called.
Comment 1 Dani Megert CLA 2016-04-05 10:51:42 EDT
EditorUtility#getEditorID is an internal method. Are you calling that method?

Please provide steps that show the issue.
Comment 2 Christian Dietrich CLA 2018-07-24 11:23:59 EDT
we try to implement the extension point 

org.eclipse.ui.ide.IEditorAssociationOverride.overrideDefaultEditor(String, IContentType, IEditorDescriptor)

to open a custom editor instead of the default class file editor

here is the stack

OriginalEditorSelector.findJavaTypeForSimpleFileName(String) line: 185	
OriginalEditorSelector.findXbaseEditor(String, boolean) line: 111	
OriginalEditorSelector.overrideDefaultEditor(String, IContentType, IEditorDescriptor) line: 96	
IDE.overrideDefaultEditorAssociation(String, IContentType, IEditorDescriptor) line: 917	
IDE.getEditorDescriptor(String, boolean) line: 1069	
IDE.getEditorDescriptor(String) line: 1016	
EditorUtility.getEditorID(IEditorInput) line: 435	
EditorUtility.openInEditor(Object, boolean) line: 179	
JavaUI.openInEditor(IJavaElement, boolean, boolean) line: 734	
OpenTypeAction.runWithEvent(Event) line: 90	

to be able to decide sufficiently which if our custom editor can handle a particular class file the simple name is not sufficient enhough
Comment 3 Eclipse Genie CLA 2020-08-23 14:29:17 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Christian Dietrich CLA 2020-08-24 01:53:55 EDT
problem is still there
Comment 5 Eclipse Genie CLA 2022-09-17 20:32:11 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.