001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.cnd.modelimpl.debug;
043:
044: import org.netbeans.modules.cnd.apt.debug.APTTraceFlags;
045: import org.netbeans.modules.cnd.apt.debug.DebugUtils;
046:
047: /**
048: * A common place for tracing flags that are used by several classes
049: * @author Vladimir Kvashim
050: */
051: public interface TraceFlags {
052:
053: public static final boolean TRACE_PARSER_QUEUE_DETAILS = Boolean
054: .getBoolean("cnd.parser.queue.trace.details");
055: public static final boolean TRACE_PARSER_QUEUE = TRACE_PARSER_QUEUE_DETAILS
056: || Boolean.getBoolean("cnd.parser.queue.trace");
057: public static final boolean TRACE_CLOSE_PROJECT = DebugUtils
058: .getBoolean("cnd.trace.close.project", false);
059: public static final boolean TIMING_PARSE_PER_FILE_DEEP = Boolean
060: .getBoolean("cnd.modelimpl.timing.per.file.deep");
061: public static final boolean TIMING_PARSE_PER_FILE_FLAT = Boolean
062: .getBoolean("cnd.modelimpl.timing.per.file.flat");
063: public static final boolean TIMING = Boolean
064: .getBoolean("cnd.modelimpl.timing");
065: public static final int SUSPEND_PARSE_TIME = Integer.getInteger(
066: "cnd.modelimpl.sleep", 0); // NOI18N
067: public static final boolean REPORT_PARSING_ERRORS = Boolean
068: .getBoolean("parser.report.errors");
069: public static final boolean DUMP_AST = Boolean
070: .getBoolean("parser.collect.ast");
071: public static final boolean DUMP_PROJECT_ON_OPEN = DebugUtils
072: .getBoolean("cnd.dump.project.on.open", false);
073:
074: /**
075: * swithces off parsing function bodies
076: */
077: public static final boolean EXCLUDE_COMPOUND = DebugUtils
078: .getBoolean("cnd.modelimpl.excl.compound", true);
079:
080: public static final boolean APT_CHECK_GET_STATE = DebugUtils
081: .getBoolean("apt.check.get.state", true);
082:
083: public static final int BUF_SIZE = APTTraceFlags.BUF_SIZE;
084:
085: /**
086: * switches for cache
087: */
088: public static final boolean CACHE_AST = DebugUtils.getBoolean(
089: "cnd.cache.ast", false);
090: public static final boolean TRACE_CACHE = DebugUtils.getBoolean(
091: "cnd.trace.cache", false);
092: public static final boolean USE_AST_CACHE = DebugUtils.getBoolean(
093: "cnd.use.ast.cache", false);
094: public static final boolean CACHE_SKIP_APT_VISIT = DebugUtils
095: .getBoolean("cnd.cache.skip.apt.visit", false);
096:
097: public static final boolean CACHE_SKIP_SAVE = DebugUtils
098: .getBoolean("cnd.cache.skip.save", true);
099:
100: public static final boolean TRACE_MODEL_STATE = Boolean
101: .getBoolean("cnd.modelimpl.installer.trace");
102:
103: public static final boolean USE_CANONICAL_PATH = DebugUtils
104: .getBoolean("cnd.modelimpl.use.canonical.path", false);
105:
106: public static final boolean CHECK_MEMORY = DebugUtils.getBoolean(
107: "cnd.check.memory", false);
108:
109: public static final boolean DUMP_PARSE_RESULTS = DebugUtils
110: .getBoolean("cnd.dump.parse.results", false);
111: public static final boolean DUMP_REPARSE_RESULTS = DebugUtils
112: .getBoolean("cnd.dump.reparse.results", false);
113:
114: public static final boolean DEBUG = Boolean
115: .getBoolean("org.netbeans.modules.cnd.modelimpl.trace")
116: || Boolean.getBoolean("cnd.modelimpl.trace");
117:
118: //public static final boolean USE_REPOSITORY = DebugUtils.getBoolean("cnd.modelimpl.use.repository", true);
119: public static final boolean PERSISTENT_REPOSITORY = DebugUtils
120: .getBoolean("cnd.modelimpl.persistent", true);
121: public static final boolean RESTORE_CONTAINER_FROM_UID = DebugUtils
122: .getBoolean("cnd.modelimpl.use.uid.container", true);
123: //public static final boolean UID_CONTAINER_MARKER = true;
124:
125: public static final boolean CLEAN_MACROS_AFTER_PARSE = DebugUtils
126: .getBoolean("cnd.clean.macros.after.parse", true);
127:
128: public static final boolean SET_UNNAMED_QUALIFIED_NAME = DebugUtils
129: .getBoolean("cnd.modelimpl.fqn.unnamed", false);
130: public static final boolean TRACE_UNNAMED_DECLARATIONS = DebugUtils
131: .getBoolean("cnd.modelimpl.trace.unnamed", false);
132:
133: public static final boolean CHECK_DECLARATIONS = DebugUtils
134: .getBoolean("cnd.modelimpl.check.decl", false);
135:
136: public static final boolean TRACE_REGISTRATION = DebugUtils
137: .getBoolean("cnd.modelimpl.trace.registration", false);
138: public static final boolean TRACE_DISPOSE = DebugUtils.getBoolean(
139: "cnd.modelimpl.trace.dispose", false);
140:
141: public static final boolean CLOSE_AFTER_PARSE = DebugUtils
142: .getBoolean("cnd.close.ide.after.parse", false);
143: public static final int CLOSE_TIMEOUT = Integer.getInteger(
144: "cnd.close.ide.timeout", 0); // in seconds // NOI18N
145:
146: public static final boolean USE_DEEP_REPARSING = DebugUtils
147: .getBoolean("cnd.modelimpl.use.deep.repersing", true);
148: public static final boolean USE_DEEP_REPARSING_TRACE = DebugUtils
149: .getBoolean("cnd.modelimpl.use.deep.repersing.trace", false);
150:
151: public static final boolean SAFE_REPOSITORY_ACCESS = DebugUtils
152: .getBoolean("cnd.modelimpl.repository.safe.access", false);
153:
154: // see IZ#101952 and IZ#101953
155: public static final boolean SAFE_UID_ACCESS = DebugUtils
156: .getBoolean("cnd.modelimpl.safe.uid", true);
157:
158: public static final boolean TRACE_CANONICAL_FIND_FILE = DebugUtils
159: .getBoolean("cnd.modelimpl.trace.canonical.find", false);
160:
161: public static final boolean NEED_TO_TRACE_UNRESOLVED_INCLUDE = DebugUtils
162: .getBoolean("cnd.modelimpl.trace.failed.include", false);
163: public static final boolean TRACE_VALIDATION = DebugUtils
164: .getBoolean("cnd.modelimpl.trace.validation", false);
165:
166: public static boolean TRACE_XREF_REPOSITORY = DebugUtils
167: .getBoolean("cnd.modelimpl.trace.xref.repository", false);
168:
169: public static boolean TRACE_REPOSITORY_LISTENER = DebugUtils
170: .getBoolean("cnd.repository.listener.trace", false);
171: public static boolean TRACE_UP_TO_DATE_PROVIDER = DebugUtils
172: .getBoolean("cnd.uptodate.trace", false);
173: public static boolean TRACE_PROJECT_COMPONENT_RW = DebugUtils
174: .getBoolean("cnd.project.compoment.rw.trace", false);
175:
176: public static boolean TRACE_RESOLVED_LIBRARY = DebugUtils
177: .getBoolean("cnd.project.trace.resolved.library", false);
178: }
|