Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Default Editor
Default Editor [message #120344] Tue, 02 September 2003 06:49 Go to next message
Eclipse UserFriend
Originally posted by: xavier.omondo.com

Hi All,

is there a way to register file extension to various editors inside eclipse ?

I mean from a plugin and not manually from the file extensions preferences.

I found this :

IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
registry.setDefaultEditor("*.ext", "org.eclipse.ui.DefaultTextEditor");

I can analyse the editors set registered for a particular extension but no way to
dynamically registers other editors.

There is also an API but this is internal, so no warranty for future eclipse relases.

Regards.
Re: Default Editor [message #120515 is a reply to message #120344] Tue, 02 September 2003 13:02 Go to previous message
Eclipse UserFriend
Originally posted by: simon.ibm.oti.lab

When you register an editor via xml, you can specify the file types it can
accept.

There is no way via xml to associate a file type with an existing editor.
You can open a feature request against Platform - UI for this (explain your
use case also)

Simon :-)

"Xavier Maysonnave" <xavier@omondo.com> wrote in message
news:bj1siu$fiq$1@eclipse.org...
> Hi All,
>
> is there a way to register file extension to various editors inside
eclipse ?
>
> I mean from a plugin and not manually from the file extensions
preferences.
>
> I found this :
>
> IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
> registry.setDefaultEditor("*.ext", "org.eclipse.ui.DefaultTextEditor");
>
> I can analyse the editors set registered for a particular extension but no
way to
> dynamically registers other editors.
>
> There is also an API but this is internal, so no warranty for future
eclipse relases.
>
> Regards.
>
Previous Topic:PDE/ANT: Create Ant Build File error in 2.1.1?
Next Topic:Accessibility problem
Goto Forum:
  


Current Time: Sat May 10 08:07:14 EDT 2025

Powered by FUDForum. Page generated in 0.04032 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top