1 /*******************************************************************************
\r
2 * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the terms of the Eclipse Public License v1.0
\r
5 * which accompanies this distribution, and is available at
\r
6 * http://www.eclipse.org/legal/epl-v10.html
\r
9 * VTT Technical Research Centre of Finland - initial API and implementation
\r
10 *******************************************************************************/
\r
11 package org.simantics.project.management;
\r
13 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
\r
14 import org.eclipse.core.runtime.preferences.DefaultScope;
\r
15 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
\r
16 import org.simantics.project.internal.Activator;
\r
17 import org.simantics.utils.strings.EString;
\r
19 public class RepositoryPreference extends AbstractPreferenceInitializer {
\r
21 public static final String P_REPOSITY_SOURCES = "repository_sources";
\r
23 public RepositoryPreference() {
\r
27 public void initializeDefaultPreferences() {
\r
28 IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(Activator.PLUGIN_ID);
\r
29 String[] xxx = new String[] {"http://www.simantics.org/update"};
\r
30 prefs.put(P_REPOSITY_SOURCES, EString.implode(xxx));
\r
33 IScopeContext context = new DefaultScope();
\r
34 Preferences node = context.getNode(WorkspaceActivator.PLUGIN_ID);
\r
36 String[] xxx = new String[] {"http://www.simantics.org/update"};
\r
37 Binding bbb = Bindings.getBindingUnchecked(String[].class);
\r
38 String yyy = (String) Bindings.STR_VARIANT.createUnchecked(bbb, xxx);
\r
39 node.put(P_REPOSITY_SOURCES, yyy);
\r