mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Moved initialization of default preference to Codan core where it belongs.
This commit is contained in:
parent
ed4a45991a
commit
f118967040
3 changed files with 15 additions and 23 deletions
|
@ -63,6 +63,9 @@
|
|||
|
||||
<extension
|
||||
point="org.eclipse.core.runtime.preferences">
|
||||
<initializer
|
||||
class="org.eclipse.cdt.codan.internal.core.PreferenceInitializer">
|
||||
</initializer>
|
||||
</extension>
|
||||
|
||||
<extension
|
||||
|
|
|
@ -1,35 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2010 Alena Laskavaia
|
||||
* Copyright (c) 2009, 2011 Alena Laskavaia
|
||||
* 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:
|
||||
* Alena Laskavaia - initial API and implementation
|
||||
* Alena Laskavaia - initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.codan.internal.ui.preferences;
|
||||
package org.eclipse.cdt.codan.internal.core;
|
||||
|
||||
import org.eclipse.cdt.codan.core.CodanCorePlugin;
|
||||
import org.eclipse.cdt.codan.core.PreferenceConstants;
|
||||
import org.eclipse.cdt.codan.internal.ui.CodanUIActivator;
|
||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.core.runtime.preferences.DefaultScope;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
|
||||
/**
|
||||
* Class used to initialize default preference values.
|
||||
*/
|
||||
public class PreferenceInitializer extends AbstractPreferenceInitializer {
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
|
||||
* initializeDefaultPreferences()
|
||||
*/
|
||||
@Override
|
||||
public void initializeDefaultPreferences() {
|
||||
IPreferenceStore store = CodanUIActivator.getDefault().getPreferenceStore();
|
||||
store.setDefault(PreferenceConstants.P_RUN_ON_BUILD, false);
|
||||
store.setDefault(PreferenceConstants.P_RUN_IN_EDITOR, true);
|
||||
store.setDefault(PreferenceConstants.P_USE_PARENT, true);
|
||||
IEclipsePreferences node =
|
||||
DefaultScope.INSTANCE.getNode(CodanCorePlugin.getDefault().getBundle().getSymbolicName());
|
||||
node.putBoolean(PreferenceConstants.P_RUN_ON_BUILD, false);
|
||||
node.putBoolean(PreferenceConstants.P_RUN_IN_EDITOR, true);
|
||||
node.putBoolean(PreferenceConstants.P_USE_PARENT, true);
|
||||
}
|
||||
}
|
|
@ -46,14 +46,6 @@
|
|||
</page>
|
||||
</extension>
|
||||
|
||||
|
||||
<extension
|
||||
point="org.eclipse.core.runtime.preferences">
|
||||
<initializer
|
||||
class="org.eclipse.cdt.codan.internal.ui.preferences.PreferenceInitializer">
|
||||
</initializer>
|
||||
</extension>
|
||||
|
||||
<extension
|
||||
point="org.eclipse.ui.commands">
|
||||
<command
|
||||
|
|
Loading…
Add table
Reference in a new issue