Java 类org.eclipse.jface.dialogs.IDialogSettings 实例源码

项目:n4js    文件:AbstractExportToSingleFileWizardPage.java   
/**
 * Restores control settings that were saved in the previous instance of this page.
 */
private void restoreWidgetValues() {
    IDialogSettings settings = getDialogSettings();
    if (settings != null) {
        String[] directoryNames = settings.getArray(getStoreDestinationNamesID());
        if (directoryNames == null) {
            return; // ie.- no settings stored
        }

        // destination
        setDestinationValue(directoryNames[0]);
        for (int i = 0; i < directoryNames.length; i++) {
            addDestinationItem(directoryNames[i]);
        }

        // options
        overwriteExistingFilesCheckbox.setSelection(settings.getBoolean(getStoreOverwriteExistingFilesID()));
    }
}
项目:n4js    文件:AbstractExportToSingleFileWizardPage.java   
/**
 * Hook method for saving widget values for restoration by the next instance of this class.
 */
private void saveWidgetValues() {
    // update directory names history
    IDialogSettings settings = getDialogSettings();
    if (settings != null) {
        String[] directoryNames = settings.getArray(getStoreDestinationNamesID());
        if (directoryNames == null) {
            directoryNames = new String[0];
        }

        directoryNames = addToHistory(directoryNames, getTargetDirectory());
        settings.put(getStoreDestinationNamesID(), directoryNames);

        // options
        settings.put(getStoreOverwriteExistingFilesID(), overwriteExistingFilesCheckbox.getSelection());
    }
}
项目:n4js    文件:ExportSelectionPage.java   
@Override
protected void internalSaveWidgetValues() {

    IDialogSettings settings = getDialogSettings();
    if (settings != null) {
        // update directory names history
        String[] directoryNames = settings
                .getArray(STORE_EXPORT_DESTINATION_FOLDERS_ID);
        if (directoryNames == null) {
            directoryNames = new String[0];
        }

        directoryNames = addToHistory(directoryNames, getDestinationValue());
        settings.put(STORE_EXPORT_DESTINATION_FOLDERS_ID, directoryNames);

        // store checkbox - compress
        settings.put(STORE_EXPORT_COMPRESS_CONTENTS_ID, compressContentsCheckbox.getSelection());
    }

}
项目:n4js    文件:ExportSelectionPage.java   
@Override
protected void restoreWidgetValues() {
    IDialogSettings settings = getDialogSettings();
    if (settings != null) {
        String[] directoryNames = settings
                .getArray(STORE_EXPORT_DESTINATION_FOLDERS_ID);
        if (directoryNames == null || directoryNames.length == 0) {
            // ie.- no settings stored
        } else {

            // destination
            setDestinationValue(directoryNames[0]);
            for (int i = 0; i < directoryNames.length; i++) {
                addDestinationItem(directoryNames[i]);
            }
        }
        compressContentsCheckbox.setSelection(settings.getBoolean(STORE_EXPORT_COMPRESS_CONTENTS_ID));
    }
}
项目:n4js    文件:NpmToolRunnerPage.java   
/** save for next usage */
protected void internalSaveWidgetValues() {

    IDialogSettings settings = getDialogSettings();
    if (settings != null) {
        // update goals history
        String[] npmGoalLines = settings
                .getArray(STORE_NPM_GOAL);
        if (npmGoalLines == null) {
            npmGoalLines = new String[0];
        }

        npmGoalLines = addToHistory(npmGoalLines, getGoalValue());
        settings.put(STORE_NPM_GOAL, npmGoalLines);

        // store checkbox - compress
        settings.put(STORE_RUN_NPM_TOOL, runNpmCheckbox.getSelection());
    }

}
项目:n4js    文件:NpmToolRunnerPage.java   
@Override
protected void restoreWidgetValues() {
    IDialogSettings settings = getDialogSettings();
    if (settings != null) {
        String[] npmGoalLines = settings
                .getArray(STORE_NPM_GOAL);
        if (npmGoalLines == null || npmGoalLines.length == 0) {
            // ie.- no settings stored
        } else {

            // destination
            setGoalValue(npmGoalLines[0]);
            for (int i = 0; i < npmGoalLines.length; i++) {
                addGoalItem(npmGoalLines[i]);
            }
        }
        runNpmCheckbox.setSelection(settings.getBoolean(STORE_RUN_NPM_TOOL));
    }
}
项目:n4js    文件:SimpleN4MFNewProjectWizard.java   
/**
 * Creates a new wizard container for creating and initializing a new N4JS project into the workspace.
 *
 * @param projectCreator
 *            the project creation logic to be triggered when finishing this wizard.
 */
