Package org.eclipse.core.runtime.preferences

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


        }
    }

    @Override
    public void dispose() {
        final IEclipsePreferences node = CodeAssistPreferences.getNode();
        node.removePreferenceChangeListener(fPreferenceChangeListener);
    }
View Full Code Here


    @Test
    public void outputPathShouldFollowPropertyChange() throws BackingStoreException {
        final String expected = "hello/world";

        final IProject wproject = project.getWorkspaceProject();
        final IEclipsePreferences node = new ProjectScope(wproject)
                .getNode("org.erlide.model");
        node.put(ProjectPreferencesConstants.OUTPUT_DIR, expected);
        node.flush();

        final ErlangProjectProperties pp = project.getProperties();
        final String actual = pp.getOutputDir().toPortableString();

        assertThat(actual, is(expected));
View Full Code Here

    @Test
    public void includePathsShouldFollowPropertyChange() throws BackingStoreException {
        final String expected = "hello/world;a/b";

        final IProject wproject = project.getWorkspaceProject();
        final IEclipsePreferences node = new ProjectScope(wproject)
                .getNode("org.erlide.model");
        node.put(ProjectPreferencesConstants.INCLUDE_DIRS, expected);
        node.flush();

        final String actual = project.getProperties().getIncludeDirs().toString();

        assertThat(actual, is(convertListString(expected)));
    }
View Full Code Here

    private String erlangTriggers;
    private String eDocTriggers;

    public static IEclipsePreferences getNode() {
        final IScopeContext context = InstanceScope.INSTANCE;
        final IEclipsePreferences eclipsePreferences = context.getNode(QUALIFIER);
        return eclipsePreferences;
    }
View Full Code Here

    private static final int DEFAULT_INDENT_WIDTH = 4;
    private static final boolean DEFAULT_ENABLE_HOVER = true;

    private void setToPreferences() {
        final IEclipsePreferences node = ErlideUIPlugin.getPrefsNode();
        final Integer i = node.getInt(indentWidthKey, DEFAULT_INDENT_WIDTH);
        indentWidthText.setText(i.toString());
        enableHoverCheckBox.setSelection(node.getBoolean(enableHoverKey,
                DEFAULT_ENABLE_HOVER));
    }
View Full Code Here

                DEFAULT_ENABLE_HOVER));
    }

    @Override
    protected void putPreferences() {
        final IEclipsePreferences node = ErlideUIPlugin.getPrefsNode();
        node.putInt(indentWidthKey, Integer.parseInt(indentWidthText.getText()));
        node.putBoolean(enableHoverKey, enableHoverCheckBox.getSelection());
    }
View Full Code Here

        node.putInt(indentWidthKey, Integer.parseInt(indentWidthText.getText()));
        node.putBoolean(enableHoverKey, enableHoverCheckBox.getSelection());
    }

    public static boolean getEnableHover() {
        final IEclipsePreferences node = ErlideUIPlugin.getPrefsNode();
        return node.getBoolean(EDITOR_KEY + "/" + ErlideUIConstants.EDITOR_ENABLE_HOVER,
                DEFAULT_ENABLE_HOVER);
    }
View Full Code Here

        storeContext.getNode(qualifier).flush();
    }

    public boolean hasAnyAtLowestScope() {
        final IScopeContext sc = storeContext;
        final IEclipsePreferences p = sc.getNode(qualifier);
        if (p != null) {
            try {
                final String[] keys = p.keys();
                return keys.length > 0;
            } catch (final BackingStoreException e) {
            }
        }
        return false;
View Full Code Here

        return false;
    }

    public void removeAllAtLowestScope() {
        final IScopeContext sc = storeContext;
        final IEclipsePreferences p = sc.getNode(qualifier);
        if (p != null) {
            try {
                final String[] keys = p.keys();
                for (final String key : keys) {
                    remove(key, sc);
                }
                flush();
            } catch (final BackingStoreException e) {
View Full Code Here

    return commandContributionItemParam;
  }

  protected List<MavenCommand> loadPreferences() {
    IEclipsePreferences store = new InstanceScope().getNode(Activator.PLUGIN_ID);
    List<MavenCommand> commands = new ArrayList<MavenCommand>();
    int commandNumber = 0;
    String[] keys;
    try {
      keys = store.keys();

      if (keys != null)
        for (String key : keys) {
          if (key.contains(PreferencesConstants.MAVEN_COMMAND_ALIAS)) {
            String sId = key
                .substring(PreferencesConstants.MAVEN_COMMAND_ALIAS
                    .length() + 1);
            commandNumber = Integer.parseInt(sId);

            MavenCommand command = new MavenCommand();
            command.setId("" + commandNumber);
            command.setAliasValue(store.get(
                PreferencesConstants.MAVEN_COMMAND_ALIAS + "."
                    + commandNumber, null));
            command.setCommandLine(store.get(
                PreferencesConstants.MAVEN_COMMANDLINE + "."
                    + commandNumber, null));
            commands.add(command);
          }
        }
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.