use of org.eclipse.jface.preference.BooleanFieldEditor in project AutoRefactor by JnRouvignac.
the class WorkspacePreferencePage method invalidateToggleRules.
private void invalidateToggleRules(final Composite ruleGroup) {
boolean isAllRulesChecked = true;
for (final BooleanFieldEditor rule : WorkspacePreferencePage.this.rules) {
isAllRulesChecked = ((Button) rule.getDescriptionControl(ruleGroup)).getSelection();
if (!isAllRulesChecked) {
break;
}
}
toggleAllRules.setSelection(isAllRulesChecked);
}
use of org.eclipse.jface.preference.BooleanFieldEditor in project tdi-studio-se by Talend.
the class PerformancePreferencePage method createFieldEditors.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/
@Override
protected void createFieldEditors() {
IBrandingService breaningService = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);
if (breaningService.isPoweredOnlyCamel()) {
addField(new BooleanFieldEditor(ITalendCorePrefConstants.DEACTIVE_REPOSITORY_UPDATE, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.display.deactiveRepositoryUpdate"), getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPERTY_CODE_CHECK, Messages.getString("PerformancePreferencePage.propertyCodeCheck"), //$NON-NLS-1$
getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.GENERATE_CODE_WHEN_OPEN_JOB, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.generateCode"), getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.checkVersion"), getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT_VARIABLE, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.addOrDeleteVariable"), getFieldEditorParent()));
dbConnTimeoutActive = new CheckBoxFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED, Messages.getString("PerformancePreferencePage.ActivedTimeoutSetting"), //$NON-NLS-1$
getFieldEditorParent());
dbConnTimeoutActive.getButton().addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
checkDBTimeout();
}
});
dbConnTimeout = new IntegerFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.ConnectionTimeout"), getFieldEditorParent());
Text textControl = dbConnTimeout.getTextControl(getFieldEditorParent());
//$NON-NLS-1$
textControl.setToolTipText(Messages.getString("PerformancePreferencePage.ConnectionTimeoutTip"));
dbConnTimeout.setValidRange(0, Short.MAX_VALUE);
textControl.setEnabled(getPreferenceStore().getBoolean(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED));
addField(dbConnTimeoutActive);
addField(dbConnTimeout);
addSVNInforAutoCheckFiled();
} else {
addField(new BooleanFieldEditor(ITalendCorePrefConstants.DEACTIVE_REPOSITORY_UPDATE, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.display.deactiveRepositoryUpdate"), getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPERTY_CODE_CHECK, Messages.getString("PerformancePreferencePage.propertyCodeCheck"), //$NON-NLS-1$
getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.GENERATE_CODE_WHEN_OPEN_JOB, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.generateCode"), getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.checkVersion"), getFieldEditorParent()));
addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT_VARIABLE, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.addOrDeleteVariable"), getFieldEditorParent()));
dbConnTimeoutActive = new CheckBoxFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED, Messages.getString("PerformancePreferencePage.ActivedTimeoutSetting"), //$NON-NLS-1$
getFieldEditorParent());
dbConnTimeoutActive.getButton().addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
checkDBTimeout();
}
});
dbConnTimeout = new IntegerFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.ConnectionTimeout"), getFieldEditorParent());
Text textControl = dbConnTimeout.getTextControl(getFieldEditorParent());
//$NON-NLS-1$
textControl.setToolTipText(Messages.getString("PerformancePreferencePage.ConnectionTimeoutTip"));
dbConnTimeout.setValidRange(0, Short.MAX_VALUE);
textControl.setEnabled(getPreferenceStore().getBoolean(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED));
addField(dbConnTimeoutActive);
addField(dbConnTimeout);
addField(new BooleanFieldEditor(ITalendCorePrefConstants.ADD_USER_ROUTINES, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.addAllUserRoutines"), getFieldEditorParent()));
// TDI-8323:remove this one,we do not need this since we always add all system routines for new job
// addField(new BooleanFieldEditor(ITalendCorePrefConstants.ADD_SYSTEM_ROUTINES, Messages
// .getString("PerformancePreferencePage.addAllSystemRoutines"),//$NON-NLS-1$
// getFieldEditorParent()));
addSVNInforAutoCheckFiled();
}
IntegerFieldEditor codeFormatTimeout = new IntegerFieldEditor(ITalendCorePrefConstants.PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT, //$NON-NLS-1$
Messages.getString("PerformancePreferencePage.CodeFormatTimeout"), getFieldEditorParent());
codeFormatTimeout.setValidRange(1, Short.MAX_VALUE);
addField(codeFormatTimeout);
}
use of org.eclipse.jface.preference.BooleanFieldEditor in project tdi-studio-se by Talend.
the class ExchangePreferencePage method createFieldEditors.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/
@Override
protected void createFieldEditors() {
Composite composite = new Composite(getFieldEditorParent(), SWT.NONE);
composite.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
composite.setLayout(new GridLayout());
Group eGroup = new Group(composite, SWT.NONE);
eGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
eGroup.setLayout(new GridLayout(3, false));
Label userLabelTitle = new Label(eGroup, SWT.NONE);
//$NON-NLS-1$
userLabelTitle.setText(Messages.getString("ExchangePreferencePage.currentUserTitle"));
GridData data = new GridData(GridData.FILL, GridData.CENTER, true, false);
userLabelTitle.setLayoutData(data);
userAccountLink = new Link(eGroup, SWT.NONE);
GridData dataLink = new GridData(GridData.FILL, GridData.CENTER, true, false);
dataLink.widthHint = convertVerticalDLUsToPixels(120);
userAccountLink.setLayoutData(dataLink);
userAccountLink.setText(userAccount != null ? "<a> " + userAccount + " </a>" : "<a> " + "< None >" + " </a>");
logonButton = new Button(eGroup, SWT.PUSH);
logonButton.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
logonButton.setText(userAccount != null ? Messages.getString("ExchangePreferencePage.signOutExchangeTitle") : Messages.getString("ExchangePreferencePage.signInExchangeTitle"));
if (PluginChecker.isSVNProviderPluginLoaded()) {
BooleanFieldEditor checkTisLogonExchangeDialog = new BooleanFieldEditor(ITalendCorePrefConstants.EXCHANGE_CHECK_TIS_VERSION, Messages.getString("ExchangePreferencePage.checkTisLogonExchangeTitle"), //$NON-NLS-1$
getFieldEditorParent());
addField(checkTisLogonExchangeDialog);
}
BooleanFieldEditor downloadedCheckUpdates = new BooleanFieldEditor(ITalendCorePrefConstants.EXCHANGE_DOWNLOADED_CHECK_UPDATES, Messages.getString("ExchangePreferencePage.exchangeCheckUpdatesTitle"), //$NON-NLS-1$
getFieldEditorParent());
addField(downloadedCheckUpdates);
addListeners();
}
use of org.eclipse.jface.preference.BooleanFieldEditor in project tdi-studio-se by Talend.
the class AppearancePreferencePage method createFieldEditors.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/
@Override
protected void createFieldEditors() {
addField(new BooleanFieldEditor(ITalendCorePrefConstants.CONTEXT_GROUP_BY_SOURCE, //$NON-NLS-1$
Messages.getString("AppearancePreferencePage.groupBySource"), getFieldEditorParent()));
Composite parent = getFieldEditorParent();
addFields(parent);
}
use of org.eclipse.jface.preference.BooleanFieldEditor in project eclipse.platform.text by eclipse.
the class SearchPreferencePage method createFieldEditors.
@Override
protected void createFieldEditors() {
addField(new BooleanFieldEditor(REUSE_EDITOR, SearchMessages.SearchPreferencePage_reuseEditor, getFieldEditorParent()));
addField(new BooleanFieldEditor(BRING_VIEW_TO_FRONT, SearchMessages.SearchPreferencePage_bringToFront, getFieldEditorParent()));
fIgnorePotentialMatchesCheckbox = new BooleanFieldEditor(IGNORE_POTENTIAL_MATCHES, SearchMessages.SearchPreferencePage_ignorePotentialMatches, getFieldEditorParent());
addField(fIgnorePotentialMatchesCheckbox);
fEmphasizedCheckbox = new BooleanFieldEditor(EMPHASIZE_POTENTIAL_MATCHES, SearchMessages.SearchPreferencePage_emphasizePotentialMatches, getFieldEditorParent());
addField(fEmphasizedCheckbox);
fColorEditor = new ColorFieldEditor(POTENTIAL_MATCH_FG_COLOR, SearchMessages.SearchPreferencePage_potentialMatchFgColor, getFieldEditorParent());
addField(fColorEditor);
fEmphasizedCheckbox.setEnabled(!arePotentialMatchesIgnored(), getFieldEditorParent());
fColorEditor.setEnabled(!arePotentialMatchesIgnored() && arePotentialMatchesEmphasized(), getFieldEditorParent());
handleDeletedPerspectives();
String[][] perspectiveNamesAndIds = getPerspectiveNamesAndIds();
ComboFieldEditor comboEditor = new ComboFieldEditor(DEFAULT_PERSPECTIVE, SearchMessages.SearchPreferencePage_defaultPerspective, perspectiveNamesAndIds, getFieldEditorParent());
addField(comboEditor);
// in case we have a contributed engine, let the user choose.
TextSearchEngineRegistry reg = SearchPlugin.getDefault().getTextSearchEngineRegistry();
String[][] engineNamesAndIds = reg.getAvailableEngines();
if (engineNamesAndIds.length > 1) {
comboEditor = new ComboFieldEditor(TEXT_SEARCH_ENGINE, SearchMessages.SearchPreferencePage_textSearchEngine, engineNamesAndIds, getFieldEditorParent());
addField(comboEditor);
}
}
Aggregations