Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Editor association seems broken in Helios
Editor association seems broken in Helios [message #513146] Tue, 09 February 2010 03:56 Go to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Seeing a rather weird problem in Helios with editor association and content types. Has there been any recent changes to the org.eclipse.ui.editors extension point? We are fairly confident that it's not a problem on our end since the same code works fine on Galileo. On Helios, we are using a very recent build (just past M5).

Here are some more details...

Case 1:

We have a content type registered that picks up java files with @WebService annotation.

<extension point="org.eclipse.core.runtime.contentTypes">
  <content-type id="webServiceSource" name="%jws.content.type.name" base-type="org.eclipse.jdt.core.javaSource" priority="high" file-extensions="java">
    <describer class="oracle.eclipse.tools.common.content.TopLevelAnnotationContentDescriber">
    <parameter name="annotationRegExp" value="javax\.jws\.WebService\z" /> 
    <parameter name="storeElementValuePairs" value="true" /> 
  </describer>
</content-type>


We also have another unrelated editor registered as non-default choice for java files.

<extension point="org.eclipse.ui.editors">
  <editor class="oracle.eclipse.tools.orm.ui.diagram.editor.jpaentities.JpaEntityDiagramEditor" default="false" id="JpaEntityDiagramEditor" icon="platform:/plugin/org.eclipse.jpt.ui/icons/full/obj16/entity.gif" extensions="java" name="%entityEditorName" /> 
</extension>


What we are observing in Helios is that for plain java class files, the standard java editor opens (expected behavior). However, once you add @WebService annotation, the default editor becomes our JpaEntityDiagramEditor. It's almost like base java editor association is lost (or becomes non-default) as soon as a content type is associated with a file. This behavior is not observed in Galileo.

Case 2:

We have a content type registered for XML files that have a certain root element.

<extension point="org.eclipse.core.runtime.contentTypes">
  <content-type id="jaxWSBindings" name="%jaxwsBindings.content.type.name" base-type="org.eclipse.core.runtime.xml" priority="high" file-extensions="xml">
    <describer class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
      <parameter name="element" value="{http://java.sun.com/xml/ns/jaxws}bindings" /> 
    </describer>
  </content-type>
</extension>


We then associate that content type with a custom editor.

<extension point="org.eclipse.ui.editors">
  <editor class="oracle.eclipse.tools.webservices.ui.editors.bindings.jaxws.JAXWSBindingsEditor" extensions="xml" icon="icons/bindings/jax-ws-bindings-icon.png" id="oracle.eclipse.tools.webservices.ui.editors.JAXWSBindingsEditor" name="%JAXWSBindingFileEditor.name">
    <contentTypeBinding contentTypeId="oracle.eclipse.tools.webservices.jaxWSBindings" /> 
  </editor>
</extension>


What we are seeing in Helios is that this editor becomes the default editor for all XML files, even the ones that don't have the expected root element. The standard XML Editor is still available as a choice under the Open menu, but it is no longer the default editor. Again, this behavior is not observed in Galileo.

I hope that someone might know what's going on here.

Thanks,

- Konstantin
Re: Editor association seems broken in Helios [message #513246 is a reply to message #513146] Tue, 09 February 2010 08:56 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I would open a new bug at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=Resources
with your scenarios. It looks like some work was done that touches
both content types and the XML content type describers in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=182337

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Editor association seems broken in Helios [message #513303 is a reply to message #513146] Tue, 09 February 2010 17:35 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
For x-reference purposes, here is the bug for this:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=302297
Previous Topic:popup menu: dynamic objectContribution
Next Topic:Prevent file from being commited to CVS
Goto Forum:
  


Current Time: Thu Apr 25 02:14:55 GMT 2024

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

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

Back to the top