com.intel.sgx.preferences.PreferenceInitializer.java Source code

Java tutorial

Introduction

Here is the source code for com.intel.sgx.preferences.PreferenceInitializer.java

Source

///////////////////////////////////////////////////////////////////////////
// Copyright (c) 2016 Intel Corporation.             //
//                             //
// 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:                      //
//     Intel Corporation - initial implementation and documentation    //
///////////////////////////////////////////////////////////////////////////

package com.intel.sgx.preferences;

import com.intel.sgx.Activator;

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

/**
 * Class used to initialize default preference values.
 */
public class PreferenceInitializer extends AbstractPreferenceInitializer {

    public void initializeDefaultPreferences() {
        IPreferenceStore store = Activator.getDefault().getPreferenceStore();
        store.setDefault(PreferenceConstants.SDK_PATH, "");
        Activator.getDefault().getPreferenceStore().setValue(PreferenceConstants.SDK_PATH, "/opt/intel/sgxsdk");
        Activator.getDefault().getPreferenceStore().setDefault(PreferenceConstants.SDK_PATH, "/opt/intel/sgxsdk");
    }
}