]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics/src/org/simantics/internal/ModelBrowserPreferenceInitializer.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics / src / org / simantics / internal / ModelBrowserPreferenceInitializer.java
diff --git a/bundles/org.simantics/src/org/simantics/internal/ModelBrowserPreferenceInitializer.java b/bundles/org.simantics/src/org/simantics/internal/ModelBrowserPreferenceInitializer.java
new file mode 100644 (file)
index 0000000..02b66d8
--- /dev/null
@@ -0,0 +1,31 @@
+/*******************************************************************************\r
+ * Copyright (c) 2012 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Semantum Oy - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.internal;\r
+\r
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;\r
+import org.eclipse.core.runtime.preferences.DefaultScope;\r
+import org.eclipse.core.runtime.preferences.IScopeContext;\r
+import org.osgi.service.prefs.Preferences;\r
+import org.simantics.ModelBrowserPreferences;\r
+\r
+/**\r
+ * @author Tuukka Lehtonen <tuukka.lehtonen@semantum.fi>\r
+ */\r
+public class ModelBrowserPreferenceInitializer extends AbstractPreferenceInitializer {\r
+\r
+    public void initializeDefaultPreferences() {\r
+        IScopeContext context = DefaultScope.INSTANCE;\r
+        Preferences node = context.getNode(ModelBrowserPreferences.P_NODE);\r
+        node.put(ModelBrowserPreferences.P_ONTOLOGY_VISIBILITY, ModelBrowserPreferences.DEFAULT_ONTOLOGY_VISIBILITY);\r
+    }\r
+\r
+}\r