@Inject
public SimpleN4MFNewProjectWizard(final IProjectCreator projectCreator) {
    super(projectCreator);
    setWindowTitle("New N4JS Project");
    setNeedsProgressMonitor(true);
    setDefaultPageImageDescriptor(NEW_PROJECT_WIZBAN_DESC);
    projectInfo = new N4MFProjectInfo();

    // Setup the dialog settings
    IDialogSettings workbenchDialogSettings = N4MFActivator.getInstance().getDialogSettings();

    IDialogSettings projectWizardSettings = workbenchDialogSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
    if (null == projectWizardSettings) {
        projectWizardSettings = workbenchDialogSettings.addNewSection(DIALOG_SETTINGS_SECTION_KEY);
    }
    setDialogSettings(projectWizardSettings);
}
项目:eclipse-batch-editor    文件:AbstractFilterableTreeQuickDialog.java   
@Override
protected Point getInitialSize() {
    IDialogSettings dialogSettings = getDialogSettings();
    if (dialogSettings == null) {
        /* no dialog settings available, so fall back to min settings */
        return new Point(minWidth, minHeight);
    }
    Point point = super.getInitialSize();
    if (point.x < minWidth) {
        point.x = minWidth;
    }
    if (point.y < minHeight) {
        point.y = minHeight;
    }
    return point;
}
项目:eclipse-bash-editor    文件:AbstractFilterableTreeQuickDialog.java   
@Override
protected Point getInitialSize() {
    IDialogSettings dialogSettings = getDialogSettings();
    if (dialogSettings == null) {
        /* no dialog settings available, so fall back to min settings */
        return new Point(minWidth, minHeight);
    }
    Point point = super.getInitialSize();
    if (point.x < minWidth) {
        point.x = minWidth;
    }
    if (point.y < minHeight) {
        point.y = minHeight;
    }
    return point;
}
项目:SWET    文件:PopupDialog.java   
/**
 * Initialize any state related to the widgetry that should be set up each
 * time widgets are created.
 */
