blob: 5bbba225534bbb91a96ab5379fade5e954e7b876 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*******************************************************************************
* Copyright (c) 2011 Wind River Systems, Inc. and others. 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:
* Wind River Systems - initial API and implementation
* William Chen (Wind River) - [361324] Add more file operations in the file system
* of Target Explorer.
*******************************************************************************/
package org.eclipse.tcf.te.tcf.filesystem.internal.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
import org.eclipse.tcf.te.tcf.filesystem.interfaces.preferences.IPreferenceKeys;
/**
* The bundle's preference initializer implementation.
*/
public class PreferencesInitializer extends AbstractPreferenceInitializer {
/**
* Constructor.
*/
public PreferencesInitializer() {
super();
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
@Override
public void initializeDefaultPreferences() {
// Get the bundles preferences manager
IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(UIPlugin.getUniqueIdentifier());
if (prefs != null) {
// [Hidden] Editor content contribution: default on
prefs.putBoolean(IPreferenceKeys.PREF_FEATURE_ENABLE_EDITOR_CONTENT_CONTRIBUTION, true);
}
IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
preferenceStore.setDefault(TargetExplorerPreferencePage.PREF_AUTOSAVING, TargetExplorerPreferencePage.DEFAULT_AUTOSAVING);
preferenceStore.setDefault(TargetExplorerPreferencePage.PREF_RENAMING_IN_PLACE_EDITOR, TargetExplorerPreferencePage.DEFAULT_RENAMING_IN_PLACE_EDITOR);
preferenceStore.setDefault(TargetExplorerPreferencePage.PREF_COPY_PERMISSION, TargetExplorerPreferencePage.DEFAULT_COPY_PERMISSION);
preferenceStore.setDefault(TargetExplorerPreferencePage.PREF_COPY_OWNERSHIP, TargetExplorerPreferencePage.DEFAULT_COPY_OWNERSHIP);
}
}
|