Example usage for org.eclipse.jface.dialogs IDialogConstants CLOSE_LABEL

List of usage examples for org.eclipse.jface.dialogs IDialogConstants CLOSE_LABEL

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogConstants CLOSE_LABEL.

Prototype

String CLOSE_LABEL

To view the source code for org.eclipse.jface.dialogs IDialogConstants CLOSE_LABEL.

Click Source Link

Document

The label for close buttons.

Usage

From source file:org.eclipse.emf.cdo.internal.ui.dialogs.PackageManagerDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, REGISTER_GENERATED_PACKAGES_ID, "Generated...", false);
    createButton(parent, REGISTER_WORKSPACE_PACKAGES_ID, "Workspace...", false);
    createButton(parent, REGISTER_FILESYSTEM_PACKAGES_ID, "Filesystem...", false);
    createButton(parent, IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, false);
}

From source file:org.eclipse.emf.cdo.internal.ui.dialogs.PackageRegistryDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    Button button = createButton(parent, -1, Messages.getString("PackageRegistryDialog.5"), false); //$NON-NLS-1$
    button.setEnabled(isGlobalPackageAvaliable());
    button.addSelectionListener(new SelectionAdapter() {
        @Override//  w w  w .j av a 2  s . c o m
        public void widgetSelected(SelectionEvent e) {
            new RegisterGeneratedPackagesAction(page, session) {
                @Override
                protected void postRegistration(List<EPackage> ePackages) {
                    refreshViewer();
                }
            }.run();
        }
    });

    createButton(parent, -1, Messages.getString("PackageRegistryDialog.7"), false) //$NON-NLS-1$
            .addSelectionListener(new SelectionAdapter() {
                @Override
                public void widgetSelected(SelectionEvent e) {
                    new RegisterFilesystemPackagesAction(page, session) {
                        @Override
                        protected void postRegistration(List<EPackage> ePackages) {
                            refreshViewer();
                        }
                    }.run();
                }
            });

    CustomizeableComposite.customize(parent, IPluginContainer.INSTANCE, PRODUCT_GROUP, this);

    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, false);
}

From source file:org.eclipse.equinox.internal.provisional.security.ui.X509CertificateViewDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    // The default has only a "Close" button, but it returns the CANCEL Id
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, true);

}

From source file:org.eclipse.gmf.runtime.common.ui.dialogs.PropertiesDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    // create close button
    closeButton = createButton(parent, IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, true);
    getShell().setDefaultButton(closeButton);
}

From source file:org.eclipse.jubula.client.alm.mylyn.ui.dialogs.InspectALMAttributesDialog.java

License:Open Source License

/**
 * {@inheritDoc}
 */
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, true);
}

From source file:org.eclipse.linuxtools.internal.docker.ui.launch.BuildDockerImageShortcutSWTBotTest.java

License:Open Source License

@Test
@RunWithProject("foo")
public void shouldNotBuildDockerImageOnSecondCallWhenAllConnectionWereRemoved()
        throws InterruptedException, com.spotify.docker.client.DockerException, IOException {
    // given//from  w  ww.  ja va2 s  . c o m
    final DockerClient client = MockDockerClientFactory.build();
    final DockerConnection dockerConnection = MockDockerConnectionFactory.from("Test", client)
            .withDefaultTCPConnectionSettings();
    DockerConnectionManagerUtils.configureConnectionManager(dockerConnection);
    // when
    SWTUtils.asyncExec(() -> getRunAsdockerImageBuildContextMenu("foo", "Dockerfile").click());
    // then expect a dialog, fill the "repository" text field and click "Ok"
    assertThat(bot.shell(WizardMessages.getString("ImageBuildDialog.title"))).isNotNull();
    bot.textWithLabel(WizardMessages.getString("ImageBuildDialog.repoNameLabel")).setText("foo/bar:latest");
    // when launching the build
    SWTUtils.syncExec(() -> {
        bot.button("OK").click();
    });
    // then the 'DockerConnection#buildImage(...) method should have been
    // called within the specified timeout
    Mockito.verify(client, Mockito.timeout((int) TimeUnit.SECONDS.toMillis(30)).times(1)).build(
            Matchers.any(Path.class), Matchers.any(String.class), Matchers.any(ProgressHandler.class),
            Matchers.anyVararg());
    // when trying to call again after connection was removed, there should
    // be an error dialog
    DockerConnectionManager.getInstance().removeConnection(dockerConnection);
    SWTUtils.asyncExec(() -> getRunAsdockerImageBuildContextMenu("foo", "Dockerfile").click(), false);
    final SWTBotShell shell = bot.shell("Edit Configuration");
    assertThat(shell).isNotNull();
    assertThat(shell.bot().button("Run").isEnabled()).isFalse();
    // closing the wizard
    SWTUtils.asyncExec(() -> {
        shell.bot().button(IDialogConstants.CLOSE_LABEL).click();
    }, false);
    // do not save the config while closing
    SWTUtils.syncExec(() -> {
        bot.button(IDialogConstants.NO_LABEL).click();
    });
}

