]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.issues/src/org/simantics/issues/preferences/IssuePreferences.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.issues / src / org / simantics / issues / preferences / IssuePreferences.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 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
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.issues.preferences;\r
13 \r
14 /**\r
15  * Constant definitions for plug-in preferences\r
16  */\r
17 public final class IssuePreferences {\r
18 \r
19     public static final String           P_ISSUES_ENABLED       = "issues.enabled";\r
20 \r
21     /**\r
22      * Preference for the maximum amount of issues to write during a batch\r
23      * validation operation. This is used to keep the amount of written issues\r
24      * down to tolerable levels performance-wise.\r
25      */\r
26     public static final String           P_MAX_BATCH_ISSUES_TO_WRITE = "issues.batch.write.max";\r
27 \r
28     public static final boolean          DEFAULT_ISSUES_ENABLED = true;\r
29 \r
30     public static final int              DEFAULT_MAX_BATCH_ISSUES_TO_WRITE = 1000;\r
31 \r
32     public static final IssuePreferences DEFAULT                = new IssuePreferences(DEFAULT_ISSUES_ENABLED, DEFAULT_MAX_BATCH_ISSUES_TO_WRITE);\r
33 \r
34     public final boolean                 enabled;\r
35 \r
36     public final int                     maxBatchIssuesToWrite;\r
37 \r
38     public IssuePreferences(boolean enabled, int maxBatchIssuesToWrite) {\r
39         this.enabled = enabled;\r
40         this.maxBatchIssuesToWrite = maxBatchIssuesToWrite;\r
41     }\r
42 \r
43 }\r