diff options
| author | slewis | 2005-01-08 23:35:33 +0000 |
|---|---|---|
| committer | slewis | 2005-01-08 23:35:33 +0000 |
| commit | a844cc1ec4c7cf5cf1ec5f0fc7e62e6ec0a4504d (patch) | |
| tree | 5feec72b397bde0941224c0fe12b416c79d895b3 | |
| parent | 9a4b24c59d736572a3ce83cd790ef675b7708da3 (diff) | |
| download | org.eclipse.ecf-a844cc1ec4c7cf5cf1ec5f0fc7e62e6ec0a4504d.tar.gz org.eclipse.ecf-a844cc1ec4c7cf5cf1ec5f0fc7e62e6ec0a4504d.tar.xz org.eclipse.ecf-a844cc1ec4c7cf5cf1ec5f0fc7e62e6ec0a4504d.zip | |
Added tracing to the ECF plugin initialization. Minor bug fixes, additional tests.
8 files changed, 172 insertions, 133 deletions
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/ProviderPlugin.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/ProviderPlugin.java index 635fd2914..80e8abdea 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/ProviderPlugin.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/ProviderPlugin.java @@ -19,6 +19,7 @@ import java.util.*; * The main plugin class to be used in the desktop. */ public class ProviderPlugin extends Plugin { + public static final String PROVIDERPLUGIN_ID = "org.eclipse.ecf.provider"; //The shared instance. private static ProviderPlugin plugin; //Resource bundle. diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/Trace.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/Trace.java index 2b73c6910..b3dc01d28 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/Trace.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/Trace.java @@ -26,11 +26,10 @@ public class Trace { try { ON = Platform.inDebugMode(); isEclipse = true; - pluginName = ProviderPlugin.getDefault().getBundle() - .getSymbolicName(); + pluginName = ProviderPlugin.PROVIDERPLUGIN_ID; } catch (Exception e) { try { - String val = System.getProperty("org.eclipse.ecf.provider.Trace"); + String val = System.getProperty(ProviderPlugin.PROVIDERPLUGIN_ID+".Trace"); if (val != null) { setTrace(true); isEclipse = false; diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java index 7961bdd17..1c29ff902 100644 --- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java +++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/TCPServerSOContainer.java @@ -33,7 +33,8 @@ public class TCPServerSOContainer extends ServerSOContainer implements // Keep alive value protected int keepAlive; protected TCPServerSOContainerGroup group; - + protected boolean isSingle = false; + protected int getKeepAlive() { return keepAlive; } @@ -56,6 +57,7 @@ public class TCPServerSOContainer extends ServerSOContainer implements URI aURI = new URI(config.getID().getName()); int urlPort = aURI.getPort(); if (group == null) { + isSingle = true; this.group = new TCPServerSOContainerGroup(urlPort); this.group.putOnTheAir(); } else @@ -86,6 +88,9 @@ public class TCPServerSOContainer extends ServerSOContainer implements } if (aURI != null) group.remove(aURI.getPath()); + if (isSingle) { + group.takeOffTheAir(); + } group = null; super.dispose(timeout); } diff --git a/framework/bundles/org.eclipse.ecf/.options b/framework/bundles/org.eclipse.ecf/.options index 5ab3fad6f..4dfc6d96f 100644 --- a/framework/bundles/org.eclipse.ecf/.options +++ b/framework/bundles/org.eclipse.ecf/.options @@ -4,3 +4,4 @@ org.eclipse.ecf/debug/flag = true org.eclipse.ecf/debug/containerfactory = true org.eclipse.ecf/debug/idfactory = true org.eclipse.ecf/debug/connectionfactory = true +org.eclipse.ecf/debug/factoryinit = true
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/SharedObjectActivatedEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/SharedObjectActivatedEvent.java index 3eaffaae8..5487c4a4c 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/SharedObjectActivatedEvent.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/SharedObjectActivatedEvent.java @@ -32,7 +32,7 @@ public class SharedObjectActivatedEvent implements ISharedObjectActivatedEvent { } public ID[] getGroupMemberIDs() { - return groupMemberIDs; + return (groupMemberIDs==null)?new ID[0]:groupMemberIDs; } public String toString() { diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/SharedObjectManagerConnectEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/SharedObjectManagerConnectEvent.java index 618ac2529..9ec62ff70 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/SharedObjectManagerConnectEvent.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/events/SharedObjectManagerConnectEvent.java @@ -34,7 +34,7 @@ public class SharedObjectManagerConnectEvent implements return localContainerID; } public ID[] getSharedObjectReceiverIDs() { - return sharedObjectReceiverIDs; + return (sharedObjectReceiverIDs==null)?new ID[0]:sharedObjectReceiverIDs; } public ID getSharedObjectSenderID() { return sharedObjectSenderID; 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 fc6c6f658..adfd49e9a 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 @@ -6,13 +6,11 @@ * * Contributors: Composent, Inc. - initial API and implementation ******************************************************************************/ - package org.eclipse.ecf.internal.core; import java.lang.reflect.Constructor; import java.util.MissingResourceException; import java.util.ResourceBundle; - import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtension; @@ -35,16 +33,15 @@ import org.eclipse.ecf.core.provider.ISharedObjectContainerInstantiator; import org.osgi.framework.BundleContext; public class ECFPlugin extends Plugin { - + public static final String PLUGIN_ID = "org.eclipse.ecf"; + public static final Trace trace = Trace.create("factoryinit"); public static final String PLUGIN_RESOURCE_BUNDLE = "org.eclipse.ecf.ECFPluginResources"; - public static final String NAMESPACE_EPOINT = "org.eclipse.ecf.namespace"; public static final String INSTANTIATOR_CLASS_ATTRIBUTE = "instantiatorClass"; public static final String INSTANTIATOR_NAME_ATTRIBUTE = "name"; public static final String NAMESPACE_CLASS_ATTRIBUTE = "namespaceClass"; public static final String INSTANTIATOR_DATA_ATTRIBUTE = "description"; public static final String NAMESPACE_DEFAULT_CLASS = "org.eclipse.ecf.core.identity.Namespace"; - public static final String CONTAINER_FACTORY_EPOINT = "org.eclipse.ecf.containerFactory"; public static final String CONTAINER_FACTORY_EPOINT_CLASS_ATTRIBUTE = "class"; public static final String CONTAINER_FACTORY_EPOINT_NAME_ATTRIBUTE = "name"; @@ -53,28 +50,36 @@ public class ECFPlugin extends Plugin { public static final String ARG_TYPE_ATTRIBUTE = "type"; public static final String ARG_VALUE_ATTRIBUTE = "value"; public static final String ARG_NAME_ATTRIBUTE = "name"; - public static final String COMM_FACTORY_EPOINT = "org.eclipse.ecf.connectionFactory"; public static final String COMM_FACTORY_EPOINT_CLASS_ATTRIBUTE = "class"; public static final String COMM_FACTORY_EPOINT_NAME_ATTRIBUTE = "name"; public static final String COMM_FACTORY_EPOINT_DESC_ATTRIBUTE = "description"; - public static final int FACTORY_DOES_NOT_IMPLEMENT_ERRORCODE = 10; public static final int FACTORY_NAME_COLLISION_ERRORCODE = 20; - public static final int INSTANTIATOR_DOES_NOT_IMPLEMENT_ERRORCODE = 30; public static final int INSTANTIATOR_NAME_COLLISION_ERRORCODE = 50; public static final int INSTANTIATOR_NAMESPACE_LOAD_ERRORCODE = 60; - //The shared instance. private static ECFPlugin plugin; //Resource bundle. private ResourceBundle resourceBundle; - BundleContext context = null; - + + private static void debug(String msg) { + if (Trace.ON && trace != null) { + trace.msg(msg); + } + } + + private static void dumpStack(String msg, Throwable e) { + if (Trace.ON && trace != null) { + trace.dumpStack(e, msg); + } + } + public ECFPlugin() { super(); + debug("<init>"); plugin = this; try { resourceBundle = ResourceBundle.getBundle(PLUGIN_RESOURCE_BUNDLE); @@ -82,6 +87,7 @@ public class ECFPlugin extends Plugin { resourceBundle = null; } } + public static void log(IStatus status) { if (status == null) return; @@ -93,7 +99,55 @@ public class ECFPlugin extends Plugin { + status.getMessage()); } } + + class DefaultArgs { + String[] types; + String[] defaults; + String[] names; + + public DefaultArgs(String[] types, String[] defaults, String[] names) { + this.types = types; + this.defaults = defaults; + this.names = names; + } + + public String[] getDefaults() { + return defaults; + } + + public String[] getNames() { + return names; + } + + public String[] getTypes() { + return types; + } + } + + protected DefaultArgs getDefaultArgs(IConfigurationElement[] argElements) { + String[] argTypes = new String[0]; + String[] argDefaults = new String[0]; + String[] argNames = new String[0]; + if (argElements != null) { + if (argElements.length > 0) { + argTypes = new String[argElements.length]; + argDefaults = new String[argElements.length]; + argNames = new String[argElements.length]; + for (int i = 0; i < argElements.length; i++) { + argTypes[i] = argElements[i] + .getAttribute(ARG_TYPE_ATTRIBUTE); + argDefaults[i] = argElements[i] + .getAttribute(ARG_VALUE_ATTRIBUTE); + argNames[i] = argElements[i] + .getAttribute(ARG_NAME_ATTRIBUTE); + } + } + } + return new DefaultArgs(argTypes, argDefaults, argNames); + } + protected void setupContainerExtensionPoint(BundleContext bc) { + debug("setupContainerExtensionPoint(" + bc + ")"); String bundleName = getDefault().getBundle().getSymbolicName(); IExtensionRegistry reg = Platform.getExtensionRegistry(); IExtensionPoint extensionPoint = reg @@ -105,84 +159,57 @@ public class ECFPlugin extends Plugin { .getConfigurationElements(); // For each configuration element for (int m = 0; m < members.length; m++) { + debug("setupContainerExtensionPoint:" + members[m].getName()); IConfigurationElement member = members[m]; // Get the label of the extender plugin and the ID of the extension. IExtension extension = member.getDeclaringExtension(); Object exten = null; + String name = null; try { // The only required attribute is "class" exten = member .createExecutableExtension(CONTAINER_FACTORY_EPOINT_CLASS_ATTRIBUTE); - // Verify that object implements ISharedObjectContainerFactory - if (!(exten instanceof ISharedObjectContainerInstantiator)) { - IStatus s = new Status( - Status.ERROR, - bundleName, - FACTORY_DOES_NOT_IMPLEMENT_ERRORCODE, - getResourceString("ExtPointError.ContainerNoImplPrefix") - + exten.getClass().getName() - + getResourceString("ExtPointError.ContainerNoImplSuffix") - + extension - .getExtensionPointUniqueIdentifier(), - null); - throw new CoreException(s); - } ClassLoader cl = exten.getClass().getClassLoader(); String clazz = exten.getClass().getName(); // Get name and get version, if available - String name = member + name = member .getAttribute(CONTAINER_FACTORY_EPOINT_NAME_ATTRIBUTE); if (name == null) { name = clazz; } - String description = member.getAttribute(CONTAINER_FACTORY_EPOINT_DESC_ATTRIBUTE); + String description = member + .getAttribute(CONTAINER_FACTORY_EPOINT_DESC_ATTRIBUTE); if (description == null) { description = ""; } // Get any arguments - String[] argTypes = new String[0]; - String[] argDefaults = new String[0]; - String[] argNames = new String[0]; - IConfigurationElement [] argElements = member.getChildren(ARG_ELEMENT_NAME); - if (argElements != null) { - if (argElements.length > 0) { - argTypes = new String[argElements.length]; - argDefaults = new String[argElements.length]; - argNames = new String[argElements.length]; - for(int i=0; i < argElements.length; i++) { - argTypes[i] = argElements[i].getAttribute(ARG_TYPE_ATTRIBUTE); - argDefaults[i] = argElements[i].getAttribute(ARG_VALUE_ATTRIBUTE); - argNames[i] = argElements[i].getAttribute(ARG_NAME_ATTRIBUTE); - } - } - } + DefaultArgs defaults = getDefaultArgs(member + .getChildren(ARG_ELEMENT_NAME)); + // Now make description instance SharedObjectContainerDescription scd = new SharedObjectContainerDescription( - name, (ISharedObjectContainerInstantiator) exten, description, argTypes, argDefaults,argNames); + name, (ISharedObjectContainerInstantiator) exten, + description, defaults.getTypes(), defaults + .getDefaults(), defaults.getNames()); + debug("setupContainerExtensionPoint:created description:" + scd); if (SharedObjectContainerFactory.containsDescription(scd)) { - // It's already there...log and throw as we can't use the - // same named factory - IStatus s = new Status( - Status.ERROR, - bundleName, - FACTORY_NAME_COLLISION_ERRORCODE, - getResourceString("ExtPointError.ContainerNameCollisionPrefix") - + name - + getResourceString("ExtPointError.ContainerNameCollisionSuffix") - + extension - .getExtensionPointUniqueIdentifier(), - null); - throw new CoreException(s); + throw new CoreException(getStatusForContException(extension,bundleName,name)); } // Now add the description and we're ready to go. SharedObjectContainerFactory.addDescription(scd); + debug("setupContainerExtensionPoint:added description to factory:" + + scd); } catch (CoreException e) { log(e.getStatus()); + dumpStack("CoreException in setupContainerExtensionPoint", e); + } catch (Exception e) { + log(getStatusForContException(extension, bundleName, name)); + dumpStack("Exception in setupContainerExtensionPoint", e); } } - } protected void setupIdentityExtensionPoint(BundleContext context) { + debug("setupIdentityExtensionPoint(" + context + ")"); String bundleName = getDefault().getBundle().getSymbolicName(); // Process extension points IExtensionRegistry reg = Platform.getExtensionRegistry(); @@ -195,17 +222,19 @@ public class ECFPlugin extends Plugin { .getConfigurationElements(); // For each service: for (int m = 0; m < members.length; m++) { + debug("setupIdentityExtensionPoint:" + members[m].getName()); IConfigurationElement member = members[m]; // Get the label of the extender plugin and the ID of the // extension. IExtension extension = member.getDeclaringExtension(); + String nsName = null; try { String nsInstantiatorClass = member .getAttribute(INSTANTIATOR_CLASS_ATTRIBUTE); if (nsInstantiatorClass == null) { throw new CoreException(null); } - String nsName = member + nsName = member .getAttribute(INSTANTIATOR_NAME_ATTRIBUTE); if (nsName == null) { nsName = nsInstantiatorClass; @@ -221,19 +250,6 @@ public class ECFPlugin extends Plugin { Object obj = member .createExecutableExtension(INSTANTIATOR_CLASS_ATTRIBUTE); // Verify that object implements IDInstantiator - if (!(obj instanceof IDInstantiator)) { - IStatus s = new Status( - Status.ERROR, - bundleName, - INSTANTIATOR_DOES_NOT_IMPLEMENT_ERRORCODE, - getResourceString("ExtPointError.IDNoImplPrefix") - + obj.getClass().getName() - + getResourceString("ExtPointError.IDNoImplSuffix") - + extension - .getExtensionPointUniqueIdentifier(), - null); - throw new CoreException(s); - } ClassLoader loader = obj.getClass().getClassLoader(); Namespace ns = null; try { @@ -256,31 +272,26 @@ public class ECFPlugin extends Plugin { e); throw new CoreException(s); } + debug("setupIdentityExtensionPoint:created namespace:" + ns); if (IDFactory.containsNamespace(ns)) { - // It's already there...log and throw as we can't use the - // same named factory - IStatus s = new Status( - Status.ERROR, - bundleName, - INSTANTIATOR_NAME_COLLISION_ERRORCODE, - getResourceString("ExtPointError.IDNameCollisionPrefix") - + nsName - + getResourceString("ExtPointError.IDNameCollisionSuffix") - + extension - .getExtensionPointUniqueIdentifier(), - null); - throw new CoreException(s); + throw new CoreException(getStatusForIDException(extension,bundleName,nsName)); } // Now add to known namespaces IDFactory.addNamespace(ns); + debug("setupIdentityExtensionPoint:added namespace to factory:" + + ns); } catch (CoreException e) { log(e.getStatus()); + dumpStack("Exception in setupIdentityExtensionPoint", e); + } catch (Exception e) { + log(getStatusForIDException(extension,bundleName,nsName)); + dumpStack("Exception in setupIdentityExtensionPoint",e); } } - } protected void setupCommExtensionPoint(BundleContext bc) { + debug("setupCommExtensionPoint(" + bc + ")"); String bundleName = getDefault().getBundle().getSymbolicName(); IExtensionRegistry reg = Platform.getExtensionRegistry(); IExtensionPoint extensionPoint = reg @@ -292,59 +303,39 @@ public class ECFPlugin extends Plugin { .getConfigurationElements(); // For each configuration element for (int m = 0; m < members.length; m++) { + debug("setupCommExtensionPoint:" + members[m].getName()); IConfigurationElement member = members[m]; // Get the label of the extender plugin and the ID of the extension. IExtension extension = member.getDeclaringExtension(); Object exten = null; + String name = null; try { // The only required attribute is "instantiatorClass" exten = member .createExecutableExtension(COMM_FACTORY_EPOINT_CLASS_ATTRIBUTE); - // Verify that object implements ISynchAsynchConnectionInstantiator - if (!(exten instanceof ISynchAsynchConnectionInstantiator)) { - IStatus s = new Status( - Status.ERROR, - bundleName, - FACTORY_DOES_NOT_IMPLEMENT_ERRORCODE, - getResourceString("ExtPointError.CommNoImplPrefix") - + exten.getClass().getName() - + getResourceString("ExtPointError.CommNoImplSuffix") - + extension - .getExtensionPointUniqueIdentifier(), - null); - throw new CoreException(s); - } + // Verify that object implements + // ISynchAsynchConnectionInstantiator ClassLoader cl = exten.getClass().getClassLoader(); String clazz = exten.getClass().getName(); // Get name and get version, if available - String name = member - .getAttribute(COMM_FACTORY_EPOINT_NAME_ATTRIBUTE); + name = member.getAttribute(COMM_FACTORY_EPOINT_NAME_ATTRIBUTE); if (name == null) { name = clazz; } - String description = member.getAttribute(COMM_FACTORY_EPOINT_DESC_ATTRIBUTE); + String description = member + .getAttribute(COMM_FACTORY_EPOINT_DESC_ATTRIBUTE); if (description == null) { description = ""; } // Get any arguments - String[] argTypes = new String[0]; - String[] argDefaults = new String[0]; - String[] argNames = new String[0]; - IConfigurationElement [] argElements = member.getChildren(ARG_ELEMENT_NAME); - if (argElements != null) { - if (argElements.length > 0) { - argTypes = new String[argElements.length]; - argDefaults = new String[argElements.length]; - argNames = new String[argElements.length]; - for(int i=0; i < argElements.length; i++) { - argTypes[i] = argElements[i].getAttribute(ARG_TYPE_ATTRIBUTE); - argDefaults[i] = argElements[i].getAttribute(ARG_VALUE_ATTRIBUTE); - argNames[i] = argElements[i].getAttribute(ARG_NAME_ATTRIBUTE); - } - } - } - ConnectionDescription cd = new ConnectionDescription( - name, (ISynchAsynchConnectionInstantiator) exten, description,argTypes,argDefaults,argNames); + // Get any arguments + DefaultArgs defaults = getDefaultArgs(member + .getChildren(ARG_ELEMENT_NAME)); + ConnectionDescription cd = new ConnectionDescription(name, + (ISynchAsynchConnectionInstantiator) exten, + description, defaults.getTypes(), defaults + .getDefaults(), defaults.getNames()); + debug("setupCommExtensionPoint:created description:" + cd); if (ConnectionFactory.containsDescription(cd)) { // It's already there...log and throw as we can't use the // same named factory @@ -358,17 +349,61 @@ public class ECFPlugin extends Plugin { + extension .getExtensionPointUniqueIdentifier(), null); - throw new CoreException(s); + throw new CoreException(getStatusForCommException( + extension, bundleName, name)); } // Now add the description and we're ready to go. ConnectionFactory.addDescription(cd); + debug("setupCommExtensionPoint:added description to factory:" + + cd); } catch (CoreException e) { log(e.getStatus()); + dumpStack("CoreException in setupCommExtensionPoint", e); + } catch (Exception e) { + log(getStatusForCommException(extension, bundleName, name)); + dumpStack("Exception in setupCommExtensionPoint", e); } } + } + protected IStatus getStatusForCommException(IExtension ext, + String bundleName, String name) { + IStatus s = new Status( + Status.ERROR, + bundleName, + FACTORY_NAME_COLLISION_ERRORCODE, + getResourceString("ExtPointError.CommNameCollisionPrefix") + + name + + getResourceString("ExtPointError.CommNameCollisionSuffix") + + ext.getExtensionPointUniqueIdentifier(), null); + return s; } + protected IStatus getStatusForContException(IExtension ext, + String bundleName, String name) { + IStatus s = new Status( + Status.ERROR, + bundleName, + FACTORY_NAME_COLLISION_ERRORCODE, + getResourceString("ExtPointError.ContainerNameCollisionPrefix") + + name + + getResourceString("ExtPointError.ContainerNameCollisionSuffix") + + ext.getExtensionPointUniqueIdentifier(), null); + return s; + } + + protected IStatus getStatusForIDException(IExtension ext, + String bundleName, String name) { + IStatus s = new Status( + Status.ERROR, + bundleName, + FACTORY_NAME_COLLISION_ERRORCODE, + getResourceString("ExtPointError.CommNameCollisionPrefix") + + name + + getResourceString("ExtPointError.CommNameCollisionSuffix") + + ext.getExtensionPointUniqueIdentifier(), null); + return s; + } /** * This method is called upon plug-in activation @@ -388,7 +423,7 @@ public class ECFPlugin extends Plugin { super.stop(context); this.context = null; } - + public BundleContext getBundleContext() { return context; } @@ -419,5 +454,4 @@ public class ECFPlugin extends Plugin { public ResourceBundle getResourceBundle() { return resourceBundle; } - }
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Trace.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Trace.java index 877f997eb..88f0a36f5 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Trace.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Trace.java @@ -26,11 +26,10 @@ public class Trace { try { ON = Platform.inDebugMode(); isEclipse = true; - pluginName = ECFPlugin.getDefault().getBundle() - .getSymbolicName(); + pluginName = ECFPlugin.PLUGIN_ID; } catch (Exception e) { try { - String val = System.getProperty("org.eclipse.ecf.core.internal.Trace"); + String val = System.getProperty(ECFPlugin.PLUGIN_ID+".Trace"); if (val != null) { setTrace(true); isEclipse = false; |
