Examples of PathSettingsContainer


Examples of org.eclipse.cdt.core.settings.model.util.PathSettingsContainer

     *
     * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator #generateDependencies()
     */
    @Override
    public void generateDependencies() throws CoreException {
  final PathSettingsContainer postProcs = PathSettingsContainer.createRootContainer();
  // Note: PopulateDummyTargets is a hack for the pre-3.x GCC compilers

  // Collect the methods that will need to be called
  toolInfos.accept(new IPathSettingsContainerVisitor() {
      @SuppressWarnings("synthetic-access")
      @Override
      public boolean visit(PathSettingsContainer container) {
    ToolInfoHolder h = (ToolInfoHolder) container.getValue();
    Vector<String> depExts = new Vector<String>(); // Vector of
                     // dependency
                     // file
                     // extensions
    IManagedDependencyGenerator2[] postProcessors = new IManagedDependencyGenerator2[h.buildTools.length];
    boolean callPopulateDummyTargets = collectDependencyGeneratorInformation(h, depExts, postProcessors);

    // Is there anyone to call if we do find dependency files?
    if (!callPopulateDummyTargets) {
        int i;
        for (i = 0; i < postProcessors.length; i++) {
      if (postProcessors[i] != null)
          break;
        }
        if (i == postProcessors.length)
      return true;
    }

    PathSettingsContainer child = postProcs.getChildContainer(container.getPath(), true, true);
    DepInfo di = new DepInfo();
    di.depExts = depExts;
    di.postProcessors = postProcessors;
    di.callPopulateDummyTargets = callPopulateDummyTargets;
    child.setValue(di);

    return true;
      }
  });

  IWorkspaceRoot root = CCorePlugin.getWorkspace().getRoot();
  for (IResource res : getSubdirList()) {
      // The builder creates a subdir with same name as source in the
      // build location
      IContainer subDir = (IContainer) res;
      IPath projectRelativePath = subDir.getProjectRelativePath();
      IResourceInfo rcInfo = config.getResourceInfo(projectRelativePath, false);
      PathSettingsContainer cr = postProcs.getChildContainer(rcInfo.getPath(), false, true);
      if (cr == null || cr.getValue() == null)
    continue;

      DepInfo di = (DepInfo) cr.getValue();

      ToolInfoHolder h = getToolInfo(projectRelativePath);
      IPath buildRelativePath = topBuildDir.append(projectRelativePath);
      IFolder buildFolder = root.getFolder(buildRelativePath);
      if (buildFolder == null)
View Full Code Here

Examples of org.eclipse.cdt.core.settings.model.util.PathSettingsContainer

  }
  return getToolInfo(path, false);
    }

    private ToolInfoHolder getToolInfo(IPath path, boolean create) {
  PathSettingsContainer child = toolInfos.getChildContainer(path, create, create);
  ToolInfoHolder h = null;
  if (child != null) {
      h = (ToolInfoHolder) child.getValue();
      if (h == null && create) {
    h = new ToolInfoHolder();
    child.setValue(h);
      }
  }
  return h;
    }
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.