1 package org.simantics.db;
\r
3 import org.simantics.databoard.Bindings;
\r
4 import org.simantics.utils.Development;
\r
6 public class DevelopmentKeys {
\r
8 final public static String PRINT = "Development.print";
\r
10 final public static String LOGGER_ECHO = trickToInitialize();
\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
16 final public static String WRITEGRAPH_EXCEPTION_STACKTRACES = "WriteGraph.exceptionStacktraces";
\r
18 final public static String WRITELOGGER_LOG = "WriteLogger.log";
\r
20 final public static String QUERYPROCESSOR_UPDATE = "QueryProcessor.update";
\r
22 final public static String QUERYPROCESSOR_PUT = "QueryProcessor.put";
\r
24 final public static String SESSION_LOG_WRITES = "Session.logWrites";
\r
26 final public static String READGRAPH_COUNT = "ReadGraph.count";
\r
28 final public static String CLUSTERTABLE_VALIDATE_ON_LOAD = "ClusterTable.validateOnLoad";
\r
30 public static void initialize() {
\r
32 if(Development.DEVELOPMENT) {
\r
34 Development.setProperty(DevelopmentKeys.PRINT, true, Bindings.BOOLEAN);
\r
36 Development.setProperty(DevelopmentKeys.LOGGER_ECHO, false, Bindings.BOOLEAN);
\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
42 Development.setProperty(DevelopmentKeys.WRITEGRAPH_EXCEPTION_STACKTRACES, false, Bindings.BOOLEAN);
\r
44 Development.setProperty(DevelopmentKeys.READGRAPH_COUNT, false, Bindings.BOOLEAN);
\r
46 Development.setProperty(DevelopmentKeys.WRITELOGGER_LOG, false, Bindings.BOOLEAN);
\r
48 Development.setProperty(DevelopmentKeys.QUERYPROCESSOR_UPDATE, false, Bindings.BOOLEAN);
\r
50 Development.setProperty(DevelopmentKeys.QUERYPROCESSOR_PUT, false, Bindings.BOOLEAN);
\r
52 Development.setProperty(DevelopmentKeys.SESSION_LOG_WRITES, false, Bindings.BOOLEAN);
\r
54 Development.setProperty(DevelopmentKeys.CLUSTERTABLE_VALIDATE_ON_LOAD, false, Bindings.BOOLEAN);
\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