Search code examples
eclipse-rcpe4

Enable min/max button on parts of RCP app


I created a RCP app following "New Plug-in Project" wizard. (Check "This plug-in will make contributions to the UI" and "Yes". Select template "Eclipse 4 RCP application". Check "Create sample content".) When I run the app, there are no min/max button on the part. I have tried to add them by this CSS:

.MPartStack {
  swt-minimize-visible: true;
  swt-maximize-visible: true;
}

The buttons appeared but they didn't work. Can you help me to show those buttons correctly? Thanks!

I'm using Eclipse PDE Oxygen Release (4.7.0).


Solution

  • Include org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon in the 'Add-ons' list in your Application.e4xmi. The full text for the Add-on entry will be:

    bundleclass://org.eclipse.e4.ui.workbench.addons.swt/org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon