Class RepositoryManipulationPage

  • All Implemented Interfaces:
    ICopyable, IDialogPage, IMessageProvider, IPreferencePage, IWorkbenchPreferencePage

    public class RepositoryManipulationPage
    extends PreferencePage
    implements IWorkbenchPreferencePage, ICopyable
    Page that allows users to update, add, remove, import, and export repositories. This page can be hosted inside a preference dialog or inside its own dialog. When hosting this page inside a non-preference dialog, some of the dialog methods will likely have to call page methods. The following snippet shows how to host this page inside a TitleAreaDialog.
                    TitleAreaDialog dialog = new TitleAreaDialog(shell) {
                            RepositoryManipulationPage page;
                            protected Control createDialogArea(Composite parent) {
                                    page = new RepositoryManipulationPage();
                                    this.setTitle("Software Sites");
                                    this.setMessage("The enabled sites will be searched for software.  Disabled sites are ignored.");
                                    return page.getControl();
                            protected void okPressed() {
                                    if (page.performOk())
                            protected void cancelPressed() {
                                    if (page.performCancel())
    This class is not intended to be subclassed by clients.
    • Constructor Detail

      • RepositoryManipulationPage

        public RepositoryManipulationPage()
        Create a repository manipulation page that will display the repositories available to the user.
    • Method Detail

      • setProvisioningUI

        public void setProvisioningUI​(ProvisioningUI ui)
        Set the provisioning UI that provides the session, policy, and other services for the UI. This method must be called before the contents are created or it will have no effect.
        ui - the provisioning UI to use for this page.
      • createContents

        protected Control createContents​(Composite parent)
        Description copied from class: PreferencePage
        Creates and returns the SWT control for the customized body of this preference page under the given parent composite.

        This framework method must be implemented by concrete subclasses. Any subclass returning a Composite object whose Layout has default margins (for example, a GridLayout) is expected to set the margins of this Layout to 0 pixels.

        Specified by:
        createContents in class PreferencePage
        parent - the parent composite
        the new control
      • performOk

        public boolean performOk()
        Description copied from interface: IPreferencePage
        Notifies that the OK button of this page's container has been pressed.
        Specified by:
        performOk in interface IPreferencePage
        performOk in class PreferencePage
        false to abort the container's OK processing and true to allow the OK to happen
      • init

        public void init​(IWorkbench workbench)
        Description copied from interface: IWorkbenchPreferencePage
        Initializes this preference page for the given workbench.

        This method is called automatically as the preference page is being created and initialized. Clients must not call this method.

        Specified by:
        init in interface IWorkbenchPreferencePage
        workbench - the workbench
      • copyToClipboard

        public void copyToClipboard​(Control activeControl)
        Description copied from interface: ICopyable
        Copy text related to the active control to the clipboard.
        Specified by:
        copyToClipboard in interface ICopyable
        activeControl - the active control