X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.workbench%2Fsrc%2Forg%2Fsimantics%2Fworkbench%2Finternal%2Fpreferences%2FModelBrowserPreferencePage.java;fp=bundles%2Forg.simantics.workbench%2Fsrc%2Forg%2Fsimantics%2Fworkbench%2Finternal%2Fpreferences%2FModelBrowserPreferencePage.java;h=4b6f130a509d0dbd9e7a90eab24b3554c4916991;hp=8165196e9eacd30cb7ba8133f1f096b4c3f1b6b4;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/preferences/ModelBrowserPreferencePage.java b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/preferences/ModelBrowserPreferencePage.java index 8165196e9..4b6f130a5 100644 --- a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/preferences/ModelBrowserPreferencePage.java +++ b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/preferences/ModelBrowserPreferencePage.java @@ -1,51 +1,51 @@ -/******************************************************************************* - * Copyright (c) 2012 Association for Decentralized Information Management - * in Industry THTH ry. - * 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: - * Semantum Oy - initial API and implementation - *******************************************************************************/ -package org.simantics.workbench.internal.preferences; - -import org.eclipse.core.runtime.preferences.InstanceScope; -import org.eclipse.jface.preference.ComboFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.preferences.ScopedPreferenceStore; -import org.simantics.ModelBrowserPreferences; - -/** - * @author Antti Villberg - */ -public class ModelBrowserPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - - public ModelBrowserPreferencePage() { - super(GRID); - IPreferenceStore pf = new ScopedPreferenceStore(InstanceScope.INSTANCE, ModelBrowserPreferences.P_NODE); - setPreferenceStore( pf ); - } - - @Override - protected void createFieldEditors() { - - String[][] namesAndValues = { - new String[] { "Shared Ontologies", ModelBrowserPreferences.ONTOLOGY_VISIBILITY_SHARED }, - new String[] { "All Ontologies", ModelBrowserPreferences.ONTOLOGY_VISIBILITY_ALL } - }; - - ComboFieldEditor ontologyVisibility = new ComboFieldEditor(ModelBrowserPreferences.P_ONTOLOGY_VISIBILITY, "Ontology Visibility", namesAndValues, getFieldEditorParent()); - addField(ontologyVisibility); - - } - - @Override - public void init(IWorkbench workbench) { - } - -} +/******************************************************************************* + * Copyright (c) 2012 Association for Decentralized Information Management + * in Industry THTH ry. + * 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: + * Semantum Oy - initial API and implementation + *******************************************************************************/ +package org.simantics.workbench.internal.preferences; + +import org.eclipse.core.runtime.preferences.InstanceScope; +import org.eclipse.jface.preference.ComboFieldEditor; +import org.eclipse.jface.preference.FieldEditorPreferencePage; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; +import org.eclipse.ui.preferences.ScopedPreferenceStore; +import org.simantics.ModelBrowserPreferences; + +/** + * @author Antti Villberg + */ +public class ModelBrowserPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { + + public ModelBrowserPreferencePage() { + super(GRID); + IPreferenceStore pf = new ScopedPreferenceStore(InstanceScope.INSTANCE, ModelBrowserPreferences.P_NODE); + setPreferenceStore( pf ); + } + + @Override + protected void createFieldEditors() { + + String[][] namesAndValues = { + new String[] { "Shared Ontologies", ModelBrowserPreferences.ONTOLOGY_VISIBILITY_SHARED }, + new String[] { "All Ontologies", ModelBrowserPreferences.ONTOLOGY_VISIBILITY_ALL } + }; + + ComboFieldEditor ontologyVisibility = new ComboFieldEditor(ModelBrowserPreferences.P_ONTOLOGY_VISIBILITY, "Ontology Visibility", namesAndValues, getFieldEditorParent()); + addField(ontologyVisibility); + + } + + @Override + public void init(IWorkbench workbench) { + } + +}