Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 247144

Summary: [actions][javadoc wizard] Get rid of "Open Javadoc Wizard..." object contribution on all Ant files
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3    
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Bug Depends on: 247146    
Bug Blocks:    

Description Markus Keller CLA 2008-09-12 06:55:44 EDT
I20080911-0800

org.eclipse.jdt.ui currently contributes an "Open Javadoc Wizard..." action to all Ant build files. This is bad style: 

   <extension
         point="org.eclipse.ui.popupMenus">
       <objectContribution
	        adaptable="true"
            objectClass="org.eclipse.core.resources.IFile"
            nameFilter="*.xml"
            id="org.eclipse.jdt.internal.ui.javadocexport.JavadocWizard">
         <visibility>
            <objectState name="contentTypeId" value="org.eclipse.ant.core.antBuildFile"/>
         </visibility>
          <action
               label="%CreateJavadocAction.label"
               tooltip="%CreateJavadocAction.tooltip"
               class="org.eclipse.jdt.internal.ui.javadocexport.CreateJavadocActionDelegate"
               enablesFor="1"
               id="LaunchJavadocWizard">
         </action>
      </objectContribution>
   </extension>

We should replace it by
a) a new content type, similar to:
   <extension
         point="org.eclipse.core.contenttype.contentTypes">
      <content-type
            base-type="org.eclipse.ant.core.antBuildFile"
            file-extensions="xml"
            id="JavadocExport"
            name="Javadoc Export Script"
            priority="high">
         <describer
               class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
            <parameter
                  name="element"
                  value="project">
            </parameter>
         </describer>
      </content-type>
   </extension>

b) and an editor launcher for the content type (ext. pt. "org.eclipse.ui.editors" with launcher=... and <contentTypeBinding>).

The difficult part is (a). XMLRootElementContentDescriber2 is not flexible enough, because we need to dive into the root element and make sure the describer only matches files that start with:

<project default="javadoc">
    <target name="javadoc">
        <javadoc [...]

We could do something like org.eclipse.ant.internal.core.contentDescriber.AntBuildfileContentDescriber, but I don't want to extend the internal org.eclipse.core.internal.content.XMLContentDescriber nor copy it.

I'll file a bug for better API in this are and let this bug depend on it.
Comment 1 Eclipse Genie CLA 2020-01-07 14:06:25 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.