Package org.eclipse.core.runtime.preferences

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


            cachedCommands.getClass().getName())));
      }
    }

    if (serialisedCommands != null) {
      IEclipsePreferences prefs = CloudFoundryPlugin.getDefault().getPreferences();
      prefs.put(SERVICE_COMMANDS_PREF, serialisedCommands);
      try {
        prefs.flush();
      }
      catch (BackingStoreException e) {
        CloudFoundryPlugin.logError(e);
      }
View Full Code Here


   * @param enable true if tracing should be enabled for all clients/all
   * servers. False otherwise.
   */
  public synchronized void enableTracing(boolean enable) {
    isEnabled = enable;
    IEclipsePreferences prefs = CloudFoundryPlugin.getDefault().getPreferences();
    prefs.putBoolean(PREFERENCE_TRACE, isEnabled);
    try {
      prefs.flush();
    }
    catch (BackingStoreException e) {
      CloudFoundryPlugin.logError(e);
    }

View Full Code Here

   * Set a bunch of preferences so that m2eclipse hopefully isn't doing a lot
   * of time consuming stuff in the background.
   */
  public static void mavenOffline() throws Error {
    System.out.println("Pacifying m2eclipse...");
    IEclipsePreferences m2EclipsePrefs = new InstanceScope().getNode("org.eclipse.m2e.core");
    m2EclipsePrefs.putBoolean("eclipse.m2.offline", true);
    m2EclipsePrefs.putBoolean("eclipse.m2.globalUpdatePolicy", false);
    m2EclipsePrefs.putBoolean("eclipse.m2.updateIndexes", false);
    try {
      m2EclipsePrefs.flush();
    }
    catch (BackingStoreException e) {
      throw new Error(e);
    }

View Full Code Here

    else {
      throw CloudErrorUtil.toCoreException(NLS.bind(Messages.ERROR_FAILED_STORE_SELF_SIGNED_PREFS, serverURL));
    }

    if (asString != null) {
      IEclipsePreferences prefs = CloudFoundryPlugin.getDefault().getPreferences();
      prefs.put(SELF_SIGNED_PREF, asString);
      try {
        prefs.flush();
      }
      catch (BackingStoreException e) {
        throw CloudErrorUtil.toCoreException(
            NLS.bind(Messages.ERROR_FAILED_STORE_SELF_SIGNED_PREFS, serverURL), e);
View Full Code Here

     * type + local module name) to the deployed application name.
     * @return map containing local module ID (key) to deployed cloud
     * application name (value)
     */
    private Map<String, String> getLocalModuleToCloudModuleMapping() {
      IEclipsePreferences node = new InstanceScope().getNode(CloudFoundryPlugin.PLUGIN_ID);
      String string = node.get(KEY_MODULE_MAPPING_LIST + ":" + getServerId(), ""); //$NON-NLS-1$ //$NON-NLS-2$
      return convertStringToMap(string);
    }
View Full Code Here

      return server.getAttribute(CloudFoundryServer.PROP_SERVER_ID, (String) null);
    }

    private void setLocalModuleToCloudModuleMapping(Map<String, String> list) {
      String string = convertMapToString(list);
      IEclipsePreferences node = new InstanceScope().getNode(CloudFoundryPlugin.PLUGIN_ID);
      CloudFoundryPlugin.trace("Updated mapping: " + string); //$NON-NLS-1$
      node.put(KEY_MODULE_MAPPING_LIST + ":" + getServerId(), string); //$NON-NLS-1$
      try {
        node.flush();
      }
      catch (BackingStoreException e) {
        CloudFoundryPlugin
            .getDefault()
            .getLog()
View Full Code Here

      add(appModule);
      return appModule;
    }

    void updateServerId(String oldServerId, String newServerId) {
      IEclipsePreferences node = new InstanceScope().getNode(CloudFoundryPlugin.PLUGIN_ID);
      String string = node.get(KEY_MODULE_MAPPING_LIST + ":" + oldServerId, ""); //$NON-NLS-1$ //$NON-NLS-2$
      node.remove(KEY_MODULE_MAPPING_LIST + ":" + oldServerId); //$NON-NLS-1$
      node.put(KEY_MODULE_MAPPING_LIST + ":" + newServerId, string); //$NON-NLS-1$
    }
View Full Code Here

    }
    return callback;
  }

  public synchronized void setIncrementalPublish(boolean incrementalPublish) {
    IEclipsePreferences prefs = getPreferences();
    prefs.putBoolean(ENABLE_INCREMENTAL_PUBLISH_PREFERENCE, incrementalPublish);
    try {
      prefs.flush();
    }
    catch (BackingStoreException e) {
      logError(e);
    }
  }
View Full Code Here

  protected synchronized void remove(IServer server) {
    dataByServer.remove(server);

    String serverId = server.getAttribute(CloudFoundryServer.PROP_SERVER_ID, (String) null);
    if (serverId != null) {
      IEclipsePreferences node = new InstanceScope().getNode(CloudFoundryPlugin.PLUGIN_ID);
      node.remove(KEY_MODULE_MAPPING_LIST + ":" + serverId); //$NON-NLS-1$
      try {
        node.flush();
      }
      catch (BackingStoreException e) {
        CloudFoundryPlugin
            .getDefault()
            .getLog()
View Full Code Here

*/
public class DisableDebugStatusHandlers extends ExternalResource {

    @Override
    protected void before() throws Throwable {
        IEclipsePreferences debugPrefs = InstanceScope.INSTANCE.getNode(DebugPlugin.getUniqueIdentifier());
        debugPrefs.putBoolean(IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, false);
        debugPrefs.flush();
    }
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.