Search in sources :

Example 1 with WizardPrefPage

use of org.jkiss.dbeaver.ui.preferences.WizardPrefPage in project dbeaver by serge-rider.

the class ActiveWizard method createPreferencePage.

protected WizardPrefPage createPreferencePage(IPreferencePage prefPage, String title, String description) {
    WizardPrefPage wizardPage = new WizardPrefPage(prefPage, title, description);
    prefPages.add(wizardPage);
    if (prefPage instanceof IWorkbenchPropertyPage) {
        ((IWorkbenchPropertyPage) prefPage).setElement(getActiveElement());
    }
    return wizardPage;
}
Also used : WizardPrefPage(org.jkiss.dbeaver.ui.preferences.WizardPrefPage) IWorkbenchPropertyPage(org.eclipse.ui.IWorkbenchPropertyPage)

Example 2 with WizardPrefPage

use of org.jkiss.dbeaver.ui.preferences.WizardPrefPage in project dbeaver by serge-rider.

the class ActiveWizard method createPreferencePages.

private void createPreferencePages(WizardPrefPage parent, IPreferenceNode[] preferenceNodes) {
    Arrays.sort(preferenceNodes, Comparator.comparing(IPreferenceNode::getLabelText));
    for (IPreferenceNode node : preferenceNodes) {
        if (isNodeHasParent(node, preferenceNodes)) {
            continue;
        }
        node.createPage();
        IPreferencePage preferencePage = node.getPage();
        if (preferencePage == null) {
            continue;
        }
        preferencePage.setContainer((IPreferencePageContainer) getContainer());
        WizardPrefPage wizardPrefPage;
        if (parent == null) {
            wizardPrefPage = addPreferencePage(preferencePage, preferencePage.getTitle(), preferencePage.getDescription());
        } else {
            wizardPrefPage = parent.addSubPage(preferencePage, preferencePage.getTitle(), preferencePage.getDescription());
        }
        IPreferenceNode[] subNodes = node.getSubNodes();
        if (subNodes != null) {
            createPreferencePages(wizardPrefPage, subNodes);
        }
    }
}
Also used : WizardPrefPage(org.jkiss.dbeaver.ui.preferences.WizardPrefPage) IPreferencePage(org.eclipse.jface.preference.IPreferencePage) IPreferenceNode(org.eclipse.jface.preference.IPreferenceNode)

Example 3 with WizardPrefPage

use of org.jkiss.dbeaver.ui.preferences.WizardPrefPage in project dbeaver by serge-rider.

the class ActiveWizard method addPreferencePage.

protected WizardPrefPage addPreferencePage(IPreferencePage prefPage, String title, String description) {
    WizardPrefPage wizardPage = createPreferencePage(prefPage, title, description);
    addPage(wizardPage);
    return wizardPage;
}
Also used : WizardPrefPage(org.jkiss.dbeaver.ui.preferences.WizardPrefPage)

Example 4 with WizardPrefPage

use of org.jkiss.dbeaver.ui.preferences.WizardPrefPage in project dbeaver by dbeaver.

the class ProjectCreateWizard method addPages.

@Override
public void addPages() {
    super.addPages();
    final PrefPageProjectResourceSettings projectSettingsPref = new PrefPageProjectResourceSettings();
    projectSettingsPage = new WizardPrefPage(projectSettingsPref, "Resources", "Project resources");
    addPage(projectSettingsPage);
}
Also used : WizardPrefPage(org.jkiss.dbeaver.ui.preferences.WizardPrefPage) PrefPageProjectResourceSettings(org.jkiss.dbeaver.ui.project.PrefPageProjectResourceSettings)

Example 5 with WizardPrefPage

use of org.jkiss.dbeaver.ui.preferences.WizardPrefPage in project dbeaver by dbeaver.

the class ActiveWizard method addPreferencePage.

protected WizardPrefPage addPreferencePage(IPreferencePage prefPage, String title, String description) {
    WizardPrefPage wizardPage = createPreferencePage(prefPage, title, description);
    addPage(wizardPage);
    return wizardPage;
}
Also used : WizardPrefPage(org.jkiss.dbeaver.ui.preferences.WizardPrefPage)

Aggregations

WizardPrefPage (org.jkiss.dbeaver.ui.preferences.WizardPrefPage)10 IPreferenceNode (org.eclipse.jface.preference.IPreferenceNode)2 IPreferencePage (org.eclipse.jface.preference.IPreferencePage)2 IWorkbenchPropertyPage (org.eclipse.ui.IWorkbenchPropertyPage)2 PrefPageProjectResourceSettings (org.jkiss.dbeaver.ui.project.PrefPageProjectResourceSettings)2