Community
Participate
Working Groups
The org.eclipse.ui.editors extension point provides the following option: default CDATA (true|false) "false" The intent is to allow an editor to become a default editor for a particular resource type. This option does not provide any meaningful control for a plugin to specify its loading rule. The way it is implemented today, plugins extensions are loaded (typically in the alphabetic order, as they are stored on a disk), and if an extension is marked as default, it is moved to the head of the queue. Hence the last loaded extension will win the default war. This also provides a problem if no extension specifies the "default" option. There is no way for an extension to ask NOT to be the default editor. For example: We developed the Java Visual Editor (AWT/Swing GUI editor) for a .java resource. We do NOT want to come up as the default .java editor. However, because our plugin's name starts with the com.*, it precedes the org.* plugins with the JDT Java editor. Given that the Java editor is not marked as the "default" editor, the Visual Editor has no means to stop itself from being the "default default" editor. This outcome induces a significant usability issue for most users that do not use the JVE. If the Java editor would have marked itself as the default editor, given that the org.* is the last extension to be loaded, it will (currently) be on top, even if others wanted to override it.
JDT should consider making the Java editor the default. Eduardo, please also summarize the product customization support.
tagged the Java editor as the default editor
Copied comment from bug 13603. See also bug 15428. 1) A product can specify the default editors for each extension or file name by setting "org.eclipse.ui/defaultEditors" in the file plugin_customization.ini. e.g., org.eclipse.ui/defaultEditors= *.ext1:editorId1;*.ext2:editorId2;fileName:editorId3 So the product can resolve the conflicts if none or more then two editors are set as default. 2) Once a file is opened using another editor, it will allways use that editors. E.g. a) Double click in a .txt file will open the DefaultTextEditor. (close it) b) Open it with Notepad (close it) c) Double click on it and notepad will open instead of DefaultTextEditor.
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.
Not that if plugins are packaged on top of a product, they will have to parse/update this configuration file... a potential problem.
See note in bug 15428.
- The ini file should be used by products not by plugins. - The major problem was fixed by setting the java editor as default. Please reopen this report is you think this is still a problem for you.