01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.ui.refactoring;
11:
12: import org.eclipse.jface.preference.IPreferenceStore;
13:
14: import org.eclipse.jdt.internal.ui.JavaPlugin;
15:
16: import org.eclipse.jdt.ui.PreferenceConstants;
17:
18: public class RefactoringSavePreferences {
19:
20: public static final String PREF_SAVE_ALL_EDITORS = PreferenceConstants.REFACTOR_SAVE_ALL_EDITORS;
21:
22: public static boolean getSaveAllEditors() {
23: IPreferenceStore store = JavaPlugin.getDefault()
24: .getPreferenceStore();
25: return store.getBoolean(PREF_SAVE_ALL_EDITORS);
26: }
27:
28: public static void setSaveAllEditors(boolean save) {
29: IPreferenceStore store = JavaPlugin.getDefault()
30: .getPreferenceStore();
31: store.setValue(PREF_SAVE_ALL_EDITORS, save);
32: }
33: }
|