upload tizen1.0 source
[sdk/ide/product.git] / org.eclipse.cdt.ui / src / org / eclipse / cdt / internal / ui / refactoring / RefactoringSavePreferences.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2008 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *     Sergey Prigogin (Google)
11  *******************************************************************************/
12 package org.eclipse.cdt.internal.ui.refactoring;
13
14 import org.eclipse.jface.preference.IPreferenceStore;
15
16 import org.eclipse.cdt.ui.CUIPlugin;
17 import org.eclipse.cdt.ui.PreferenceConstants;
18
19 public class RefactoringSavePreferences {
20         public static final String PREF_SAVE_ALL_EDITORS= PreferenceConstants.REFACTOR_SAVE_ALL_EDITORS;
21
22         public static boolean getSaveAllEditors() {
23                 IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
24                 return store.getBoolean(PREF_SAVE_ALL_EDITORS);
25         }
26
27         public static void setSaveAllEditors(boolean save) {
28                 IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
29                 store.setValue(PREF_SAVE_ALL_EDITORS, save);
30         }
31 }