Package org.eclipse.cdt.managedbuilder.makegen

Examples of org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGeneratorType


      IManagedDependencyGenerator2[] postProcessors) {

  boolean callPopulateDummyTargets = false;
  for (int i = 0; i < h.buildTools.length; i++) {
      ITool tool = h.buildTools[i];
      IManagedDependencyGeneratorType depType = tool.getDependencyGeneratorForExtension(tool.getDefaultInputExtension());
      if (depType != null) {
    int calcType = depType.getCalculatorType();
    if (calcType <= IManagedDependencyGeneratorType.TYPE_OLD_TYPE_LIMIT) {
        if (calcType == IManagedDependencyGeneratorType.TYPE_COMMAND) {
      callPopulateDummyTargets = true;
      depExts.add(DEP_EXT);
        }
View Full Code Here


          buildMacro = getSourceMacroName(extensionName).toString();
          if (!buildSrcVars.containsKey(buildMacro)) {
        buildSrcVars.put(buildMacro, new ArrayList<IPath>());
          }
          // Add any generated dependency file macros
          IManagedDependencyGeneratorType depType = buildTool.getDependencyGeneratorForExtension(extensionName);
          if (depType != null) {
        int calcType = depType.getCalculatorType();
        if (calcType == IManagedDependencyGeneratorType.TYPE_COMMAND
          || calcType == IManagedDependencyGeneratorType.TYPE_BUILD_COMMANDS
          || calcType == IManagedDependencyGeneratorType.TYPE_PREBUILD_COMMANDS) {
            buildMacro = getDepMacroName(extensionName).toString();
            if (!buildDepVars.containsKey(buildMacro)) {
View Full Code Here

  IManagedDependencyCommands depCommands = null;
  IManagedDependencyPreBuild depPreBuild = null;
  IPath[] depFiles = null;
  boolean doDepGen = false;
  {
      IManagedDependencyGeneratorType t = null;
      if (tool != null)
    t = tool.getDependencyGeneratorForExtension(inputExtension);
      if (t != null) {
    int calcType = t.getCalculatorType();
    if (calcType <= IManagedDependencyGeneratorType.TYPE_OLD_TYPE_LIMIT) {
        oldDepGen = (IManagedDependencyGenerator) t;
        doDepGen = (calcType == IManagedDependencyGeneratorType.TYPE_COMMAND);
        if (doDepGen) {
      IPath depFile = Path.fromOSString(relativePath + fileName + DOT + DEP_EXT);
View Full Code Here

    private void deleteDepFile(IResource deletedFile) {
  // Calculate the top build directory relative paths of the dependency
  // files
  IPath[] depFilePaths = null;
  ITool tool = null;
  IManagedDependencyGeneratorType depType = null;
  String sourceExtension = deletedFile.getFileExtension();
  IPath folderPath = inFullPathFromOutFullPath(deletedFile.getFullPath().removeLastSegments(1));
  if (folderPath != null) {
      folderPath = folderPath.removeFirstSegments(1);
  } else {
      folderPath = new Path(""); //$NON-NLS-1$
  }
  ToolInfoHolder h = getToolInfo(folderPath);
  ITool[] tools = h.buildTools;
  for (int index = 0; index < tools.length; ++index) {
      if (tools[index].buildsFileType(sourceExtension)) {
    tool = tools[index];
    depType = tool.getDependencyGeneratorForExtension(sourceExtension);
    break;
      }
  }
  if (depType != null) {
      int calcType = depType.getCalculatorType();
      if (calcType == IManagedDependencyGeneratorType.TYPE_COMMAND) {
    depFilePaths = new IPath[1];
    IPath absolutePath = deletedFile.getLocation();
    depFilePaths[0] = ManagedBuildManager.calculateRelativePath(getTopBuildDir(), absolutePath);
    depFilePaths[0] = depFilePaths[0].removeFileExtension().addFileExtension(DEP_EXT);
View Full Code Here

  if (inTypes != null && inTypes.length > 0) {
      for (int i = 0; i < inTypes.length; i++) {
    IInputType type = inTypes[i];

    // Handle dependencies from the dependencyCalculator
    IManagedDependencyGeneratorType depGen = type.getDependencyGenerator();
    String[] extensionsList = type.getSourceExtensions(tool);
    if (depGen != null) {
        done = callDependencyCalculator(makeGen, config, handledInputExtensions, depGen, extensionsList, myCommandDependencies,
          myOutputMacros, myAdditionalTargets, h, done);
    }

    // Add additional dependencies specified in AdditionalInput
    // elements
    IAdditionalInput[] addlInputs = type.getAdditionalInputs();
    if (addlInputs != null && addlInputs.length > 0) {
        for (int j = 0; j < addlInputs.length; j++) {
      IAdditionalInput addlInput = addlInputs[j];
      int kind = addlInput.getKind();
      if (kind == IAdditionalInput.KIND_ADDITIONAL_DEPENDENCY || kind == IAdditionalInput.KIND_ADDITIONAL_INPUT_DEPENDENCY) {
          String[] paths = addlInput.getPaths();
          if (paths != null) {
        for (int k = 0; k < paths.length; k++) {
            // Translate the path from project relative
            // to
            // build directory relative
            String path = paths[k];
            if (!(path.startsWith("$("))) { //$NON-NLS-1$
          IResource addlResource = project.getFile(path);
          if (addlResource != null) {
              IPath addlPath = addlResource.getLocation();
              if (addlPath != null) {
            path = ManagedBuildManager.calculateRelativePath(makeGen.getTopBuildDir(), addlPath).toString();
              }
          }
            }
            myCommandDependencies.add(path);
            // myEnumeratedInputs.add(path);
        }
          }
      }
        }
    }
      }
  } else {
      if (bIsTargetTool) {
    // For support of pre-CDT 3.0 integrations.
    // NOTE WELL: This only supports the case of a single
    // "target tool"
    // with the following characteristics:
    // 1. The tool consumes exactly all of the object files produced
    // by other tools in the build and produces a single output
    // 2. The target name comes from the configuration artifact name
    // The rule looks like:
    // <targ_prefix><target>.<extension>: $(OBJS) <refd_project_1
    // ... refd_project_n>
    myCommandDependencies.add("$(OBJS)"); //$NON-NLS-1$
    myCommandDependencies.add("$(USER_OBJS)"); //$NON-NLS-1$
      } else {
    // Handle dependencies from the dependencyCalculator
    IManagedDependencyGeneratorType depGen = tool.getDependencyGenerator();
    String[] extensionsList = tool.getAllInputExtensions();
    if (depGen != null) {
        done = callDependencyCalculator(makeGen, config, handledInputExtensions, depGen, extensionsList, myCommandDependencies,
          myOutputMacros, myAdditionalTargets, h, done);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGeneratorType

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.