blob: 0e18369c3b692b59113c4ba0572b68a9ace0408f [file] [log] [blame]
//------------------------------------------------------------------------------
// Copyright (c) 2005, 2006 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 implementation
//------------------------------------------------------------------------------
package org.eclipse.epf.library.preferences;
import org.eclipse.epf.library.LibraryPlugin;
/**
* The Library preferences.
*
* @author Kelvin Low
* @since 1.0
*/
public class LibraryPreferences {
/**
* The Library preference keys prefix.
*/
public static final String PREFIX = "library."; //$NON-NLS-1$
/**
* Preference key for storing the URI of the method library that was opened
* in the last session.
*/
public static final String SAVED_METHOD_LIRARY_URI = PREFIX
+ "savedMethodLibraryURI"; //$NON-NLS-1$
/**
* Preference key for storing the type of the method library that was opened
* in the last session.
*/
public static final String SAVED_METHOD_LIRARY_TYPE = PREFIX
+ "savedMethodLibraryType"; //$NON-NLS-1$
/**
* Preference key for storing the backup before save option.
*/
public static final String BACKUP_BEFORE_SAVE = PREFIX + "backupBeforeSave"; //$NON-NLS-1$
/**
* Preference key for storing the discard unresolved references option.
*/
public static final String DISCARD_UNRESOLVED_REFERENCES = PREFIX
+ "discardUnresolvedReferences"; //$NON-NLS-1$
/**
* Gets the URI of the method library that was opened in the last session.
*/
public static String getSavedMethodLibraryURI() {
return LibraryPlugin.getDefault().getPreferenceStore().getString(
SAVED_METHOD_LIRARY_URI);
}
/**
* Saves the URI of the method library that was opened in the last session.
*/
public static void setSavedMethodLibraryURI(String value) {
LibraryPlugin.getDefault().getPreferenceStore().setValue(
SAVED_METHOD_LIRARY_URI, value);
}
/**
* Gets the type of the method library that was opened in the last session.
*/
public static String getSavedMethodLibraryType() {
return LibraryPlugin.getDefault().getPreferenceStore().getString(
SAVED_METHOD_LIRARY_TYPE);
}
/**
* Saves the type of the method library that was opened in the last session.
*/
public static void setSavedMethodLibraryType(String value) {
LibraryPlugin.getDefault().getPreferenceStore().setValue(
SAVED_METHOD_LIRARY_TYPE, value);
}
/**
* Gets the backup before save option.
*/
public static boolean getBackupBeforeSave() {
return LibraryPlugin.getDefault().getPreferenceStore().getBoolean(
BACKUP_BEFORE_SAVE);
}
/**
* Saves the backup before save option.
*/
public static void setBackupBeforeSave(boolean value) {
LibraryPlugin.getDefault().getPreferenceStore().setValue(
BACKUP_BEFORE_SAVE, value);
}
/**
* Gets the discard unresolved references option.
*/
public static boolean getDiscardUnresolvedReferences() {
return LibraryPlugin.getDefault().getPreferenceStore().getBoolean(
DISCARD_UNRESOLVED_REFERENCES);
}
/**
* Saves the discard unresolved references option.
*/
public static void setDiscardUnresolvedReferences(boolean value) {
LibraryPlugin.getDefault().getPreferenceStore().setValue(
DISCARD_UNRESOLVED_REFERENCES, value);
}
}