Package org.eclipse.jface.preference

Examples of org.eclipse.jface.preference.IPreferenceStore


  public PreferenceInitializer() {
  }

  @Override
  public void initializeDefaultPreferences() {
    IPreferenceStore store = PEXUIPlugin.getDefault()
        .getPreferenceStore();
   
    store.setDefault(PreferenceConstants.ENABLED, false);
    store.setDefault(PreferenceConstants.LINE_ALPHA, 50);
    store.setDefault(PreferenceConstants.LINE_STYLE, SWT.LINE_SOLID);
    store.setDefault(PreferenceConstants.LINE_WIDTH, 1);
    store.setDefault(PreferenceConstants.LINE_SHIFT, 3);
    store.setDefault(PreferenceConstants.LINE_COLOR, "0,0,0"); //$NON-NLS-1$
    store.setDefault(PreferenceConstants.DRAW_LEFT_END, true); //$NON-NLS-1$
    store.setDefault(PreferenceConstants.DRAW_BLANK_LINE, false); //$NON-NLS-1$
    store.setDefault(PreferenceConstants.SKIP_COMMENT_BLOCK, false); //$NON-NLS-1$

    /**
     * PHP cs fixer
     * TODO: check how we can move this to the semanticanalysis plugin.
     * when creating a separate initializer in the other plugin, it gets not called for some reason
     */
    store.setDefault(PreferenceConstants.PREF_PHPCS_USE_DEFAULT_FIXERS, "yes");
    store.setDefault(PreferenceConstants.PREF_PHPCS_CONFIG, "phpcs_config_default");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_INDENTATION, "phpcs_option_indentation::indentation::Code must use 4 spaces for indenting, not tabs.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_LINEFEED, "phpcs_option_linefeed::linefeed::All PHP files must use the Unix LF (linefeed) line ending.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_TRAILING_SPACES, "phpcs_option_trailing_spaces::trailing_spaces::Remove trailing whitespace at the end of lines.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_UNUSED_USE, "phpcs_option_unused_use::unused_use::Unused use statements must be removed.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_PHP_CLOSING_TAG, "phpcs_option_php_closing_tag::php_closing_tag::The closing ?> tag MUST be omitted from files containing only PHP.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_SHORT_TAG, "phpcs_option_php_closing_tag::short_tag::PHP code must use the long tags or the short-echo tags; it must not use the other tag variations.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_RETURN, "phpcs_option_return::return::An empty line feed should precede a return statement.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_VISIBILITY, "phpcs_option_return::visibility::Visibility must be declared on all properties and methods; abstract and final must be declared before the visibility; static must be declared after the visibility.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_BRACES, "phpcs_option_braces::braces::Opening braces for classes and methods must go on the next line, and closing braces must go on the next line after the body.\nOpening braces for control structures must go on the same line, and closing braces must go on the next line after the body.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_PHPDOC_PARAMS, "phpcs_option_phpdoc_params::phpdoc_params::All items of the @param phpdoc tags must be aligned vertically.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_EOF_ENDING, "phpcs_option_eof_ending::eof_ending:: A file must always ends with an empty line feed.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_EXTRA_EMPTY_LINES, "phpcs_option_extra_empty_lines::extra_empty_lines::Removes extra empty lines.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_INCLUDE, "phpcs_option_include::include::Include and file path should be devided with single space. File path should not be placed under brackets.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_PSR0, "phpcs_option_psr0::psr0:: Classes must be in a path that matches their namespace, be at least one namespace deep, and the class name should match the file name.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_CONTROLS_SPACE, "phpcs_option_controls_space::controls_spaces::A single space should be between: the closing brace and the control, the control and the opening parenthese, the closing parenthese and the opening brace.::true");
    store.setDefault(PreferenceConstants.PREF_PHPCS_OPTION_ELSEIF, "phpcs_option_elseif::elseif::The keyword elseif should be used instead of else if so that all control keywords looks like single words.::true");
  }
