Examples of IPreferenceStore


Examples of org.eclipse.jface.preference.IPreferenceStore

  /**
   * Method declared on IPreferencePage. Save the
   * color preference to the preference store.
   */
  public boolean performOk() {
        IPreferenceStore prefs = PerlEditorPlugin.getDefault().getPreferenceStore();
       
    PerlEditorPlugin.getDefault().setPerlExecutable(
      executableText.getText());
        prefs.setValue(
            PreferenceConstants.DEBUG_SHOW_WARNINGS,
            warningsCheckBox.getSelection());
        prefs.setValue(
            PreferenceConstants.DEBUG_METHOD_SIGNATURES,
            methodsCheckBox.getSelection());
    prefs.setValue(
            PreferenceConstants.DEBUG_TAINT_MODE,
      taintCheckBox.getSelection());
        prefs.setValue(
            PreferenceConstants.DEBUG_DEBUG_CONSOLE,
            debugConsoleCheckBox.getSelection());
        prefs.setValue(
            PreferenceConstants.DEBUG_SUSPEND_AT_FIRST,
            suspendAtFirstCheckBox.getSelection());
    prefs.setValue(
            PreferenceConstants.EDITOR_SYNTAX_VALIDATION,
            validateCheckBox.getSelection());
    prefs.setValue(
            PreferenceConstants.DEBUG_INTERPRETER_TYPE,
            interpreterTypeCombo.getText());
    prefs.setValue(
            PreferenceConstants.EDITOR_SYNTAX_VALIDATION_INTERVAL,
            syntaxCheckInterval.getSelection());
    prefs.setValue(
            PreferenceConstants.BROWSER_START_URL,
            browserLabelText.getText());
        prefs.setValue(
            PreferenceConstants.DEBUG_PREVIEW_KEYS,
            debugPreviewKeysText.getText());
   
    return super.performOk();
  }
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore

        return WidgetUtils.createComposite(parent, numCols);
    }

    private boolean loadBoolean(String name, boolean restoreDefault)
    {
        IPreferenceStore store = getPreferenceStore();
        return restoreDefault ? store.getDefaultBoolean(name) : store.getBoolean(name);
    }
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore

        updateErrorMessage();
    }

    private String loadString(String name, String backup, boolean restoreDefault)
    {
        IPreferenceStore store = getPreferenceStore();
        String value = restoreDefault ? store.getDefaultString(name) : store.getString(name);
        return ("".equals(value) ? backup : value);
    }
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore

        tasksReconciler = new TasksReconciler(this);
    }

    private void reconfigureBracketInserter()
    {
        IPreferenceStore preferenceStore = getPreferenceStore();

        bracketInserter.setCloseBracketsEnabled(
            preferenceStore.getBoolean(PreferenceConstants.AUTO_COMPLETION_BRACKET1));
        bracketInserter.setCloseBracesEnabled(
            preferenceStore.getBoolean(PreferenceConstants.AUTO_COMPLETION_BRACKET2));
        bracketInserter.setCloseParensEnabled(
            preferenceStore.getBoolean(PreferenceConstants.AUTO_COMPLETION_BRACKET3));
        bracketInserter.setCloseAngularBracketsEnabled(
            preferenceStore.getBoolean(PreferenceConstants.AUTO_COMPLETION_BRACKET4));
        bracketInserter.setCloseDoubleQuotesEnabled(
            preferenceStore.getBoolean(PreferenceConstants.AUTO_COMPLETION_QUOTE1));
        bracketInserter.setCloseSingleQuotesEnabled(
            preferenceStore.getBoolean(PreferenceConstants.AUTO_COMPLETION_QUOTE2));
    }
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore

        cmdList.add("-html");
        cmdList.add("-opath");
        cmdList.add(outputDir);

        // Add additional options
        IPreferenceStore store = PerlEditorPlugin.getDefault().getPreferenceStore();
        StringTokenizer st =
            new StringTokenizer(store.getString(
                    SourceFormatterPreferences.HTML_EXPORT_OPTIONS));
        while (st.hasMoreTokens())
        {
            cmdList.add(st.nextToken());
        }
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore

