/** * Returns whether monitoring of a given performance event is enabled. * <p> * For frequent performance events, the result of this method call should * be cached by the caller to minimize overhead when performance monitoring * is turned off. It is not possible for enablement to change during the life * of this invocation of the platform. * </p> * * @param eventName The name of the event to determine enablement for * @return <code>true</code>If the performance event with the given * name is enabled, and <code>false</code> otherwise. */ public static boolean isEnabled(String eventName) { if (!ENABLED) return false; String option = Platform.getDebugOption(eventName); return option != null && !option.equalsIgnoreCase("false") && !option.equalsIgnoreCase("-1"); //$NON-NLS-1$ //$NON-NLS-2$ }
private static boolean calculateValue() { String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspsearch"); //$NON-NLS-1$ boolean debug = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$ return debug; }
private ConnectionProfileManager() { super(); String debug = Platform .getDebugOption(OPTION_DEBUG_CONNECTION_PROFILE_EXTENSION); DEBUG_CONNECTION_PROFILE_EXTENSION = debug == null ? false : (debug .equalsIgnoreCase("true") ? true : false); //$NON-NLS-1$ }
private static boolean getDebugValue() { String value = Platform.getDebugOption("org.eclipse.wst.sse.ui/debug/outline"); //$NON-NLS-1$ boolean result = (value != null) && value.equalsIgnoreCase("true"); //$NON-NLS-1$ return result; }
private static boolean getDebugOption(String option) { return "true".equalsIgnoreCase(//$NON-NLS-1$ Platform.getDebugOption(PLUGIN_ID + option)); }
private static boolean getDebugOption(String option) { return "true".equalsIgnoreCase(Platform.getDebugOption(PlatformUI.PLUGIN_ID + option)); //$NON-NLS-1$ } }
private static boolean getDebugOption(String option) { return "true".equalsIgnoreCase(Platform.getDebugOption(IDEWorkbenchPlugin.IDE_WORKBENCH + option)); //$NON-NLS-1$ }
private static boolean internal_isEnabled(String eventName) { String option = Platform.getDebugOption(eventName); return option != null && !option.equalsIgnoreCase("false") && !option.equalsIgnoreCase("-1"); //$NON-NLS-1$ //$NON-NLS-2$ } }
private boolean isDebugging(Bundle bundle) { String symbolicName = bundle.getSymbolicName(); if (symbolicName != null) { String key = symbolicName + "/debug"; //$NON-NLS-1$ String value = Platform.getDebugOption(key); return value == null ? false : value.equalsIgnoreCase("true"); //$NON-NLS-1$ } return false; }
private static ITracer getTracer(String channel) { String key = KEYPREFIX_DEBUG + channel; if (Boolean.valueOf(Platform.getDebugOption(key)).booleanValue()) { return new PrintStreamTracer(channel); } else { return NUL_TRACER; } }
@Override public void start(BundleContext context) throws Exception { super.start(context); inst = this; if (Log.logInfo) Log.info("IntroPlugin - calling start on Intro bundle"); //$NON-NLS-1$ // Setup debugging options DEBUG = isDebugging(); if (DEBUG) { DEBUG_NO_BROWSER = "true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID + "/flags/noBrowser")); //$NON-NLS-1$ //$NON-NLS-2$ } if (DEBUG) { DEBUG_TOOLBAR = "true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID + "/debug/toolbar")); //$NON-NLS-1$ //$NON-NLS-2$ } }
public static boolean shouldTrace(String option) { if (getPlugin() != null) { if (getPlugin().isDebugging()) { return Boolean.TRUE.toString().equalsIgnoreCase( Platform.getDebugOption(option)); } return false; } return Boolean.getBoolean("org.eclipse.ocl.ecore.debug"); //$NON-NLS-1$ }
public static boolean shouldTrace(String option) { if (getPlugin() != null) { if (getPlugin().isDebugging()) { return Boolean.TRUE.toString().equalsIgnoreCase( Platform.getDebugOption(option)); } return false; } return traceAll || Boolean.getBoolean(option); }
public static boolean debug() { String debugOption = Platform.getDebugOption(isDebugMode); // $NON-NLS-1$ return getDefault().isDebugging() && "true".equalsIgnoreCase(debugOption); } }
public static boolean debug() { String debugOption = Platform.getDebugOption(isDebugMode); //$NON-NLS-1$ return getDefault().isDebugging() && "true".equalsIgnoreCase(debugOption); } }
public static boolean isTracing() { if (CheatSheetPlugin.getPlugin().isDebugging()) { String traceTimes = Platform.getDebugOption("org.eclipse.ui.cheatsheets/trace/creation/times"); //$NON-NLS-1$ if (traceTimes != null && traceTimes.equalsIgnoreCase("true")) { //$NON-NLS-1$ return true; } } return false; }
public static boolean shouldTrace(String option) { if (getPlugin() != null) { if (getPlugin().isDebugging()) { return Boolean.TRUE.toString().equalsIgnoreCase( Platform.getDebugOption(option)); } return false; } return traceAll || Boolean.getBoolean(option); }
public void trace(TraceLocation location, String message) { if (!Platform.inDebugMode()) return; String debugOption = Platform.getDebugOption(PLUGIN_ID + "/debug" + location.getPrefix()); if ( !Boolean.parseBoolean(debugOption) ) return; getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message)); }
public static boolean shouldTrace(String option) { if (getPlugin() != null) { if (getPlugin().isDebugging()) { return Boolean.TRUE.toString().equalsIgnoreCase( Platform.getDebugOption(option)); } return false; } return Boolean.getBoolean("org.eclipse.ocl.uml.debug"); //$NON-NLS-1$ }
private EclipseLogger createLogger() { Map<TraceScope, Boolean> tracingEnablement = Maps.newHashMap(); for (TraceScope scope : CoreTraceScopes.values()) { String option = Platform.getDebugOption("org.eclipse.buildship.core/trace/" + scope.getScopeKey()); tracingEnablement.put(scope, "true".equalsIgnoreCase(option)); } return new EclipseLogger(getLog(), PLUGIN_ID, tracingEnablement); }