mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-29 19:23:38 +02:00
[261503][cleanup] Get rid of deprecated getPluginPreferences()
This commit is contained in:
parent
717cf8cc0a
commit
5ab146edc6
1 changed files with 36 additions and 32 deletions
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
|
||||
* Copyright (c) 2006, 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
|
||||
|
@ -23,6 +23,7 @@
|
|||
* David Dykstal (IBM) - [197027] Can lose data if closing eclipse before profile is saved
|
||||
* Kevin Doyle (IBM) - [243821] Save occurring on Main Thread
|
||||
* David Dykstal (IBM) - [243128] Problem during migration - NPE if provider does save without using a job.
|
||||
* Martin Oberhuber (Wind River) - [261503][cleanup] Get rid of deprecated getPluginPreferences()
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.persistence;
|
||||
|
@ -47,11 +48,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
|||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.core.runtime.Preferences;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
|
||||
import org.eclipse.core.runtime.jobs.IJobChangeListener;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.core.runtime.preferences.IPreferencesService;
|
||||
import org.eclipse.rse.core.IRSEPreferenceNames;
|
||||
import org.eclipse.rse.core.RSECorePlugin;
|
||||
import org.eclipse.rse.core.model.IRSEPersistableContainer;
|
||||
|
@ -478,14 +479,17 @@ public class RSEPersistenceManager implements IRSEPersistenceManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrieves the default persistence provider id from the preferences.
|
||||
* This persistence provider identifier is specified in the org.eclipse.rse.core/DEFAULT_PERSISTENCE_PROVIDER
|
||||
* preference and can be specified a product's plugin_customization.ini file.
|
||||
* @return
|
||||
* Retrieves the default persistence provider id from the preferences. This
|
||||
* persistence provider identifier is specified in the
|
||||
* org.eclipse.rse.core/DEFAULT_PERSISTENCE_PROVIDER preference and can be
|
||||
* specified a product's plugin_customization.ini file.
|
||||
*
|
||||
* @return the specified default persistence provider, or the empty string
|
||||
* <code>""</code> if not set.
|
||||
*/
|
||||
private String getDefaultPersistenceProviderId() {
|
||||
Preferences preferences = RSECorePlugin.getDefault().getPluginPreferences();
|
||||
String providerId = preferences.getString(IRSEPreferenceNames.DEFAULT_PERSISTENCE_PROVIDER);
|
||||
IPreferencesService ps = Platform.getPreferencesService();
|
||||
String providerId = ps.getString(RSECorePlugin.PLUGIN_ID, IRSEPreferenceNames.DEFAULT_PERSISTENCE_PROVIDER, "", null); //$NON-NLS-1$
|
||||
return providerId;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue