Bug 15684 - Invalid Menu Extension on search pages
Summary: Invalid Menu Extension on search pages
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 15670
Blocks: 491191
  Show dependency tree
 
Reported: 2002-05-09 17:54 EDT by John Wiegand CLA
Modified: 2016-04-06 16:26 EDT (History)
3 users (show)

See Also:


Attachments
workspace.zip (60.10 KB, application/octet-stream)
2002-05-10 16:47 EDT, Jed Anderson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Wiegand CLA 2002-05-09 17:54:14 EDT
508

Following is an almost useless defect report, but it contains all of the 
information we have.

After using the 508 build for some time (and exiting and restarting at least 
once), we discovered the following text in the console (we don't know exactly 
when it occurs)

(paraphrased error messages)
Invalid Menu Extension (path invalid) referencesSubMenu
(many messages like the above)

I thought this was trivially reproducable, but now cannot make it occur at 
all.  Will annotate the defect report with steps when (if) I discover them.
Comment 1 Jed Anderson CLA 2002-05-10 16:29:32 EDT
I got this to happen again.  The following was printed to the console at startup.

(sorry, still no test case)

Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.OpenJavaSearchPage
Invalid Menu Extension (Path is invalid): implementorsSubMenu
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.ImplementorsInWorkingSet
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.ImplementorsInWorkspace
Invalid Menu Extension (Path is invalid): declarationsSubMenu
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.DeclarationsInWorkingSet
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.DeclarationsInHierarchy
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.DeclarationsInWorkspace
Invalid Menu Extension (Path is invalid): writeAccessSubMenu
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.WriteAccessInWorkingSet
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.WriteAccessInHierarchy
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.WriteAccessInWorkspace
Invalid Menu Extension (Path is invalid): readAccessSubMenu
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.ReadAccessInWorkingSet
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.ReadAccessInHierarchy
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.ReadAccessInWorkspace
Invalid Menu Extension (Path is invalid): referencesSubMenu
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.ReferencesInWorkingSet
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.ReferencesInHierarchy
Invalid Menu Extension (Path is invalid):
org.eclipse.jdt.ui.actions.ReferencesInWorkspace
Comment 2 Jed Anderson CLA 2002-05-10 16:47:45 EDT
Created attachment 796 [details]
workspace.zip
Comment 3 Jed Anderson CLA 2002-05-10 16:48:32 EDT
Use the workspace I have zipped & attached to reproduce this problem.  I have
only tested this with the 20020508 build.
Comment 4 Erich Gamma CLA 2002-05-11 04:35:35 EDT
Here is a theory. These actions are contributed in action set part association. 
What we observerd before is that an action set part association can get's lost 
(e.g. F3 no longer works in the editor, since the Source menu got lost). There 
is a bug against the workbench on this.

Once the actions set is "lost" the corresponding menu slots are missing and 
when search wants to dynamically update the menus these slits are missing and 
you get the exception.

When this happens again please open the menus and verify that the Java search 
actions are contributed, same for the Source menu.  

Comment 5 Erich Gamma CLA 2002-05-11 04:38:31 EDT
hmm, the fact that this problem is reproducable in a particular workspace 
doesn't support my theory. We should try with the workspace.
Comment 6 Dani Megert CLA 2002-05-17 02:21:56 EDT
This is caused by a workbench bug which is set to FIX LATER (after 2.0). The
suggested solution is to copy the Search menu definition in the plug-in which
adds items to it. This currently affects Java and Help.

This must be well documented since other contributors *will* stumble over this too.
I will provide the following (final) menu in the Search plug-in:
<!-- =================================================================== -->
<!-- Search Menu                                                         -->
<!-- =================================================================== -->

<menu
  id="org.eclipse.search.menu"
  label="%searchMenu.label"
  path="navigate">
  <groupMarker name="internalDialogGroup"/>   <!-- not to be used by clients  -->
  <groupMarker name="dialogGroup"/>           <!-- to be used by clients      -->
  <separator name="contextMenuActionsGroup"/>
</menu>
Comment 7 Christoph Pohl CLA 2011-01-13 10:40:37 EST
Is this really bug really fixed? 

I just failed making a contribution to the Search menu as described at http://wiki.eclipse.org/Menu_Contributions/Search_Menu . 
Later I tried the workaround with actionSets as described at http://www.eclipse.org/forums/index.php?t=msg&goto=648585&S=0b4e3effd0f243c7f18afd151cd53952#msg_648585 and finally I succeeded with the workaround that is still active in current JDT 3.6: By redefining the whole Search menu.
Comment 8 Dani Megert CLA 2011-01-13 10:51:32 EST
(In reply to comment #7)
> Is this really bug really fixed? 
This bug was about the issue in JDT UI's menu additions and this got fixed. The thing you refer to is not a real working example as it says: "Possible Java Search Menu Example". This example assumes that Search switched to the new menu contribution story which it didn't so far (see bug 213385).