private void initializeWidgetState() {
    menuManager = null;
    dialogArea = null;
    titleLabel = null;
    titleSeparator = null;
    infoSeparator = null;
    infoLabel = null;
    toolBar = null;

    // If the menu item for persisting bounds is displayed, use the stored
    // value to determine whether any persisted bounds should be honored at
    // all.
    if (showDialogMenu && showPersistActions) {
        IDialogSettings settings = getDialogSettings();
        if (settings != null) {
            String key = getClass().getName() + DIALOG_USE_PERSISTED_SIZE;
            if (settings.get(key) != null || !isUsing34API)
                persistSize = settings.getBoolean(key);
            key = getClass().getName() + DIALOG_USE_PERSISTED_LOCATION;
            if (settings.get(key) != null || !isUsing34API)
                persistLocation = settings.getBoolean(key);
        }
    }
}
项目:SWET    文件:PopupDialog.java   
private void migrateBoundsSetting() {
    IDialogSettings settings = getDialogSettings();
    if (settings == null)
        return;

    final String className = getClass().getName();

    String key = className + DIALOG_USE_PERSISTED_BOUNDS;
    String value = settings.get(key);
    if (value == null || DIALOG_VALUE_MIGRATED_TO_34.equals(value))
        return;

    boolean storeBounds = settings.getBoolean(key);
    settings.put(className + DIALOG_USE_PERSISTED_LOCATION, storeBounds);
    settings.put(className + DIALOG_USE_PERSISTED_SIZE, storeBounds);
    settings.put(key, DIALOG_VALUE_MIGRATED_TO_34);
}
项目:egradle    文件:SelectConfigurationDialog.java   
private void persistLocation() {
    if (shell==null || shell.isDisposed()){
        return;
    }
    IDialogSettings settings = getDialogSettings();
    if (settings != null) {
        Point shellLocation = shell.getLocation();
        Shell parent = getParent();
        if (parent != null) {
            Point parentLocation = parent.getLocation();
            shellLocation.x -= parentLocation.x;
            shellLocation.y -= parentLocation.y;
        }
        String prefix = getClass().getName();
        settings.put(prefix + DIALOG_ORIGIN_X, shellLocation.x);
        settings.put(prefix + DIALOG_ORIGIN_Y, shellLocation.y);
    }
}
项目:egradle    文件:SelectConfigurationDialog.java   
private Point getPersistedLocation() {
    if (shell==null || shell.isDisposed()){
        return null;
    }
    Point result = null;
    IDialogSettings dialogSettings = getDialogSettings();
    if (dialogSettings == null) {
        return null;
    }
    try {
        int x = dialogSettings.getInt(getClass().getName() + DIALOG_ORIGIN_X);
        int y = dialogSettings.getInt(getClass().getName() + DIALOG_ORIGIN_Y);
        result = new Point(x, y);
        // The coordinates were stored relative to the parent shell.
        // Convert to display coordinates.
        Shell parentShell = getParent();
        if (parentShell != null) {
            Point parentLocation = parentShell.getLocation();
            result.x += parentLocation.x;
            result.y += parentLocation.y;
        }
    } catch (NumberFormatException e) {
    }
    return result;
}
项目:egradle    文件:AbstractFilterableTreeQuickDialog.java   
@Override
protected Point getInitialSize() {
    IDialogSettings dialogSettings = getDialogSettings();
    if (dialogSettings == null) {
        /* no dialog settings available, so fall back to min settings */
        return new Point(minWidth, minHeight);
    }
    Point point = super.getInitialSize();
    if (point.x < minWidth) {
        point.x = minWidth;
    }
    if (point.y < minHeight) {
        point.y = minHeight;
    }
    return point;
}
项目:team-explorer-everywhere    文件:LinkDialog.java   
public LinkDialog(
    final Shell parentShell,
    final WorkItem workItem,
    final LinkUIRegistry linkUiRegistry,
    final WIFormLinksControlOptions linksControlOptions) {
    super(parentShell);
    this.workItem = workItem;
    this.linkCollection = workItem.getLinks();
    this.linkUiRegistry = linkUiRegistry;
    this.linksControlOptions = linksControlOptions;

    final IDialogSettings uiSettings = TFSCommonUIClientPlugin.getDefault().getDialogSettings();
    final IDialogSettings dialogSettings = uiSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
    if (dialogSettings != null) {
        initialLinkTypeName = dialogSettings.get(DIALOG_SETTINGS_LINK_TYPE_KEY);
    }
}
项目:team-explorer-everywhere    文件:NewLinkedWorkItemDialog.java   
public NewLinkedWorkItemDialog(
    final Shell shell,
    final WorkItem hostWorkItem,
    final WIFormLinksControlOptions linksControlOptions) {
    super(shell);
    this.hostWorkItem = hostWorkItem;
    client = hostWorkItem.getClient();
    this.linksControlOptions = linksControlOptions;
    witVersionSupportsWILinks = client.supportsWorkItemLinkTypes();

    final IDialogSettings uiSettings = TFSCommonUIClientPlugin.getDefault().getDialogSettings();
    final IDialogSettings dialogSettings = uiSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
    if (dialogSettings != null) {
        initialLinkTypeName = dialogSettings.get(DIALOG_SETTINGS_LINK_TYPE_KEY);
        initialWorkItemTypeName = dialogSettings.get(DIALOG_SETTINGS_WORKITEM_TYPE_KEY);
    }
}
项目:team-explorer-everywhere    文件:NewLinkedWorkItemDialog.java   
@Override
protected void okPressed() {
    selectedTitle = textWorkItemTitle.getText();
    selectedComment = textWorkItemComment.getText();

    // Save the selected link-type in user setting so the next launch of the
    // dialog will
    // initially select the last used link-type.
    final IDialogSettings uiSettings = TFSCommonUIClientPlugin.getDefault().getDialogSettings();
    IDialogSettings dialogSettings = uiSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
    if (dialogSettings == null) {
        dialogSettings = uiSettings.addNewSection(DIALOG_SETTINGS_SECTION_KEY);
    }
    dialogSettings.put(DIALOG_SETTINGS_LINK_TYPE_KEY, linkTypeDisplayNames[selectedLinkTypeIndex]);
    dialogSettings.put(DIALOG_SETTINGS_WORKITEM_TYPE_KEY, workItemTypeDisplayNames[selectedWorkItemTypeIndex]);

    super.okPressed();
}
项目:team-explorer-everywhere    文件:GitImportWizardSelectFoldersPage.java   
@Override
protected void doCreateControl(final Composite parent, final IDialogSettings dialogSettings) {
    wizard = (ImportWizard) getExtendedWizard();
    options = (ImportOptions) wizard.getPageData(ImportOptions.class);
    workspace = options.getEclipseWorkspace();

    final Composite container = new Composite(parent, SWT.NONE);
    setControl(container);

    final GridLayout layout = new GridLayout(1, false);
    layout.marginWidth = getHorizontalMargin();
    layout.marginHeight = getVerticalMargin();
    layout.horizontalSpacing = getHorizontalSpacing();
    layout.verticalSpacing = getVerticalSpacing();
    container.setLayout(layout);

    createWizardSelctionOptions(container);
    createRepositoriesTreeControl(container);

    refresh();
}
项目:team-explorer-everywhere    文件:GitImportWizardSelectProjectsPage.java   
@Override
protected void doCreateControl(final Composite parent, final IDialogSettings dialogSettings) {
    wizard = (ImportWizard) getExtendedWizard();
    options = (ImportOptions) wizard.getPageData(ImportOptions.class);
    workspace = options.getEclipseWorkspace();

    final Composite container = new Composite(parent, SWT.NONE);
    setControl(container);

    final GridLayout layout = new GridLayout(1, false);
    layout.marginWidth = getHorizontalMargin();
    layout.marginHeight = getVerticalMargin();
    layout.horizontalSpacing = getHorizontalSpacing();
    layout.verticalSpacing = getVerticalSpacing();
    container.setLayout(layout);

    createProjectsTreeControl(container);
    createWorkingSetOption(container);

    refresh();
}
项目:team-explorer-everywhere    文件:TfsImportWizardConfirmationPage.java   
@Override
protected void doCreateControl(final Composite parent, final IDialogSettings dialogSettings) {
    final Composite container = new Composite(parent, SWT.NONE);
    setControl(container);

    final GridLayout layout = new GridLayout(1, false);
    layout.marginWidth = getHorizontalMargin();
    layout.marginHeight = getVerticalMargin();
    layout.horizontalSpacing = getHorizontalSpacing();
    layout.verticalSpacing = getVerticalSpacing();
    container.setLayout(layout);

    confirmationLabel = new Label(container, SWT.NONE);

    GridDataBuilder.newInstance().hFill().hGrab().applyTo(confirmationLabel);

    confirmationTable = new ImportWizardConfirmationTable(container, SWT.FULL_SELECTION);
    AutomationIDHelper.setWidgetID(confirmationTable.getTable(), CONFIRMATION_TABLE_ID);

    GridDataBuilder.newInstance().fill().grab().applyTo(confirmationTable);
}
项目:subclipse    文件:IgnoreResourcesDialog.java   
/**
 * Creates a new dialog for ignoring resources.
 * @param shell the parent shell
 * @param resources the array of resources to be ignored
 */
