List of usage examples for org.eclipse.jface.dialogs IDialogConstants OK_LABEL
String OK_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants OK_LABEL.
Click Source Link
From source file:com.salesforce.ide.ui.internal.startup.ForceStartup.java
License:Open Source License
public void earlyStartup() { if (!Utils.isSkipCompatibilityCheck()) { Bundle bundle = Platform.getBundle(Constants.PREV_IDE_BUNDLE_NAME); if (bundle != null) { int state = bundle.getState(); if (logger.isDebugEnabled()) { StringBuilder debugInfo = new StringBuilder("Current state of older version bundle '"); debugInfo.append(Constants.PREV_IDE_BUNDLE_NAME + "' is '" + state + "'"); debugInfo.append("Ref: UNINSTALLED=" + Bundle.UNINSTALLED + ", INSTALLED=" + Bundle.INSTALLED + ", RESOLVED=" + Bundle.RESOLVED + ", STARTING=" + Bundle.STARTING + ", STOPPING=" + Bundle.STOPPING + ", ACTIVE=" + Bundle.ACTIVE + ")"); logger.debug(debugInfo); }// ww w . jav a 2 s . co m if (state != Bundle.STOPPING || state != Bundle.UNINSTALLED) { String title = UIMessages.getString("Force.Startup.Compatibility.Warning.title"); String bundleName = (String) bundle.getHeaders().get(Constants.BUNDLE_ATTRIBUTE_NAME); String bundleVersion = (String) bundle.getHeaders().get(Constants.BUNDLE_ATTRIBUTE_VERSION); String dialogMsg = UIMessages.getString("Force.Startup.Compatibility.Warning.message", new String[] { bundleName, bundleVersion }); MessageDialogRunnable messageDialogRunnable = new MessageDialogRunnable(title, null, dialogMsg, MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL }, 0); Display.getDefault().asyncExec(messageDialogRunnable); } } } Display.getDefault().asyncExec(new Runnable() { public void run() { IPerspectiveDescriptor[] perspectives = PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getActivePage().getOpenPerspectives(); if (Utils.isNotEmpty(perspectives)) { for (IPerspectiveDescriptor perspectiveDescriptor : perspectives) { if (perspectiveDescriptor.getId().startsWith(Constants.SFDC_PREFIX)) { logger.debug("Found " + perspectiveDescriptor.getId() + " perspective"); //$NON-NLS-1$ //$NON-NLS-2$ } } } } }); addPackageManifestChangeListener(); }
From source file:com.salesforce.ide.ui.refactoring.BaseRefactorController.java
License:Open Source License
protected void testDeploy(IProgressMonitor monitor) throws OperationCanceledException, InterruptedException, ServiceException, ForceRemoteException { DeployResultExt deployResultExt = null; ProjectPackageList projectPackageList = refactorModel.getProjectPackageList(); monitorCheck(monitor);//w w w. j a v a 2s. c om try { try { deployResultExt = ContainerDelegate.getInstance().getServiceLocator().getPackageDeployService() .deployDelete(projectPackageList, true, monitor); } catch (ServiceTimeoutException ex) { deployResultExt = ContainerDelegate.getInstance().getServiceLocator().getPackageDeployService() .handleDeployServiceTimeoutException(ex, "test deploy", monitor); } if (!deployResultExt.isSuccess()) { deployResultExt.getMessageHandler().sort(DeployMessageExt.SORT_RESULT); DeployMessage[] deployMessages = deployResultExt.getMessageHandler().getMessages(); for (DeployMessage deployMessage : deployMessages) { if (!deployMessage.isSuccess()) { logger.warn("Component '" + deployMessage.getFullName() + "' failed test delete: '" + deployMessage.getProblem() + "'. will be deleted locally only."); projectPackageList.removeComponentByFilePath(deployMessage.getFileName(), true, true); monitorCheck(monitor); MessageDialogRunnable messageDialogRunnable = new MessageDialogRunnable( "Remote Delete Error", null, UIMessages.getString("Refactor.Delete.Complete.CannotDelete.message", new String[] { deployMessage.getFileName(), deployMessage.getProblem() }), MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); Display.getDefault().syncExec(messageDialogRunnable); if (messageDialogRunnable.getAction() == 1) { logger.warn("Canceling delete operation"); throw new OperationCanceledException("Delete operation canceled"); } } } } } catch (InterruptedException e) { throw new OperationCanceledException(e.getMessage()); } catch (DeployException e) { logger.error("Unable to perform server delete", e); } catch (ForceConnectionException e) { logger.warn("Unable to perform server delete", e); } }
From source file:com.salesforce.ide.upgrade.ui.wizards.CompareDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); }
From source file:com.schmeedy.relaxng.eclipse.ui.internal.preferences.EditRngSchemaBindingDialog.java
License:Open Source License
@Override protected Control createContents(Composite parent) { errorReportColor = new Color(parent.getDisplay(), 200, 0, 0); warningReportColor = new Color(parent.getDisplay(), 204, 102, 0); browseImage = RngUiPlugin.getDefault().getIcon("file_expand.gif").createImage(); Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(GridLayoutFactory.createFrom(new GridLayout(3, false)).margins(10, 7).create()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); Label labelNamespace = new Label(composite, SWT.NONE); labelNamespace.setText("Namespace: "); GridData inputLayoutData = new GridData(GridData.FILL_HORIZONTAL); inputLayoutData.widthHint = 270;//w w w .j a v a 2 s. co m namespaceText = new Text(composite, SWT.SINGLE | SWT.BORDER); namespaceText.setLayoutData(GridDataFactory.createFrom(inputLayoutData).span(2, 1).create()); Label labelSchemaLocation = new Label(composite, SWT.NONE); labelSchemaLocation.setText("Schema Location: "); schemaLocationText = new Text(composite, SWT.SINGLE | SWT.BORDER); schemaLocationText.setLayoutData(inputLayoutData); Button browseControl = createBrowseButton(composite); browseControl.addSelectionListener(new DropDownSelectionListener(schemaLocationText)); Label labelSchemaType = new Label(composite, SWT.NONE); labelSchemaType.setText("Schema Syntax: "); schemaTypeCombo = new Combo(composite, SWT.READ_ONLY); schemaTypeCombo.setLayoutData(GridDataFactory.createFrom(inputLayoutData).span(2, 1).create()); schemaTypeCombo.add("XML", SCHEMA_TYPE_XML_COMBO_IDX); schemaTypeCombo.add("Compact", SCHEMA_TYPE_COMPACT_COMBO_IDX); errorReportArea = new Label(composite, SWT.NONE); errorReportArea.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).span(3, 1).create()); Composite buttonComposite = new Composite(composite, SWT.NONE); buttonComposite.setLayout(new GridLayout(2, false)); buttonComposite .setLayoutData(GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).span(3, 1).create()); okButton = createButton(buttonComposite, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); okButton.setEnabled(false); createButton(buttonComposite, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); if (binding != null) { initEditedValues(); } revalidate(); ModifyListener validationListener = new ModifyListener() { public void modifyText(ModifyEvent e) { revalidate(); } }; namespaceText.addModifyListener(validationListener); schemaLocationText.addModifyListener(validationListener); schemaTypeCombo.addModifyListener(validationListener); return composite; }
From source file:com.siteview.mde.internal.ui.editor.feature.PortabilityChoicesDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.siteview.mde.internal.ui.editor.schema.NewRestrictionDialog.java
License:Open Source License
public NewRestrictionDialog(Shell parent) { super(parent, MDEUIMessages.NewRestrictionDialog_title, null, MDEUIMessages.NewRestrictionDialog_message, QUESTION, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); }
From source file:com.siteview.mde.internal.ui.launcher.LauncherUtilsStatusHandler.java
License:Open Source License
private static void generateErrorDialog(final String title, final String message, final ILaunchConfiguration launchConfig, final String mode) { getDisplay().syncExec(new Runnable() { public void run() { Shell parentShell = getActiveShell(); MessageDialog dialog = new MessageDialog(parentShell, title, null, message, MessageDialog.ERROR, new String[] { MDEUIMessages.LauncherUtils_edit, IDialogConstants.OK_LABEL }, 1); int res = dialog.open(); if (res == 0) { IStructuredSelection selection = new StructuredSelection(launchConfig); ILaunchGroup group = DebugUITools.getLaunchGroup(launchConfig, mode); String groupIdentifier = group == null ? IDebugUIConstants.ID_RUN_LAUNCH_GROUP : group.getIdentifier(); IStatus status = new Status(IStatus.OK, PDELaunchingPlugin.getPluginId(), LauncherUtils.SELECT_WORKSPACE_FIELD, "", null); //$NON-NLS-1$ DebugUITools.openLaunchConfigurationDialogOnGroup(parentShell, selection, groupIdentifier, status);/*from www .j a va 2 s . com*/ } } }); }
From source file:com.siteview.mde.internal.ui.launcher.PluginStatusDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); if (fShowCancelButton) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }//from www. j a v a2 s.c o m }
From source file:com.siteview.mde.internal.ui.wizards.imports.PluginImportWizard.java
License:Open Source License
public boolean performFinish() { page1.storeSettings();/* w w w. j av a 2 s . c o m*/ ((BaseImportWizardSecondPage) page1.getNextPage()).storeSettings(); final IMonitorModelBase[] models = getModelsToImport(); int launchedConfiguration = getConflictingConfigurationsCount(models); if (launchedConfiguration > 0) { String message = launchedConfiguration == 1 ? MDEUIMessages.PluginImportWizard_runningConfigDesc : MDEUIMessages.PluginImportWizard_runningConfigsDesc; MessageDialog dialog = new MessageDialog(getShell(), MDEUIMessages.PluginImportWizard_runningConfigsTitle, null, message, MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); if (dialog.open() != IDialogConstants.OK_ID) return false; } if (page1.getImportType() == PluginImportOperation.IMPORT_FROM_REPOSITORY) { if (getContainer().getCurrentPage() instanceof BaseImportWizardSecondPage) { // ensure to set the models to import when finished is pressed without advancing to the repository pages page1.configureBundleImportPages(models); } } // finish contributed pages if (!page1.finishPages()) { return false; } doImportOperation(page1.getImportType(), models, page2.forceAutoBuild(), launchedConfiguration > 0, page1.getAlternateSourceLocations(), page1.getImportDescriptions()); return true; }
From source file:com.softberries.klerk.gui.dialogs.AddressDialog.java
License:Open Source License
/** * Create contents of the button bar./*from w w w. j a v a2s . c o m*/ * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); m_bindingContext = initDataBindings(); okButton.setEnabled(getFormValid()); }