Java tutorial
package mt.com.southedge.jclockwork.plugin.preferences; /* ****************************************************************************** * Copyright (c) 2011 SouthEdge Software and Consultancy. 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: Carl Frendo - initial design and implementation * ******************************************************************************/ import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.jface.preference.IPreferenceStore; import mt.com.southedge.jclockwork.plugin.Activator; import mt.com.southedge.jclockwork.plugin.preferences.conversionhandling.ConversionHandlingConstants; /** * Class used to initialize default preference values. */ public class PreferenceInitializer extends AbstractPreferenceInitializer { private static final String CONVERSION_STRING = "String-to-Date:mt.com.southedge.jclockwork.plugin.conversionhandling.StringDateConversionHandler;" + "String-to-int:mt.com.southedge.jclockwork.plugin.conversionhandling.StringIntConversionHandler;" + "Int-to-String:mt.com.southedge.jclockwork.plugin.conversionhandling.IntStringConversionHandler;" + "Char-to-String:mt.com.southedge.jclockwork.plugin.conversionhandling.CharStringConversionHandler;" + "String-to-Char:mt.com.southedge.jclockwork.plugin.conversionhandling.StringCharConversionHandler;" + "Date-to-String:mt.com.southedge.jclockwork.plugin.conversionhandling.DateStringConversionHandler;" + "No-Conversion:mt.com.southedge.jclockwork.plugin.conversionhandling.NoConversionHandler;" + "Object-to-String:mt.com.southedge.jclockwork.plugin.conversionhandling.ObjectStringConversionHandler;" + "Custom Conversion:mt.com.southedge.jclockwork.plugin.conversionhandling.CustomConverter"; /* * (non-Javadoc) * * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() */ public void initializeDefaultPreferences() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); store.setDefault(PreferenceConstants.P_SHOW_CONVERSION_DIALOG_ON_CONCAT, false); store.setDefault(PreferenceConstants.P_FORMAT_GENERATED_CODE, true); store.setDefault(PreferenceConstants.P_SAVE_AFTER_GENERATION, true); store.setDefault(PreferenceConstants.P_PACKAGE_EXCEPTIONS, "java.lang"); store.setDefault(PreferenceConstants.P_METHOD_NAME_EXCEPTIONS, "is;get"); store.setDefault(ConversionHandlingConstants.P_CONVERSION_HANDLING_LIST, CONVERSION_STRING); } }