KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > ide > Policy


1 /*******************************************************************************
2  * Copyright (c) 2003, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.ide;
12
13 import org.eclipse.core.runtime.Platform;
14
15 public class Policy {
16     public static final boolean DEFAULT = false;
17
18     public static boolean DEBUG_OPEN_ERROR_DIALOG = DEFAULT;
19     public static boolean DEBUG_GC = DEFAULT;
20     public static boolean DEBUG_UNDOMONITOR = DEFAULT;
21
22     static {
23         if (getDebugOption("/debug")) { //$NON-NLS-1$
24
DEBUG_OPEN_ERROR_DIALOG = getDebugOption("/debug/internalerror/openDialog"); //$NON-NLS-1$
25
DEBUG_GC = getDebugOption("/debug/gc"); //$NON-NLS-1$
26
DEBUG_UNDOMONITOR = getDebugOption("/debug/undomonitor"); //$NON-NLS-1$
27
}
28     }
29
30     private static boolean getDebugOption(String JavaDoc option) {
31         return "true".equalsIgnoreCase(Platform.getDebugOption(IDEWorkbenchPlugin.IDE_WORKBENCH + option)); //$NON-NLS-1$
32
}
33 }
34
Popular Tags