public IgnoreResourcesDialog(Shell shell, IResource[] resources) {
    super(shell);
    this.resources = resources;

    IDialogSettings workbenchSettings = SVNUIPlugin.getPlugin().getDialogSettings();
    this.settings = workbenchSettings.getSection("IgnoreResourcesDialog");//$NON-NLS-1$
    if (settings == null) {
        this.settings = workbenchSettings.addNewSection("IgnoreResourcesDialog");//$NON-NLS-1$
    }

    try {
        selectedAction = settings.getInt(ACTION_KEY);
    } catch (NumberFormatException e) {
        selectedAction = ADD_NAME_ENTRY;
    }
}
项目:subclipse    文件:SvnWizardCommitPage.java   
public boolean performFinish() {

        if (confirmUserData() == false) {
            return false;
        }

        selectedResources = resourceSelectionTree.getSelectedResources();
        int[] hWeights = horizontalSash.getWeights();
        int[] vWeights = verticalSash.getWeights();
        IDialogSettings section = settings.getSection(COMMIT_WIZARD_DIALOG_SETTINGS);
        if (section == null)
            section= settings.addNewSection(COMMIT_WIZARD_DIALOG_SETTINGS);
        if (showCompare) {
            section.put(H_WEIGHT_1, hWeights[0]);
            section.put(H_WEIGHT_2, hWeights[1]);
        }
        section.put(V_WEIGHT_1, vWeights[0]);
        section.put(V_WEIGHT_2, vWeights[1]);
        section.put(SHOW_COMPARE, showCompare);
        return true;
    }
