Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338898 - [JAXRS] JAX-RS Facet 'Servlet Information' panel not initially disabled as opposed to plugin extension configuration.
Summary: [JAXRS] JAX-RS Facet 'Servlet Information' panel not initially disabled as op...
Status: RESOLVED DUPLICATE of bug 431081
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Keith Chong CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-04 03:37 EST by Xavier Coulon CLA
Modified: 2014-09-10 10:48 EDT (History)
1 user (show)

See Also:


Attachments
Joining a screenshot to illustrate the bug description. (17.26 KB, image/png)
2011-03-04 03:38 EST, Xavier Coulon CLA
no flags Details
Patch proposal (4.71 KB, patch)
2014-05-27 06:44 EDT, Xavier Coulon CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Coulon CLA 2011-03-04 03:37:08 EST
Build Identifier: Eclipse 20110218-0911 (Helios SR2) / Webtools 3.2.3.v201101121727

In my plugin.xml file, I declared the following extensions, to provide an extra library configuration for the JAX-RS Facet. :

   <extension
         point="org.eclipse.jst.common.project.facet.core.libraryProviders">
      <provider
            abstract="false"
            id="org.bytesparadise.tools.jaxrs.ui.pureJEE6LibraryProvider">
         <action
               type="INSTALL">
            <operation
                  class="org.bytesparadise.tools.jaxrs.ui.facet.PureJEE6LibraryInstallOperation">
            </operation>
         </action>
         <action
               type="UNINSTALL">
            <operation
                  class="org.bytesparadise.tools.jaxrs.ui.facet.PureJEE6LibraryUninstallOperation"></operation>
         </action>
         <label>Pure JEE6 Implementation</label>
         <enablement>
        <with variable="requestingProjectFacet">
          <test property="org.eclipse.wst.common.project.facet.core.projectFacet"
				value="jst.jaxrs:1.1" forcePluginActivation="true"/>
        </with>
        <with variable="projectFacets">
            <count value="+"/>
            <iterate operator="or">
                <test property="org.eclipse.wst.common.project.facet.core.projectFacet"
					value="java:[5.0" forcePluginActivation="true"/>
            </iterate>
        </with>        
      </enablement>
      </provider>
   </extension>
   
   <extension point="org.eclipse.jst.common.project.facet.ui.libraryProviderActionPanels">
    <panel 
      provider="org.bytesparadise.tools.jaxrs.ui.pureJEE6LibraryProvider"
      class="org.bytesparadise.tools.jaxrs.ui.facet.PureJEE6LibraryProviderInstallPanel"/>
   </extension>

   <extension
         point="org.eclipse.jst.ws.jaxrs.core.jaxrsLibraryProvider">
      <jaxrsLibraryprovider
            libraryProviderID="org.bytesparadise.tools.jaxrs.ui.pureJEE6LibraryProvider"
            showUpdateDD="true"
            updateDDSelected="false">
      </jaxrsLibraryprovider>
   </extension>

In substance, this library provider should let the user skip the 'Servlet information' part in case the webapp is a pure JEE6 one, which means there is no need to modify the web deployment descriptor.

When I launch my runtime workbench to test the library, the 'Update Deployment Descriptor' checkbox is not checked as expected, but the panel is still enabled, which is inconsistent with the checkbox state.
Checking and unchecking the checkbox enables then disables the panel, so this issue is just about the panel initial state.

Reproducible: Always
Comment 1 Xavier Coulon CLA 2011-03-04 03:38:17 EST
Created attachment 190362 [details]
Joining a screenshot to illustrate the bug description.
Comment 2 Konstantin Komissarchik CLA 2011-03-04 10:09:23 EST
It sounds like your issue is with JAX-RS facet implementation rather than the framework. Moving to the appropriate component.
Comment 3 Xavier Coulon CLA 2011-03-04 10:12:51 EST
Sorry for the wrong component classification.
Comment 4 Keith Chong CLA 2011-03-23 15:30:37 EDT
Hi Atosa, can you look at this?  This could be a one or two line change.
Comment 5 Xavier Coulon CLA 2014-05-27 06:44:59 EDT
Created attachment 243527 [details]
Patch proposal

After trying again the JAX-RS Facet configuration dialog today (with Luna RC1), I noticed that the dialog did not have the same (wrong) behaviour as what I initially reported, but I also found a couple of issues that this patch attempts to fix:

- the "Update Deployment Descriptor" checkbox would not be visible on Dynamic Web Project version 3.1. It is visible on Dynamic Web Project 3.0 (this assumes that the target runtime is JEE6), so it should be visible for JEE7 projects, too. There was a strict comparison between the current 'jst.web' facet and the "Dynamic Web Project 3.0" value that has been changed to something that should support version 3.0 and greater.
- when selecting a custom JAX-RS Implementation Library, the expected behaviour was not met: the checkbox should be visible but disabled by default (as specified in the 'org.eclipse.jst.ws.jaxrs.core.jaxrsLibraryProvider' extension of our bundle). This was not the case, and it's fixed, too.

The remaining problem that was initially reported (when unselecting the "Update Deployment Descriptor" checkbox, the underneath panel widgets remained enable) could not be reproduced, so I assume it has been fixed since I opened this bug.

Please, let me know if this patch is fine for you and if it can be merged for Luna RC3
Comment 6 Xavier Coulon CLA 2014-09-02 08:10:13 EDT
Hello,

Any chance this patch can be reviewed and integrated in Luna SR1 ?
Comment 7 Keith Chong CLA 2014-09-03 13:40:28 EDT
Hi Xavier,

Could you try the patch from 431081?  Let me know if it fixes the problems you are seeing here.
Comment 8 Xavier Coulon CLA 2014-09-10 06:54:25 EDT
Keith,

Sorry for the late reply.
I tried with the patch that you merge for 431081 and it works fine.
Thanks !
Comment 9 Keith Chong CLA 2014-09-10 10:48:58 EDT
Hi Xavier, it's ok. Thanks for verifying.

*** This bug has been marked as a duplicate of bug 431081 ***