blob: b8fb0aef3c1ca5bba8f6ff44e3cbc2678bbba8a2 [file] [log] [blame]
package org.eclipse.jst.jsf.core.internal;
import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
import org.eclipse.osgi.service.debug.DebugOptions;
/**
* Defines that standard runtime trace options for debugging. See .options file
* for definitions.
*
* @author cbateman
*
*/
public final class JSFCoreTraceOptions
{
/**
* True if debug tracing is enabled. Other tracing cannot be enabled unless
* this is enabled.
*/
public static final boolean ENABLED;
/**
* True if tag introspector tracing is enabled
*/
public static final boolean TRACE_JSPTAGINTROSPECTOR;
/**
* True if the JSP tag registry tracing is enabled
*/
public static final boolean TRACE_JSPTAGREGISTRY;
/**
* True if handling of JSP TagIndex changes are being traced
*/
public static final boolean TRACE_JSPTAGREGISTRY_CHANGES;
private static final String KEY_DEBUG_ENABLED = "/debug";
private static final String KEY_DESIGNTIME = "/designtime";
private static final String KEY_DESIGNTIME_VIEW = KEY_DESIGNTIME + "/view";
private static final String KEY_VIEW_JSPTAGINTROSPECTOR = KEY_DESIGNTIME_VIEW
+ "/jsptagintrospection";
private static final String KEY_VIEW_JSPTAGREGISTRY = KEY_DESIGNTIME_VIEW
+ "/jsptagregistry";
private static final String KEY_VIEW_JSPTAGREGISTRY_CHANGES =
KEY_VIEW_JSPTAGREGISTRY + "/changes";
static
{
final DebugOptions debugOptions = FrameworkDebugOptions.getDefault();
ENABLED = debugOptions != null
&& debugOptions.getBooleanOption(JSFCorePlugin.PLUGIN_ID
+ KEY_DEBUG_ENABLED, false);
if (ENABLED)
{
TRACE_JSPTAGINTROSPECTOR = debugOptions.getBooleanOption(
JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGINTROSPECTOR, false);
TRACE_JSPTAGREGISTRY = debugOptions.getBooleanOption(
JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGREGISTRY, false);
TRACE_JSPTAGREGISTRY_CHANGES = debugOptions.getBooleanOption(
JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGREGISTRY_CHANGES, false);
}
else
{
TRACE_JSPTAGINTROSPECTOR = false;
TRACE_JSPTAGREGISTRY = false;
TRACE_JSPTAGREGISTRY_CHANGES = false;
}
}
/**
* @param message
*/
public static void log(final String message)
{
System.out.println(message);
}
private JSFCoreTraceOptions()
{
// no instantiation
}
}