01: /*******************************************************************************
02: * Copyright (c) 2003, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.ide;
11:
12: import org.eclipse.core.runtime.Platform;
13:
14: public class Policy {
15: public static final boolean DEFAULT = false;
16:
17: public static boolean DEBUG_OPEN_ERROR_DIALOG = DEFAULT;
18: public static boolean DEBUG_GC = DEFAULT;
19: public static boolean DEBUG_UNDOMONITOR = DEFAULT;
20:
21: static {
22: if (getDebugOption("/debug")) { //$NON-NLS-1$
23: DEBUG_OPEN_ERROR_DIALOG = getDebugOption("/debug/internalerror/openDialog"); //$NON-NLS-1$
24: DEBUG_GC = getDebugOption("/debug/gc"); //$NON-NLS-1$
25: DEBUG_UNDOMONITOR = getDebugOption("/debug/undomonitor"); //$NON-NLS-1$
26: }
27: }
28:
29: private static boolean getDebugOption(String option) {
30: return "true".equalsIgnoreCase(Platform.getDebugOption(IDEWorkbenchPlugin.IDE_WORKBENCH + option)); //$NON-NLS-1$
31: }
32: }
|