Examples of ISharedObjectInstantiator


Examples of org.eclipse.ecf.core.sharedobject.provider.ISharedObjectInstantiator

    // For each configuration element
    for (int m = 0; m < members.length; m++) {
      IConfigurationElement member = members[m];
      // Get the label of the extender plugin and the ID of the extension.
      IExtension extension = member.getDeclaringExtension();
      ISharedObjectInstantiator exten = null;
      String name = null;
      try {
        // The only required attribute is "class"
        exten = (ISharedObjectInstantiator) member.createExecutableExtension(CLASS_ATTRIBUTE);
        name = member.getAttribute(NAME_ATTRIBUTE);
View Full Code Here

Examples of org.eclipse.ecf.core.sharedobject.provider.ISharedObjectInstantiator

      throw new SharedObjectCreateException("SharedObjectTypeDescription cannot be null"); //$NON-NLS-1$
    SharedObjectTypeDescription cd = getDescription0(desc);
    if (cd == null)
      //throw new SharedObjectCreateException(Messages.SharedObjectFactory_Exception_Create_Shared_Objec + desc.getName() + Messages.SharedObjectFactory_Exception_Create_Shared_Object_Not_Found);
      throw new SharedObjectCreateException("SharedObjectDescription named " + desc.getName() + " not found"); //$NON-NLS-1$ //$NON-NLS-2$
    ISharedObjectInstantiator instantiator = null;
    try {
      instantiator = cd.getInstantiator();
    } catch (Exception e) {
      SharedObjectCreateException newexcept = new SharedObjectCreateException("createSharedObject exception with description" + desc, //$NON-NLS-1$
          e);
      dumpStack("Exception in createSharedObject", newexcept); //$NON-NLS-1$
      throw newexcept;
    }
    if (instantiator == null)
      //throw new SharedObjectCreateException(Messages.SharedObjectFactory_Exception_Create_Instantiator + cd.getName() + Messages.SharedObjectFactory_Exception_Create_Instantiator_Null);
      throw new SharedObjectCreateException("Instantiator for SharedObjectDescription " + cd.getName() + " is null"); //$NON-NLS-1$ //$NON-NLS-2$
    // Ask instantiator to actually create instance
    return instantiator.createInstance(desc, args);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.