Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-03-13 20:09:44 -0400
committerslewis2007-03-13 20:09:44 -0400
commitb48f00b39f83ed61eca616ee890a8573892bd648 (patch)
tree4627c9805f37dafde436d629bc07c615e87da070 /framework/bundles/org.eclipse.ecf.identity/src
parent1f3b8d6578577081d2aba700e1ab9106dcc8a98e (diff)
downloadorg.eclipse.ecf-b48f00b39f83ed61eca616ee890a8573892bd648.tar.gz
org.eclipse.ecf-b48f00b39f83ed61eca616ee890a8573892bd648.tar.xz
org.eclipse.ecf-b48f00b39f83ed61eca616ee890a8573892bd648.zip
Refactored Trace class static methods to remove reference to Plugin class and replace with String pluginId
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.identity/src')
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java32
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java100
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java38
3 files changed, 96 insertions, 74 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
index be2ab189e..1da69358e 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
@@ -60,13 +60,13 @@ public class IDFactory implements IIDFactory {
public Namespace addNamespace(Namespace namespace) throws SecurityException {
if (namespace == null)
return null;
- Trace.entering(Activator.getDefault(),
+ Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
"addNamespace", namespace); //$NON-NLS-1$
checkPermission(new NamespacePermission(namespace.toString(),
NamespacePermission.ADD_NAMESPACE));
Namespace result = addNamespace0(namespace);
- Trace.exiting(Activator.getDefault(),
+ Trace.exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
"addNamespace", result); //$NON-NLS-1$
return result;
@@ -91,7 +91,7 @@ public class IDFactory implements IIDFactory {
*/
public boolean containsNamespace(Namespace namespace)
throws SecurityException {
- Trace.entering(Activator.getDefault(),
+ Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
"containsNamespace", namespace); //$NON-NLS-1$
if (namespace == null)
@@ -99,7 +99,7 @@ public class IDFactory implements IIDFactory {
checkPermission(new NamespacePermission(namespace.toString(),
NamespacePermission.CONTAINS_NAMESPACE));
boolean result = containsNamespace0(namespace);
- Trace.exiting(Activator.getDefault(),
+ Trace.exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
"containsNamespace", new Boolean(result)); //$NON-NLS-1$
return result;
@@ -111,7 +111,7 @@ public class IDFactory implements IIDFactory {
* @see org.eclipse.ecf.core.identity.IIDFactory#getNamespaces()
*/
public List getNamespaces() {
- Trace.entering(Activator.getDefault(),
+ Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
"getNamespaces"); //$NON-NLS-1$
return new ArrayList(namespaces.values());
@@ -129,7 +129,7 @@ public class IDFactory implements IIDFactory {
* @see org.eclipse.ecf.core.identity.IIDFactory#getNamespace(org.eclipse.ecf.core.identity.Namespace)
*/
public Namespace getNamespace(Namespace namespace) throws SecurityException {
- Trace.entering(Activator.getDefault(),
+ Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
"getNamespace", namespace); //$NON-NLS-1$
if (namespace == null)
@@ -137,7 +137,7 @@ public class IDFactory implements IIDFactory {
checkPermission(new NamespacePermission(namespace.toString(),
NamespacePermission.GET_NAMESPACE));
Namespace result = getNamespace0(namespace);
- Trace.exiting(Activator.getDefault(),
+ Trace.exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
"getNamespace", result); //$NON-NLS-1$
return result;
@@ -149,11 +149,11 @@ public class IDFactory implements IIDFactory {
* @see org.eclipse.ecf.core.identity.IIDFactory#getNamespaceByName(java.lang.String)
*/
public Namespace getNamespaceByName(String name) throws SecurityException {
- Trace.entering(Activator.getDefault(),
+ Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
"getNamespaceByName", name); //$NON-NLS-1$
Namespace result = getNamespace0(name);
- Trace.exiting(Activator.getDefault(),
+ Trace.exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
"getNamespaceByName", result); //$NON-NLS-1$
return result;
@@ -187,12 +187,12 @@ public class IDFactory implements IIDFactory {
* @see org.eclipse.ecf.core.identity.IIDFactory#createGUID(int)
*/
public ID createGUID(int length) throws IDCreateException {
- Trace.entering(Activator.getDefault(),
+ Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
"createGUID", new Integer(length)); //$NON-NLS-1$
Namespace namespace = new GUID.GUIDNamespace();
ID result = createID(namespace, new Integer[] { new Integer(length) });
- Trace.exiting(Activator.getDefault(),
+ Trace.exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
"createGUID", result); //$NON-NLS-1$
return result;
@@ -207,7 +207,7 @@ public class IDFactory implements IIDFactory {
} else {
e = new IDCreateException(s);
}
- Trace.throwing(Activator.getDefault(),
+ Trace.throwing(Activator.PLUGIN_ID,
IdentityDebugOptions.EXCEPTIONS_THROWING, IDFactory.class,
"logAndThrow", e); //$NON-NLS-1$
Activator.getDefault().getLog().log(
@@ -223,7 +223,7 @@ public class IDFactory implements IIDFactory {
* java.lang.Object[])
*/
public ID createID(Namespace n, Object[] args) throws IDCreateException {
- Trace.entering(Activator.getDefault(),
+ Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
"createID", new Object[] { n, Trace.getArgumentsString(args) }); //$NON-NLS-1$
// Verify namespace is non-null
@@ -239,7 +239,7 @@ public class IDFactory implements IIDFactory {
// instantiator
// Ask instantiator to actually create instance
ID result = ns.createInstance(args);
- Trace.exiting(Activator.getDefault(),
+ Trace.exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
"createID", result); //$NON-NLS-1$
return result;
@@ -297,7 +297,7 @@ public class IDFactory implements IIDFactory {
* @see org.eclipse.ecf.core.identity.IIDFactory#removeNamespace(org.eclipse.ecf.core.identity.Namespace)
*/
public Namespace removeNamespace(Namespace n) throws SecurityException {
- Trace.entering(Activator.getDefault(),
+ Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
"removeNamespace", n); //$NON-NLS-1$
if (n == null)
@@ -305,7 +305,7 @@ public class IDFactory implements IIDFactory {
checkPermission(new NamespacePermission(n.toString(),
NamespacePermission.REMOVE_NAMESPACE));
Namespace result = removeNamespace0(n);
- Trace.exiting(Activator.getDefault(),
+ Trace.exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
"removeNamespace", result); //$NON-NLS-1$
return result;
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
index 0b3e5d587..bc1093ece 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
@@ -13,9 +13,9 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
+import org.eclipse.ecf.internal.core.identity.Activator;
import org.eclipse.ecf.internal.core.identity.Messages;
+import org.eclipse.osgi.service.debug.DebugOptions;
/**
* A utility for tracing debug information. Provides a simple interface for
@@ -125,38 +125,46 @@ public class Trace {
* specified plug-in.
*
* @return Whether tracing is enabled for the plug-in.
- * @param plugin
- * The plug-in for which to determine trace enablement.
+ * @param pluginId
+ * The symbolic plugin id for which to determine trace enablement.
*
*/
- protected static boolean shouldTrace(Plugin plugin) {
- if (plugin == null)
- return false;
- return plugin.isDebugging();
+ protected static boolean shouldTrace(String pluginId) {
+ return shouldTrace0(pluginId,"/debug"); //$NON-NLS-1$
}
+ protected static boolean shouldTrace0(String pluginId, String option) {
+ if (pluginId == null || option == null)
+ return false;
+ DebugOptions debugOptions = Activator.getDefault().getDebugOptions();
+ if (debugOptions == null) return false;
+ String key = pluginId + (option.startsWith("/")?option:("/"+option)); //$NON-NLS-1$
+ String result = debugOptions.getOption(key);
+ return (result == null)?false:result.equalsIgnoreCase("true"); //$NON-NLS-1$
+ }
+
/**
* Retrieves a Boolean value indicating whether tracing is enabled for the
* specified debug option of the specified plug-in.
*
* @return Whether tracing is enabled for the debug option of the plug-in.
- * @param plugin
+ * @param pluginId
* The plug-in for which to determine trace enablement.
* @param option
* The debug option for which to determine trace enablement.
*
*/
- public static boolean shouldTrace(Plugin plugin, String option) {
- if (plugin == null)
+ public static boolean shouldTrace(String pluginId, String option) {
+ if (pluginId == null)
return false;
- if (shouldTrace(plugin)) {
+ if (shouldTrace(pluginId)) {
Boolean value = null;
synchronized (cachedOptions) {
value = (Boolean) cachedOptions.get(option);
if (null == value) {
- value = Boolean.valueOf(Platform.getDebugOption(option));
+ value = new Boolean(shouldTrace0(pluginId, option));
cachedOptions.put(option, value);
}
@@ -236,14 +244,14 @@ public class Trace {
/**
* Traces the specified message from the specified plug-in.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param message
* The message to be traced.
*
*/
- public static void trace(Plugin plugin, String message) {
- if (shouldTrace(plugin))
+ public static void trace(String pluginId, String message) {
+ if (shouldTrace(pluginId))
trace(message);
}
@@ -251,7 +259,7 @@ public class Trace {
* Traces the specified message from the specified plug-in for the specified
* debug option.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -259,15 +267,15 @@ public class Trace {
* The message to be traced.
*
*/
- public static void trace(Plugin plugin, String option, String message) {
- if (shouldTrace(plugin, option))
+ public static void trace(String pluginId, String option, String message) {
+ if (shouldTrace(pluginId, option))
trace(message);
}
/**
* Traces the changing of a value.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -278,10 +286,10 @@ public class Trace {
* @param newValue
* The new value.
*/
- public static void changing(Plugin plugin, String option,
+ public static void changing(String pluginId, String option,
String valueDescription, Object oldValue, Object newValue) {
- if (shouldTrace(plugin, option)) {
+ if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
buf.append(valueDescription).append(SEPARATOR_SPACE).append(
LABEL_OLD_VALUE).append(getArgumentString(oldValue));
@@ -293,7 +301,7 @@ public class Trace {
/**
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -308,10 +316,10 @@ public class Trace {
* @param newValue
* The new value.
*/
- public static void changing(Plugin plugin, String option, Class clazz,
+ public static void changing(String pluginId, String option, Class clazz,
String methodName, String valueDescription, Object oldValue,
Object newValue) {
- if (shouldTrace(plugin, option)) {
+ if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
buf.append(valueDescription).append(SEPARATOR_SPACE).append(
LABEL_OLD_VALUE).append(getArgumentString(oldValue));
@@ -328,7 +336,7 @@ public class Trace {
* Traces the catching of the specified throwable in the specified method of
* the specified class.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -340,10 +348,10 @@ public class Trace {
* The throwable that is being caught.
*
*/
- public static void catching(Plugin plugin, String option, Class clazz,
+ public static void catching(String pluginId, String option, Class clazz,
String methodName, Throwable throwable) {
- if (shouldTrace(plugin, option)) {
+ if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_CATCHING);
buf.append(throwable.getMessage()).append(SEPARATOR_SPACE);
buf.append(PARENTHESIS_OPEN).append(clazz.getName()).append(
@@ -358,7 +366,7 @@ public class Trace {
* Traces the throwing of the specified throwable from the specified method
* of the specified class.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -371,10 +379,10 @@ public class Trace {
* The throwable that is being thrown.
*
*/
- public static void throwing(Plugin plugin, String option, Class clazz,
+ public static void throwing(String pluginId, String option, Class clazz,
String methodName, Throwable throwable) {
- if (shouldTrace(plugin, option)) {
+ if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_THROWING);
buf.append(throwable.getMessage()).append(SEPARATOR_SPACE);
buf.append(PARENTHESIS_OPEN).append(clazz.getName()).append(
@@ -388,7 +396,7 @@ public class Trace {
/**
* Traces the entering into the specified method of the specified class.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -398,10 +406,10 @@ public class Trace {
* The name of method that is being entered.
*
*/
- public static void entering(Plugin plugin, String option, Class clazz,
+ public static void entering(String pluginId, String option, Class clazz,
String methodName) {
- if (shouldTrace(plugin, option)) {
+ if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
.getName());
buf.append(SEPARATOR_METHOD).append(methodName).append(
@@ -414,7 +422,7 @@ public class Trace {
* Traces the entering into the specified method of the specified class,
* with the specified parameter.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -426,10 +434,10 @@ public class Trace {
* The parameter to the method being entered.
*
*/
- public static void entering(Plugin plugin, String option, Class clazz,
+ public static void entering(String pluginId, String option, Class clazz,
String methodName, Object parameter) {
- if (shouldTrace(plugin, option)) {
+ if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
.getName());
buf.append(SEPARATOR_METHOD).append(methodName);
@@ -444,7 +452,7 @@ public class Trace {
* Traces the entering into the specified method of the specified class,
* with the specified parameters.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -456,10 +464,10 @@ public class Trace {
* The parameters to the method being entered.
*
*/
- public static void entering(Plugin plugin, String option, Class clazz,
+ public static void entering(String pluginId, String option, Class clazz,
String methodName, Object[] parameters) {
- if (shouldTrace(plugin, option)) {
+ if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
.getName());
buf.append(SEPARATOR_METHOD).append(methodName);
@@ -473,7 +481,7 @@ public class Trace {
/**
* Traces the exiting from the specified method of the specified class.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -483,10 +491,10 @@ public class Trace {
* The name of method that is being exited.
*
*/
- public static void exiting(Plugin plugin, String option, Class clazz,
+ public static void exiting(String pluginId, String option, Class clazz,
String methodName) {
- if (shouldTrace(plugin, option)) {
+ if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz
.getName());
buf.append(SEPARATOR_METHOD).append(methodName);
@@ -498,7 +506,7 @@ public class Trace {
* Traces the exiting from the specified method of the specified class, with
* the specified return value.
*
- * @param plugin
+ * @param pluginId
* The plug-in from which to trace.
* @param option
* The debug option for which to trace.
@@ -510,10 +518,10 @@ public class Trace {
* The return value of the method being exited.
*
*/
- public static void exiting(Plugin plugin, String option, Class clazz,
+ public static void exiting(String pluginId, String option, Class clazz,
String methodName, Object returnValue) {
- if (shouldTrace(plugin, option)) {
+ if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz
.getName());
buf.append(SEPARATOR_METHOD).append(methodName);
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java
index 80ef6c970..33b09e1cc 100644
--- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java
@@ -23,6 +23,7 @@ import org.eclipse.ecf.core.identity.IDFactory;
import org.eclipse.ecf.core.identity.IIDFactory;
import org.eclipse.ecf.core.identity.Namespace;
import org.eclipse.ecf.core.util.Trace;
+import org.eclipse.osgi.service.debug.DebugOptions;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.util.tracker.ServiceTracker;
@@ -59,6 +60,8 @@ public class Activator extends Plugin {
private ServiceTracker extensionRegistryTracker = null;
+ private ServiceTracker debugOptionsTracker = null;
+
/**
* The constructor
*/
@@ -69,6 +72,10 @@ public class Activator extends Plugin {
return (IExtensionRegistry) extensionRegistryTracker.getService();
}
+ public DebugOptions getDebugOptions() {
+ return (DebugOptions) debugOptionsTracker.getService();
+ }
+
/*
* (non-Javadoc)
*
@@ -85,9 +92,12 @@ public class Activator extends Plugin {
this.registryManager = new IdentityRegistryManager();
reg.addRegistryChangeListener(registryManager);
}
+ this.debugOptionsTracker = new ServiceTracker(context,
+ DebugOptions.class.getName(), null);
+ this.debugOptionsTracker.open();
this.setupNamespaceExtensionPoint();
Trace
- .exiting(Activator.getDefault(),
+ .exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, Activator.class,
"start"); //$NON-NLS-1$
// Register IIDFactory service
@@ -121,7 +131,7 @@ public class Activator extends Plugin {
* the members to remove
*/
protected void removeNamespaceExtensions(IConfigurationElement[] members) {
- org.eclipse.ecf.core.util.Trace.entering(Activator.getDefault(),
+ org.eclipse.ecf.core.util.Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, Activator.class,
"removeNamespaceExtensions", members); //$NON-NLS-1$
for (int m = 0; m < members.length; m++) {
@@ -141,13 +151,13 @@ public class Activator extends Plugin {
}
// remove
factory.removeNamespace(n);
- org.eclipse.ecf.core.util.Trace.trace(Activator.getDefault(),
+ org.eclipse.ecf.core.util.Trace.trace(Activator.PLUGIN_ID,
IdentityDebugOptions.DEBUG,
"removeNamespaceExtensions.removedNamespace(" //$NON-NLS-1$
+ n + ")"); //$NON-NLS-1$
} catch (Exception e) {
org.eclipse.ecf.core.util.Trace.catching(
- Activator.getDefault(),
+ Activator.PLUGIN_ID,
IdentityDebugOptions.EXCEPTIONS_CATCHING,
Activator.class, "removeNamespaceExtensions", e); //$NON-NLS-1$
getDefault().getLog().log(
@@ -156,7 +166,7 @@ public class Activator extends Plugin {
"Exception removing namespace", e)); //$NON-NLS-1$
}
}
- org.eclipse.ecf.core.util.Trace.exiting(Activator.getDefault(),
+ org.eclipse.ecf.core.util.Trace.exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, Activator.class,
"removeNamespaceExtensions", members); //$NON-NLS-1$
}
@@ -168,7 +178,7 @@ public class Activator extends Plugin {
* the members to add
*/
protected void addNamespaceExtensions(IConfigurationElement[] members) {
- org.eclipse.ecf.core.util.Trace.entering(Activator.getDefault(),
+ org.eclipse.ecf.core.util.Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_ENTERING, Activator.class,
"addNamespaceExtensions", members); //$NON-NLS-1$
String bundleName = getDefault().getBundle().getSymbolicName();
@@ -189,7 +199,7 @@ public class Activator extends Plugin {
String nsDescription = member
.getAttribute(DESCRIPTION_ATTRIBUTE);
ns.initialize(nsName, nsDescription);
- org.eclipse.ecf.core.util.Trace.trace(Activator.getDefault(),
+ org.eclipse.ecf.core.util.Trace.trace(Activator.PLUGIN_ID,
IdentityDebugOptions.DEBUG,
"addNamespaceExtensions.createdNamespace(" + ns + ")"); //$NON-NLS-1$ //$NON-NLS-2$
// Check to see if we have a namespace name collision
@@ -207,14 +217,14 @@ public class Activator extends Plugin {
null));
// Now add to known namespaces
IDFactory.getDefault().addNamespace(ns);
- org.eclipse.ecf.core.util.Trace.trace(Activator.getDefault(),
+ org.eclipse.ecf.core.util.Trace.trace(Activator.PLUGIN_ID,
IdentityDebugOptions.DEBUG,
"addNamespaceExtensions.addedNamespaceToFactory(" + ns //$NON-NLS-1$
+ ")"); //$NON-NLS-1$
} catch (CoreException e) {
getDefault().getLog().log(e.getStatus());
org.eclipse.ecf.core.util.Trace.catching(
- Activator.getDefault(),
+ Activator.PLUGIN_ID,
IdentityDebugOptions.EXCEPTIONS_CATCHING,
Activator.class, "addNamespaceExtensions", e); //$NON-NLS-1$
} catch (Exception e) {
@@ -232,12 +242,12 @@ public class Activator extends Plugin {
.getExtensionPointUniqueIdentifier(),
null));
org.eclipse.ecf.core.util.Trace.catching(
- Activator.getDefault(),
+ Activator.PLUGIN_ID,
IdentityDebugOptions.EXCEPTIONS_CATCHING,
Activator.class, "addNamespaceExtensions", e); //$NON-NLS-1$
}
}
- org.eclipse.ecf.core.util.Trace.exiting(Activator.getDefault(),
+ org.eclipse.ecf.core.util.Trace.exiting(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, Activator.class,
"addNamespaceExtensions"); //$NON-NLS-1$
}
@@ -265,13 +275,17 @@ public class Activator extends Plugin {
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
- Trace.entering(Activator.getDefault(),
+ Trace.entering(Activator.PLUGIN_ID,
IdentityDebugOptions.METHODS_EXITING, Activator.class, "stop"); //$NON-NLS-1$
IExtensionRegistry reg = getExtensionRegistry();
if (reg != null)
reg.removeRegistryChangeListener(registryManager);
registryManager = null;
plugin = null;
+ if (debugOptionsTracker != null) {
+ debugOptionsTracker.close();
+ debugOptionsTracker = null;
+ }
if (extensionRegistryTracker != null) {
extensionRegistryTracker.close();
extensionRegistryTracker = null;

Back to the top