Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/internal/ProfilerPreferences.java')
-rw-r--r--plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/internal/ProfilerPreferences.java73
1 files changed, 0 insertions, 73 deletions
diff --git a/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/internal/ProfilerPreferences.java b/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/internal/ProfilerPreferences.java
deleted file mode 100644
index 32ee2fe42..000000000
--- a/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/internal/ProfilerPreferences.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.internal;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Helper class which wraps around the preference store so that options related to
- * server profilers can be persisted.
- */
-public class ProfilerPreferences {
-
- private static ProfilerPreferences prefs = null;
- private IPreferencesService prefService;
-
- /* The qualifier (scope) in the preference store */
- private static final String PREF_PROFILER_QUALIFIER = "org.eclipse.jst.server.core.internal.profilers";
- /* The key used to store the selected profiler preference */
- private static final String PREF_SELECTED_PROFILER = "selected-profiler";
-
-
- /**
- * Private Constructor - This should be a singleton class
- */
- private ProfilerPreferences() {
- prefService = Platform.getPreferencesService();
- }
-
- /**
- * Returns an instance of this class
- * @return
- */
- public static ProfilerPreferences getInstance() {
- if ( prefs == null )
- prefs = new ProfilerPreferences();
- return prefs;
- }
-
- /**
- * Sets the profiler to use when profiling on server
- * @param profilerId the id of the server profiler
- */
- public void setServerProfilerId( String profilerId ) {
- Preferences node = new InstanceScope().getNode( PREF_PROFILER_QUALIFIER );
- node.put( PREF_SELECTED_PROFILER, profilerId );
- try {
- node.flush();
- } catch (BackingStoreException e) {
- Trace.trace(Trace.SEVERE, "Could not save server profiler preference", e);
- }
- }
-
- /**
- * Reutns the id of the current server profiler
- * @return the id of the current server profiler
- */
- public String getServerProfilerId() {
- return prefService.getString( PREF_PROFILER_QUALIFIER, PREF_SELECTED_PROFILER, null, null );
- }
-
-}

Back to the top