### Eclipse Workspace Patch 1.0 #P org.eclipse.pde.ui Index: src/org/eclipse/pde/internal/ui/parts/SharedPartWithButtons.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/parts/SharedPartWithButtons.java,v retrieving revision 1.12 diff -u -r1.12 SharedPartWithButtons.java --- src/org/eclipse/pde/internal/ui/parts/SharedPartWithButtons.java 8 Jun 2007 16:45:07 -0000 1.12 +++ src/org/eclipse/pde/internal/ui/parts/SharedPartWithButtons.java 24 Oct 2007 07:38:44 -0000 @@ -44,6 +44,19 @@ fButtons[index].setEnabled(enabled); } } + + /** + * Set the specified button's visibility. + * Fix for defect 190717. + * @param index The index of the button to be changed + * @param visible true if the button is to be shown, false if hidden + */ + public void setButtonVisible(int index, boolean visible) { + if (fButtons != null && index >= 0 && fButtons.length > index) { + fButtons[index].setVisible(visible); + } + } + protected abstract void createMainControl(Composite parent, int style, int span, FormToolkit toolkit); protected abstract void buttonSelected(Button button, int index); Index: src/org/eclipse/pde/internal/ui/editor/target/ContentSection.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/target/ContentSection.java,v retrieving revision 1.19 diff -u -r1.19 ContentSection.java --- src/org/eclipse/pde/internal/ui/editor/target/ContentSection.java 23 May 2007 18:41:01 -0000 1.19 +++ src/org/eclipse/pde/internal/ui/editor/target/ContentSection.java 24 Oct 2007 07:38:44 -0000 @@ -290,6 +290,16 @@ boolean pluginTab = (fLastTab == 0); table.setButtonEnabled(3, isEditable() && pluginTab && !useAllPlugins); table.setButtonEnabled(4, isEditable() && pluginTab && !useAllPlugins && hasItems); + + + // Fix for defect 190717 + // Only show the working set and required buttons on the plugin tab + // (retaining the existing enablement logic in the rare case the + // platform doesn't support control.visible=false; I can't imagine + // how this would happen, but better to be safe?) + table.setButtonVisible(3, pluginTab); + table.setButtonVisible(4, pluginTab); + } protected boolean canPaste(Object target, Object[] objects) {