1 package org.simantics.db;
3 import org.simantics.databoard.Bindings;
4 import org.simantics.utils.Development;
6 public class DevelopmentKeys {
8 final public static String PRINT = "Development.print";
10 final public static String LOGGER_ECHO = trickToInitialize();
12 final public static String WRITEGRAPH_DEBUG = "WriteGraph.debug";
13 final public static String WRITEGRAPH_DEBUG_NAMES = "WriteGraph.debugNames";
14 final public static String WRITEGRAPH_DEBUG_STACK = "WriteGraph.debugStack";
16 final public static String WRITEGRAPH_EXCEPTION_STACKTRACES = "WriteGraph.exceptionStacktraces";
18 final public static String WRITELOGGER_LOG = "WriteLogger.log";
20 final public static String QUERYPROCESSOR_UPDATE = "QueryProcessor.update";
22 final public static String QUERYPROCESSOR_PUT = "QueryProcessor.put";
24 final public static String SESSION_LOG_WRITES = "Session.logWrites";
26 final public static String READGRAPH_COUNT = "ReadGraph.count";
28 final public static String CLUSTERTABLE_VALIDATE_ON_LOAD = "ClusterTable.validateOnLoad";
30 public static void initialize() {
32 if(Development.DEVELOPMENT) {
34 Development.setProperty(DevelopmentKeys.PRINT, true, Bindings.BOOLEAN);
36 Development.setProperty(DevelopmentKeys.LOGGER_ECHO, false, Bindings.BOOLEAN);
38 Development.setProperty(DevelopmentKeys.WRITEGRAPH_DEBUG, false, Bindings.BOOLEAN);
39 Development.setProperty(DevelopmentKeys.WRITEGRAPH_DEBUG_NAMES, false, Bindings.BOOLEAN);
40 Development.setProperty(DevelopmentKeys.WRITEGRAPH_DEBUG_STACK, false, Bindings.BOOLEAN);
42 Development.setProperty(DevelopmentKeys.WRITEGRAPH_EXCEPTION_STACKTRACES, false, Bindings.BOOLEAN);
44 Development.setProperty(DevelopmentKeys.READGRAPH_COUNT, false, Bindings.BOOLEAN);
46 Development.setProperty(DevelopmentKeys.WRITELOGGER_LOG, false, Bindings.BOOLEAN);
48 Development.setProperty(DevelopmentKeys.QUERYPROCESSOR_UPDATE, false, Bindings.BOOLEAN);
50 Development.setProperty(DevelopmentKeys.QUERYPROCESSOR_PUT, false, Bindings.BOOLEAN);
52 Development.setProperty(DevelopmentKeys.SESSION_LOG_WRITES, false, Bindings.BOOLEAN);
54 Development.setProperty(DevelopmentKeys.CLUSTERTABLE_VALIDATE_ON_LOAD, false, Bindings.BOOLEAN);
61 // This enables to call initialize even if bundle activator is not yet called.
62 // This happens when calling from headless junit4 plugin driver and ProCoreServer process does not start.
63 private static String trickToInitialize() {