Package org.eclipse.ecf.core

Examples of org.eclipse.ecf.core.ContainerTypeDescription


    final IContainer base = getContainerFactoryService().createContainer();
    assertNotNull(base);
  }

  public void testCreateBaseContainer1() throws Exception {
    final ContainerTypeDescription desc = getContainerFactoryService()
        .getDescriptionByName(BASE_CONTAINER_TYPE_NAME);
    assertNotNull(desc);
    final IContainer base = getContainerFactoryService().createContainer(
        desc, IDFactory.getDefault().createGUID());
    assertNotNull(base);
View Full Code Here


        BASE_CONTAINER_TYPE_NAME, IDFactory.getDefault().createGUID());
    assertNotNull(base);
  }

  public void testCreateBaseContainer3() throws Exception {
    final ContainerTypeDescription desc = getContainerFactoryService()
        .getDescriptionByName(BASE_CONTAINER_TYPE_NAME);
    assertNotNull(desc);
    final IContainer base = getContainerFactoryService().createContainer(
        desc,
        new Object[] { IDFactory.getDefault().createGUID().getName() });
View Full Code Here

        new Object[] { IDFactory.getDefault().createGUID() });
    assertNotNull(base);
  }

  public void testCreateBaseContainer5() throws Exception {
    final ContainerTypeDescription desc = getContainerFactoryService()
        .getDescriptionByName(BASE_CONTAINER_TYPE_NAME);
    assertNotNull(desc);
    final IContainer base = getContainerFactoryService().createContainer(
        desc, IDFactory.getDefault().createGUID(),
        new Object[] { "param" });
View Full Code Here

        new Object[] { "param" });
    assertNotNull(base);
  }

  public void testContainerTypeDescriptionGetName() {
    final ContainerTypeDescription desc = getContainerFactoryService()
        .getDescriptionByName(CONTAINER_TYPE_NAME);
    assertTrue(desc.getName().equals(CONTAINER_TYPE_NAME));
  }
View Full Code Here

        .getDescriptionByName(CONTAINER_TYPE_NAME);
    assertTrue(desc.getName().equals(CONTAINER_TYPE_NAME));
  }

  public void testContainerTypeDescriptionGetDescription() {
    final ContainerTypeDescription desc = getContainerFactoryService()
        .getDescriptionByName(CONTAINER_TYPE_NAME);
    assertTrue(desc.getDescription().equals(DESCRIPTION));
  }
View Full Code Here

        .getDescriptionByName(CONTAINER_TYPE_NAME);
    assertTrue(desc.getDescription().equals(DESCRIPTION));
  }

  public void testContainerTypeDescriptionGetSupportedAdapterTypes() {
    final ContainerTypeDescription desc = getContainerFactoryService()
        .getDescriptionByName(CONTAINER_TYPE_NAME);
    final String[] adapterTypes = desc.getSupportedAdapterTypes();
    assertTrue(adapterTypes.length > 0);
    assertTrue(Arrays.asList(adapterTypes).contains("one"));
  }
View Full Code Here

    assertTrue(adapterTypes.length > 0);
    assertTrue(Arrays.asList(adapterTypes).contains("one"));
  }

  public void testContainerTypeDescriptionGetSupportedParemeterTypes() {
    final ContainerTypeDescription desc = getContainerFactoryService()
        .getDescriptionByName(CONTAINER_TYPE_NAME);
    final Class[][] parameterTypes = desc.getSupportedParameterTypes();
    assertTrue(parameterTypes.length == 1);
    assertTrue(parameterTypes[0].length == 2);
    assertTrue(parameterTypes[0][0].equals(String.class));
    assertTrue(parameterTypes[0][1].equals(Class.class));
View Full Code Here

  protected IContainerFactory getFixture() {
    return fixture;
  }

  protected ContainerTypeDescription createContainerTypeDescription() {
    return new ContainerTypeDescription(this.getClass().getName(),
        new IContainerInstantiator() {
          public IContainer createInstance(
              ContainerTypeDescription description,
              Object[] parameters)
              throws ContainerCreateException {
View Full Code Here

      Namespace ns = container.getConnectNamespace();
      if (ns != null) {
        interpreter.print("\tConnect namespace: ");
        interpreter.println(ns.getName());
      } else interpreter.println("\tNo connect namespace.");
      ContainerTypeDescription desc = getContainerManager().getContainerTypeDescription(container.getID());
      if (desc != null) printDescription(interpreter, desc);
    }
    interpreter.println("--End Container--");
  }
View Full Code Here

  public void _listfactories(CommandInterpreter interpreter) {
    List descs = getContainerManager().getContainerFactory().getDescriptions();
    if (descs == null || descs.size() == 0) interpreter.println("No factories.");
    for(Iterator i=descs.iterator(); i.hasNext(); ) {
      ContainerTypeDescription desc = (ContainerTypeDescription) i.next();
      printDescription(interpreter, desc);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.core.ContainerTypeDescription

Copyright © 2018 www.massapicom. 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.