|
Re: Default Editor setting being ignored [message #321171 is a reply to message #321124] |
Wed, 10 October 2007 18:25 |
John Lawrence 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
|
|
|
Powered by
FUDForum. Page generated in 0.03109 seconds