1 /******************************************************************************* 2 * Copyright (c) 2004, 2005 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 package org.eclipse.core.runtime.preferences; 12 13 /** 14 * Abstract class used to aid in default preference value initialization. 15 * Clients who extend the <code>org.eclipse.core.runtime.preferences</code> 16 * extension point are able to specify a class within an <code>initializer</code> 17 * element. 18 * 19 * @since 3.0 20 */ 21 public abstract class AbstractPreferenceInitializer { 22 23 /** 24 * Default constructor for the class. 25 */ 26 public AbstractPreferenceInitializer() { 27 super(); 28 } 29 30 /** 31 * This method is called by the preference initializer to initialize default 32 * preference values. Clients should get the correct node for their 33 * bundle and then set the default values on it. For example: 34 * <pre> 35 * public void initializeDefaultPreferences() { 36 * Preferences node = new DefaultScope().getNode("my.bundle.id"); 37 * node.put(key, value); 38 * } 39 * </pre> 40 * <p> 41 * <em>Note: Clients should only set default preference values for their 42 * own bundle.</em> 43 * </p> 44 * <p> 45 * <em>Note:</em> Clients should not call this method. It will be called 46 * automatically by the preference initializer when the appropriate default 47 * preference node is accessed. 48 * </p> 49 */ 50 public abstract void initializeDefaultPreferences(); 51 52 } 53