public class TestSmartTyping extends BasePDETestCase
{
    public void testAll() throws Exception
    {
        IPreferenceStore prefs = PerlEditorPlugin.getDefault().getPreferenceStore();
       
        boolean p1 = prefs.getBoolean(PreferenceConstants.AUTO_COMPLETION_BRACKET1);
        boolean p2 = prefs.getBoolean(PreferenceConstants.AUTO_COMPLETION_BRACKET2);
        boolean p3 = prefs.getBoolean(PreferenceConstants.AUTO_COMPLETION_BRACKET3);
        boolean p4 = prefs.getBoolean(PreferenceConstants.AUTO_COMPLETION_BRACKET4);
        boolean p5 = prefs.getBoolean(PreferenceConstants.AUTO_COMPLETION_QUOTE1);
        boolean p6 = prefs.getBoolean(PreferenceConstants.AUTO_COMPLETION_QUOTE2);
   
        try { _testAll(); }
        finally
        {
            prefs.setValue(PreferenceConstants.AUTO_COMPLETION_BRACKET1, p1);
            prefs.setValue(PreferenceConstants.AUTO_COMPLETION_BRACKET2, p2);
            prefs.setValue(PreferenceConstants.AUTO_COMPLETION_BRACKET3, p3);
            prefs.setValue(PreferenceConstants.AUTO_COMPLETION_BRACKET4, p4);
            prefs.setValue(PreferenceConstants.AUTO_COMPLETION_QUOTE1, p5);
            prefs.setValue(PreferenceConstants.AUTO_COMPLETION_QUOTE2, p6);
        }
    }
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore

        }
    }
   
    private void _testAll() throws Exception
    {
        IPreferenceStore prefs = PerlEditorPlugin.getDefault().getPreferenceStore();
       
        prefs.setValue(PreferenceConstants.AUTO_COMPLETION_BRACKET1, true);
        prefs.setValue(PreferenceConstants.AUTO_COMPLETION_BRACKET2, true);
        prefs.setValue(PreferenceConstants.AUTO_COMPLETION_BRACKET3, true);
        prefs.setValue(PreferenceConstants.AUTO_COMPLETION_BRACKET4, true);
        prefs.setValue(PreferenceConstants.AUTO_COMPLETION_QUOTE1, true);
        prefs.setValue(PreferenceConstants.AUTO_COMPLETION_QUOTE2, true);
       
        PerlEditor editor = openEditor("EPICTest/empty.pl");
        PerlEditor.TestInterface testIface = editor.getTestInterface();
       
        try
        {  
            Keyboard.typeString("}");           
            assertEquals("}", testIface.getText());

            testIface.clear();
           
            Keyboard.typeString("{");
            assertEquals("{}", testIface.getText());
            Keyboard.typeString("{");
            assertEquals("{{}}", testIface.getText());
            Keyboard.typeString("}");
            Keyboard.typeString("}");
            assertEquals("{{}}", testIface.getText());

            testIface.clear();
           
            Keyboard.typeString("my @x = (foo");
            assertEquals("my @x = (foo)", testIface.getText());
            Keyboard.typeString(";");
            assertEquals("my @x = (foo;)", testIface.getText());
            Keyboard.backspace();
            assertEquals("my @x = (foo)", testIface.getText());
            Keyboard.typeString(")");
            assertEquals("my @x = (foo)", testIface.getText());
            Keyboard.typeString(";");
            assertEquals("my @x = (foo);", testIface.getText());
           
            testIface.clear();
           
            Keyboard.typeString("print aaa");
            assertEquals("print aaa", testIface.getText());
            Keyboard.left();
            Keyboard.left();
            Keyboard.left();
            Keyboard.typeString("'");
            assertEquals("print ''aaa", testIface.getText());
            Keyboard.backspace();
            assertEquals("print 'aaa", testIface.getText());
            Keyboard.right();
            Keyboard.right();
            Keyboard.right();
            Keyboard.right();
            Keyboard.typeString("'");
            assertEquals("print 'aaa'", testIface.getText());
            Keyboard.left();
            Keyboard.typeString("'");
            Keyboard.typeString(";");
            assertEquals("print 'aaa';", testIface.getText());
           
            testIface.clear();
           
            Keyboard.typeString("# ' ok {");
            assertEquals("# ' ok {}", testIface.getText());
           
            testIface.clear();
           
            Keyboard.typeString("=comment\nLet's go");
            assertEquals("=comment\nLet's go", testIface.getText());
           
            testIface.clear();
            prefs.setValue(PreferenceConstants.AUTO_COMPLETION_BRACKET2, false);

            Keyboard.typeString(" ");
            Keyboard.left();
            Keyboard.typeString("${()");
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore

public class TestTasks extends BasePDETestCase
{
    public void testAll() throws Exception
    {
        IPreferenceStore prefs = PerlEditorPlugin.getDefault().getPreferenceStore();
       
        boolean p1 = prefs.getBoolean(TaskTagPreferences.ID_WHITESPACE);
   
        try { _testAll(); }
        finally
        {
            prefs.setValue(TaskTagPreferences.ID_WHITESPACE, p1);
        }
    }
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore

        }
    }
   
    private void _testAll() throws Exception
    {
        IPreferenceStore prefs = PerlEditorPlugin.getDefault().getPreferenceStore();
       
        prefs.setValue(TaskTagPreferences.ID_WHITESPACE, true);
       
        PerlEditor editor = openEditor("EPICTest/test_Tasks.pl");
       
        try
        {
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore

  }

  public static List<CloudServerURL> getUserDefinedUrls(String serverTypeId) {
    List<CloudServerURL> urls = new ArrayList<CloudServerURL>();

    IPreferenceStore prefStore = CloudFoundryServerUiPlugin.getDefault().getPreferenceStore();
    String urlString = prefStore.getString(ATTR_USER_DEFINED_URLS + "." + serverTypeId); //$NON-NLS-1$

    if (urlString != null && urlString.length() > 0) {
      // Split on "||"
      String[] urlEntries = urlString.split("\\|\\|"); //$NON-NLS-1$
      if (urlEntries != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.