at.spardat.xma.guidesign.preferences.PreferenceInitializer.java Source code

Java tutorial

Introduction

Here is the source code for at.spardat.xma.guidesign.preferences.PreferenceInitializer.java

Source

/*******************************************************************************
 * Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
 * 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:
 *     s IT Solutions AT Spardat GmbH - initial API and implementation
 *******************************************************************************/
package at.spardat.xma.guidesign.preferences;

import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;

import at.spardat.xma.gui.projectw.cmp.BuildToolEnumeration;
import at.spardat.xma.guidesign.plugin.GUIDesignerPlugin;

/**
 * Class used to initialize default preference values.
 * 
 * @author <a href="mailto:michael.clay@s-itsolutions.at">Michael Clay</a>
 * @version $Revision: 9783 $ $Date: 2012-08-23 13:52:20 +0200 (Don, 23. Aug 2012) $
 */
public class PreferenceInitializer extends AbstractPreferenceInitializer {
    public static final String DEFAULT_MODEL_ROOT_PACKAGE_VALUE = "org.mycompany";

    /*
     * (non-Javadoc)
     * 
     * @seeorg.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
     * initializeDefaultPreferences()
     */
    public void initializeDefaultPreferences() {
        IPreferenceStore store = GUIDesignerPlugin.getPlugin().getPreferenceStore();
        store.setDefault(PreferenceConstants.JAVA_SRC_ROOT_FOLDER,
                PreferenceConstants.JAVA_SRC_ROOT_FOLDER_DEFAULT);
        store.setDefault(PreferenceConstants.WEBAPP_ROOT_FOLDER, PreferenceConstants.WEBAPP_ROOT_FOLDER_DEFAULT);
        store.setDefault(PreferenceConstants.RESOURCES_SRC_ROOT_FOLDER,
                PreferenceConstants.RESOURCES_SRC_ROOT_FOLDER_DEFAULT);
        store.setDefault(PreferenceConstants.JAVA_TEST_ROOT_FOLDER,
                PreferenceConstants.JAVA_TEST_ROOT_FOLDER_DEFAULT);
        store.setDefault(PreferenceConstants.USED_BUILD_TOOL, BuildToolEnumeration.ANT.toString());
        store.setDefault(PreferenceConstants.MODEL_ROOT_PACKAGE, DEFAULT_MODEL_ROOT_PACKAGE_VALUE);
    }

}