Search in sources :

Example 1 with StringListEditor

use of org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor in project titan.EclipsePlug-ins by eclipse.

the class HighlightKeywordsPage method createFieldEditors.

@Override
public void createFieldEditors() {
    new Label(getFieldEditorParent(), SWT.NONE);
    this.useHighLight = new BooleanFieldEditor(PreferenceConstants.PREF_USE_HIGHLIGHT_ID, // $NON-NLS-1$
    Messages.getString("HighlightKeywordsPage.1"), getFieldEditorParent());
    addField(this.useHighLight);
    this.highLightEditor = new StringListEditor(PreferenceConstants.PREF_HIGHLIGHT_KEYWORD_ID, // $NON-NLS-1$
    "", getFieldEditorParent(), false, false);
    addField(this.highLightEditor);
}
Also used : StringListEditor(org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor) Label(org.eclipse.swt.widgets.Label) BooleanFieldEditor(org.eclipse.jface.preference.BooleanFieldEditor)

Example 2 with StringListEditor

use of org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor in project titan.EclipsePlug-ins by eclipse.

the class SetverdictPreferencePage method createFieldEditors.

@Override
public void createFieldEditors() {
    this.setverdictError = new BooleanFieldEditor(PreferenceConstants.PREF_SETVERDICT_ERROR_ID, // $NON-NLS-1$
    Messages.getString("SetverdictPreferencePage.1"), getFieldEditorParent());
    addField(this.setverdictError);
    this.setverdictFail = new BooleanFieldEditor(PreferenceConstants.PREF_SETVERDICT_FAIL_ID, // $NON-NLS-1$
    Messages.getString("SetverdictPreferencePage.2"), getFieldEditorParent());
    addField(this.setverdictFail);
    this.setverdictInconc = new BooleanFieldEditor(PreferenceConstants.PREF_SETVERDICT_INCONC_ID, // $NON-NLS-1$
    Messages.getString("SetverdictPreferencePage.3"), getFieldEditorParent());
    addField(this.setverdictInconc);
    this.setverdictNone = new BooleanFieldEditor(PreferenceConstants.PREF_SETVERDICT_NONE_ID, // $NON-NLS-1$
    Messages.getString("SetverdictPreferencePage.4"), getFieldEditorParent());
    addField(this.setverdictNone);
    this.setverdictPass = new BooleanFieldEditor(PreferenceConstants.PREF_SETVERDICT_PASS_ID, // $NON-NLS-1$
    Messages.getString("SetverdictPreferencePage.5"), getFieldEditorParent());
    addField(this.setverdictPass);
    new Label(getFieldEditorParent(), SWT.NONE);
    this.errorCausedByEditor = new StringListEditor(PreferenceConstants.PREF_ERROR_CAUSED_BY_ID, // $NON-NLS-1$
    Messages.getString("SetverdictPreferencePage.6"), getFieldEditorParent(), false);
    this.errorCausedByEditor.setPreferenceStore(getPreferenceStore());
    new Label(getFieldEditorParent(), SWT.NONE);
    addField(this.errorCausedByEditor);
    this.failCausedByEditor = new StringListEditor(PreferenceConstants.PREF_FAIL_CAUSED_BY_ID, // $NON-NLS-1$
    Messages.getString("SetverdictPreferencePage.7"), getFieldEditorParent(), false);
    this.failCausedByEditor.setPreferenceStore(getPreferenceStore());
    addField(this.failCausedByEditor);
}
Also used : StringListEditor(org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor) Label(org.eclipse.swt.widgets.Label) BooleanFieldEditor(org.eclipse.jface.preference.BooleanFieldEditor)

Example 3 with StringListEditor

use of org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor in project titan.EclipsePlug-ins by eclipse.

the class ComponentsVisualOrderPrefPage method createFieldEditors.

@Override
public void createFieldEditors() {
    this.compVisOrderEditor = new StringListEditor(PreferenceConstants.PREF_COMPONENT_ORDER_ID, // $NON-NLS-1$
    "", getFieldEditorParent(), true);
    this.compVisOrderEditor.setPreferenceStore(getPreferenceStore());
    addField(this.compVisOrderEditor);
}
Also used : StringListEditor(org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor)

