mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +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
|
<extension
|
||||||
point="org.eclipse.core.runtime.preferences">
|
point="org.eclipse.core.runtime.preferences">
|
||||||
|
<initializer
|
||||||
|
class="org.eclipse.cdt.codan.internal.core.PreferenceInitializer">
|
||||||
|
</initializer>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<extension
|
<extension
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2009, 2010 Alena Laskavaia
|
* Copyright (c) 2009, 2011 Alena Laskavaia
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,29 +7,26 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* 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.core.PreferenceConstants;
|
||||||
import org.eclipse.cdt.codan.internal.ui.CodanUIActivator;
|
|
||||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
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.
|
* Class used to initialize default preference values.
|
||||||
*/
|
*/
|
||||||
public class PreferenceInitializer extends AbstractPreferenceInitializer {
|
public class PreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
|
|
||||||
* initializeDefaultPreferences()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void initializeDefaultPreferences() {
|
public void initializeDefaultPreferences() {
|
||||||
IPreferenceStore store = CodanUIActivator.getDefault().getPreferenceStore();
|
IEclipsePreferences node =
|
||||||
store.setDefault(PreferenceConstants.P_RUN_ON_BUILD, false);
|
DefaultScope.INSTANCE.getNode(CodanCorePlugin.getDefault().getBundle().getSymbolicName());
|
||||||
store.setDefault(PreferenceConstants.P_RUN_IN_EDITOR, true);
|
node.putBoolean(PreferenceConstants.P_RUN_ON_BUILD, false);
|
||||||
store.setDefault(PreferenceConstants.P_USE_PARENT, true);
|
node.putBoolean(PreferenceConstants.P_RUN_IN_EDITOR, true);
|
||||||
|
node.putBoolean(PreferenceConstants.P_USE_PARENT, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -46,14 +46,6 @@
|
||||||
</page>
|
</page>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
|
|
||||||
<extension
|
|
||||||
point="org.eclipse.core.runtime.preferences">
|
|
||||||
<initializer
|
|
||||||
class="org.eclipse.cdt.codan.internal.ui.preferences.PreferenceInitializer">
|
|
||||||
</initializer>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.commands">
|
point="org.eclipse.ui.commands">
|
||||||
<command
|
<command
|
||||||
|
|
Loading…
Add table
Reference in a new issue