001: /*
002: * Debug.java - Various debugging flags
003: * :tabSize=8:indentSize=8:noTabs=false:
004: * :folding=explicit:collapseFolds=1:
005: *
006: * Copyright (C) 2003 Slava Pestov
007: *
008: * This program is free software; you can redistribute it and/or
009: * modify it under the terms of the GNU General Public License
010: * as published by the Free Software Foundation; either version 2
011: * of the License, or any later version.
012: *
013: * This program is distributed in the hope that it will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016: * GNU General Public License for more details.
017: *
018: * You should have received a copy of the GNU General Public License
019: * along with this program; if not, write to the Free Software
020: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
021: */
022:
023: package org.gjt.sp.jedit;
024:
025: /**
026: * This class contains various debugging flags mainly useful for core
027: * development.
028: * @since jEdit 4.2pre1
029: * @author Slava Pestov
030: * @version $Id: Debug.java 7144 2006-09-29 09:13:27Z kpouer $
031: */
032: public class Debug {
033: /**
034: * Print messages when the gap moves, and other offset manager state
035: * changes.
036: */
037: public static boolean OFFSET_DEBUG = false;
038:
039: /**
040: * Print messages when text area and display manager perform scroll
041: * updates.
042: */
043: public static boolean SCROLL_DEBUG = false;
044:
045: /**
046: * Print messages when text area tries to make the caret visible.
047: */
048: public static boolean SCROLL_TO_DEBUG = false;
049:
050: /**
051: * Display an error if the scrolling code detects an inconsistency.
052: * This kills performance!
053: */
054: public static boolean SCROLL_VERIFY = false;
055:
056: /**
057: * Print messages when screen line counts change.
058: */
059: public static boolean SCREEN_LINES_DEBUG = false;
060:
061: /**
062: * For checking context, etc.
063: */
064: public static boolean TOKEN_MARKER_DEBUG = false;
065:
066: /**
067: * For checking fold level invalidation, etc.
068: */
069: public static boolean FOLD_DEBUG = false;
070:
071: /**
072: * For checking the line visibility structure..
073: */
074: public static boolean FOLD_VIS_DEBUG = false;
075:
076: /**
077: * For checking invalidation, etc.
078: */
079: public static boolean CHUNK_CACHE_DEBUG = false;
080:
081: /**
082: * Paints boxes around chunks.
083: */
084: public static boolean CHUNK_PAINT_DEBUG = false;
085:
086: /**
087: * Show time taken to repaint text area painter.
088: */
089: public static boolean PAINT_TIMER = false;
090:
091: /**
092: * Show time taken for each EBComponent.
093: */
094: public static boolean EB_TIMER = false;
095:
096: /**
097: * Paint strings instead of glyph vectors.
098: */
099: public static boolean DISABLE_GLYPH_VECTOR = false;
100:
101: /**
102: * Logs messages when BeanShell code is evaluated.
103: */
104: public static boolean BEANSHELL_DEBUG = false;
105:
106: /**
107: * If true, an alternative dispatcher using key typed events will be
108: * used to handle a modifier key press in conjunction with an alphabet
109: * key. <b>On by default on MacOS.</b>
110: */
111: public static boolean ALTERNATIVE_DISPATCHER = OperatingSystem
112: .isMacOS();
113:
114: /**
115: * If true, A+ shortcuts are disabled. If you use this, you should also
116: * remap the the modifiers so that A+ is actually something else.
117: * <b>On by default on MacOS.</b>
118: */
119: public static boolean ALT_KEY_PRESSED_DISABLED = OperatingSystem
120: .isMacOS();
121:
122: /**
123: * Old key handling (SIMPLIFIED_KEY_HANDLING==false) and
124: * new key handling (SIMPLIFIED_KEY_HANDLING==true) react on different
125: * key events. Old key handling primarily reacts on "key pressed" events,
126: * while new key handling primarily reacts on "key typed" events.
127: * The feature of enabled shortcuts when dockables are docked and have
128: * focus was only implemented for the case of reaction on "key pressed"
129: * evets. This switch enables such handling for "key typed" events, too.
130: * With this switch on, global shortcuts for docked dockables also work
131: * with the new key handling.
132: *
133: * See also: jEdit bug 1493185 ( https://sourceforge.net/tracker/?func=detail&aid=1493185&group_id=588&atid=100588 ).
134: */
135: public static boolean GLOBAL_SHORTCUTS_FOR_DOCKED_DOCKABLES = true;
136:
137: /**
138: * Geometry workaround for X11.
139: */
140: public static boolean GEOMETRY_WORKAROUND = false;
141:
142: /**
143: * Dump key events received by text area?
144: */
145: public static boolean DUMP_KEY_EVENTS = false;
146:
147: /**
148: * Indent debug.
149: */
150: public static boolean INDENT_DEBUG = false;
151:
152: /**
153: * Printing debug.
154: */
155: public static boolean PRINT_DEBUG = false;
156:
157: /**
158: * Create new search dialogs instead of reusing instances.
159: */
160: public static boolean DISABLE_SEARCH_DIALOG_POOL = false;
161:
162: /**
163: * Disable multihead support, since it can cause window positioning
164: * problems with some Java versions.
165: * @since jEdit 4.3pre1
166: */
167: public static boolean DISABLE_MULTIHEAD = false;
168: }
|