]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db/src/org/simantics/db/DevelopmentKeys.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / DevelopmentKeys.java
1 package org.simantics.db;\r
2 \r
3 import org.simantics.databoard.Bindings;\r
4 import org.simantics.utils.Development;\r
5 \r
6 public class DevelopmentKeys {\r
7 \r
8         final public static String PRINT = "Development.print";\r
9 \r
10         final public static String LOGGER_ECHO = trickToInitialize();\r
11         \r
12         final public static String WRITEGRAPH_DEBUG = "WriteGraph.debug";\r
13         final public static String WRITEGRAPH_DEBUG_NAMES = "WriteGraph.debugNames";\r
14         final public static String WRITEGRAPH_DEBUG_STACK = "WriteGraph.debugStack";\r
15 \r
16         final public static String WRITEGRAPH_EXCEPTION_STACKTRACES = "WriteGraph.exceptionStacktraces";\r
17         \r
18         final public static String WRITELOGGER_LOG = "WriteLogger.log";\r
19 \r
20         final public static String QUERYPROCESSOR_UPDATE = "QueryProcessor.update";\r
21 \r
22         final public static String QUERYPROCESSOR_PUT = "QueryProcessor.put";\r
23 \r
24         final public static String SESSION_LOG_WRITES = "Session.logWrites";\r
25 \r
26         final public static String READGRAPH_COUNT = "ReadGraph.count";\r
27 \r
28         final public static String CLUSTERTABLE_VALIDATE_ON_LOAD = "ClusterTable.validateOnLoad";\r
29 \r
30         public static void initialize() {\r
31 \r
32                 if(Development.DEVELOPMENT) {\r
33 \r
34                         Development.setProperty(DevelopmentKeys.PRINT, true, Bindings.BOOLEAN);\r
35 \r
36                         Development.setProperty(DevelopmentKeys.LOGGER_ECHO, false, Bindings.BOOLEAN);\r
37 \r
38                         Development.setProperty(DevelopmentKeys.WRITEGRAPH_DEBUG, false, Bindings.BOOLEAN);\r
39                         Development.setProperty(DevelopmentKeys.WRITEGRAPH_DEBUG_NAMES, false, Bindings.BOOLEAN);\r
40                         Development.setProperty(DevelopmentKeys.WRITEGRAPH_DEBUG_STACK, false, Bindings.BOOLEAN);\r
41 \r
42                         Development.setProperty(DevelopmentKeys.WRITEGRAPH_EXCEPTION_STACKTRACES, false, Bindings.BOOLEAN);\r
43 \r
44                         Development.setProperty(DevelopmentKeys.READGRAPH_COUNT, false, Bindings.BOOLEAN);\r
45 \r
46                         Development.setProperty(DevelopmentKeys.WRITELOGGER_LOG, false, Bindings.BOOLEAN);\r
47 \r
48                         Development.setProperty(DevelopmentKeys.QUERYPROCESSOR_UPDATE, false, Bindings.BOOLEAN);\r
49 \r
50                         Development.setProperty(DevelopmentKeys.QUERYPROCESSOR_PUT, false, Bindings.BOOLEAN);\r
51 \r
52                         Development.setProperty(DevelopmentKeys.SESSION_LOG_WRITES, false, Bindings.BOOLEAN);\r
53                         \r
54                         Development.setProperty(DevelopmentKeys.CLUSTERTABLE_VALIDATE_ON_LOAD, false, Bindings.BOOLEAN);\r
55                         \r
56                         \r
57 \r
58                 }\r
59 \r
60         }\r
61         // This enables to call initialize even if bundle activator is not yet called.\r
62         // This happens when calling from headless junit4 plugin driver and ProCoreServer process does not start.  \r
63         private static String trickToInitialize() {\r
64         return "Logger.echo"; \r
65         }\r
66         static {\r
67         initialize();\r
68         }\r
69 }\r