Example usage for org.eclipse.jface.dialogs DialogSettings getOrCreateSection

List of usage examples for org.eclipse.jface.dialogs DialogSettings getOrCreateSection

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs DialogSettings getOrCreateSection.

Prototype

public static IDialogSettings getOrCreateSection(IDialogSettings settings, String sectionName) 

Source Link

Document

Returns a section with the given name in the given dialog settings.

Usage

From source file:com.salesforce.ide.ui.wizards.components.AbstractTemplateSelectionPage.java

License:Open Source License

@Override
protected IDialogSettings getDialogSettings() {
    final IDialogSettings master = super.getDialogSettings();
    return DialogSettings.getOrCreateSection(master, this.contextTypeId);
}

From source file:de.uni_jena.iaa.linktype.atomic.model.pepper.wizard.AbstractPepperWizard.java

License:Apache License

/**
 * {@inheritDoc}//w  ww .  j a v  a 2s  .c  om
 */
@Override
public IDialogSettings getDialogSettings() {
    IDialogSettings settings = super.getDialogSettings();
    if (settings == null) {
        settings = DialogSettings.getOrCreateSection(Activator.getDefault().getDialogSettings(),
                "pepperWizard:" + getClass().getName());
        setDialogSettings(settings);
    }

    return settings;
}

From source file:org.eclipse.emf.cdo.ui.internal.admin.wizards.AbstractCreateRepositoryWizardPage.java

License:Open Source License

@Override
protected IDialogSettings getDialogSettings() {
    IDialogSettings wizardSettings = super.getDialogSettings();
    return wizardSettings == null ? null : DialogSettings.getOrCreateSection(wizardSettings, getName());
}

From source file:org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor.java

License:Open Source License

/**
 * Creates a new Java breakpoint condition editor with a history drop-down list.
 * /* www  .j  av a 2  s . c  o  m*/
 * @param dialogSettings the dialog settings for the condition history or <code>null</code> to
 *            use the default settings (i.e. those used by JDT Debug)
 * @since 3.6
 */
public JavaBreakpointConditionEditor(IDialogSettings dialogSettings) {
    fConditionHistoryDialogSettings = dialogSettings != null ? dialogSettings
            : DialogSettings.getOrCreateSection(JDIDebugUIPlugin.getDefault().getDialogSettings(),
                    DS_SECTION_CONDITION_HISTORY);
}

From source file:org.eclipse.jdt.internal.debug.ui.actions.OpenFromClipboardAction.java

License:Open Source License

/**
 * Handles the given matches.//from w  ww. j  ava  2 s.  c o  m
 * 
 * @param matches matched Java elements
 * @param line the line number
 * @param inputText the input text
 * @throws InterruptedException if canceled by the user
 */
private static void handleMatches(List<Object> matches, int line, String inputText) {
    if (matches.size() > 1) {
        int flags = JavaElementLabelProvider.SHOW_DEFAULT | JavaElementLabelProvider.SHOW_QUALIFIED
                | JavaElementLabelProvider.SHOW_ROOT;
        IWorkbenchWindow window = JDIDebugUIPlugin.getActiveWorkbenchWindow();
        ElementListSelectionDialog dialog = new ElementListSelectionDialog(window.getShell(),
                new JavaElementLabelProvider(flags)) {
            /*
             * @see org.eclipse.ui.dialogs.SelectionDialog#getDialogBoundsSettings()
             * @since 4.3
             */
            @Override
            protected IDialogSettings getDialogBoundsSettings() {
                IDialogSettings settings = JDIDebugUIPlugin.getDefault().getDialogSettings();
                return DialogSettings.getOrCreateSection(settings, "OpenFromClipboardAction_dialogBounds"); //$NON-NLS-1$
            }
        };
        dialog.setTitle(ActionMessages.OpenFromClipboardAction_OpenFromClipboard);
        dialog.setMessage(ActionMessages.OpenFromClipboardAction_SelectOrEnterTheElementToOpen);
        dialog.setElements(matches.toArray());
        dialog.setMultipleSelection(true);

        int result = dialog.open();
        if (result != IDialogConstants.OK_ID)
            return;

        Object[] elements = dialog.getResult();
        if (elements != null && elements.length > 0) {
            openJavaElements(elements, line);
        }
    } else if (matches.size() == 1) {
        openJavaElements(matches.toArray(), line);
    } else if (matches.size() == 0) {
        openInputEditDialog(inputText);
    }
}

From source file:org.eclipse.jubula.client.wiki.ui.dialogs.DescriptionEditDialog.java

License:Open Source License

/** {@inheritDoc} */
protected IDialogSettings getDialogBoundsSettings() {
    IDialogSettings bundleDialogSettings = Activator.getActivator().getDialogSettings();
    return DialogSettings.getOrCreateSection(bundleDialogSettings, this.getClass().getName());
}

From source file:org.eclipse.ltk.internal.ui.refactoring.RefactoringStatusDialog.java

License:Open Source License

protected IDialogSettings getDialogBoundsSettings() {
    IDialogSettings settings = RefactoringUIPlugin.getDefault().getDialogSettings();
    return DialogSettings.getOrCreateSection(settings, "RefactoringStatusDialog"); //$NON-NLS-1$
}

From source file:org.eclipse.net4j.util.ui.UIActivator.java

License:Open Source License

/**
 * @since 3.4
 */
public IDialogSettings getDialogSettings(String section) {
    return DialogSettings.getOrCreateSection(getDialogSettings(), section);
}

From source file:org.eclipse.php.internal.debug.ui.pathmapper.PathMapperEntryDialog.java

License:Open Source License

@Override
protected IDialogSettings getDialogBoundsSettings() {
    if (fDialogSettings == null) {
        fDialogSettings = DialogSettings.getOrCreateSection(PHPDebugUIPlugin.getDefault().getDialogSettings(),
                this.getClass().getSimpleName());
    }/*from w  w  w .  ja v  a  2 s .c o m*/
    return fDialogSettings;
}

From source file:org.eclipse.php.internal.server.ui.ServerEditWizardRunner.java

License:Open Source License

public static int runWizard(Shell parentShell, ServerEditWizard wizard) {
    IDialogSettings dialogSettings = DialogSettings.getOrCreateSection(
            Activator.getDefault().getDialogSettings(), ServerEditWizard.class.getSimpleName());
    PersistingSizeAndLocationWizardDialog dialog = new PersistingSizeAndLocationWizardDialog(parentShell,
            wizard, dialogSettings);//from  w w  w .  j  a  va 2 s.c  o m
    return dialog.open();
}