项目:subclipse    文件:ConfigurationWizardMainPage.java   
/**
 * Saves the widget values for the next time
 */
private void saveWidgetValues() {
    // Update history
    IDialogSettings settings = getDialogSettings();
    if (settings != null) {
        if (showCredentials) {
            String[] userNames = settings.getArray(STORE_USERNAME_ID);
            if (userNames == null) userNames = new String[0];
            userNames = addToHistory(userNames, userCombo.getText());
            settings.put(STORE_USERNAME_ID, userNames);
        }
        String[] hostNames = settings.getArray(STORE_URL_ID);
        if (hostNames == null) hostNames = new String[0];
        hostNames = addToHistory(hostNames, urlCombo.getText());
        settings.put(STORE_URL_ID, hostNames);
    }
}
项目:Notepad4e    文件:NotepadView.java   
/**
 * Saves plugin state for next Eclipse session or when reopening the view.
 */
private void savePluginState() {
    if (!tabFolder.isDisposed()) {
        IDialogSettings section = Notepad4e.getDefault().getDialogSettings().getSection(ID);
        section.put(STORE_COUNT_KEY, tabFolder.getItemCount());
        for (int tabIndex = 0; tabIndex < tabFolder.getItemCount(); ++tabIndex) {
            CTabItem tab = tabFolder.getItem(tabIndex);
            if (!tab.isDisposed()) {
                Note note = getNote(tabIndex);
                section.put(STORE_TEXT_PREFIX_KEY + tabIndex, note.getText());
                section.put(STORE_STYLE_PREFIX_KEY + tabIndex, note.serialiseStyle());
                if (tab.getText().startsWith(LOCK_PREFIX)) {
                    // Do not save lock symbol.
                    section.put(STORE_TITLE_PREFIX_KEY + tabIndex, tab.getText().substring(LOCK_PREFIX.length()));
                } else {
                    section.put(STORE_TITLE_PREFIX_KEY + tabIndex, tab.getText());
                }
                section.put(STORE_EDITABLE_PREFIX_KEY + tabIndex, note.getEditable());
                section.put(STORE_BULLETS_PREFIX_KEY + tabIndex, note.serialiseBullets());
            }
        }
        Notepad4e.save();
    }
}
项目:JAADAS    文件:SootConfigManagerDialog.java   
private void runPressed() {
    super.okPressed();
    if (getSelected() == null) return;

    IDialogSettings settings = SootPlugin.getDefault().getDialogSettings();
    String mainClass = settings.get(getSelected()+"_mainClass");

    if (getLauncher() instanceof SootConfigProjectLauncher) {
        ((SootConfigProjectLauncher)getLauncher()).launch(getSelected(), mainClass);
    }
    else if (getLauncher() instanceof SootConfigJavaProjectLauncher){
        ((SootConfigJavaProjectLauncher)getLauncher()).launch(getSelected(), mainClass);
    }
    else if (getLauncher() instanceof SootConfigFileLauncher) {
        ((SootConfigFileLauncher)getLauncher()).launch(getSelected(), mainClass);
    }
    else if (getLauncher() instanceof SootConfigFromJavaFileLauncher){
        ((SootConfigFromJavaFileLauncher)getLauncher()).launch(getSelected(), mainClass);
    }


}
项目:tlaplus    文件:FilteredItemsSelectionDialog.java   
/**
 * Stores dialog settings.
 *
 * @param settings
 *            settings used to store dialog
 */
