Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358672 - [Compatibility] Some of WTP Source Editing context menu contributions are misbehaving
Summary: [Compatibility] Some of WTP Source Editing context menu contributions are mis...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.2 M5   Edit
Assignee: Remy Suen CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 334303
  Show dependency tree
 
Reported: 2011-09-22 17:48 EDT by Nick Sandonato CLA
Modified: 2012-01-24 11:16 EST (History)
1 user (show)

See Also:


Attachments
Menu contributions patch v1 (868 bytes, patch)
2011-09-26 14:11 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Sandonato CLA 2011-09-22 17:48:23 EDT
The "Source" context menu item is missing from Structured Text Editors. It is appended to the ITextEditorActionConstants.GROUP_EDIT group from the editorContextMenuAboutToShow() method.

Additionally, the "Refactor" menu item is always visible regardless of if it has any actions. It displays the arrow as if it has a submenu, but once you mouse over it, the text is grayed out and it becomes disabled. Similar to the "Source" context menu, it is appended to ITextEditorActionConstants.GROUP_EDIT group from the editorContextMenuAboutToShow() method.
Comment 1 Remy Suen CLA 2011-09-23 07:48:06 EDT
Hi Nick, thanks for testing WTP on 4.x. Which build were you using?
Comment 2 Nick Sandonato CLA 2011-09-23 10:15:31 EDT
Hey, Remy. I was using Eclipse 4.2M2 I20110916-1615 and WTP 3.4 20110922105747.
Comment 3 Remy Suen CLA 2011-09-23 10:44:51 EDT
(In reply to comment #0)
> Additionally, the "Refactor" menu item is always visible regardless of if it
> has any actions. It displays the arrow as if it has a submenu, but once you
> mouse over it, the text is grayed out and it becomes disabled.

Without debugging the code, it's probably the same problem as bug 352380.
Comment 4 Remy Suen CLA 2011-09-26 13:02:01 EDT
(In reply to comment #0)
> The "Source" context menu item is missing from Structured Text Editors. It is
> appended to the ITextEditorActionConstants.GROUP_EDIT group from the
> editorContextMenuAboutToShow() method.

It seems this menu's children are not in the model so the menu contributions cannot find an insertion point as it can't find any separators with the desired id in the model.
Comment 5 Remy Suen CLA 2011-09-26 14:11:22 EDT
Created attachment 204031 [details]
Menu contributions patch v1

If we make the renderer recurse downwards to create opaque items for missing menu managers then the problem is solved.

Though it's not clear to me if these really have to be opaque or if they could instead be actual model elements.
Comment 6 Paul Webster CLA 2011-12-05 15:47:02 EST
(In reply to comment #5)
> Created attachment 204031 [details]
> Menu contributions patch v1
> 
I've released this for the next build.

PW
Comment 7 Remy Suen CLA 2012-01-11 11:15:52 EST
(In reply to comment #6)
> (In reply to comment #5)
> > Created attachment 204031 [details]
> > Menu contributions patch v1
> > 
> I've released this for the next build.

This looks okay on I20120110-2200.

Nick, the 'Source' submenu appears for me when I bring up the context menu on an XML file's 'Source' tab. Please let us know if you still have this problem.
Comment 8 Remy Suen CLA 2012-01-24 11:16:33 EST
Verified with I20120123-2200 on Windows 7.