Community
Participate
Working Groups
Currently VEX registers itself as default editor for all xml files. This is really annoying, e.g. for pom.xml or Android layout files. I suggest to remove this default registration and leave it to the user to open the "right" editor, via right-click -> Open With
I suspected that the root cause of this is in the plugin.xml, but it's not. Vex registers itself for every document that is created through our wizard using the method org.eclipse.vex.ui.internal.wizards.NewDocumentWizard.registerEditorForFilename(String, String)
*** Bug 430343 has been marked as a duplicate of this bug. ***
https://git.eclipse.org/r/#/c/23405/
Eric, can you please verify the bugfix using the latest version from our continuous build? https://hudson.eclipse.org/vex/job/mylyn-docs-vex.ci/lastSuccessfulBuild/artifact/org.eclipse.vex.repository/target/repository
@Florian: I tried, but when I try to install the plugin it now complains that my org.eclipse.ui is too low. I have 3.104.0.v20121024-145224. I will use my keplar installation for testing. Eclipse SDK Version: 4.2.2 Build id: M20130204-1200 Cannot complete the install because one or more required items could not be found. Software being installed: Vex SDK 1.1.0.z201403141859 (org.eclipse.vex.sdk.feature.feature.group 1.1.0.z201403141859) Missing requirement: Vex DocBook 1.1.0.z201403141859 (org.eclipse.vex.docbook 1.1.0.z201403141859) requires 'bundle org.eclipse.ui [3.105.0,4.0.0)' but it could not be found Cannot satisfy dependency: From: Visual Editor for XML 1.1.0.z201403141859 (org.eclipse.vex.feature.feature.group 1.1.0.z201403141859) To: org.eclipse.vex.docbook [1.1.0.z201403141859] Cannot satisfy dependency: From: Vex SDK 1.1.0.z201403141859 (org.eclipse.vex.sdk.feature.feature.group 1.1.0.z201403141859) To: org.eclipse.vex.feature.feature.group [1.1.0.z201403141859]
Ok, I used the latest keplar (had to reinstall it after a crash -_-). After installing the latest plugin (jenkins build) I switched to the VEX perspective, switched batck to the Java perspective and the pom.xml now still opens with the default editor. Thats great so far, but all my other xml files are associated with the vex editor. If I switch to the VEX perspective even .classpath and .project files are associated with VEX. I now can still set my xml editor as the default editor, but that already worked before (Window --> Preferences --> General --> Editors --> Files Associations).
@Eric: Thank you for the feedback, I'll look deeper into it. That Vex feels responsible for .project and .classpath is really strange - but I can also reproduce this in a clean environment (fresh workspace and configuration).
I digged further into the content type inference logic implemented in ContentTypeCatalog. It seems that the best solution would be to implement an IContentDescriber which matches only for doctypes registered via the extension point org.eclipse.vex.doctypes. At a first glance we may inherit from XmlContentDescriber and get "inspired" by XMLRootElementContentDescriber2.
https://git.eclipse.org/r/#/c/23677/
@Eric: There is a new bugfix availble on our master branch now. Could you please try again, if this now works as you expect it? To associate Vex with files, we now use an own implementation of IContentDescriber. This describer matches only XML documents for which a document type is registered as extension to o.e.vex.ui.doctypes.
fixed