Examples of DependencyDef


Examples of net.sf.antcontrib.cpptasks.ide.DependencyDef

      List dependencies = project.getDependencies();
      List projectDeps = new ArrayList();
      String basePath = dspFile.getParent();
      for(Iterator iter = dependencies.iterator(); iter.hasNext();) {
          DependencyDef dep = (DependencyDef) iter.next();
          if (dep.getFile() != null) {
            String projName = toProjectName(dep.getName());
            projectDeps.add(projName);
            String depProject = CUtil.toWindowsPath(
                      CUtil.getRelativePath(basePath,
                              new File(dep.getFile() + ".dsp")));
            writeWorkspaceProject(writer, projName, depProject, dep.getDependsList());
          }
      }

      writeWorkspaceProject(writer, projectName, dspFile.getName(), projectDeps);
View Full Code Here

Examples of net.sf.antcontrib.cpptasks.ide.DependencyDef

          //       if it does it should not be explicitly linked
          boolean fromDependency = false;
          if (relPath.indexOf(".") > 0) {
              String baseName = relPath.substring(0, relPath.indexOf("."));
              for(Iterator iter = dependencies.iterator(); iter.hasNext(); ) {
                DependencyDef depend = (DependencyDef) iter.next();
                if (baseName.compareToIgnoreCase(depend.getName()) == 0) {
                    fromDependency = true;
                }
            }
          }
          if (!fromDependency) {
View Full Code Here

Examples of net.sf.antcontrib.cpptasks.ide.DependencyDef

                projectDirPath, projectRoot, projectTargets);
        objects.put(project.getID(), project.getProperties());

        List frameworkBuildFiles = new ArrayList();
        for (Iterator iter = projectDef.getDependencies().iterator(); iter.hasNext();) {
            DependencyDef dependency = (DependencyDef) iter.next();
            PBXObjectRef buildFile = addDependency(objects, project, groups, basePath, dependency);
            if (buildFile != null) {
                frameworkBuildFiles.add(buildFile);
            }
        }
View Full Code Here

Examples of net.sf.antcontrib.cpptasks.ide.DependencyDef

                     //  check if library is in dependencies list
                     //
                     String libName = linkerArgs[i].substring(2);
                     boolean found = false;
                     for(Iterator iter = dependencies.iterator();iter.hasNext();) {
                         DependencyDef dependency = (DependencyDef) iter.next();
                         if (libName.startsWith(dependency.getName())) {
                             File dependencyFile = dependency.getFile();
                             if (dependencyFile != null &&
                                     new File(dependencyFile.getAbsolutePath() + ".xcodeproj").exists()) {
                                found = true;
                                break;
                             }
View Full Code Here

Examples of net.sf.antcontrib.cpptasks.ide.DependencyDef

              //       if it does it should not be explicitly linked
            boolean fromDependency = false;
            if (relPath.indexOf(".") > 0) {
                  String baseName = relPath.substring(0, relPath.indexOf("."));
                  for(Iterator iter = projectDependencies.iterator(); iter.hasNext(); ) {
                    DependencyDef depend = (DependencyDef) iter.next();
                    if (baseName.compareToIgnoreCase(depend.getName()) == 0) {
                        fromDependency = true;
                    }
                }
            }
View Full Code Here

Examples of org.auraframework.def.DependencyDef

    public DependencyDefImplTest(String name) {
        super(name);
    }

    public void testDependencyDefAndValidate() throws Exception {
        DependencyDef testDependencyDef = null;

        // Invalid, no parent.
        try {
            testDependencyDef = vendor.makeDependencyDef(null, "aura", null, vendor.makeLocation("f1", 5, 5, 0));
            testDependencyDef.validateDefinition();
            fail("Should have thrown QuickFixException for null parent in DependencyDef's");
        } catch (Exception e) {
            checkExceptionFull(e, InvalidDefinitionException.class, "No parent in DependencyDef", "f1");
        }

        // Invalid no resource.
        try {
            testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), null, "COMPONENT",
                    vendor.makeLocation("f1", 5, 5, 0));
            testDependencyDef.validateDefinition();
            fail("Should have thrown QuickFixException for null resource in DependencyDef's");
        } catch (Exception e) {
            checkExceptionFull(e, InvalidDefinitionException.class, "Missing required resource", "f1");
        }

        // Invalid type
        try {
            testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), "aura", "WhatAmI",
                    vendor.makeLocation("f1", 5, 5, 0));
            testDependencyDef.validateDefinition();
            fail("Should have thrown QuickFixException for invalid type in DependencyDef's");
        } catch (Exception e) {
            checkExceptionRegex(e, InvalidDefinitionException.class,
                    "No enum const(ant)? (class )?org\\.auraframework\\.def\\.DefDescriptor.DefType\\.WhatAmI", "f1");
        }

        // Valid, with a namespace.
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), "aura", null,
                vendor.makeLocation("f1", 5, 5, 0));
        testDependencyDef.validateDefinition();

        // Valid, with a namespace & type.
        testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"), "aura", "COMPONENT",
                vendor.makeLocation("f1", 5, 5, 0));
        testDependencyDef.validateDefinition();
    }
View Full Code Here

Examples of org.auraframework.def.DependencyDef

     *
     * Since this test looks in a namespace that can be changed over time, the specific names of dependencies may need
     * to be changed as the source code changes.
     */
    public void testAppendDependencies() throws Exception {
        DependencyDef testDependencyDef;
        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 =
        // vendor.makeDependencyDef(vendor.makeComponentDefDescriptor("hi"),
        // "aura", "PROVIDER", vendor.makeLocation("f1", 5, 5, 0));
        // deps.clear();
        // testDependencyDef.appendDependencies(deps);

        // 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"),
                "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,
                    "Invalid dependency markup://aura:iDontExist[APPLICATION]", "f1");
        }

        // 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,
                    "Invalid dependency markup://aura:application[COMPONENT]", "f1");
        }
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.