protected void handleSelected(StructuredSelection selection) { super.handleSelected(selection); if (selection.size() == 0 && fTypeWizardPage.getSuperInterfaces().size() > fOldContent.size()) { // overrides updateStatus() from handleSelected() if // list of super interfaces was modified // the <code>super.handleSelected(selection)</code> has to be // called, because superclass implementation of this class updates // state of the table. updateStatus(new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null)); //$NON-NLS-1$ getButton(ADD_ID).setEnabled(false); } else { // if selection isn't empty, the add button should be enabled in // exactly the same scenarios as the OK button getButton(ADD_ID).setEnabled(getButton(OK).isEnabled()); } }
@Override protected void handleSelected(StructuredSelection selection) { super.handleSelected(selection); if (selection.size() == 0 && fTypeWizardPage.getSuperInterfaces().size() > fOldContent.size()) { // overrides updateStatus() from handleSelected() if // list of super interfaces was modified // the <code>super.handleSelected(selection)</code> has to be // called, because superclass implementation of this class updates // state of the table. updateStatus(Status.OK_STATUS); getButton(ADD_ID).setEnabled(false); } else { // if selection isn't empty, the add button should be enabled in // exactly the same scenarios as the OK button getButton(ADD_ID).setEnabled(getButton(OK).isEnabled()); } }
@Override protected void handleSelected(StructuredSelection selection) { super.handleSelected(selection); if (selection.size() == 0 && fTypeWizardPage.getSuperInterfaces().size() > fOldContent.size()) { // overrides updateStatus() from handleSelected() if // list of super interfaces was modified // the <code>super.handleSelected(selection)</code> has to be // called, because superclass implementation of this class updates // state of the table. updateStatus(Status.OK_STATUS); getButton(ADD_ID).setEnabled(false); } else { // if selection isn't empty, the add button should be enabled in // exactly the same scenarios as the OK button getButton(ADD_ID).setEnabled(getButton(OK).isEnabled()); } }
@Override protected void handleSelected(StructuredSelection selection) { super.handleSelected(selection); if (selection.size() == 0 && getSuperTypeCount(this.typeWizardPage) > this.oldContent.size()) { // overrides updateStatus() from handleSelected() if // list of super interfaces was modified // the <code>super.handleSelected(selection)</code> has to be // called, because superclass implementation of this class updates // state of the table. updateStatus(Status.OK_STATUS); getButton(ADD_ID).setEnabled(false); } else { // if selection isn't empty, the add button should be enabled in // exactly the same scenarios as the OK button getButton(ADD_ID).setEnabled(getButton(OK).isEnabled()); } }