Package org.eclipse.core.runtime.preferences

Examples of org.eclipse.core.runtime.preferences.IEclipsePreferences


            final IErlProject project) {
        IProjectConfigurator result = null;
        switch (configType) {
        case INTERNAL:
            final String configName = configType.getConfigName();
            final IEclipsePreferences node = new ProjectScope(
                    project.getWorkspaceProject()).getNode(configName);
            // TODO remove later
            // (shade legacy projects, how long to support them?)
            final IEclipsePreferences oldNode = new ProjectScope(
                    project.getWorkspaceProject()).getNode("org.erlide.core");
            result = new PreferencesProjectConfigurator(node, oldNode);
            break;
        case REBAR:
        case EMAKE:
View Full Code Here


        setToPreferences(NAVIGATION_KEYS, NAVIGATION_DEFAULTS, buttons);
    }

    public static boolean getCheckAllProjects() {
        if (fCachedCheckAllProjects == null) {
            final IEclipsePreferences node = ErlideUIPlugin.getPrefsNode();
            final boolean checkAllProjects = node.getBoolean(NAVIGATION_KEY + "/"
                    + CHECK_ALL_PROJECTS_KEY, true);
            fCachedCheckAllProjects = checkAllProjects;
        }
        return fCachedCheckAllProjects.booleanValue();
    }
View Full Code Here

        clearCaches();
        super.close();
    }

    private void loadCoreProperties() {
        final IEclipsePreferences node = getCorePropertiesNode();
        final String name = node.get(CONFIG_TYPE_TAG, ProjectConfigType.INTERNAL.name());
        setConfigType(ProjectConfigType.valueOf(name));
    }
View Full Code Here

        final String name = node.get(CONFIG_TYPE_TAG, ProjectConfigType.INTERNAL.name());
        setConfigType(ProjectConfigType.valueOf(name));
    }

    private void storeCoreProperties() {
        final IEclipsePreferences node = getCorePropertiesNode();
        node.put(CONFIG_TYPE_TAG, getConfigType().name());
        try {
            node.flush();
        } catch (final Exception e) {
            ErlLogger.debug(e);
            // ignore?
        }
    }
View Full Code Here

            storing = false;
        }
    }

    private void loadBuilderProperties() {
        final IEclipsePreferences node = getCorePropertiesNode();
        final String data = node.get("builderData", "");
        builderProperties = new BuilderProperties();
        builderProperties.fromString(data);
        // TODO more
    }
View Full Code Here

        builderProperties.fromString(data);
        // TODO more
    }

    private void storeBuilderProperties() {
        final IEclipsePreferences node = getCorePropertiesNode();
        node.put("builderData", builderProperties.toString());
        try {
            node.flush();
        } catch (final BackingStoreException e) {
            // ignore?
        }
    }
View Full Code Here

    private static final String SEPARATOR = ",";

    public static boolean loadViewDefaults(final List<String> userDefinedPatterns,
            final Set<String> enabledFilterIDs) {
        final IEclipsePreferences prefsNode = ErlangOutlinePage.getPrefsNode();
        final boolean areUserDefinedPatternsEnabled = prefsNode.getBoolean(
                PreferenceConstants.OUTLINE_CUSTOM_PATTERN_FILTERS_ENABLED, false);
        final String userDefinedPatternsString = prefsNode.get(
                PreferenceConstants.OUTLINE_CUSTOM_PATTERN_FILTERS, "");
        userDefinedPatterns.addAll(ListsUtils.unpackList(userDefinedPatternsString,
                SEPARATOR));
        final String enabledFilterIDsString = prefsNode.get(
                PreferenceConstants.OUTLINE_ENABLED_FILTERS, "");
        enabledFilterIDs.addAll(ListsUtils.unpackList(enabledFilterIDsString, SEPARATOR));
        return areUserDefinedPatternsEnabled;
    }
View Full Code Here

        return areUserDefinedPatternsEnabled;
    }

    public static void storeViewDefaults(final boolean areUserDefinedPatternsEnabled,
            final List<String> userDefinedPatterns, final Set<String> enabledFilterIDs) {
        final IEclipsePreferences prefsNode = ErlangOutlinePage.getPrefsNode();
        prefsNode.putBoolean(PreferenceConstants.OUTLINE_CUSTOM_PATTERN_FILTERS_ENABLED,
                areUserDefinedPatternsEnabled);
        prefsNode.put(PreferenceConstants.OUTLINE_CUSTOM_PATTERN_FILTERS,
                ListsUtils.packList(userDefinedPatterns, SEPARATOR));
        prefsNode.put(PreferenceConstants.OUTLINE_ENABLED_FILTERS,
                ListsUtils.packList(enabledFilterIDs, SEPARATOR));
        try {
            prefsNode.flush();
        } catch (final BackingStoreException e) {
            ErlLogger.error(e);
        }
    }
View Full Code Here

public class ToggleMarkOccurrencesHandler extends AbstractHandler {

    @Override
    public Object execute(final ExecutionEvent event) throws ExecutionException {
        final boolean oldValue = HandlerUtil.toggleCommandState(event.getCommand());
        final IEclipsePreferences prefsNode = ErlideUIPlugin.getPrefsNode();
        prefsNode.putBoolean("markingOccurences", !oldValue);
        return null;
    }
View Full Code Here

            setDescription(ActionMessages.ToggleLinkingAction_description);
            setToolTipText(ActionMessages.ToggleLinkingAction_tooltip);
            ErlideImage.setLocalImageDescriptors(this, "synced.gif");
            PlatformUI.getWorkbench().getHelpSystem()
                    .setHelp(this, IErlangHelpContextIds.LINK_EDITOR_ACTION);
            final IEclipsePreferences prefsNode = ErlangOutlinePage.getPrefsNode();
            final boolean isLinkingEnabled = prefsNode.getBoolean(
                    PreferenceConstants.ERLANG_OUTLINE_LINK_WITH_EDITOR, true);
            setChecked(isLinkingEnabled);
            fLinkHelper.setLinkWithEditor(isLinkingEnabled);
        }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.preferences.IEclipsePreferences

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.