Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF2
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java95
-rw-r--r--framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF2
-rw-r--r--framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java28
-rw-r--r--framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java65
5 files changed, 107 insertions, 85 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
index 8da653d21..6437ba562 100644
--- a/framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
+++ b/framework/bundles/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.identity;singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.core.identity.Activator
Bundle-Localization: plugin
Bundle-Vendor: %plugin.provider
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 a2f6459e8..c2443fdf0 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
@@ -21,6 +21,31 @@ import org.eclipse.osgi.service.debug.DebugOptions;
public class Trace {
/**
+ * @since 3.6
+ */
+ public static final boolean TRACEALL = new Boolean(System.getProperty(
+ "org.eclipse.ecf.core.util.traceAll", "false"));
+
+ private static final List<String> TRACE_PLUGINS = new ArrayList<String>();
+
+ static {
+ if (!TRACEALL) {
+ String tracePlugins = System
+ .getProperty("org.eclipse.ecf.core.util.tracePlugins");
+ if (tracePlugins != null)
+ try {
+ String[] plugins = tracePlugins.split(",");
+ for (String s : plugins)
+ TRACE_PLUGINS.add(s);
+ } catch (Exception e) {
+ System.err
+ .println("Unexpected exception in Trace class static initializer");
+ e.printStackTrace(System.err);
+ }
+ }
+ }
+
+ /**
* private constructor for the static class.
*/
private Trace() {
@@ -120,7 +145,14 @@ public class Trace {
/**
* The cached debug options (for optimization).
*/
- private static final Map cachedOptions = new HashMap();
+ private static final Map<String, Boolean> cachedOptions = new HashMap<String, Boolean>();
+
+ private static boolean tracePluginsStartsWith(String option) {
+ for (String s : TRACE_PLUGINS)
+ if (option.startsWith(s))
+ return true;
+ return false;
+ }
/**
* Retrieves a Boolean value indicating whether tracing is enabled for the
@@ -133,12 +165,19 @@ public class Trace {
*
*/
protected static boolean shouldTrace(String pluginId) {
- return shouldTrace0(pluginId + "/debug"); //$NON-NLS-1$
+ if (TRACEALL)
+ return true;
+ else if (TRACE_PLUGINS.contains(pluginId))
+ return true;
+ else
+ return shouldTrace0(pluginId + "/debug"); //$NON-NLS-1$
}
protected static boolean shouldTrace0(String option) {
if (option == null)
return false;
+ if (TRACEALL || tracePluginsStartsWith(option))
+ return true;
Activator activator = Activator.getDefault();
if (activator == null)
return false;
@@ -167,9 +206,9 @@ public class Trace {
Boolean value = null;
synchronized (cachedOptions) {
- value = (Boolean) cachedOptions.get(option);
+ value = cachedOptions.get(option);
if (null == value) {
- value = shouldTrace0(option) ? Boolean.TRUE : Boolean.FALSE;
+ value = shouldTrace0(option);
cachedOptions.put(option, value);
}
}
@@ -305,8 +344,9 @@ public class Trace {
* The message to be traced.
*
*/
- public static void trace(String pluginId, String option, Class clazz,
- String methodName, String message) {
+ public static void trace(String pluginId, String option,
+ @SuppressWarnings("rawtypes") Class clazz, String methodName,
+ String message) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_TRACING).append(clazz
.getName());
@@ -362,9 +402,9 @@ public class Trace {
* @param newValue
* The new value.
*/
- public static void changing(String pluginId, String option, Class clazz,
- String methodName, String valueDescription, Object oldValue,
- Object newValue) {
+ public static void changing(String pluginId, String option,
+ @SuppressWarnings("rawtypes") Class clazz, String methodName,
+ String valueDescription, Object oldValue, Object newValue) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
buf.append(valueDescription).append(SEPARATOR_SPACE)
@@ -395,8 +435,9 @@ public class Trace {
* The throwable that is being caught.
*
*/
- public static void catching(String pluginId, String option, Class clazz,
- String methodName, Throwable throwable) {
+ public static void catching(String pluginId, String option,
+ @SuppressWarnings("rawtypes") Class clazz, String methodName,
+ Throwable throwable) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_CATCHING);
@@ -409,8 +450,8 @@ public class Trace {
.append(SEPARATOR_METHOD);
buf.append(methodName).append(PARENTHESIS_CLOSE);
trace(buf.toString());
- if(throwable != null) {
- throwable.printStackTrace(System.err);
+ if (throwable != null) {
+ throwable.printStackTrace(System.err);
}
}
}
@@ -432,8 +473,9 @@ public class Trace {
* The throwable that is being thrown.
*
*/
- public static void throwing(String pluginId, String option, Class clazz,
- String methodName, Throwable throwable) {
+ public static void throwing(String pluginId, String option,
+ @SuppressWarnings("rawtypes") Class clazz, String methodName,
+ Throwable throwable) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_THROWING);
@@ -463,8 +505,8 @@ public class Trace {
* The name of method that is being entered.
*
*/
- public static void entering(String pluginId, String option, Class clazz,
- String methodName) {
+ public static void entering(String pluginId, String option,
+ @SuppressWarnings("rawtypes") Class clazz, String methodName) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
@@ -491,8 +533,9 @@ public class Trace {
* The parameter to the method being entered.
*
*/
- public static void entering(String pluginId, String option, Class clazz,
- String methodName, Object parameter) {
+ public static void entering(String pluginId, String option,
+ @SuppressWarnings("rawtypes") Class clazz, String methodName,
+ Object parameter) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
@@ -521,8 +564,9 @@ public class Trace {
* The parameters to the method being entered.
*
*/
- public static void entering(String pluginId, String option, Class clazz,
- String methodName, Object[] parameters) {
+ public static void entering(String pluginId, String option,
+ @SuppressWarnings("rawtypes") Class clazz, String methodName,
+ Object[] parameters) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
@@ -548,8 +592,8 @@ public class Trace {
* The name of method that is being exited.
*
*/
- public static void exiting(String pluginId, String option, Class clazz,
- String methodName) {
+ public static void exiting(String pluginId, String option,
+ @SuppressWarnings("rawtypes") Class clazz, String methodName) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz
@@ -575,8 +619,9 @@ public class Trace {
* The return value of the method being exited.
*
*/
- public static void exiting(String pluginId, String option, Class clazz,
- String methodName, Object returnValue) {
+ public static void exiting(String pluginId, String option,
+ @SuppressWarnings("rawtypes") Class clazz, String methodName,
+ Object returnValue) {
if (shouldTrace(pluginId, option)) {
StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz
diff --git a/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF
index 782721361..db200bea5 100644
--- a/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF
+++ b/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf;singleton:=true
-Bundle-Version: 3.4.0.qualifier
+Bundle-Version: 3.5.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.core.ECFPlugin
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java
index 96555812e..1797fd1c9 100644
--- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java
+++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java
@@ -157,15 +157,13 @@ public class ContainerTypeDescription {
* returned if no adapters are supported.
*/
public String[] getSupportedAdapterTypes() {
- String method = "getSupportedAdapterTypes"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
String[] result = new String[0];
try {
String[] r = getInstantiator().getSupportedAdapterTypes(this);
if (r != null)
result = r;
} catch (Exception e) {
- traceAndLogException(IStatus.ERROR, method, e);
+ traceAndLogException(IStatus.ERROR, "getSupportedAdapterTypes", e); //$NON-NLS-1$
}
List resultList = new ArrayList();
for (int i = 0; i < result.length; i++) {
@@ -173,7 +171,6 @@ public class ContainerTypeDescription {
}
if (!resultList.contains(IContainer.class.getName()))
resultList.add(IContainer.class.getName());
- Trace.exiting(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_EXITING, this.getClass(), method, result);
return (String[]) resultList.toArray(new String[] {});
}
@@ -202,17 +199,14 @@ public class ContainerTypeDescription {
* array will be returned
*/
public Class[][] getSupportedParameterTypes() {
- String method = "getParameterTypes"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
- Class[][] result = new Class[0][0];
+ Class[][] result = {{}};
try {
Class[][] r = getInstantiator().getSupportedParameterTypes(this);
if (r != null)
result = r;
} catch (Exception e) {
- traceAndLogException(IStatus.ERROR, method, e);
+ traceAndLogException(IStatus.ERROR, "getSupportedParameterTypes", e); //$NON-NLS-1$
}
- Trace.exiting(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_EXITING, this.getClass(), method, result);
return result;
}
@@ -222,13 +216,11 @@ public class ContainerTypeDescription {
* @since 3.0
*/
public String[] getSupportedIntents() {
- String method = "getSupportedIntents"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
try {
IContainerInstantiator ci = getInstantiator();
return (ci instanceof IRemoteServiceContainerInstantiator) ? ((IRemoteServiceContainerInstantiator) ci).getSupportedIntents(this) : null;
} catch (Exception e) {
- traceAndLogException(IStatus.ERROR, method, e);
+ traceAndLogException(IStatus.ERROR, "getSupportedIntents", e); //$NON-NLS-1$
return null;
}
}
@@ -237,13 +229,11 @@ public class ContainerTypeDescription {
* @since 3.1
*/
public String[] getSupportedConfigs() {
- String method = "getSupportedConfigs"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
try {
IContainerInstantiator ci = getInstantiator();
return (ci instanceof IRemoteServiceContainerInstantiator) ? ((IRemoteServiceContainerInstantiator) ci).getSupportedConfigs(this) : null;
} catch (Exception e) {
- traceAndLogException(IStatus.ERROR, method, e);
+ traceAndLogException(IStatus.ERROR, "getSupportedConfigs", e); //$NON-NLS-1$
return null;
}
}
@@ -252,15 +242,13 @@ public class ContainerTypeDescription {
* @since 3.1
*/
public String[] getImportedConfigs(String[] exporterSupportedConfigs) {
- String method = "getImportedConfigs"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
if (exporterSupportedConfigs == null)
return null;
try {
IContainerInstantiator ci = getInstantiator();
return (ci instanceof IRemoteServiceContainerInstantiator) ? ((IRemoteServiceContainerInstantiator) ci).getImportedConfigs(this, exporterSupportedConfigs) : null;
} catch (Exception e) {
- traceAndLogException(IStatus.ERROR, method, e);
+ traceAndLogException(IStatus.ERROR, "getImportedConfigs", e); //$NON-NLS-1$
return null;
}
}
@@ -269,15 +257,13 @@ public class ContainerTypeDescription {
* @since 3.1
*/
public Dictionary getPropertiesForImportedConfigs(String[] importedConfigs, Dictionary exportedProperties) {
- String method = "getPropertiesForImportedConfigs"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
if (importedConfigs == null)
return null;
try {
IContainerInstantiator ci = getInstantiator();
return (ci instanceof IRemoteServiceContainerInstantiator) ? ((IRemoteServiceContainerInstantiator) ci).getPropertiesForImportedConfigs(this, importedConfigs, exportedProperties) : null;
} catch (Exception e) {
- traceAndLogException(IStatus.ERROR, method, e);
+ traceAndLogException(IStatus.ERROR, "getPropertiesForImportedConfigs", e); //$NON-NLS-1$
return null;
}
}
diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java
index 151df0d31..9002f78fc 100644
--- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java
+++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java
@@ -114,7 +114,7 @@ public class ECFPlugin implements BundleActivator {
} catch (ClassNotFoundException e) {
// will occur if fragment is not installed or not on proper execution environment
} catch (Throwable t) {
- log(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), "Unexpected Error in ECFPlugin.start", t)); //$NON-NLS-1$
+ log(new Status(IStatus.ERROR, PLUGIN_ID, "Unexpected Error in ECFPlugin.start", t)); //$NON-NLS-1$
}
// initialize from ContainerTypeDescription services
@@ -191,9 +191,8 @@ public class ECFPlugin implements BundleActivator {
protected void runWithRegistry(IExtensionRegistry registry) throws Exception {
if (registry != null) {
final IExtensionPoint extensionPoint = registry.getExtensionPoint(START_EPOINT);
- if (extensionPoint == null) {
+ if (extensionPoint == null)
return;
- }
IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements();
final String method = "runStartExtensions"; //$NON-NLS-1$
// For each configuration element
@@ -209,8 +208,7 @@ public class ECFPlugin implements BundleActivator {
try {
result = clazz.run(new NullProgressMonitor());
} catch (final Throwable e) {
- final String message = "startup extension error"; //$NON-NLS-1$
- logException(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, message, e), message, e);
+ logException(method, "startup extension error", e); //$NON-NLS-1$
}
if (result != null && !result.isOK())
logException(result, result.getMessage(), result.getException());
@@ -221,7 +219,7 @@ public class ECFPlugin implements BundleActivator {
} catch (final CoreException e) {
logException(e.getStatus(), method, e);
} catch (final Exception e) {
- logException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, "Unknown start exception", e), method, e); //$NON-NLS-1$
+ logException(method, "Unknown start exception", e); //$NON-NLS-1$
}
}
}
@@ -339,9 +337,14 @@ public class ECFPlugin implements BundleActivator {
logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException());
}
- protected void logException(IStatus status, String method, Throwable exception) {
+ protected void logException(String method, String message, Throwable exception) {
+ log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, message, exception));
+ Trace.catching(PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_CATCHING, ECFPlugin.class, method, exception);
+ }
+
+ protected void logException(IStatus status, String methodName, Throwable exception) {
log(status);
- Trace.catching(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_CATCHING, ECFPlugin.class, method, exception);
+ Trace.catching(status.getPlugin(), ECFDebugOptions.EXCEPTIONS_CATCHING, ECFPlugin.class, methodName, exception);
}
/**
@@ -351,37 +354,33 @@ public class ECFPlugin implements BundleActivator {
* the members to remove
*/
protected void removeContainerFactoryExtensions(IConfigurationElement[] members) {
- final String method = "removeContainerFactoryExtensions"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
// For each configuration element
for (int m = 0; m < members.length; m++) {
final IConfigurationElement member = members[m];
- // Get the label of the extender plugin and the ID of the extension.
- final IExtension extension = member.getDeclaringExtension();
String name = null;
try {
// Get name and get version, if available
name = member.getAttribute(NAME_ATTRIBUTE);
- if (name == null) {
+ if (name == null)
name = member.getAttribute(CLASS_ATTRIBUTE);
- }
final IContainerFactory factory = ContainerFactory.getDefault();
final ContainerTypeDescription cd = factory.getDescriptionByName(name);
- if (cd == null || !factory.containsDescription(cd)) {
+ if (cd == null || !factory.containsDescription(cd))
continue;
- }
// remove
factory.removeDescription(cd);
- Trace.trace(ECFPlugin.PLUGIN_ID, ECFDebugOptions.DEBUG, method + ".removed " + cd + " from factory"); //$NON-NLS-1$ //$NON-NLS-2$
+ trace("removeContainerFactoryExtensions", "Removed ContainerTypeDescription=" + cd); //$NON-NLS-1$ //$NON-NLS-2$
} catch (final Exception e) {
- logException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, "ECF container factory with name=" + name + " already found. Ignoring registration for containerFactory extension point=" + extension.getExtensionPointUniqueIdentifier(), null), method, e); //$NON-NLS-1$//$NON-NLS-2$
+ logException("removeContainerFactoryExtensions", "Unexpected exception", e); //$NON-NLS-1$//$NON-NLS-2$
}
}
}
+ private void trace(String method, String message) {
+ Trace.trace(PLUGIN_ID, ECFDebugOptions.DEBUG, "TRACING " + ECFPlugin.class.getName() + "#" + method + " " + message); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ }
+
void removeContainerExtensions(IConfigurationElement[] members) {
- final String method = "removeContainerExtensions"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
// For each configuration element
for (int m = 0; m < members.length; m++) {
final IConfigurationElement member = members[m];
@@ -402,7 +401,7 @@ public class ECFPlugin implements BundleActivator {
try {
containers[i].dispose();
} catch (Exception e) {
- logException(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Unexpected exception disposing container with factoryName=" + factoryName + " and id=" + containers[i].getID(), null), method, e); //$NON-NLS-1$ //$NON-NLS-2$
+ logException("removeContainerException", "Unexpected exception disposing container id=" + containers[i].getID(), e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -417,14 +416,10 @@ public class ECFPlugin implements BundleActivator {
* to add
*/
protected void addContainerFactoryExtensions(IConfigurationElement[] members) {
- final String method = "addContainerFactoryExtensions"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
final IContainerFactory factory = ContainerFactory.getDefault();
// For each configuration element
for (int m = 0; m < members.length; m++) {
final IConfigurationElement member = members[m];
- // Get the label of the extender plugin and the ID of the extension.
- final IExtension extension = member.getDeclaringExtension();
Object exten = null;
String name = null;
try {
@@ -444,15 +439,13 @@ public class ECFPlugin implements BundleActivator {
exten = member.createExecutableExtension(CLASS_ATTRIBUTE);
final String clazz = exten.getClass().getName();
- if (name == null) {
+ if (name == null)
name = clazz;
- }
// Get description, if present
String description = member.getAttribute(DESCRIPTION_ATTRIBUTE);
- if (description == null) {
+ if (description == null)
description = ""; //$NON-NLS-1$
- }
String s = member.getAttribute(SERVER_ATTRIBUTE);
final boolean server = (s == null) ? false : Boolean.valueOf(s).booleanValue();
@@ -468,18 +461,16 @@ public class ECFPlugin implements BundleActivator {
}
// Now add the description and we're ready to go.
factory.addDescription(scd);
- Trace.trace(ECFPlugin.PLUGIN_ID, ECFDebugOptions.DEBUG, method + ".added " + scd + " to factory " + factory); //$NON-NLS-1$ //$NON-NLS-2$
+ trace("addContainerFactoryDescription", "added ContainerTypeDescription=" + scd); //$NON-NLS-1$ //$NON-NLS-2$
} catch (final CoreException e) {
- logException(e.getStatus(), method, e);
+ logException(e.getStatus(), "addContainerFactoryExtension", e); //$NON-NLS-1$
} catch (final Exception e) {
- logException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, "ECF container factory with name=" + name + " already found. Ignoring registration for containerFactory extension point=" + extension.getExtensionPointUniqueIdentifier(), null), method, e); //$NON-NLS-1$ //$NON-NLS-2$
+ logException("addContainerFactoryExtension", "Unexpected error", e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
void addContainerExtensions(IConfigurationElement[] members) {
- final String method = "addContainerExtensions"; //$NON-NLS-1$
- Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
// For each configuration element
for (int m = 0; m < members.length; m++) {
final IConfigurationElement member = members[m];
@@ -495,11 +486,11 @@ public class ECFPlugin implements BundleActivator {
id = (id == null || "".equals(id)) ? null : id; //$NON-NLS-1$
Map parameters = getParametersForContainer(member);
ContainerFactory.getDefault().createContainer(factory, id, parameters);
- Trace.trace(ECFPlugin.PLUGIN_ID, ECFDebugOptions.DEBUG, method + ".added container with factoryName=" + factory + " and id=" + id); //$NON-NLS-1$ //$NON-NLS-2$
+ trace("addContainerExtensions", "Created container with id=" + id); //$NON-NLS-1$ //$NON-NLS-2$
} catch (final CoreException e) {
- logException(e.getStatus(), method, e);
+ logException(e.getStatus(), "addContainerExtensions", e); //$NON-NLS-1$
} catch (final Exception e) {
- logException(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Unexpected exception creating container with factoryName=" + factory + " and id=" + id, null), method, e); //$NON-NLS-1$ //$NON-NLS-2$
+ logException("addContainerExtensions", "Exception creating container with id=" + id, null); //$NON-NLS-1$//$NON-NLS-2$
}
}
}

Back to the top