Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 152035 - [BiDi] Menu items do not appear for IFile resources when -nl iw is used
Summary: [BiDi] Menu items do not appear for IFile resources when -nl iw is used
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Karice McIntyre CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 155695 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-27 13:44 EDT by Peter Moogk CLA
Modified: 2006-09-28 10:30 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Moogk CLA 2006-07-27 13:44:39 EDT
I found an very weird problem that only seems to appear in Eclipse 3.2.1 when the language setting is set to -nl iw.  A drop down menu item seems to be missing when -nl iw is specified.  If just english is specified the menu item appear as expected.  This problem does not occur in Eclipse 3.2.

- To reproduce this problem do the following:
- Download a 3.2.1 driver.  I downloaded eclipse-SDK-M20060726-0800-win32.zip.
- Overlay on top of this driver a WTP driver.  I used http://download3.eclipse.org/webtools/downloads/drops/R1.5/M-1.5.1-200607211907/

- Start eclipse in a new workspace WITHOUT the -nl iw command line flag.
- Create a Java project.
- Create some Class in the source directory of this Java project.
- Switch to the resource perspective.
- If you right click on the java file a menu item called "Web Services" will appear.
- shutdown eclipse.
- Start eclipse with the "-nl iw" language flag.
- In the resource perspective again right click on the java file.(Note: being in the resource perspective is important to reproducing this bug)
- The "Web Services" menu item will be missing.

Note: if Eclipse 3.2 is used as the base driver this problem does not occur.
Comment 1 Steven Wasleski CLA 2006-07-27 16:44:50 EDT
Does this require the language packs to be installed?
Comment 2 Jeffrey Liu CLA 2006-07-27 16:56:01 EDT
Nope, take an English driver, launch it with -nl iw and you'll run into the problem.
Comment 3 Peter Moogk CLA 2006-07-27 17:24:35 EDT
No the language pack does not need to be installed.  Even though -nl iw is specified Eclipse will come up in English.  However, the direction will switch to right to left.  Jeff and I verified that it is not the direction switch that is causing the problem.

P.S.  I'm heading out on vacation starting tomorrow for 1 week.  Jeff will need to field questions for this problem while I'm gone.  He was able to reproduce this problem on his machine.
Comment 4 Lina Kemmel CLA 2006-07-30 07:18:58 EDT
Guys, as a side note, to get rid of right to left direction, you can use the 'dir' program argument (-nl iw -dir ltr).

And the problem seems to occur also under an Arabic locale.
Comment 5 Cam-Thu Le CLA 2006-08-01 12:44:00 EDT
Karice, Any Progress on this Bug ?
Comment 6 Karice McIntyre CLA 2006-08-01 14:35:06 EDT
In what plug-in is the web services menu contributed?
Comment 7 Karice McIntyre CLA 2006-08-01 15:01:06 EDT
More specifically, does this menu use a nameFilter (i.e. is it enabled on a particular file extension)?  
Comment 8 Kathy Chan CLA 2006-08-01 15:33:02 EDT
The Web service pop-up is contributed in the org.eclipse.jst.ws.creation.ui.  Yes, we use name-filter. Here's a snippet of our plugin.xml:

<extension
         point="org.eclipse.ui.popupMenus">

      <objectContribution
            objectClass="org.eclipse.core.resources.IFile"
            nameFilter="*.java"
            id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard.java">
         <action
               label="%ACTION_DEPLOY_WEBSERVICE"
               class="org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard"
               menubarPath="org.eclipse.jst.ws.atk.ui.webservice.category.popupMenu/popupActions"
               id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard">
         </action>
      </objectContribution>

      <objectContribution
            objectClass="org.eclipse.jdt.internal.core.CompilationUnit"
            nameFilter="*.java"
            id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard.java">
         <action
               label="%ACTION_DEPLOY_WEBSERVICE"
               class="org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard"
               menubarPath="org.eclipse.jst.ws.atk.ui.webservice.category.popupMenu/popupActions"
               id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard">
         </action>
      </objectContribution>

      <objectContribution
            objectClass="org.eclipse.core.resources.IFile"
            nameFilter="*.wsdl"
            id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard.skeleton">
         <action
               label="%ACTION_GENERATE_JAVA_SKELETON"
               class="org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard"
               menubarPath="org.eclipse.jst.ws.atk.ui.webservice.category.popupMenu/popupActions"
               id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard">
         </action>
      </objectContribution>

      <objectContribution
            objectClass="org.eclipse.wst.wsdl.Service"
            nameFilter="*"
            id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard.skeleton">
         <action
               label="%ACTION_GENERATE_JAVA_SKELETON"
               class="org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard"
               menubarPath="additions"
               id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard">
         </action>
      </objectContribution>

      <objectContribution
            objectClass="org.eclipse.wst.wsdl.util.WSDLResourceImpl"
            nameFilter="*"
            id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard.skeleton">
         <action
               label="%ACTION_GENERATE_JAVA_SKELETON"
               class="org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard"
               menubarPath="additions"
               id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard">
         </action>
      </objectContribution>

      <objectContribution
            objectClass="org.eclipse.jst.j2ee.webservice.wsclient.ServiceRef"
            nameFilter="*"
            id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard.skeleton">
         <action
               label="%ACTION_GENERATE_JAVA_SKELETON"
               class="org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard"
               menubarPath="additions"
               id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard">
         </action>
      </objectContribution>

      <objectContribution
            objectClass="org.eclipse.jst.j2ee.webservice.wsdd.ServiceImplBean"
            nameFilter="*"
            id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard.java">
         <action
               label="%ACTION_DEPLOY_WEBSERVICE"
               class="org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard"
               menubarPath="additions"
               id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard">
         </action>
      </objectContribution>
      
      <objectContribution
            objectClass="org.eclipse.jst.j2ee.webservice.wsdd.BeanLink"
            nameFilter="*"
            id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard.java">
         <action
               label="%ACTION_DEPLOY_WEBSERVICE"
               class="org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard"
               menubarPath="additions"
               id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard">
         </action>
      </objectContribution>       
      
      <objectContribution
            objectClass="org.eclipse.core.resources.IFile"
            nameFilter="*.wsil"
            id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard.skeleton">
         <action
               label="%ACTION_GENERATE_JAVA_SKELETON"
               class="org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard"
               menubarPath="org.eclipse.jst.ws.atk.ui.webservice.category.popupMenu/popupActions"
               id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard">
         </action>
      </objectContribution>

Note that the Web service menu item is showing up for .java file in Java perspective (i.e. it works for object class ICompilationUnit) but not for .wsdl file or .java file in Resource perspective.
Comment 9 Karice McIntyre CLA 2006-08-02 10:25:54 EDT
I think I know what is happening.  In efforts to improve Eclipse in Bidi locales, code was added in 3.2.1 and 3.3 streams to make file names display properly in the Navigator.  This alters the string returned by the file's label provider, which (as it turns out) is also used to test a match to the name filter of popup menu entries.  The code that alters the label provider will have to be rolled out until a better solution can be found.  See bug 145842.
Comment 10 Karice McIntyre CLA 2006-08-02 11:14:27 EDT
Rolled back code to fix bug 145842 (in WorkbenchFile) and released to 3.3 and 3.2.1 streams for build > 20060802
Comment 11 Peter Moogk CLA 2006-08-08 15:40:46 EDT
Hi Karice,
   I tried to verify this fix on the eclipse-SDK-M20060802-0800-win32.zip driver.  However, it doesn't seem to be there.  Will this fix be in the next driver?  Thanks.
Comment 12 Karice McIntyre CLA 2006-08-08 16:05:09 EDT
The fix will be in the next M-build.  It missed getting into the 0802 M-build by a day.
Comment 13 Karice McIntyre CLA 2006-08-30 15:34:06 EDT
*** Bug 155695 has been marked as a duplicate of this bug. ***
Comment 14 Peter Moogk CLA 2006-09-28 10:30:27 EDT
Verified.