KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > dolphin > preferences > PreferenceInitializer


1 /*
2 * Copyright (C) 2005 Bourgeon Jérôme, Macherel Bruno
3 *
4 * This file is part of Dolphin
5 *
6 * Dolphin : An open source J2EE Deployment Tool JSR-88 compliant
7 * Contact: ishmael-dev@objectweb.org
8 *
9 * Dolphin is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or any later version.
13 *
14 * Dolphin is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with Dolphin; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 */

24 package org.objectweb.dolphin.preferences;
25
26 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
27 import org.eclipse.jface.preference.IPreferenceStore;
28
29 import org.objectweb.dolphin.DolphinPlugin;
30 import org.objectweb.dolphin.resources.DolphinResourcesManagment;
31
32 /**
33  * Class used to initialize default preference values.
34  */

35 public class PreferenceInitializer extends AbstractPreferenceInitializer {
36
37     /**
38      * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
39      */

40     public void initializeDefaultPreferences() {
41         IPreferenceStore store = DolphinPlugin.getDefault()
42                 .getPreferenceStore();
43         store.setDefault(PreferenceConstants.P_BOOLEAN, true);
44         store.setDefault(PreferenceConstants.P_CHOICE, "choice2");
45         store.setDefault(PreferenceConstants.P_STRING,
46                 "Default value");
47         store.setDefault(PreferenceConstants.P_WORKSPACE,DolphinResourcesManagment.getWorkspace());
48     }
49
50 }
51
Popular Tags