View Full Code Here


    private void launchDebuggerAndWait(
        TestDriver listener,
        boolean suspendAtFirst)
        throws Exception
    {
        IPreferenceStore prefs = PerlEditorPlugin.getDefault().getPreferenceStore();
       
        boolean p1 = PerlEditorPlugin.getDefault().getBooleanPreference(
            PreferenceConstants.DEBUG_DEBUG_CONSOLE);
        boolean p2 = PerlEditorPlugin.getDefault().getBooleanPreference(
            PreferenceConstants.DEBUG_SUSPEND_AT_FIRST);
       
        try
        {
            prefs.setValue(PreferenceConstants.DEBUG_DEBUG_CONSOLE, false);
            prefs.setValue(PreferenceConstants.DEBUG_SUSPEND_AT_FIRST, suspendAtFirst);

            ILaunchConfiguration config = getLaunchConfig(listener.getScriptName());
            assert config != null;
           
            DebugPlugin.getDefault().addDebugEventListener(listener);
            DebugUITools.launch(config, ILaunchManager.DEBUG_MODE);
            spinEventLoop(0);
           
            IWorkbenchPage page =
                PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
            page.showView("org.eclipse.debug.ui.VariableView");
            spinEventLoop(0);
           
            for (;;)
            {
                try { spinEventLoop(10000); }
                catch (InterruptedException e)
                {
                    synchronized (this) { if (tEnd > 0L) break; }
                }
            }
            DebugPlugin.getDefault().removeDebugEventListener(listener);
        }
        finally
        {
            prefs.setValue(PreferenceConstants.DEBUG_DEBUG_CONSOLE, p1);
            prefs.setValue(PreferenceConstants.DEBUG_SUSPEND_AT_FIRST, p2);
           
            IEditorPart editor = null;
            editor = findEditor("EPICTest/test_Debugger.pl");
            if (editor != null) closeEditor(editor);
            editor = findEditor("EPICTest/test_Debugger2.pl");
View Full Code Here

    public PreferenceInitializer() {
    }

    @Override
    public void initializeDefaultPreferences() {
        final IPreferenceStore store = Activator.getDefault().getPreferenceStore();
        store.setDefault(PreferenceNames.NODE_NAME, "tracing");
        store.setDefault(PreferenceNames.TICK_TIME, 60);
        store.setDefault(PreferenceNames.TRACES_LOAD_LIMIT, 100);
    }
View Full Code Here

            }
        });
    }

    private void loadDefaultEditorColors() {
        final IPreferenceStore rootStore = getPreferenceStore();

        for (final TokenHighlight th : TokenHighlight.values()) {
            final HighlightStyle data = th.getDefaultStyle();
            rootStore.setDefault(th.getColorKey(),
                    StringConverter.asString(data.getColor()));
            rootStore.setDefault(th.getStylesKey(), data.getStyles());
        }
    }
View Full Code Here

        super();
    }

    @Override
    protected IPreferenceStore doGetPreferenceStore() {
        final IPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(
                getProject()), ErlangCore.PLUGIN_ID);
        return store;
    }
View Full Code Here

    private Object fInput;

    ErlContentViewer(final Composite parent) {
        fSourceViewer = new SourceViewer(parent, null, SWT.LEFT_TO_RIGHT | SWT.H_SCROLL
                | SWT.V_SCROLL);
        final IPreferenceStore store = ErlideUIPlugin.getDefault().getPreferenceStore();
        fSourceViewer.configure(new ErlangSourceViewerConfiguration(store,
                new ColorManager()));
        fSourceViewer.setEditable(false);

        final String symbolicFontName = ErlMergeViewer.class.getName();
View Full Code Here

    @Override
    protected void initializeEditor() {
        colorManager = new ColorManager();
        setDocumentProvider(new TextFileDocumentProvider());

        final IPreferenceStore store = getErlangEditorPreferenceStore();
        setPreferenceStore(store);

        final ErlangSourceViewerConfiguration cfg = new ErlangScratchPadConfiguration(
                getPreferenceStore(), colorManager, this);
        setSourceViewerConfiguration(cfg);
View Full Code Here

        }
        return null;
    }

    public static ChainedPreferenceStore getErlangEditorPreferenceStore() {
        final IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore();
        return new ChainedPreferenceStore(new IPreferenceStore[] {
                ErlideUIPlugin.getDefault().getPreferenceStore(), generalTextStore });
    }
View Full Code Here

                e.doit = true;
            }

        });

        final IPreferenceStore store = ErlideUIPlugin.getDefault().getPreferenceStore();
        final IColorManager colorManager = new ColorManager();
        consoleOutputViewer.setDocument(fDoc);
        consoleOutputViewer.configure(new ErlangConsoleSourceViewerConfiguration(store,
                colorManager, backend));
View Full Code Here

    }

    protected abstract String getKey();

    private void update() {
        final IPreferenceStore store = getPreferenceStore();
        if (store.getBoolean(getKey())) {
            // on
            setChecked(true);
        } else {
            // off
            setChecked(false);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.preference.IPreferenceStore

Copyright © 2018 www.massapicom. 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.