protected void storeDialog(IDialogSettings settings) {
    settings.put(SHOW_STATUS_LINE, toggleStatusLineAction.isChecked());

    XMLMemento memento = XMLMemento.createWriteRoot(HISTORY_SETTINGS);
    this.contentProvider.saveHistory(memento);
    StringWriter writer = new StringWriter();
    try {
        memento.save(writer);
        settings.put(HISTORY_SETTINGS, writer.getBuffer().toString());
    } catch (IOException e) {
        // Simply don't store the settings
        StatusManager
                .getManager()
                .handle(
                        new Status(
                                IStatus.ERROR,
                                PlatformUI.PLUGIN_ID,
                                IStatus.ERROR,
                                WorkbenchMessages.FilteredItemsSelectionDialog_storeError,
                                e));
    }
}
项目:tlaplus    文件:TLCModelLaunchDataProvider.java   
/**
   * Resets the values to defaults
   */
  protected void initialize()
  {
      isDone = false;
      isTLCStarted = false;
      errors = new Vector<TLCError>();
      lastDetectedError = null;
      model.removeMarkers(ModelHelper.TLC_MODEL_ERROR_MARKER_TLC);

      coverageInfo = new Vector<CoverageInformationItem>();
      progressInformation = new Vector<StateSpaceInformationItem>();
      startTime = 0;
      startTimestamp = Long.MIN_VALUE;
      finishTimestamp = Long.MIN_VALUE;
      tlcMode = "";
      lastCheckpointTimeStamp = Long.MIN_VALUE;
      coverageTimestamp = "";
      setCurrentStatus(NOT_RUNNING);
      setFingerprintCollisionProbability("");
      progressOutput = new Document(NO_OUTPUT_AVAILABLE);
      userOutput = new Document(NO_OUTPUT_AVAILABLE);
      constantExprEvalOutput = "";

final IDialogSettings dialogSettings = Activator.getDefault().getDialogSettings();
stateSortDirection = dialogSettings.getBoolean(STATESORTORDER);
  }
项目:n4js    文件:OpenTypeSelectionDialog.java   
@Override
protected IDialogSettings getDialogSettings() {
    IDialogSettings settings = N4JSActivator.getInstance().getDialogSettings().getSection(DIALOG_SETTINGS_ID);
    if (null == settings) {
        settings = N4JSActivator.getInstance().getDialogSettings().addNewSection(DIALOG_SETTINGS_ID);
    }
    return settings;
}
项目:n4js    文件:NFARExportWizard.java   
@Inject
private void injectDialogSettings(IDialogSettings settings) {
    IDialogSettings section = settings.getSection("NFARExportWizard");//$NON-NLS-1$
    if (section == null) {
        section = settings.addNewSection("NFARExportWizard");//$NON-NLS-1$
    }
    setDialogSettings(section);
}
项目:n4js    文件:NpmExportWizard.java   
/** */
public NpmExportWizard() {

    IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault().getDialogSettings();
    IDialogSettings section = workbenchSettings.getSection("NpmExportWizard");//$NON-NLS-1$
    if (section == null) {
        section = workbenchSettings.addNewSection("NpmExportWizard");//$NON-NLS-1$
    }
    setDialogSettings(section);
}
项目:n4js    文件:SimpleN4MFNewProjectWizard.java   
@Override
public void createPageControls(Composite pageContainer) {
    super.createPageControls(pageContainer);

    IDialogSettings dialogSettings = this.getDialogSettings();

    if (null != dialogSettings.get(CREATE_GREETER_SETTINGS_KEY)) {
        projectInfo.setCreateGreeterFile(dialogSettings.getBoolean(CREATE_GREETER_SETTINGS_KEY));
    }
    if (null != dialogSettings.get(VENDOR_ID_SETTINGS_KEY)) {
        projectInfo.setVendorId(dialogSettings.get(VENDOR_ID_SETTINGS_KEY));
    }
}
项目:n4js    文件:ADocSpecExportWizard.java   
/**
 * Default constructor
 */