Example 4 with StringListEditor

use of org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor in project titan.EclipsePlug-ins by eclipse.

the class DecipheringPreferencePage method createFieldEditors.

@Override
public void createFieldEditors() {
    comboFieldEditor = new MutableComboFieldEditor(getPreferenceKeyForRulesets(), "rulesets", getFieldEditorParent());
    comboFieldEditor.setPreferenceStore(getPreferenceStore());
    addField(comboFieldEditor);
    comboFieldEditor.setInputValidator(new IInputValidator() {

        @Override
        public String isValid(final String newText) {
            if (newText == null || newText.length() == 0) {
                return "The name should contain at least one character.";
            }
            String[] items = DecipheringPreferencePage.this.comboFieldEditor.getItems();
            for (String str : items) {
                if (str.equals(newText)) {
                    return "Ruleset with the given name already exists.";
                }
            }
            return null;
        }
    });
    comboFieldEditor.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(final SelectionEvent e) {
            updateMsgTypeEditor();
        }
    });
    comboFieldEditor.addItemListener(new IItemListener() {

        @Override
        public void itemRemoved(final String item) {
            deletedRuleSets.add(item);
            updateMsgTypeEditor();
        }

        @Override
        public void itemAdded(final String item) {
            comboFieldEditor.select(comboFieldEditor.getItemCount() - 1);
            updateMsgTypeEditor();
        }
    });
    messageTypeEditor = new StringListEditor("", "Message types", getFieldEditorParent(), false);
    messageTypeEditor.setPreferenceStore(getPreferenceStore());
    messageTypeEditor.setInputValidator(new IInputValidator() {

        @Override
        public String isValid(final String newText) {
            return MSGTPYE_PATTERN.matcher(newText).matches() ? null : "Invalid message type.";
        }
    });
    messageTypeEditor.setEnabled(false, getFieldEditorParent());
    messageTypeEditor.addSelectionChangedListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(final SelectionEvent e) {
            updateRuleEditor();
        }
    });
    addField(messageTypeEditor);
    ruleEditor = new StringListEditor("", "Deciphering rules", getFieldEditorParent(), true);
    ruleEditor.setPreferenceStore(getPreferenceStore());
    ruleEditor.setInputValidator(new IInputValidator() {

        @Override
        public String isValid(final String newText) {
            return RULE_PATTERN.matcher(newText).matches() ? null : "Invalid rule type.";
        }
    });
    ruleEditor.setEnabled(false, getFieldEditorParent());
    addField(ruleEditor);
    updatePage();
}
Also used : MutableComboFieldEditor(org.eclipse.titan.log.viewer.preferences.fieldeditors.MutableComboFieldEditor) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) StringListEditor(org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor) SelectionEvent(org.eclipse.swt.events.SelectionEvent) IItemListener(org.eclipse.titan.log.viewer.preferences.fieldeditors.MutableComboFieldEditor.IItemListener) IInputValidator(org.eclipse.jface.dialogs.IInputValidator)

Example 5 with StringListEditor

use of org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor in project titan.EclipsePlug-ins by eclipse.

the class FilteredComponentsPrefPage method createFieldEditors.

@Override
public void createFieldEditors() {
    this.filterComponentsEditor = new StringListEditor(PreferenceConstants.PREF_FILTER_COMPONENT_ID, // $NON-NLS-1$
    "", getFieldEditorParent(), false);
    this.filterComponentsEditor.setPreferenceStore(getPreferenceStore());
    addField(this.filterComponentsEditor);
}
Also used : StringListEditor(org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor)

Aggregations

StringListEditor (org.eclipse.titan.log.viewer.preferences.fieldeditors.StringListEditor)7 BooleanFieldEditor (org.eclipse.jface.preference.BooleanFieldEditor)2 Label (org.eclipse.swt.widgets.Label)2 IInputValidator (org.eclipse.jface.dialogs.IInputValidator)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 MutableComboFieldEditor (org.eclipse.titan.log.viewer.preferences.fieldeditors.MutableComboFieldEditor)1 IItemListener (org.eclipse.titan.log.viewer.preferences.fieldeditors.MutableComboFieldEditor.IItemListener)1