Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.IDialogSettings


  /**
   * Since Finish was pressed, write widget values to the dialog store so that
   * they will persist into the next invocation of this wizard page
   */
  protected void saveWidgetValues() {
    IDialogSettings settings = getDialogSettings();
    // record whether use was viewing internal or external editors
    settings
        .put(STORE_ID_INTERNAL_EXTERNAL, !internalButton.getSelection());
  }
View Full Code Here


                }
            }
        }

        wizard.init(workbenchWindow.getWorkbench(), selectionToPass);
        IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault()
                .getDialogSettings();
        IDialogSettings wizardSettings = workbenchSettings
                .getSection("NewWizardAction"); //$NON-NLS-1$
        if (wizardSettings == null) {
      wizardSettings = workbenchSettings.addNewSection("NewWizardAction"); //$NON-NLS-1$
    }
        wizard.setDialogSettings(wizardSettings);
View Full Code Here

        } else {
            selectionToPass = StructuredSelection.EMPTY;
        }

        wizard.init(workbenchWindow.getWorkbench(), selectionToPass);
        IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault()
                .getDialogSettings();
        IDialogSettings wizardSettings = workbenchSettings
                .getSection("ImportExportAction"); //$NON-NLS-1$
        if (wizardSettings == null) {
      wizardSettings = workbenchSettings
                    .addNewSection("ImportExportAction"); //$NON-NLS-1$
    }
View Full Code Here

        } else {
            selectionToPass = StructuredSelection.EMPTY;
        }

        wizard.init(workbenchWindow.getWorkbench(), selectionToPass);
        IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault()
                .getDialogSettings();
        IDialogSettings wizardSettings = workbenchSettings
                .getSection("ImportExportAction"); //$NON-NLS-1$
        if (wizardSettings == null) {
      wizardSettings = workbenchSettings
                    .addNewSection("ImportExportAction"); //$NON-NLS-1$
    }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.jface.window.Dialog#getDialogBoundsSettings()
   */
  protected IDialogSettings getDialogBoundsSettings() {
    IDialogSettings settings = getDialogSettings();
    IDialogSettings section = settings.getSection(DIALOG_BOUNDS_SETTINGS);
    if (section == null) {
      section = settings.addNewSection(DIALOG_BOUNDS_SETTINGS);
      section.put(DIALOG_HEIGHT, 500);
      section.put(DIALOG_WIDTH, 600);
    }
    return section;
  }
View Full Code Here

    long startTime = 0L;
    if (DEBUG) {
      startTime = System.currentTimeMillis();
    }

    IDialogSettings settings = getDialogSettings();
    if (settings.get(TAG_FILTER_ACTION_SETS) != null) {
      filterActionSetContexts = settings
          .getBoolean(TAG_FILTER_ACTION_SETS);
    }
    if (settings.get(TAG_FILTER_INTERNAL) != null) {
      filterInternalContexts = settings.getBoolean(TAG_FILTER_INTERNAL);
    }
    patternFilter = new CategoryPatternFilter(
        true, commandService.getCategory(null));
    if (settings.get(TAG_FILTER_UNCAT) != null) {
      patternFilter.filterCategories(settings
          .getBoolean(TAG_FILTER_UNCAT));
    }

    // Creates a composite to hold all of the page contents.
    final Composite page = new Composite(parent, SWT.NONE);
View Full Code Here

    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalAlignment = SWT.FILL;
    gridData.verticalAlignment = SWT.TOP;
    showAllCheckBox.setLayoutData(gridData);
    showAllCheckBox.setText(NewKeysPreferenceMessages.ShowAllCheckBox_Text);
    IDialogSettings settings = getDialogSettings();
    boolean showAllValue = !settings.getBoolean(TAG_CONVERT_SHOW_ALL)
      || settings.getBoolean(TAG_FIELD);
    showAllCheckBox.setSelection(showAllValue);
    showAllCheckBox.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        updateShowAll();
      }
View Full Code Here

    dialogSettings.put(TAG_FILTER_INTERNAL, filterInternalContexts);
    dialogSettings.put(TAG_FILTER_UNCAT, filteredTree.isFilteringCategories());
  }

  protected IDialogSettings getDialogSettings() {
    IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault()
        .getDialogSettings();

    IDialogSettings settings = workbenchSettings
        .getSection(TAG_DIALOG_SECTION);

    if (settings == null) {
      settings = workbenchSettings.addNewSection(TAG_DIALOG_SECTION);
    }
View Full Code Here

   * Hook method for saving widget values for restoration by the next instance
   * of this class.
   */
  protected void internalSaveWidgetValues() {
    // update directory names history
    IDialogSettings settings = getDialogSettings();
    if (settings != null) {
      String[] directoryNames = settings
          .getArray(STORE_DESTINATION_NAMES_ID);
      if (directoryNames == null) {
        directoryNames = new String[0];
      }

      directoryNames = addToHistory(directoryNames, getDestinationValue());
      settings.put(STORE_DESTINATION_NAMES_ID, directoryNames);
      String current = getDestinationValue();
      if (current != null && !current.equals("")) { //$NON-NLS-1$
        settings.put(STORE_DESTINATION_ID, current);
      }
      // options
      if (overwriteExistingFilesCheckbox != null) {
        settings.put(STORE_OVERWRITE_EXISTING_FILES_ID,
            overwriteExistingFilesCheckbox.getSelection());
      }
      settings.put(TRANSFER_ALL_PREFERENCES_ID, allButton.getSelection());

    }
  }
View Full Code Here

  /**
   * Hook method for restoring widget values to the values that they held last
   * time this wizard was used to completion.
   */
  protected void restoreWidgetValues() {
    IDialogSettings settings = getDialogSettings();
    boolean all = true;
    if (settings != null) {
      String[] directoryNames = settings
          .getArray(STORE_DESTINATION_NAMES_ID);
      if (directoryNames != null) {
        // destination
        setDestinationValue(directoryNames[0]);
        for (int i = 0; i < directoryNames.length; i++) {
          addDestinationItem(directoryNames[i]);
        }

        String current = settings.get(STORE_DESTINATION_ID);
        if (current != null) {
          setDestinationValue(current);
        }
        // options
        if (overwriteExistingFilesCheckbox != null) {
          overwriteExistingFilesCheckbox.setSelection(settings
              .getBoolean(STORE_OVERWRITE_EXISTING_FILES_ID));
        }
        all = settings.getBoolean(TRANSFER_ALL_PREFERENCES_ID);
      }
    }
    if (all) {
      allButton.setSelection(true);
    } else {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.dialogs.IDialogSettings

Copyright © 2018 www.massapicom. 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.