public ADocSpecExportWizard() {
    IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault().getDialogSettings();
    IDialogSettings section = workbenchSettings.getSection(WIZARD_NAME);// $NON-NLS-1$
    if (section == null) {
        section = workbenchSettings.addNewSection(WIZARD_NAME);// $NON-NLS-1$
    }
    setDialogSettings(section);
}
项目:ide-plugins    文件:GluonProjectWizard.java   
private static IDialogSettings getOrCreateDialogSection(IDialogSettings dialogSettings) {
    // in Eclipse 3.6 the method DialogSettings#getOrCreateSection does not exist
    IDialogSettings section = dialogSettings.getSection(WIZARD_ID);
    if (section == null) {
        section = dialogSettings.addNewSection(WIZARD_ID);
    }
    return section;
}
项目:ide-plugins    文件:ProjectImportWizardController.java   
private void saveBooleanPropertyWhenChanged(final IDialogSettings settings, final String settingsKey, final Property<Boolean> target) {
    target.addValidationListener(new ValidationListener() {

        @Override
        public void validationTriggered(Property<?> source, Optional<String> validationErrorMessage) {
            settings.put(settingsKey, target.getValue());
        }
    });
}
项目:ide-plugins    文件:ProjectImportWizardController.java   
private void saveStringArrayPropertyWhenChanged(final IDialogSettings settings, final String settingsKey, final Property<List<String>> target) {
    target.addValidationListener(new ValidationListener() {

        @Override
        public void validationTriggered(Property<?> source, Optional<String> validationErrorMessage) {
            List<String> value = target.getValue();
            settings.put(settingsKey, value.toArray(new String[value.size()]));
        }
    });
}
项目:ide-plugins    文件:ProjectImportWizardController.java   
private void saveFilePropertyWhenChanged(final IDialogSettings settings, final String settingsKey, final Property<File> target) {
    target.addValidationListener(new ValidationListener() {

        @Override
        public void validationTriggered(Property<?> source, Optional<String> validationErrorMessage) {
            settings.put(settingsKey, FileUtils.getAbsolutePath(target.getValue()).orNull());
        }
    });
}
项目:ide-plugins    文件:ProjectImportWizardController.java   
private void saveGradleWrapperPropertyWhenChanged(final IDialogSettings settings, final Property<GradleDistributionWrapper> target) {
    target.addValidationListener(new ValidationListener() {

        @Override
        public void validationTriggered(Property<?> source, Optional<String> validationErrorMessage) {
            settings.put(SETTINGS_KEY_GRADLE_DISTRIBUTION_TYPE, target.getValue().getType().name());
            settings.put(SETTINGS_KEY_GRADLE_DISTRIBUTION_CONFIGURATION, target.getValue().getConfiguration());
        }
    });
}
项目:eclipse-batch-editor    文件:AbstractFilterableTreeQuickDialog.java   
@Override
protected final IDialogSettings getDialogSettings() {
    AbstractUIPlugin activator = getUIPlugin();
    if (activator == null) {
        return null;
    }
    return activator.getDialogSettings();
}
项目:eclipse-batch-editor    文件:AbstractFilterableTreeQuickDialog.java   
@Override
protected Point getInitialLocation(Point initialSize) {
    IDialogSettings dialogSettings = getDialogSettings();
    if (dialogSettings == null) {
        /* no dialog settings available, so fall back to min settings */
        return new Point(DEFAULT_X, DEFAULT_Y);
    }
    return super.getInitialLocation(initialSize);
}
项目:neoscada    文件:ImportWizard.java   
public ImportWizard ()
{
    setNeedsProgressMonitor ( true );
    setWindowTitle ( Messages.ImportWizard_Title );

    IDialogSettings settings = Activator.getDefault ().getDialogSettings ().getSection ( "importWizard" ); //$NON-NLS-1$
    if ( settings == null )
    {
        settings = Activator.getDefault ().getDialogSettings ().addNewSection ( "importWizard" ); //$NON-NLS-1$
    }

    setDialogSettings ( Activator.getDefault ().getDialogSettings ().getSection ( "importWizard" ) ); //$NON-NLS-1$

    this.mergeController = new DiffController ();
}