Search in sources :

Example 1 with PreferencePage

use of org.eclipse.jface.preference.PreferencePage in project tdi-studio-se by Talend.

the class ProjectSettingsPreferenceDialog method openPage.

@Override
public boolean openPage(String nodeId, Object data) {
    if (this instanceof IWorkbenchPreferenceContainer) {
        ((IWorkbenchPreferenceContainer) this).openPage(nodeId, data);
    } else {
        // impl by self
        final IPreferenceNode node = findNodeMatching(nodeId);
        if (node != null) {
            getTreeViewer().setSelection(new StructuredSelection(node));
            showPage(node);
        }
        IPreferencePage page = getCurrentPage();
        if (page instanceof PreferencePage) {
            ((PreferencePage) page).applyData(data);
        }
        return true;
    }
    return false;
}
Also used : PreferencePage(org.eclipse.jface.preference.PreferencePage) IPreferencePage(org.eclipse.jface.preference.IPreferencePage) IWorkbenchPreferenceContainer(org.eclipse.ui.preferences.IWorkbenchPreferenceContainer) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IPreferencePage(org.eclipse.jface.preference.IPreferencePage) IPreferenceNode(org.eclipse.jface.preference.IPreferenceNode)

Aggregations

IPreferenceNode (org.eclipse.jface.preference.IPreferenceNode)1 IPreferencePage (org.eclipse.jface.preference.IPreferencePage)1 PreferencePage (org.eclipse.jface.preference.PreferencePage)1 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1 IWorkbenchPreferenceContainer (org.eclipse.ui.preferences.IWorkbenchPreferenceContainer)1