KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > refactoring > RefactoringSavePreferences


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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  *******************************************************************************/

11
12 package org.eclipse.jdt.internal.ui.refactoring;
13
14 import org.eclipse.jface.preference.IPreferenceStore;
15
16 import org.eclipse.jdt.internal.ui.JavaPlugin;
17
18 import org.eclipse.jdt.ui.PreferenceConstants;
19
20 public class RefactoringSavePreferences {
21
22     public static final String JavaDoc PREF_SAVE_ALL_EDITORS= PreferenceConstants.REFACTOR_SAVE_ALL_EDITORS;
23     
24     public static boolean getSaveAllEditors() {
25         IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
26         return store.getBoolean(PREF_SAVE_ALL_EDITORS);
27     }
28     
29     public static void setSaveAllEditors(boolean save) {
30         IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
31         store.setValue(PREF_SAVE_ALL_EDITORS, save);
32     }
33 }
34
Popular Tags