use of org.eclipse.ui.preferences.IWorkbenchPreferenceContainer 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;
}
use of org.eclipse.ui.preferences.IWorkbenchPreferenceContainer in project dbeaver by serge-rider.
the class PrefPageDatabaseGeneral method createContents.
@Override
protected Control createContents(Composite parent) {
Composite composite = UIUtils.createPlaceholder(parent, 1, 5);
{
Group groupObjects = UIUtils.createControlGroup(composite, CoreMessages.pref_page_ui_general_group_general, 1, GridData.VERTICAL_ALIGN_BEGINNING, 300);
automaticUpdateCheck = UIUtils.createCheckbox(groupObjects, CoreMessages.pref_page_ui_general_checkbox_automatic_updates, false);
automaticUpdateCheck.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, true, false, 2, 1));
}
// Agent settings
{
Group agentGroup = UIUtils.createControlGroup(composite, "Task Bar", 2, SWT.NONE, 0);
longOperationsCheck = UIUtils.createCheckbox(agentGroup, "Enable long-time operations notification", false);
longOperationsCheck.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, true, false, 2, 1));
longOperationsCheck.setToolTipText("Shows special notification in system taskbar after long-time operation (e.g. SQL query) finish.");
longOperationsTimeout = UIUtils.createLabelSpinner(agentGroup, "Long-time operation timeout", 0, 0, Integer.MAX_VALUE);
if (RuntimeUtils.isPlatformMacOS()) {
ControlEnableState.disable(agentGroup);
}
}
{
// Resources
Group groupResources = UIUtils.createControlGroup(composite, "Resources", 2, GridData.VERTICAL_ALIGN_BEGINNING, 0);
UIUtils.createControlLabel(groupResources, "Default resource encoding");
defaultResourceEncoding = UIUtils.createEncodingCombo(groupResources, GeneralUtils.DEFAULT_ENCODING);
defaultResourceEncoding.setToolTipText("Default encoding for scripts and text files. Change requires restart");
}
{
// Link to secure storage config
new PreferenceLinkArea(composite, SWT.NONE, PrefPageEntityEditor.PAGE_ID, "<a>''{0}''</a> settings", (IWorkbenchPreferenceContainer) getContainer(), //$NON-NLS-1$
null);
new PreferenceLinkArea(composite, SWT.NONE, PrefPageSQLEditor.PAGE_ID, "<a>''{0}''</a> settings", (IWorkbenchPreferenceContainer) getContainer(), //$NON-NLS-1$
null);
}
performDefaults();
return composite;
}
Aggregations