Answers for "How do I retrieve editors registered for a certain file extension in Eclipse?"

0

How do I retrieve editors registered for a certain file extension in Eclipse?

IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
IEditorDescriptor [] desc = registry.getEditors("file name");
//The IEditorDescriptor contains the editor id which you can pass to 
//open of the openEditor methods of IWorkbenchPage

//If you want to open the same file in two editors at the same time 
public IEditorPart openEditor(final IEditorInput input,
         final String editorId, final boolean activate, final int matchFlags)
//Specify IWorkbenchPage.MATCH_NONE as the matchFlags to stop the search for an existing open editor.
Posted by: Guest on January-24-2021

Code answers related to "How do I retrieve editors registered for a certain file extension in Eclipse?"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language