Community
Participate
Working Groups
source->format menu should only appear in context menu for formattable files like xml html jsp css not dtd all other sse files probably need to contribute the format handler the same way other handlers are contributed for xml/html-specific actions.
Created attachment 97300 [details] patch This patch addresses the issue of the Source context menu showing up in the project navigator for file types that don't have Formatting support. To accomplish this, the SSE UI plugin is no longer the sole provider of the Source menu. The Source menu provided by SSE UI is available only for IContainers. The XML, CSS, JSP, and HTML UI plugins all define their own Source menus that are only displayed for IFiles that have the required contentTypeId. To support files that may have content types that are based on other content types, the SSE Core plugin contributes a propertyTester that will ascend content types until they are exhausted, or a matching content type is found for the expected value. This means that XSD files will not need to provide their own Source menu, since their content type is based on the XML content type. This also gives 4 new menu ids: xmlSourceMenuId, cssSourceMenuId, jspSourceMenuId, and htmlSourceMenuId.
Because 4 new source menus are being contributed, I'm marking this for PII.
I flagged this as - because I don't think we should be creating 4 Source menus. sse.ui should still be the one to create the one Source menu. And then xml, html, jsp, css will need to dictate that the format command/handler should be visible/enabled.
Created attachment 97334 [details] removing multiple source menus Each content-type is now responsible for activating and enabling the FormatHandler. The Source menu is once again only contributed by the SSE UI plugin, but the visibility of it is requiring that the handler is enabled.
Also removed PII from keywords as there are no new menu contributions with the most recent patch.
Patch looks good. I just made one small change in the menu definition in sse.ui to remove all the child tags within visibleWhen checkEnabled=true. Released for this week's M7.
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword.
Verified in I20080429053810.