KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > junit > ui > JunitPreferenceInitializer


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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  * Sebastian Davids <sdavids@gmx.de> - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.junit.ui;
12
13 import java.util.List JavaDoc;
14
15 import org.eclipse.core.runtime.Preferences;
16 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
17
18 /**
19  * Default preference value initialization for the
20  * <code>org.eclipse.jdt.junit</code> plug-in.
21  */

22 public class JunitPreferenceInitializer extends AbstractPreferenceInitializer {
23
24     /** {@inheritDoc} */
25     public void initializeDefaultPreferences() {
26         Preferences prefs= JUnitPlugin.getDefault().getPluginPreferences();
27         prefs.setDefault(JUnitPreferencesConstants.DO_FILTER_STACK, true);
28         prefs.setDefault(JUnitPreferencesConstants.SHOW_ON_ERROR_ONLY, false);
29         prefs.setDefault(JUnitPreferencesConstants.ENABLE_ASSERTIONS, false);
30
31         List JavaDoc defaults= JUnitPreferencesConstants.createDefaultStackFiltersList();
32         String JavaDoc[] filters= (String JavaDoc[]) defaults.toArray(new String JavaDoc[defaults.size()]);
33         String JavaDoc active= JUnitPreferencesConstants.serializeList(filters);
34         prefs.setDefault(JUnitPreferencesConstants.PREF_ACTIVE_FILTERS_LIST, active);
35         prefs.setDefault(JUnitPreferencesConstants.PREF_INACTIVE_FILTERS_LIST, ""); //$NON-NLS-1$
36
prefs.setDefault(JUnitPreferencesConstants.MAX_TEST_RUNS, 10);
37         
38         prefs.setDefault(JUnitPreferencesConstants.JUNIT3_JAVADOC, "http://www.junit.org/junit/javadoc/3.8.1"); //$NON-NLS-1$
39
prefs.setDefault(JUnitPreferencesConstants.JUNIT4_JAVADOC, "http://www.junit.org/junit/javadoc/4.3"); //$NON-NLS-1$
40
}
41 }
42
Popular Tags