]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.project/src/org/simantics/project/management/RepositoryPreference.java
Merge commit '728147df5d63a3333daff3d8c0e9bfd4f5597e3a'
[simantics/platform.git] / bundles / org.simantics.project / src / org / simantics / project / management / RepositoryPreference.java
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
7  *\r
8  * Contributors:\r
9  *     VTT Technical Research Centre of Finland - initial API and implementation\r
10  *******************************************************************************/\r
11 package org.simantics.project.management;\r
12 \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
18 \r
19 public class RepositoryPreference extends AbstractPreferenceInitializer {\r
20 \r
21     public static final String        P_REPOSITY_SOURCES = "repository_sources";\r
22 \r
23     public RepositoryPreference() {\r
24     }\r
25 \r
26     @Override\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
31 \r
32         /*\r
33         IScopeContext context = new DefaultScope();\r
34         Preferences node = context.getNode(WorkspaceActivator.PLUGIN_ID);\r
35 \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
40          */\r
41     }\r
42 \r
43 }\r
44 \r