Examples of SimpleReference


Examples of org.eclipse.dltk.ast.references.SimpleReference

      Token token = (Token) eachTO;
      type = token.getText();
      declBounds = getBounds(eachName, token);
    }
    int nameBounds[] = getBounds(eachName);
    SimpleReference ref = new SimpleReference(nameBounds[0], nameBounds[1], eachName.getText());
    return new RutaFeatureDeclaration(eachName.getText(), type, nameBounds[0], nameBounds[1],
            declBounds[0], declBounds[1], ref);
  }
View Full Code Here

Examples of org.eclipse.dltk.ast.references.SimpleReference

    @Override
    public boolean visit(Statement s) throws Exception {
      if (s instanceof RutaImportStatement) {
        // handle engine imports
        if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_ENGINE) {
          SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();
          importEngine(sRef.getName());
        }
        // handle script imports
        if (((RutaImportStatement) s).getType() == RutaStatementConstants.S_IMPORT_SCRIPT) {
          importScript(s);
        }
View Full Code Here

Examples of org.eclipse.dltk.ast.references.SimpleReference

          if (impFields.containsKey(name)) {
            results.add(impFields.get(name));
          }
        }
        if (s.getKind() == RutaActionConstants.A_CALL) {
          SimpleReference sr = (SimpleReference) s.getChilds().get(0);
          if (sr != null) {
            String name = sr.getName();
            if (engines.contains(name)) {
              // referenceEngineCall(name);
            } else if (scripts.containsKey(name)) {
              findImportedDeclaration(name, results, IMethod.class);
            } else {
View Full Code Here

Examples of org.eclipse.dltk.ast.references.SimpleReference

    /**
     * @param s
     * @throws ModelException
     */
    private void importScript(Statement s) throws ModelException {
      SimpleReference sRef = (SimpleReference) ((RutaImportStatement) s).getExpression();
      String sRefName = sRef.getName();
      importScript(sRefName);
    }
View Full Code Here

Examples of org.picocontainer.defaults.SimpleReference

    }

    final public void testRES_failingVerificationWithCyclicDependencyException() {
        if ((getComponentAdapterNature() & RESOLVING) > 0) {
            final Set cycleInstances = new HashSet();
            final ObjectReference cycleCheck = new SimpleReference();
            final Object[] wrapperDependencies = new Object[]{cycleInstances, cycleCheck};
            final MutablePicoContainer picoContainer = new DefaultPicoContainer(createDefaultComponentAdapterFactory());
            final ComponentAdapter componentAdapter = prepRES_failingVerificationWithCyclicDependencyException(picoContainer);
            assertSame(getComponentAdapterType(), componentAdapter.getClass());
            assertTrue(picoContainer.getComponentAdapters().contains(componentAdapter));
View Full Code Here

Examples of org.picocontainer.defaults.SimpleReference

    }

    final public void testRES_failingInstantiationWithCyclicDependencyException() {
        if ((getComponentAdapterNature() & RESOLVING) > 0) {
            final Set cycleInstances = new HashSet();
            final ObjectReference cycleCheck = new SimpleReference();
            final Object[] wrapperDependencies = new Object[]{cycleInstances, cycleCheck};
            final MutablePicoContainer picoContainer = new DefaultPicoContainer(createDefaultComponentAdapterFactory());
            final ComponentAdapter componentAdapter = prepRES_failingInstantiationWithCyclicDependencyException(picoContainer);
            assertSame(getComponentAdapterType(), componentAdapter.getClass());
            assertTrue(picoContainer.getComponentAdapters().contains(componentAdapter));
View Full Code Here

Examples of org.picocontainer.defaults.SimpleReference

    public ObjectReference deploy(FileObject applicationFolder, ClassLoader parentClassLoader, ObjectReference parentContainerRef) throws FileSystemException, ClassNotFoundException {
        ClassLoader applicationClassLoader = new VFSClassLoader(applicationFolder, fileSystemManager, parentClassLoader);

        FileObject deploymentScript = getDeploymentScript(applicationFolder);

        ObjectReference result = new SimpleReference();

        String extension = "." + deploymentScript.getName().getExtension();
        Reader scriptReader = new InputStreamReader(deploymentScript.getContent().getInputStream());
        String builderClassName = ScriptedContainerBuilderFactory.getBuilderClassName(extension);
View Full Code Here

Examples of org.picocontainer.defaults.SimpleReference

                container.registerComponentInstance(childStartable.proxy());
            }
        };
        LifecycleContainerBuilder builder = new DefaultLifecycleContainerBuilder(containerComposer);

        ObjectReference parentRef = new SimpleReference();
        MutablePicoContainer parent = new DefaultPicoContainer();

        Mock parentStartable = mock(Startable.class);
        parent.registerComponentInstance(parentStartable.proxy());
        parentRef.set(parent);

        ObjectReference childRef = new SimpleReference();

        builder.buildContainer(childRef, parentRef, null, true);
        PicoContainer childContainer = (PicoContainer) childRef.get();
        //PicoContainer.getParent() is now ImmutablePicoContainer
        assertNotSame(parent, childContainer.getParent());

        builder.killContainer(childRef);
    }
View Full Code Here

Examples of org.picocontainer.defaults.SimpleReference

        buildContainer(scriptedContainerBuilderFactory, nowait, quiet);
    }


    private static void buildContainer(final ScriptedContainerBuilderFactory scriptedContainerBuilderFactory, boolean nowait, final boolean quiet) {
        final ObjectReference containerRef = new SimpleReference();
        scriptedContainerBuilderFactory.getContainerBuilder().buildContainer(containerRef, null, null, true);

        if (nowait == false) {
            setShutdownHook(quiet, scriptedContainerBuilderFactory, containerRef);
        } else {
View Full Code Here

Examples of org.picocontainer.defaults.SimpleReference

                new ConstantParameter(getClassLoader()) };
        nano.registerComponentImplementation(containerBuilderClassName,
                containerBuilderClassName, parameters);
        ContainerBuilder containerBuilder = (ContainerBuilder) nano
                .getPico().getComponentInstance(containerBuilderClassName);
        ObjectReference parentRef = new SimpleReference();
        parentRef.set(parent);
        containerBuilder.buildContainer(new SimpleReference(), parentRef, null, false);
        return (ContainerPopulator) containerBuilder;
    }
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.