Examples of appendDependencies()


Examples of org.auraframework.def.Definition.appendDependencies()

    @Override
    public void appendDependencies(Set<DefDescriptor<?>> dependencies) {
        Object v = this.getValue();
        if (v instanceof Definition) {
            Definition def = (Definition) v;
            def.appendDependencies(dependencies);
        } else if (v instanceof Collection) {
            Collection<?> col = (Collection<?>) v;
            for (Object obj : col) {
                if (obj instanceof Definition) {
                    Definition def = (Definition) obj;
View Full Code Here

Examples of org.auraframework.def.Definition.appendDependencies()

        } else if (v instanceof Collection) {
            Collection<?> col = (Collection<?>) v;
            for (Object obj : col) {
                if (obj instanceof Definition) {
                    Definition def = (Definition) obj;
                    def.appendDependencies(dependencies);
                }
            }
        }
    }
View Full Code Here

Examples of org.auraframework.def.Definition.appendDependencies()

   
        Map<DefType, List<DefModel>> depsMap = Maps.newEnumMap(DefType.class);

        Set<DefDescriptor<?>> deps = Sets.newHashSet();

        def.appendDependencies(deps);

        for (DefDescriptor<?> dep : deps) {
            DefType type = dep.getDefType();

            List<DefModel> depsList = depsMap.get(type);
View Full Code Here

Examples of org.auraframework.def.Definition.appendDependencies()

        Map<DefType, List<DefModel>> depsMap = Maps.newEnumMap(DefType.class);

        Set<DefDescriptor<?>> deps = Sets.newHashSet();

        def.appendDependencies(deps);

        for (DefDescriptor<?> dep : deps) {
          if (ReferenceTreeModel.hasAccess(dep.getDef())) {
              DefType type = dep.getDefType();
 
View Full Code Here

Examples of org.auraframework.def.DependencyDef.appendDependencies()

        Set<DefDescriptor<?>> deps = new HashSet<>();

        // Check for a couple dependencies present in a namespace
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), "aura", "INTERFACE",
                vendor.makeLocation("f1", 5, 5, 0));
        testDependencyDef.appendDependencies(deps);
        assertTrue("Dependency not found", containsDependency(deps, "markup://aura:rootComponent"));

        // Check dependency that exists but is wrong type
        // TODO(W-1497192): can't find providers or helpers as dependencies
        // testDependencyDef =
View Full Code Here

Examples of org.auraframework.def.DependencyDef.appendDependencies()

        // Get dependency of specific component
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"),
                "markup://aura:application", "APPLICATION", vendor.makeLocation("f1", 5, 5, 0));
        deps.clear();
        testDependencyDef.appendDependencies(deps);
        assertTrue("Failed to find dependency when searching using format <type>://<namespace>:<name>",
                containsDependency(deps, "markup://aura:application"));

        // Try to get dependency that doesn't exist, verify exception thrown
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"),
View Full Code Here

Examples of org.auraframework.def.DependencyDef.appendDependencies()

        // Try to get dependency that doesn't exist, verify exception thrown
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"),
                "markup://aura:iDontExist", "APPLICATION", vendor.makeLocation("f1", 5, 5, 0));
        deps.clear();
        testDependencyDef.appendDependencies(deps);
        try {
            testDependencyDef.validateReferences();
            fail("Exception not thrown when looking for dependency that does not exist");
        } catch (Exception e) {
            checkExceptionFull(e, InvalidDefinitionException.class,
View Full Code Here

Examples of org.auraframework.def.DependencyDef.appendDependencies()

        // Valid resource name but wrong type
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"),
                "markup://aura:application", "COMPONENT", vendor.makeLocation("f1", 5, 5, 0));
        deps.clear();
        testDependencyDef.appendDependencies(deps);
        try {
            testDependencyDef.validateReferences();
            fail("Exception not thrown when dependency resource is valid but is of wrong type");
        } catch (Exception e) {
            checkExceptionFull(e, InvalidDefinitionException.class,
View Full Code Here

Examples of org.auraframework.def.ThemeDefRef.appendDependencies()

    public void testAppendDependencies() throws Exception {
        DefDescriptor<ThemeDef> desc = addSeparateTheme(theme());
        ThemeDefRef def = source(String.format("<aura:importTheme name='%s'/>", desc.getDescriptorName()));

        Set<DefDescriptor<?>> deps = Sets.newHashSet();
        def.appendDependencies(deps);
        assertTrue(deps.contains(desc));
    }

    public void testInvalidReference() throws Exception {
        try {
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.