Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Default Editor setting being ignored
Default Editor setting being ignored [message #321124] Tue, 09 October 2007 19:00 Go to next message
John Lawrence is currently offline John LawrenceFriend
Messages: 9
Registered: July 2009
Junior Member
Our product has gone through several releases, and in the latest release
we've replaced the editor that used to be declared as the default editor
with a new editor. The old editor is no longer part of the product and
the new editor is now declared as the default editor
<extension point="org.eclipse.ui.editors">
<editor default="true" ....

This works fine if a new workspace is created for our new release. In
that case, the editor preferences for one of our filetypes shows up as:
(our new editor) (default)
Basic LPEX Editor

However, if a workspace from a prior release is used with the new
release, the editor preferences show up as:
Basic LPEX Editor
(our new editor)

Note that neither one is shown as the default. When a file with this
filetype is double-clicked on, the Basic LPEX Editor is invoked, and
none of our function is available.

Is this a bug? Is there an API we can call to make sure our editor is
set as the default for our filetypes?

Thanks ... John
Re: Default Editor setting being ignored [message #321171 is a reply to message #321124] Wed, 10 October 2007 18:25 Go to previous message
John Lawrence is currently offline John LawrenceFriend
Messages: 9
Registered: July 2009
Junior Member
John Lawrence wrote:
> Our product has gone through several releases, and in the latest release
> we've replaced the editor that used to be declared as the default editor
> with a new editor. The old editor is no longer part of the product and
> the new editor is now declared as the default editor
> <extension point="org.eclipse.ui.editors">
> <editor default="true" ....
>
> This works fine if a new workspace is created for our new release. In
> that case, the editor preferences for one of our filetypes shows up as:
> (our new editor) (default)
> Basic LPEX Editor
>
> However, if a workspace from a prior release is used with the new
> release, the editor preferences show up as:
> Basic LPEX Editor
> (our new editor)
>
> Note that neither one is shown as the default. When a file with this
> filetype is double-clicked on, the Basic LPEX Editor is invoked, and
> none of our function is available.
>
> Is this a bug? Is there an API we can call to make sure our editor is
> set as the default for our filetypes?
>
> Thanks ... John

More information:

I've added code to get the IEditorRegistry and then call
registry.setDefaultEditor("*.cbl", neweditorID);
and this correctly establishes the default, but only for the rest of the
current session. If the workspace is closed and later re-opened, again
there is no default editor for *.cbl and the Base LPEX Editor is used.

Is there some reason that the default="true" specification is being
ignored only in the case where the workspace was created using an
earlier version of our product? The Eclipse level on which the product
was based is the same in both cases (3.2).

Thanks for any ideas ... John
Previous Topic:[JFace] Position of LabelProvider image in table cells
Next Topic:Refer to an external jar file at runtime
Goto Forum:
  


Current Time: Fri Apr 26 14:17:48 GMT 2024

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

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

Back to the top