From source file:org.eclipse.papyrus.diagram.activity.edit.dialogs.WarningAndCreateAttributeDialog.java

License:Open Source License

/**
 * Constructor.//ww w  .  j  a v a 2  s .  c  o  m
 * 
 * @param parentShell
 *        shell
 * @param dialogTitle
 *        title of the dialog
 * @param dialogMessage
 *        main message of the dialog
 * @param linkElement
 *        element to show
 * @param labelProvider
 *        label provider
 */
public WarningAndCreateAttributeDialog(Shell parentShell, String dialogTitle, String dialogMessage,
        NamedElement linkElement, ILabelProvider labelProvider) {
    super(parentShell, dialogTitle, null, dialogMessage, WARNING,
            new String[] { CREATE_LABEL, IDialogConstants.CLOSE_LABEL }, 0);
    attributeOwner = linkElement;
    provider = labelProvider;
}

From source file:org.eclipse.papyrus.diagram.activity.edit.dialogs.WarningAndCreateParameterDialog.java

License:Open Source License

/**
 * Constructor./*from  w  ww.  j a v  a  2 s.co  m*/
 * 
 * @param parentShell
 *        shell
 * @param dialogTitle
 *        title of the dialog
 * @param dialogMessage
 *        main message of the dialog
 * @param linkElement
 *        element to show
 * @param labelProvider
 *        label provider
 * @param preferredDirection
 *        direction to use as default for parameter creation
 */
public WarningAndCreateParameterDialog(Shell parentShell, String dialogTitle, String dialogMessage,
        NamedElement linkElement, ILabelProvider labelProvider, ParameterDirectionKind preferredDirection) {
    super(parentShell, dialogTitle, null, dialogMessage, WARNING,
            new String[] { CREATE_LABEL, IDialogConstants.CLOSE_LABEL }, 0);
    parameterOwner = linkElement;
    defaultDirection = preferredDirection;
    provider = labelProvider;
}

From source file:org.eclipse.plugin.worldwind.utils.CacheManagerDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    // delete selected  btn
    Button btn = createButton(parent, IDialogConstants.NO_ID, Messages.getString("CacheManagerDialog.2"), true); //$NON-NLS-1$

    btn.addSelectionListener(new SelectionAdapter() {
        @SuppressWarnings("unchecked") //$NON-NLS-1$
        public void widgetSelected(SelectionEvent e) {
            // Delete selected
            try {
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();

                if (selection == null || selection.isEmpty())
                    return;

                Iterator iter = selection.iterator();

                // delete selected items
                while (iter.hasNext()) {
                    final String sel = (String) iter.next();
                    // get path
                    final String path = sel.split("-")[0].trim(); //$NON-NLS-1$

                    //System.out.println("Delete " + path);
                    deleteResource(new File(path));
                }//from w ww . j a  v a 2 s . com

                // refresh table
                final String path = combo.getText();

                viewer.getTable().removeAll();

                depth = 0;
                loadTable(new File(path));
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
    });

    // close dlg
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, false);
}

From source file:org.eclipse.rcptt.ui.panels.assertion.WidgetDetailsDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(final Composite parent) {
    createButton(parent, COPY_ID, "Copy to clipboard", true);
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, true);
}