Community
Participate
Working Groups
For 2.0, we need to allow products to specify which editor should be the default associated with a specific file type. This can be done by using the preference store to specify the order of editor associations. For example, plugin A defines an XML editor. Plugin B defines a better XML editor. The product should be able to say that plugin B's editor gets used instead of A's.
Our plugins are normally shipped with other plugins which are responsible for supplying appropriate editors. However, it looks like there will be (at least) one product that our plugins will be included in that does not have these editors. So we want to include a basic editor which has minimal support (ability to add / remove breakpoints and show the breakpoint icon), but don't want it to end up as the default editor for the file extension type unless no other editor is registered for that file extension type. From some trial and error it appears to me that the first time eclipse is started up the editors for a particular file extension are added in alphabetical order (of the plugin id that the editor is declared in), and then the first one in the list is the default. Instead of doing it alphabetically, it would be better if we could register our editor with a relative priority. This would allow our editor to be used only if there are no others
Released changes to HEAD stream. Product can specify the default editors for each extension setting "org.eclipse.ui/defaultEditors" in the file plugin_customization.ini. e.g., org.eclipse.ui/defaultEditors= *.ext1:editorId1;*.ext2:editorId2;fileName:editorId3 Must test it again in the next build. In the build I have, the file must be in org.eclipse.platform instead of sdk. Must open a bug report in core if a file in sdk does not work. Bruce, The product should specify what are the default editors. When you are defining your editor (in xml) you should not add the tag default and another editor in that product should have that tag. If not editor or more than one editor have the default tag equals true then the product can specified the which one will be the default by using the plugin_customization.ini file. Other option you have is to create a separate plugin for your editors and ship it only in the product that does not have the proper editors.
Opened bug 16212 about plugin_customization.ini. Bruce, I am going to close this report if you think the options I gave are good enough to fix the problem you described.
Yes, it sounds like this meets our requirements. Thanks.
Closing it.
See bug 13603 and bug 16892.
Are you suggesting that one would have to append: org.eclipse.ui/defaultEditors=*.java:org.eclipse.jdt.ui.javaeditor to the plugin_customization.ini file in the org.eclipse.platform_2.0.0 plugin ? It will require a plugin to provide specialized packaging code, a significant impediment for a small plugin. For the .java case, I would think that the Java editor should be the default editor by default, no interventions.
The Java editor has recently changed to mark itself as the default for *.java. The support described here is intended for products to override such settings.