]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/preferences/IssuePreferencePage.java
Externalize strings
[simantics/platform.git] / bundles / org.simantics.issues.ui / src / org / simantics / issues / ui / preferences / IssuePreferencePage.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2011 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.issues.ui.preferences;
13
14 import org.eclipse.core.runtime.preferences.InstanceScope;
15 import org.eclipse.jface.preference.FieldEditorPreferencePage;
16 import org.eclipse.jface.preference.IPreferenceStore;
17 import org.eclipse.jface.preference.IntegerFieldEditor;
18 import org.eclipse.ui.IWorkbench;
19 import org.eclipse.ui.IWorkbenchPreferencePage;
20 import org.eclipse.ui.preferences.ScopedPreferenceStore;
21 import org.simantics.issues.preferences.IssuePreferences;
22
23 public class IssuePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
24
25     public IssuePreferencePage() {
26         super(GRID);
27     }
28
29     @Override
30     public void init(IWorkbench workbench) {
31     }
32
33     @Override
34     protected IPreferenceStore doGetPreferenceStore() {
35         return new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.simantics.issues"); //$NON-NLS-1$
36     }
37
38     @Override
39     protected void createFieldEditors() {
40         //addField(new BooleanFieldEditor(IssuePreferences.P_ISSUES_ENABLED, "Issue searching &enabled (only takes effect after restart)", getFieldEditorParent()));
41         IntegerFieldEditor f = new IntegerFieldEditor(IssuePreferences.P_MAX_BATCH_ISSUES_TO_WRITE, Messages.IssuePreferencePage_MaximumBatchValidationIssues, getFieldEditorParent());
42         f.getLabelControl(getFieldEditorParent()).setToolTipText(Messages.IssuePreferencePage_LimitforAmountOfBatchValidation);
43         addField(f);
44     }
45
46 }