Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-08-14 15:54:50 +0000
committerThomas Watson2012-08-14 15:54:50 +0000
commitdb6d81c023830f9676a3b50652d903c0903c3fd6 (patch)
treedb48b0f5ca2dfba80515fdb057b6ad6fa5778446 /bundles/org.eclipse.osgi/supplement/src
parent46bbe510ebe38841c223851557ff6fdadf76a719 (diff)
downloadrt.equinox.framework-db6d81c023830f9676a3b50652d903c0903c3fd6.tar.gz
rt.equinox.framework-db6d81c023830f9676a3b50652d903c0903c3fd6.tar.xz
rt.equinox.framework-db6d81c023830f9676a3b50652d903c0903c3fd6.zip
Rename "next" Debug to its final package.
Diffstat (limited to 'bundles/org.eclipse.osgi/supplement/src')
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/debug/Debug.java196
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/next/internal/debug/Debug.java370
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java11
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java6
4 files changed, 114 insertions, 469 deletions
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/debug/Debug.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/debug/Debug.java
index 51b605d8d..ced7f37cc 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/debug/Debug.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/debug/Debug.java
@@ -13,6 +13,8 @@ package org.eclipse.osgi.internal.debug;
import java.io.PrintStream;
import java.lang.reflect.*;
+import org.eclipse.osgi.internal.framework.EquinoxContainer;
+import org.eclipse.osgi.service.debug.DebugOptions;
/**
* This class has debug constants which can be used by the Framework implementation
@@ -21,161 +23,175 @@ import java.lang.reflect.*;
*/
public class Debug {
/**
- * Indicates if tracing is enabled
+ * Base debug option key (org.eclispe.osgi).
*/
- public static boolean DEBUG_ENABLED = false;
-
+ public static final String ECLIPSE_OSGI = EquinoxContainer.NAME;
/**
- * General debug flag.
+ * General Debug option key.
*/
- public static boolean DEBUG_GENERAL = false; // "debug"
+ public static final String OPTION_DEBUG_GENERAL = ECLIPSE_OSGI + "/debug"; //$NON-NLS-1$
/**
- * Bundle time debug flag.
+ * Bundle time Debug option key.
*/
- public static boolean DEBUG_BUNDLE_TIME = false; //"debug.bundleTime"
+ // TODO remove this or use it somewhere
+ public static final String OPTION_DEBUG_BUNDLE_TIME = ECLIPSE_OSGI + "/debug/bundleTime"; //$NON-NLS-1$
/**
- * Loader debug flag.
+ * Loader Debug option key.
*/
- public static boolean DEBUG_LOADER = false; // "debug.loader"
+ public static final String OPTION_DEBUG_LOADER = ECLIPSE_OSGI + "/debug/loader"; //$NON-NLS-1$
/**
- * Events debug flag.
+ * Events Debug option key.
*/
- public static boolean DEBUG_EVENTS = false; // "debug.events"
+ public static final String OPTION_DEBUG_EVENTS = ECLIPSE_OSGI + "/debug/events"; //$NON-NLS-1$
/**
- * Services debug flag.
+ * Services Debug option key.
*/
- public static boolean DEBUG_SERVICES = false; // "debug.services"
-
+ public static final String OPTION_DEBUG_SERVICES = ECLIPSE_OSGI + "/debug/services"; //$NON-NLS-1$
/**
- * Hooks debug flag.
+ * Services Debug option key.
*/
- public static boolean DEBUG_HOOKS = false; // "debug.hooks"
+ public static final String OPTION_DEBUG_HOOKS = ECLIPSE_OSGI + "/debug/hooks"; //$NON-NLS-1$
/**
- * Packages debug flag.
+ * Packages Debug option key.
*/
- // TODO remove this or use it somewhere
- public static boolean DEBUG_PACKAGES = false; // "debug.packages"
+ public static final String OPTION_DEBUG_PACKAGES = ECLIPSE_OSGI + "/debug/packages"; //$NON-NLS-1$
/**
- * Manifest debug flag.
+ * Manifest Debug option key.
*/
- public static boolean DEBUG_MANIFEST = false; // "debug.manifest"
+ public static final String OPTION_DEBUG_MANIFEST = ECLIPSE_OSGI + "/debug/manifest"; //$NON-NLS-1$
/**
- * Filter debug flag.
+ * Filter Debug option key.
*/
- public static boolean DEBUG_FILTER = false; // "debug.filter"
+ public static final String OPTION_DEBUG_FILTER = ECLIPSE_OSGI + "/debug/filter"; //$NON-NLS-1$
/**
- * Security debug flag.
+ * Security Debug option key.
*/
- public static boolean DEBUG_SECURITY = false; // "debug.security"
+ public static final String OPTION_DEBUG_SECURITY = ECLIPSE_OSGI + "/debug/security"; //$NON-NLS-1$
/**
- * Start level debug flag.
+ * Start level Debug option key.
*/
- public static boolean DEBUG_STARTLEVEL = false; // "debug.startlevel"
+ public static final String OPTION_DEBUG_STARTLEVEL = ECLIPSE_OSGI + "/debug/startlevel"; //$NON-NLS-1$
/**
- * PackageAdmin debug flag.
+ * PackageAdmin Debug option key.
*/
- public static boolean DEBUG_PACKAGEADMIN = false; // "debug.packageadmin"
+ public static final String OPTION_DEBUG_PACKAGEADMIN = ECLIPSE_OSGI + "/debug/packageadmin"; //$NON-NLS-1$
/**
- * PackageAdmin timing debug flag.
+ * PackageAdmin timing Debug option key.
*/
- // TODO remove this or use it somewhere
- public static boolean DEBUG_PACKAGEADMIN_TIMING = false; //"debug.packageadmin/timing"
+ public static final String OPTION_DEBUG_PACKAGEADMIN_TIMING = ECLIPSE_OSGI + "/debug/packageadmin/timing"; //$NON-NLS-1$
/**
- * Message debug flag.
+ * Monitor activation Debug option key.
*/
- public static boolean DEBUG_MESSAGE_BUNDLES = false; //"/debug/messageBundles"
+ public static final String OPTION_MONITOR_ACTIVATION = ECLIPSE_OSGI + "/monitor/activation"; //$NON-NLS-1$
/**
- * Monitor activation debug flag.
+ * Message bundles Debug option key.
*/
- public static boolean MONITOR_ACTIVATION = false; // "monitor/bundles"
+ public static final String OPTION_DEBUG_MESSAGE_BUNDLES = ECLIPSE_OSGI + "/debug/messageBundles"; //$NON-NLS-1$
+
+ public static final String OPTION_DEBUG_LOCATION = ECLIPSE_OSGI + "/debug/location"; //$NON-NLS-1$
/**
- * Base debug option key (org.eclispe.osgi).
+ * Indicates if tracing is enabled
*/
- public static final String ECLIPSE_OSGI = "org.eclipse.osgi"; //$NON-NLS-1$
+ public boolean DEBUG_ENABLED = false;
+
+ // these static debug options are left overs because it would be messy to fix references to them
+ // this means that if multiple frameworks are using this class these debug options may get overwritten
+ public static boolean STATIC_DEBUG_GENERAL = false; // "debug"
+ public static boolean STATIC_DEBUG_MANIFEST = false; // "debug.manifest"
+ public static boolean STATIC_DEBUG_MESSAGE_BUNDLES = false; //"/debug/messageBundles"
+
/**
- * General Debug option key.
+ * General debug flag.
*/
- public static final String OPTION_DEBUG_GENERAL = ECLIPSE_OSGI + "/debug"; //$NON-NLS-1$
+ public boolean DEBUG_GENERAL = false; // "debug"
/**
- * Bundle time Debug option key.
+ * Bundle time debug flag.
*/
- // TODO remove this or use it somewhere
- public static final String OPTION_DEBUG_BUNDLE_TIME = ECLIPSE_OSGI + "/debug/bundleTime"; //$NON-NLS-1$
+ public boolean DEBUG_BUNDLE_TIME = false; //"debug.bundleTime"
/**
- * Loader Debug option key.
+ * Loader debug flag.
*/
- public static final String OPTION_DEBUG_LOADER = ECLIPSE_OSGI + "/debug/loader"; //$NON-NLS-1$
+ public boolean DEBUG_LOADER = false; // "debug.loader"
/**
- * Events Debug option key.
+ * Events debug flag.
*/
- public static final String OPTION_DEBUG_EVENTS = ECLIPSE_OSGI + "/debug/events"; //$NON-NLS-1$
+ public boolean DEBUG_EVENTS = false; // "debug.events"
/**
- * Services Debug option key.
+ * Services debug flag.
*/
- public static final String OPTION_DEBUG_SERVICES = ECLIPSE_OSGI + "/debug/services"; //$NON-NLS-1$
+ public boolean DEBUG_SERVICES = false; // "debug.services"
+
/**
- * Services Debug option key.
+ * Hooks debug flag.
*/
- public static final String OPTION_DEBUG_HOOKS = ECLIPSE_OSGI + "/debug/hooks"; //$NON-NLS-1$
+ public boolean DEBUG_HOOKS = false; // "debug.hooks"
/**
- * Packages Debug option key.
+ * Packages debug flag.
*/
- public static final String OPTION_DEBUG_PACKAGES = ECLIPSE_OSGI + "/debug/packages"; //$NON-NLS-1$
+ // TODO remove this or use it somewhere
+ public boolean DEBUG_PACKAGES = false; // "debug.packages"
/**
- * Manifest Debug option key.
+ * Manifest debug flag.
*/
- public static final String OPTION_DEBUG_MANIFEST = ECLIPSE_OSGI + "/debug/manifest"; //$NON-NLS-1$
+ public boolean DEBUG_MANIFEST = false; // "debug.manifest"
/**
- * Filter Debug option key.
+ * Filter debug flag.
*/
- public static final String OPTION_DEBUG_FILTER = ECLIPSE_OSGI + "/debug/filter"; //$NON-NLS-1$
+ public boolean DEBUG_FILTER = false; // "debug.filter"
/**
- * Security Debug option key.
+ * Security debug flag.
*/
- public static final String OPTION_DEBUG_SECURITY = ECLIPSE_OSGI + "/debug/security"; //$NON-NLS-1$
+ public boolean DEBUG_SECURITY = false; // "debug.security"
/**
- * Start level Debug option key.
+ * Start level debug flag.
*/
- public static final String OPTION_DEBUG_STARTLEVEL = ECLIPSE_OSGI + "/debug/startlevel"; //$NON-NLS-1$
+ public boolean DEBUG_STARTLEVEL = false; // "debug.startlevel"
/**
- * PackageAdmin Debug option key.
+ * PackageAdmin debug flag.
*/
- public static final String OPTION_DEBUG_PACKAGEADMIN = ECLIPSE_OSGI + "/debug/packageadmin"; //$NON-NLS-1$
+ public boolean DEBUG_PACKAGEADMIN = false; // "debug.packageadmin"
/**
- * PackageAdmin timing Debug option key.
+ * PackageAdmin timing debug flag.
*/
- public static final String OPTION_DEBUG_PACKAGEADMIN_TIMING = ECLIPSE_OSGI + "/debug/packageadmin/timing"; //$NON-NLS-1$
+ // TODO remove this or use it somewhere
+ public boolean DEBUG_PACKAGEADMIN_TIMING = false; //"debug.packageadmin/timing"
/**
- * Monitor activation Debug option key.
+ * Message debug flag.
*/
- public static final String OPTION_MONITOR_ACTIVATION = ECLIPSE_OSGI + "/monitor/activation"; //$NON-NLS-1$
+ public boolean DEBUG_MESSAGE_BUNDLES = false; //"/debug/messageBundles"
/**
- * Message bundles Debug option key.
+ * Monitor activation debug flag.
*/
- public static final String OPTION_DEBUG_MESSAGE_BUNDLES = ECLIPSE_OSGI + "/debug/messageBundles"; //$NON-NLS-1$
+ public boolean MONITOR_ACTIVATION = false; // "monitor/bundles"
+
+ public boolean DEBUG_LOCATION = false; // debug/location
- // static {
- // FrameworkDebugOptions dbgOptions = FrameworkDebugOptions.getDefault();
- // if (dbgOptions != null) {
- // DEBUG_ENABLED = dbgOptions.isDebugEnabled();
- // DEBUG_GENERAL = dbgOptions.getBooleanOption(OPTION_DEBUG_GENERAL, false);
- // DEBUG_BUNDLE_TIME = dbgOptions.getBooleanOption(OPTION_DEBUG_BUNDLE_TIME, false) || dbgOptions.getBooleanOption("org.eclipse.core.runtime/timing/startup", false); //$NON-NLS-1$
- // DEBUG_LOADER = dbgOptions.getBooleanOption(OPTION_DEBUG_LOADER, false);
- // DEBUG_EVENTS = dbgOptions.getBooleanOption(OPTION_DEBUG_EVENTS, false);
- // DEBUG_SERVICES = dbgOptions.getBooleanOption(OPTION_DEBUG_SERVICES, false);
- // DEBUG_HOOKS = dbgOptions.getBooleanOption(OPTION_DEBUG_HOOKS, false);
- // DEBUG_PACKAGES = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGES, false);
- // DEBUG_MANIFEST = dbgOptions.getBooleanOption(OPTION_DEBUG_MANIFEST, false);
- // DEBUG_FILTER = dbgOptions.getBooleanOption(OPTION_DEBUG_FILTER, false);
- // DEBUG_SECURITY = dbgOptions.getBooleanOption(OPTION_DEBUG_SECURITY, false);
- // DEBUG_STARTLEVEL = dbgOptions.getBooleanOption(OPTION_DEBUG_STARTLEVEL, false);
- // DEBUG_PACKAGEADMIN = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGEADMIN, false);
- // DEBUG_PACKAGEADMIN_TIMING = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGEADMIN_TIMING, false) || dbgOptions.getBooleanOption("org.eclipse.core.runtime/debug", false); //$NON-NLS-1$
- // DEBUG_MESSAGE_BUNDLES = dbgOptions.getBooleanOption(OPTION_DEBUG_MESSAGE_BUNDLES, false);
- // MONITOR_ACTIVATION = dbgOptions.getBooleanOption(OPTION_MONITOR_ACTIVATION, false);
- // }
- // }
+ public Debug(DebugOptions dbgOptions) {
+ if (dbgOptions == null) {
+ return;
+ }
+ DEBUG_ENABLED = dbgOptions.isDebugEnabled();
+ DEBUG_GENERAL = dbgOptions.getBooleanOption(OPTION_DEBUG_GENERAL, false);
+ STATIC_DEBUG_GENERAL = DEBUG_GENERAL;
+ DEBUG_BUNDLE_TIME = dbgOptions.getBooleanOption(OPTION_DEBUG_BUNDLE_TIME, false) || dbgOptions.getBooleanOption("org.eclipse.core.runtime/timing/startup", false); //$NON-NLS-1$
+ DEBUG_LOADER = dbgOptions.getBooleanOption(OPTION_DEBUG_LOADER, false);
+ DEBUG_EVENTS = dbgOptions.getBooleanOption(OPTION_DEBUG_EVENTS, false);
+ DEBUG_SERVICES = dbgOptions.getBooleanOption(OPTION_DEBUG_SERVICES, false);
+ DEBUG_HOOKS = dbgOptions.getBooleanOption(OPTION_DEBUG_HOOKS, false);
+ DEBUG_PACKAGES = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGES, false);
+ DEBUG_MANIFEST = dbgOptions.getBooleanOption(OPTION_DEBUG_MANIFEST, false);
+ STATIC_DEBUG_MANIFEST = DEBUG_MANIFEST;
+ DEBUG_FILTER = dbgOptions.getBooleanOption(OPTION_DEBUG_FILTER, false);
+ DEBUG_SECURITY = dbgOptions.getBooleanOption(OPTION_DEBUG_SECURITY, false);
+ DEBUG_STARTLEVEL = dbgOptions.getBooleanOption(OPTION_DEBUG_STARTLEVEL, false);
+ DEBUG_PACKAGEADMIN = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGEADMIN, false);
+ DEBUG_PACKAGEADMIN_TIMING = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGEADMIN_TIMING, false) || dbgOptions.getBooleanOption("org.eclipse.core.runtime/debug", false); //$NON-NLS-1$
+ DEBUG_MESSAGE_BUNDLES = dbgOptions.getBooleanOption(OPTION_DEBUG_MESSAGE_BUNDLES, false);
+ STATIC_DEBUG_MESSAGE_BUNDLES = DEBUG_MESSAGE_BUNDLES;
+ MONITOR_ACTIVATION = dbgOptions.getBooleanOption(OPTION_MONITOR_ACTIVATION, false);
+ DEBUG_LOCATION = dbgOptions.getBooleanOption(OPTION_DEBUG_LOCATION, false);
+ }
/**
* The PrintStream to print debug messages to.
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/next/internal/debug/Debug.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/next/internal/debug/Debug.java
deleted file mode 100644
index 89031bffe..000000000
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/next/internal/debug/Debug.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.osgi.next.internal.debug;
-
-import java.io.PrintStream;
-import java.lang.reflect.*;
-import org.eclipse.osgi.internal.framework.EquinoxContainer;
-import org.eclipse.osgi.service.debug.DebugOptions;
-
-/**
- * This class has debug constants which can be used by the Framework implementation
- * and Adaptor implementations
- * @since 3.1
- */
-public class Debug {
- /**
- * Base debug option key (org.eclispe.osgi).
- */
- public static final String ECLIPSE_OSGI = EquinoxContainer.NAME;
- /**
- * General Debug option key.
- */
- public static final String OPTION_DEBUG_GENERAL = ECLIPSE_OSGI + "/debug"; //$NON-NLS-1$
- /**
- * Bundle time Debug option key.
- */
- // TODO remove this or use it somewhere
- public static final String OPTION_DEBUG_BUNDLE_TIME = ECLIPSE_OSGI + "/debug/bundleTime"; //$NON-NLS-1$
- /**
- * Loader Debug option key.
- */
- public static final String OPTION_DEBUG_LOADER = ECLIPSE_OSGI + "/debug/loader"; //$NON-NLS-1$
- /**
- * Events Debug option key.
- */
- public static final String OPTION_DEBUG_EVENTS = ECLIPSE_OSGI + "/debug/events"; //$NON-NLS-1$
- /**
- * Services Debug option key.
- */
- public static final String OPTION_DEBUG_SERVICES = ECLIPSE_OSGI + "/debug/services"; //$NON-NLS-1$
- /**
- * Services Debug option key.
- */
- public static final String OPTION_DEBUG_HOOKS = ECLIPSE_OSGI + "/debug/hooks"; //$NON-NLS-1$
- /**
- * Packages Debug option key.
- */
- public static final String OPTION_DEBUG_PACKAGES = ECLIPSE_OSGI + "/debug/packages"; //$NON-NLS-1$
- /**
- * Manifest Debug option key.
- */
- public static final String OPTION_DEBUG_MANIFEST = ECLIPSE_OSGI + "/debug/manifest"; //$NON-NLS-1$
- /**
- * Filter Debug option key.
- */
- public static final String OPTION_DEBUG_FILTER = ECLIPSE_OSGI + "/debug/filter"; //$NON-NLS-1$
- /**
- * Security Debug option key.
- */
- public static final String OPTION_DEBUG_SECURITY = ECLIPSE_OSGI + "/debug/security"; //$NON-NLS-1$
- /**
- * Start level Debug option key.
- */
- public static final String OPTION_DEBUG_STARTLEVEL = ECLIPSE_OSGI + "/debug/startlevel"; //$NON-NLS-1$
- /**
- * PackageAdmin Debug option key.
- */
- public static final String OPTION_DEBUG_PACKAGEADMIN = ECLIPSE_OSGI + "/debug/packageadmin"; //$NON-NLS-1$
- /**
- * PackageAdmin timing Debug option key.
- */
- public static final String OPTION_DEBUG_PACKAGEADMIN_TIMING = ECLIPSE_OSGI + "/debug/packageadmin/timing"; //$NON-NLS-1$
- /**
- * Monitor activation Debug option key.
- */
- public static final String OPTION_MONITOR_ACTIVATION = ECLIPSE_OSGI + "/monitor/activation"; //$NON-NLS-1$
- /**
- * Message bundles Debug option key.
- */
- public static final String OPTION_DEBUG_MESSAGE_BUNDLES = ECLIPSE_OSGI + "/debug/messageBundles"; //$NON-NLS-1$
-
- public static final String OPTION_DEBUG_LOCATION = ECLIPSE_OSGI + "/debug/location"; //$NON-NLS-1$
-
- /**
- * Indicates if tracing is enabled
- */
- public boolean DEBUG_ENABLED = false;
-
- /**
- * General debug flag.
- */
- public boolean DEBUG_GENERAL = false; // "debug"
- /**
- * Bundle time debug flag.
- */
- public boolean DEBUG_BUNDLE_TIME = false; //"debug.bundleTime"
- /**
- * Loader debug flag.
- */
- public boolean DEBUG_LOADER = false; // "debug.loader"
- /**
- * Events debug flag.
- */
- public boolean DEBUG_EVENTS = false; // "debug.events"
- /**
- * Services debug flag.
- */
- public boolean DEBUG_SERVICES = false; // "debug.services"
-
- /**
- * Hooks debug flag.
- */
- public boolean DEBUG_HOOKS = false; // "debug.hooks"
- /**
- * Packages debug flag.
- */
- // TODO remove this or use it somewhere
- public boolean DEBUG_PACKAGES = false; // "debug.packages"
- /**
- * Manifest debug flag.
- */
- public boolean DEBUG_MANIFEST = false; // "debug.manifest"
- /**
- * Filter debug flag.
- */
- public boolean DEBUG_FILTER = false; // "debug.filter"
- /**
- * Security debug flag.
- */
- public boolean DEBUG_SECURITY = false; // "debug.security"
- /**
- * Start level debug flag.
- */
- public boolean DEBUG_STARTLEVEL = false; // "debug.startlevel"
- /**
- * PackageAdmin debug flag.
- */
- public boolean DEBUG_PACKAGEADMIN = false; // "debug.packageadmin"
- /**
- * PackageAdmin timing debug flag.
- */
- // TODO remove this or use it somewhere
- public boolean DEBUG_PACKAGEADMIN_TIMING = false; //"debug.packageadmin/timing"
- /**
- * Message debug flag.
- */
- public boolean DEBUG_MESSAGE_BUNDLES = false; //"/debug/messageBundles"
- /**
- * Monitor activation debug flag.
- */
- public boolean MONITOR_ACTIVATION = false; // "monitor/bundles"
-
- public boolean DEBUG_LOCATION = false; // debug/location
-
- public Debug(DebugOptions dbgOptions) {
- if (dbgOptions == null) {
- return;
- }
- DEBUG_ENABLED = dbgOptions.isDebugEnabled();
- DEBUG_GENERAL = dbgOptions.getBooleanOption(OPTION_DEBUG_GENERAL, false);
- DEBUG_BUNDLE_TIME = dbgOptions.getBooleanOption(OPTION_DEBUG_BUNDLE_TIME, false) || dbgOptions.getBooleanOption("org.eclipse.core.runtime/timing/startup", false); //$NON-NLS-1$
- DEBUG_LOADER = dbgOptions.getBooleanOption(OPTION_DEBUG_LOADER, false);
- DEBUG_EVENTS = dbgOptions.getBooleanOption(OPTION_DEBUG_EVENTS, false);
- DEBUG_SERVICES = dbgOptions.getBooleanOption(OPTION_DEBUG_SERVICES, false);
- DEBUG_HOOKS = dbgOptions.getBooleanOption(OPTION_DEBUG_HOOKS, false);
- DEBUG_PACKAGES = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGES, false);
- DEBUG_MANIFEST = dbgOptions.getBooleanOption(OPTION_DEBUG_MANIFEST, false);
- DEBUG_FILTER = dbgOptions.getBooleanOption(OPTION_DEBUG_FILTER, false);
- DEBUG_SECURITY = dbgOptions.getBooleanOption(OPTION_DEBUG_SECURITY, false);
- DEBUG_STARTLEVEL = dbgOptions.getBooleanOption(OPTION_DEBUG_STARTLEVEL, false);
- DEBUG_PACKAGEADMIN = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGEADMIN, false);
- DEBUG_PACKAGEADMIN_TIMING = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGEADMIN_TIMING, false) || dbgOptions.getBooleanOption("org.eclipse.core.runtime/debug", false); //$NON-NLS-1$
- DEBUG_MESSAGE_BUNDLES = dbgOptions.getBooleanOption(OPTION_DEBUG_MESSAGE_BUNDLES, false);
- MONITOR_ACTIVATION = dbgOptions.getBooleanOption(OPTION_MONITOR_ACTIVATION, false);
- DEBUG_LOCATION = dbgOptions.getBooleanOption(OPTION_DEBUG_LOCATION, false);
- }
-
- /**
- * The PrintStream to print debug messages to.
- */
- public static PrintStream out = System.out;
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void print(boolean x) {
- out.print(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void print(char x) {
- out.print(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void print(int x) {
- out.print(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void print(long x) {
- out.print(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void print(float x) {
- out.print(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void print(double x) {
- out.print(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void print(char x[]) {
- out.print(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void print(String x) {
- out.print(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void print(Object x) {
- out.print(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void println(boolean x) {
- out.println(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void println(char x) {
- out.println(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void println(int x) {
- out.println(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void println(long x) {
- out.println(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void println(float x) {
- out.println(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void println(double x) {
- out.println(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void println(char x[]) {
- out.println(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void println(String x) {
- out.println(x);
- }
-
- /**
- * Prints x to the PrintStream
- * @param x
- */
- public static void println(Object x) {
- out.println(x);
- }
-
- /**
- * Prints t to the PrintStream
- * @param t
- */
- public static void printStackTrace(Throwable t) {
- if (t == null)
- return;
- t.printStackTrace(out);
-
- Method[] methods = t.getClass().getMethods();
-
- int size = methods.length;
- Class<?> throwable = Throwable.class;
-
- for (int i = 0; i < size; i++) {
- Method method = methods[i];
-
- if (Modifier.isPublic(method.getModifiers()) && method.getName().startsWith("get") && throwable.isAssignableFrom(method.getReturnType()) && (method.getParameterTypes().length == 0)) { //$NON-NLS-1$
- try {
- Throwable nested = (Throwable) method.invoke(t, (Object[]) null);
-
- if ((nested != null) && (nested != t)) {
- out.println("Nested Exception:"); //$NON-NLS-1$
- printStackTrace(nested);
- }
- } catch (IllegalAccessException e) {
- // nothing
- } catch (InvocationTargetException e) {
- // nothing
- }
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
index 17fa7bedf..f8d3ab3e5 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
@@ -11,12 +11,11 @@
package org.eclipse.osgi.util;
-import org.eclipse.osgi.internal.debug.Debug;
-
import java.io.*;
import java.util.*;
import org.eclipse.osgi.framework.internal.core.Msg;
import org.eclipse.osgi.framework.internal.core.Tokenizer;
+import org.eclipse.osgi.internal.debug.Debug;
import org.osgi.framework.BundleException;
/**
@@ -356,7 +355,7 @@ public class ManifestElement {
StringBuffer headerValue = new StringBuffer(next);
headerValues.add(next);
- if (Debug.DEBUG_MANIFEST)
+ if (Debug.STATIC_DEBUG_MANIFEST)
Debug.print("parseHeader: " + next); //$NON-NLS-1$
boolean directive = false;
char c = tokenizer.getChar();
@@ -380,7 +379,7 @@ public class ManifestElement {
if (c == ';' || c == ',' || c == '\0') /* more */{
headerValues.add(next);
headerValue.append(";").append(next); //$NON-NLS-1$
- if (Debug.DEBUG_MANIFEST)
+ if (Debug.STATIC_DEBUG_MANIFEST)
Debug.print(";" + next); //$NON-NLS-1$
}
}
@@ -414,7 +413,7 @@ public class ManifestElement {
if (val == null)
throw new BundleException(NLS.bind(Msg.MANIFEST_INVALID_HEADER_EXCEPTION, header, value), BundleException.MANIFEST_ERROR);
- if (Debug.DEBUG_MANIFEST)
+ if (Debug.STATIC_DEBUG_MANIFEST)
Debug.print(";" + next + "=" + val); //$NON-NLS-1$ //$NON-NLS-2$
try {
if (directive)
@@ -434,7 +433,7 @@ public class ManifestElement {
}
}
headerElements.add(manifestElement);
- if (Debug.DEBUG_MANIFEST)
+ if (Debug.STATIC_DEBUG_MANIFEST)
Debug.println(""); //$NON-NLS-1$
if (c == ',') /* another manifest element */
continue parseloop;
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
index 31a9c0a4c..407fba9d5 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
@@ -281,7 +281,7 @@ public abstract class NLS {
// log it and continue. This means that the field will (most likely) be un-initialized and
// will fail later in the code and if so then we will see both the NPE and this error.
String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$
- if (Debug.DEBUG_MESSAGE_BUNDLES)
+ if (Debug.STATIC_DEBUG_MESSAGE_BUNDLES)
System.out.println(value);
log(SEVERITY_WARNING, value, null);
if (!isAccessible)
@@ -333,7 +333,7 @@ public abstract class NLS {
}
}
computeMissingMessages(bundleName, clazz, fields, fieldArray, isAccessible);
- if (Debug.DEBUG_MESSAGE_BUNDLES)
+ if (Debug.STATIC_DEBUG_MESSAGE_BUNDLES)
System.out.println("Time to load message bundle: " + bundleName + " was " + (System.currentTimeMillis() - start) + "ms."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
@@ -406,7 +406,7 @@ public abstract class NLS {
return null;
if (fieldObject == null) {
final String msg = "NLS unused message: " + key + " in: " + bundleName;//$NON-NLS-1$ //$NON-NLS-2$
- if (Debug.DEBUG_MESSAGE_BUNDLES)
+ if (Debug.STATIC_DEBUG_MESSAGE_BUNDLES)
System.out.println(msg);
log(SEVERITY_WARNING, msg, null);
return null;

Back to the top