Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318263

Summary: Remove o.e.platform branding bundle
Product: [Tools] MAT Reporter: Benjamin Muskalla <b.muskalla>
Component: GUIAssignee: Krum Tsvetkov <krum.tsvetkov>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: andrew_johnson
Version: 1.1   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 262603    
Attachments:
Description Flags
patch andrew_johnson: iplog+

Description Benjamin Muskalla CLA 2010-06-28 19:32:58 EDT
Currently MAT ships with the org.eclipse.platform bundle which is essential the branding bundle for the Eclipse SDK. It contains many unneeded files for the MAT RCP version (SDK Intro, CVS cheatsheets, icons, splash screens, etc). Besides that this is unnecessary, it carries broken things if not part of the SDK (eg. the CVS cheatsheets do not work without CVS bundles).
The only interesting thing in that bundle is the definition of the cheatsheet action set which should be transfered to the org.eclipse.mat.ui.rcp bundle.
Comment 1 Krum Tsvetkov CLA 2010-07-01 06:23:15 EDT
Thanks for the hint. I would unfortunately need some more explanation.
I checked the dependencies of org.eclipse.mat.ui.rcp and see there the platform as you mentioned. 

1st attempt) I tried then removing it - everything compiles, but the cheetsheets don't come up.
2nd attempt) I tried then to copy (just as it is) the following actionSets definition

   <extension
         point="org.eclipse.ui.actionSets">
      <actionSet
            label="%cheatsheet.actionset"
            visible="true"
            id="org.eclipse.ui.cheatsheets.actionSet">
         <action
               label="%cheatsheet.item"
               class="org.eclipse.ui.cheatsheets.CheatSheetExtensionFactory:helpMenuAction"
               menubarPath="help/group.tutorials"
               id="org.eclipse.ui.cheatsheets.actions.CheatSheetHelpMenuAction">
         </action>
      </actionSet>
   </extension>
   
This also didn't help: wneh I try to open a cheetsheet I get: "No standby content part defined with id: org.eclipse.platform.cheatsheet."

3rd attempt) Wanted to also copy the following
   <extension point="org.eclipse.ui.intro.configExtension">
      <standbyContentPart
            id="org.eclipse.platform.cheatsheet"
            class="org.eclipse.platform.internal.CheatSheetStandbyContent"
            pluginId="org.eclipse.platform"/>
            ...
But it already points to some class within the platform bundle. 

At this moment I'd prefer to ask for more hints, as I'm afraid I'm not doing the right thing and haven't really understood your suggestion.
What did you mean by 
>> the definition of the cheatsheet action set which should be transfered to the org.eclipse.mat.ui.rcp bundle
Comment 2 Benjamin Muskalla CLA 2010-07-01 09:33:32 EDT
Created attachment 173215 [details]
patch

This patch includes the changes I suggested. When running MAT from the product file, everything looks fine to me (menu item is there, can open the MAT cheatsheets).

btw: I think the cheatsheets itself should be moved to the help bundle + the dependency to o.e.ui.cheatsheets
Comment 3 Andrew Johnson CLA 2010-09-15 11:42:26 EDT
The patch works as advertised, so I'll include it and the Tycho/Maven build should show a cheat sheets page without CVS.
Comment 4 Andrew Johnson CLA 2010-09-16 05:26:39 EDT
I now see the problem that Krum had. The cheat sheets work from Help -> Cheat sheets but not from the welcome page, which fails with ""No standby content part defined with id: org.eclipse.platform.cheatsheet."

The CheatSheetStandbyContent class can be copied from org.eclipse.platform into o.e.mat.ui, then we can have our own standby content instead of needing o.e.platform bundle. The intro tutorial XML need to be modified to change
url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mat.tutorials.bestFeaturesTutorial">  

to point to our version of the standby partId.
Comment 5 Andrew Johnson CLA 2010-09-16 10:56:52 EDT
I've made the changes in the patch, created our own copy of CheatSheetStandbyContent and associated extension in org.eclipse.mat.ui, moved the cheat sheets to the org.eclipse.mat.ui.help plugin, adjusted the build properties to ensure they are still packaged.