diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java')
-rw-r--r-- | bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java | 87 |
1 files changed, 52 insertions, 35 deletions
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java index d045a5c9f..2a35339c5 100644 --- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java +++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java @@ -15,39 +15,56 @@ import org.eclipse.osgi.framework.debug.FrameworkDebugOptions; public class Debug { - public static boolean DEBUG_GENERAL; - public static boolean DEBUG_BUNDLE; - public static boolean DEBUG_WEAVE; - public static boolean DEBUG_CACHE; - public static boolean DEBUG_SUPPLEMENTS; - - private static String bundleName; - - public static boolean bundleNameMatches (String name) { - return name.equals(bundleName); - } - - public static final String ASPECTJ_OSGI = "org.aspectj.osgi"; - public static final String OPTION_DEBUG_GENERAL = ASPECTJ_OSGI + "/debug"; - public static final String OPTION_DEBUG_BUNDLE = ASPECTJ_OSGI + "/debug/bundle"; - public static final String OPTION_DEBUG_WEAVE = ASPECTJ_OSGI + "/debug/weave"; - public static final String OPTION_DEBUG_CACHE = ASPECTJ_OSGI + "/debug/cache"; - public static final String OPTION_DEBUG_BUNDLENAME = ASPECTJ_OSGI + "/debug/bundleName"; - public static final String OPTION_DEBUG_SUPPLEMENTS = ASPECTJ_OSGI + "/debug/supplements"; - - static { - FrameworkDebugOptions fdo = FrameworkDebugOptions.getDefault(); - if (fdo != null) { - DEBUG_GENERAL = fdo.getBooleanOption(OPTION_DEBUG_GENERAL,false); - DEBUG_BUNDLE = fdo.getBooleanOption(OPTION_DEBUG_BUNDLE,false); - DEBUG_WEAVE = fdo.getBooleanOption(OPTION_DEBUG_WEAVE,false); - DEBUG_CACHE = fdo.getBooleanOption(OPTION_DEBUG_CACHE,false); - bundleName = fdo.getOption(OPTION_DEBUG_BUNDLENAME,""); - DEBUG_SUPPLEMENTS = fdo.getBooleanOption(OPTION_DEBUG_SUPPLEMENTS,false); - } - } - - public static void println (String s) { - /*if (s.indexOf("org.eclipse.osgi.tests") != -1)*/ System.err.println(s); - } + public static final String ASPECTJ_OSGI = "org.aspectj.osgi"; + + public static boolean DEBUG_BUNDLE; + + public static String DEBUG_BUNDLENAME; + + public static boolean DEBUG_CACHE; + + public static boolean DEBUG_GENERAL; + + public static boolean DEBUG_SUPPLEMENTS; + + public static boolean DEBUG_WEAVE; + + public static final String OPTION_DEBUG_BUNDLE = ASPECTJ_OSGI + + "/debug/bundle"; + + public static final String OPTION_DEBUG_BUNDLENAME = ASPECTJ_OSGI + + "/debug/bundleName"; + + public static final String OPTION_DEBUG_CACHE = ASPECTJ_OSGI + + "/debug/cache"; + + public static final String OPTION_DEBUG_GENERAL = ASPECTJ_OSGI + "/debug"; + + public static final String OPTION_DEBUG_SUPPLEMENTS = ASPECTJ_OSGI + + "/debug/supplements"; + + public static final String OPTION_DEBUG_WEAVE = ASPECTJ_OSGI + + "/debug/weave"; + + static { + final FrameworkDebugOptions fdo = FrameworkDebugOptions.getDefault(); + if (fdo != null) { + DEBUG_GENERAL = fdo.getBooleanOption(OPTION_DEBUG_GENERAL, false); + DEBUG_BUNDLE = fdo.getBooleanOption(OPTION_DEBUG_BUNDLE, false); + DEBUG_WEAVE = fdo.getBooleanOption(OPTION_DEBUG_WEAVE, false); + DEBUG_CACHE = fdo.getBooleanOption(OPTION_DEBUG_CACHE, false); + DEBUG_BUNDLENAME = fdo.getOption(OPTION_DEBUG_BUNDLENAME, ""); + DEBUG_SUPPLEMENTS = fdo.getBooleanOption(OPTION_DEBUG_SUPPLEMENTS, + false); + } + } + + public static boolean bundleNameMatches(final String name) { + return name.equals(DEBUG_BUNDLENAME); + } + + public static void println(final String s) { + /* if (s.indexOf("org.eclipse.osgi.tests") != -1) */System.err + .println(s); + } } |