]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.project/src/org/simantics/project/management/RepositoryPreference.java
Support ontology install option trueWhenDeployed also during development
[simantics/platform.git] / bundles / org.simantics.project / src / org / simantics / project / management / RepositoryPreference.java
1 /*******************************************************************************
2  * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     VTT Technical Research Centre of Finland - initial API and implementation
10  *******************************************************************************/
11 package org.simantics.project.management;
12
13 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
14 import org.eclipse.core.runtime.preferences.DefaultScope;
15 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
16 import org.simantics.project.internal.Activator;
17 import org.simantics.utils.strings.EString;
18
19 public class RepositoryPreference extends AbstractPreferenceInitializer {
20
21     public static final String        P_REPOSITY_SOURCES = "repository_sources";
22
23     public RepositoryPreference() {
24     }
25
26     @Override
27     public void initializeDefaultPreferences() {
28         IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(Activator.PLUGIN_ID);
29         String[] xxx = new String[] {"http://www.simantics.org/update"};
30         prefs.put(P_REPOSITY_SOURCES, EString.implode(xxx));
31
32         /*
33         IScopeContext context = new DefaultScope();
34         Preferences node = context.getNode(WorkspaceActivator.PLUGIN_ID);
35
36         String[] xxx = new String[] {"http://www.simantics.org/update"};
37         Binding bbb = Bindings.getBindingUnchecked(String[].class);
38         String yyy = (String) Bindings.STR_VARIANT.createUnchecked(bbb, xxx);
39         node.put(P_REPOSITY_SOURCES, yyy);
40          */
41     }
42
43 }
44