Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2f691fd7eb877c7efe87936398524b47b957346d (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
/*******************************************************************************
 * Copyright (c) 2013, 2016 Kalray.eu 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:
 *    Xavier Raynaud <xavier.raynaud@kalray.eu> - initial API and implementation
 *    Ingenico - Vincent Guignot <vincent.guignot@ingenico.com> - Add binutils strings    
 *******************************************************************************/
package org.eclipse.linuxtools.internal.binutils.preferences;

import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.linuxtools.internal.Activator;

/**
 * @author Xavier Raynaud <xavier.raynaud@kalray.eu>
 */
public class BinutilsPreferencesInitializer extends AbstractPreferenceInitializer {

    private static final String CPPFILT_CMD = "c++filt"; //$NON-NLS-1$
    private static final String ADDR2LINE_CMD = "addr2line"; //$NON-NLS-1$
    private static final String NM_CMD = "nm"; //$NON-NLS-1$
    private static final String STRINGS_CMD = "strings"; //$NON-NLS-1$

    @Override
    public void initializeDefaultPreferences() {
        IPreferenceStore store = Activator.getDefault().getPreferenceStore();
        store.setDefault(BinutilsPreferencePage.PREFKEY_ADDR2LINE_CMD, ADDR2LINE_CMD);
        store.setDefault(BinutilsPreferencePage.PREFKEY_ADDR2LINE_ARGS, ""); //$NON-NLS-1$
        store.setDefault(BinutilsPreferencePage.PREFKEY_CPPFILT_CMD, CPPFILT_CMD);
        store.setDefault(BinutilsPreferencePage.PREFKEY_CPPFILT_ARGS, ""); //$NON-NLS-1$
        store.setDefault(BinutilsPreferencePage.PREFKEY_NM_CMD, NM_CMD);
        store.setDefault(BinutilsPreferencePage.PREFKEY_NM_ARGS, ""); //$NON-NLS-1$
        store.setDefault(BinutilsPreferencePage.PREFKEY_STRINGS_CMD, STRINGS_CMD);
        store.setDefault(BinutilsPreferencePage.PREFKEY_STRINGS_ARGS, ""); //$NON-NLS-1$
    }

}

Back to the top