Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.MessageDialogWithToggle.open()


                        }
                    }

                    AddFilesToRepositoryWizard wizard = new AddFilesToRepositoryWizard(null, files);
                    WizardDialog dialog = new WizardDialog(getSection().getShell(), wizard);
                    if (Window.OK == dialog.open()) {
                        List<Pair<String,String>> addingBundles = wizard.getSelectedBundles();
                        List<VersionedClause> addingClauses = new ArrayList<VersionedClause>(addingBundles.size());

                        for (Pair<String,String> addingBundle : addingBundles) {
                            Attrs attribs = new Attrs();
View Full Code Here


            private boolean handleURLDrop(String urlStr) {
                try {
                    URI uri = new URI(urlStr);
                    AddJpmDependenciesWizard wizard = new AddJpmDependenciesWizard(uri);
                    WizardDialog dialog = new WizardDialog(getSection().getShell(), wizard);
                    if (dialog.open() == Window.OK) {
                        Set<ResourceDescriptor> resources = wizard.getResult();
                        List<VersionedClause> newBundles = new ArrayList<VersionedClause>(resources.size());
                        for (ResourceDescriptor resource : resources) {
                            Attrs attrs = new Attrs();
                            attrs.put(Constants.VERSION_ATTRIBUTE, resource.version != null ? resource.version.toString() : Version.emptyVersion.toString());
View Full Code Here

        null, message, MessageDialog.WARNING, new String[] {
            IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0,
        null, false);
    dialog.setPrefKey(UIPreferences.PREF_ALLOW_INPLACE_INSTRUMENTATION);
    dialog.setPrefStore(store);
    dialog.open();

    return Boolean.valueOf(dialog.getReturnCode() == IDialogConstants.OK_ID);
  }

}
View Full Code Here

        null, message, MessageDialog.WARNING, new String[] {
            IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0,
        null, false);
    dialog.setPrefKey(UIPreferences.PREF_ALLOW_INPLACE_INSTRUMENTATION);
    dialog.setPrefStore(store);
    dialog.open();

    return new Boolean(dialog.getReturnCode() == IDialogConstants.OK_ID);
  }

}
View Full Code Here

        launchConfiguration.getName());
    MessageDialogWithToggle continueDialog = new MessageDialogWithToggle(
        getShell(), UIText.BranchOperationUI_RunningLaunchTitle, null,
        message, MessageDialog.NONE, buttons, 0,
        UIText.BranchOperationUI_RunningLaunchDontShowAgain, false);
    int result = continueDialog.open();
    // cancel
    if (result == IDialogConstants.CANCEL_ID || result == SWT.DEFAULT)
      return true;
    boolean dontWarnAgain = continueDialog.getToggleState();
    if (dontWarnAgain)
View Full Code Here

              "Don't show this warning in future.", false);
          //MessageBox msg = new MessageBox(this.getEditorSite().getShell());
          //msg.setText("Warning!");
          //msg.setMessage("You are opening a read only file. You will not be
          // able to make or save any changes.");
          if (msg.open() == 0) {
            if (msg.getToggleState()) {
              // Don't show warning in future.
              getPreferenceStore().setValue(
                  EditorPreferenceConstants.P_WARN_READ_ONLY_FILES, false);
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.