]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexPolicy.java
Index tokenized lowercase versions of name and types for UI searches
[simantics/platform.git] / bundles / org.simantics.db.indexing / src / org / simantics / db / indexing / IndexPolicy.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 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.db.indexing;
13
14 import org.eclipse.core.runtime.Platform;
15
16 /**
17  * Contains indexing-related debugging and tracing flags.
18  * 
19  * @author Tuukka Lehtonen
20  */
21 public final class IndexPolicy {
22
23     // General debug flag for the plugin
24     public static boolean DEBUG = false;
25
26     public static boolean DEBUG_INDEX_INIT       = false;
27     public static boolean TRACE_INDEX_MANAGEMENT = false;
28     public static boolean TRACE_INDEX_INIT       = false;
29     public static boolean TRACE_INDEX_LOAD       = false;
30     public static boolean TRACE_INDEX_LOCKING    = false;
31     public static boolean TRACE_INDEX_UPDATE     = false;
32     public static boolean PERF_INDEX_INIT        = false;
33     public static boolean PERF_INDEX_LOAD        = false;
34     public static boolean PERF_INDEX_UPDATE      = false;
35     public static boolean PERF_INDEX_QUERY       = false;
36
37     static {
38         if (Activator.getDefault().isDebugging()) {
39             DEBUG = true;
40             String sTrue = Boolean.TRUE.toString();
41
42             DEBUG_INDEX_INIT = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/debug/indexInit")); //$NON-NLS-1$
43             TRACE_INDEX_MANAGEMENT = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexManagement")); //$NON-NLS-1$
44             TRACE_INDEX_INIT = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexInit")); //$NON-NLS-1$
45             TRACE_INDEX_LOAD = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexLoad")); //$NON-NLS-1$
46             TRACE_INDEX_LOCKING = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexLocking")); //$NON-NLS-1$
47             TRACE_INDEX_UPDATE = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexUpdate")); //$NON-NLS-1$
48             PERF_INDEX_INIT = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/perf/indexInit")); //$NON-NLS-1$
49             PERF_INDEX_LOAD = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/perf/indexLoad")); //$NON-NLS-1$
50             PERF_INDEX_UPDATE = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/perf/indexUpdate")); //$NON-NLS-1$
51             PERF_INDEX_QUERY = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/perf/indexQuery")); //$NON-NLS-1$
52         }
53     }
54
55 }