KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > apt > core > internal > util > AptCorePreferenceInitializer


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 BEA Systems, Inc.
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  * wharley - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.apt.core.internal.util;
13
14 import java.util.Map JavaDoc;
15
16 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
17 import org.eclipse.core.runtime.preferences.DefaultScope;
18 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
19 import org.eclipse.jdt.apt.core.internal.AptPlugin;
20 import org.eclipse.jdt.apt.core.util.AptPreferenceConstants;
21
22 /**
23  * This class is used to extend org.eclipse.core.runtime.preferences.
24  */

25 public class AptCorePreferenceInitializer extends AbstractPreferenceInitializer {
26
27     @Override JavaDoc
28     public void initializeDefaultPreferences() {
29         IEclipsePreferences defaultPreferences = new DefaultScope().getNode(AptPlugin.PLUGIN_ID);
30         for (Map.Entry JavaDoc<String JavaDoc,String JavaDoc> entry : AptPreferenceConstants.DEFAULT_OPTIONS_MAP.entrySet()) {
31             defaultPreferences.put(entry.getKey(), entry.getValue());
32         }
33     }
34
35 }
36
Popular Tags