1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2011 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.issues.ui.preferences;
\r
14 import org.eclipse.core.runtime.preferences.InstanceScope;
\r
15 import org.eclipse.jface.preference.FieldEditorPreferencePage;
\r
16 import org.eclipse.jface.preference.IPreferenceStore;
\r
17 import org.eclipse.jface.preference.IntegerFieldEditor;
\r
18 import org.eclipse.ui.IWorkbench;
\r
19 import org.eclipse.ui.IWorkbenchPreferencePage;
\r
20 import org.eclipse.ui.preferences.ScopedPreferenceStore;
\r
21 import org.simantics.issues.preferences.IssuePreferences;
\r
23 public class IssuePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
\r
25 public IssuePreferencePage() {
\r
30 public void init(IWorkbench workbench) {
\r
34 protected IPreferenceStore doGetPreferenceStore() {
\r
35 return new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.simantics.issues");
\r
39 protected void createFieldEditors() {
\r
40 //addField(new BooleanFieldEditor(IssuePreferences.P_ISSUES_ENABLED, "Issue searching &enabled (only takes effect after restart)", getFieldEditorParent()));
\r
41 IntegerFieldEditor f = new IntegerFieldEditor(IssuePreferences.P_MAX_BATCH_ISSUES_TO_WRITE, "Maximum batch validation issues to write", getFieldEditorParent());
\r
42 f.getLabelControl(getFieldEditorParent()).setToolTipText("Limit for amount of batch validation issue results to write into the database");
\r