1 11 package org.eclipse.ui.internal.misc; 12 13 import org.eclipse.core.runtime.Platform; 14 import org.eclipse.ui.ISourceProvider; 15 import org.eclipse.ui.PlatformUI; 16 17 23 public class Policy { 24 public static boolean DEFAULT = false; 25 26 public static boolean DEBUG_SWT_GRAPHICS = DEFAULT; 27 28 public static boolean DEBUG_SWT_DEBUG = DEFAULT; 29 30 public static boolean DEBUG_DRAG_DROP = DEFAULT; 31 32 35 public static boolean DEBUG_STALE_JOBS = DEFAULT; 36 37 44 public static boolean DEBUG_SOURCES = DEFAULT; 45 46 50 public static boolean DEBUG_KEY_BINDINGS = DEFAULT; 51 52 55 public static boolean DEBUG_KEY_BINDINGS_VERBOSE = DEFAULT; 56 57 61 public static boolean DEBUG_TOOLBAR_DISPOSAL = DEFAULT; 62 63 66 public static boolean DEBUG_COMMANDS = DEFAULT; 67 68 72 public static boolean DEBUG_CONTEXTS = DEFAULT; 73 74 78 public static boolean DEBUG_CONTEXTS_PERFORMANCE = DEFAULT; 79 80 84 public static boolean DEBUG_CONTEXTS_VERBOSE = DEFAULT; 85 86 90 public static boolean DEBUG_HANDLERS = DEFAULT; 91 92 96 public static boolean DEBUG_HANDLERS_PERFORMANCE = DEFAULT; 97 98 102 public static boolean DEBUG_HANDLERS_VERBOSE = DEFAULT; 103 104 108 public static boolean DEBUG_OPERATIONS = DEFAULT; 109 110 114 public static boolean DEBUG_OPERATIONS_VERBOSE = DEFAULT; 115 116 117 120 public static boolean DEBUG_SHOW_ALL_JOBS = DEFAULT; 121 122 127 public static boolean DEBUG_DECLARED_IMAGES = DEFAULT; 128 129 134 public static boolean DEBUG_CONTRIBUTIONS = DEFAULT; 135 136 141 public static String DEBUG_HANDLERS_VERBOSE_COMMAND_ID = null; 142 143 148 public static boolean EXPERIMENTAL_MENU = DEFAULT; 149 150 public static boolean DEBUG_MPE = DEFAULT; 151 152 static { 153 if (getDebugOption("/debug")) { DEBUG_SWT_GRAPHICS = getDebugOption("/trace/graphics"); DEBUG_SWT_DEBUG = getDebugOption("/debug/swtdebug"); DEBUG_DRAG_DROP = getDebugOption("/trace/dragDrop"); DEBUG_SOURCES = getDebugOption("/trace/sources"); DEBUG_KEY_BINDINGS = getDebugOption("/trace/keyBindings"); DEBUG_KEY_BINDINGS_VERBOSE = getDebugOption("/trace/keyBindings.verbose"); DEBUG_TOOLBAR_DISPOSAL = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface/trace/toolbarDisposal")); DEBUG_COMMANDS = getDebugOption("/trace/commands"); DEBUG_CONTEXTS = getDebugOption("/trace/contexts"); DEBUG_CONTEXTS_PERFORMANCE = getDebugOption("/trace/contexts.performance"); DEBUG_CONTEXTS_VERBOSE = getDebugOption("/trace/contexts.verbose"); DEBUG_HANDLERS = getDebugOption("/trace/handlers"); DEBUG_HANDLERS_PERFORMANCE = getDebugOption("/trace/handlers.performance"); DEBUG_HANDLERS_VERBOSE = getDebugOption("/trace/handlers.verbose"); DEBUG_OPERATIONS = getDebugOption("/trace/operations"); DEBUG_OPERATIONS_VERBOSE = getDebugOption("/trace/operations.verbose"); DEBUG_SHOW_ALL_JOBS = getDebugOption("/debug/showAllJobs"); DEBUG_STALE_JOBS = getDebugOption("/debug/job.stale"); DEBUG_HANDLERS_VERBOSE_COMMAND_ID = Platform 173 .getDebugOption(PlatformUI.PLUGIN_ID 174 + "/trace/handlers.verbose.commandId"); if ("".equals(DEBUG_HANDLERS_VERBOSE_COMMAND_ID)) { DEBUG_HANDLERS_VERBOSE_COMMAND_ID = null; 177 } 178 DEBUG_DECLARED_IMAGES = getDebugOption("/debug/declaredImages"); DEBUG_CONTRIBUTIONS = getDebugOption("/debug/contributions"); EXPERIMENTAL_MENU = getDebugOption("/experimental/menus"); DEBUG_MPE = getDebugOption("/trace/multipageeditor"); } 183 } 184 185 private static boolean getDebugOption(String option) { 186 return "true".equalsIgnoreCase(Platform.getDebugOption(PlatformUI.PLUGIN_ID + option)); } 188 } 189 | Popular Tags |