Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Problems with implementing a custom dependency generator

Hi,

I'm trying to implement my own dependency generator by extending the
IManagedDependencyGenerator2 interface, as described in the "Managed
Build System Extensibility Document". I'm using the internal builder and
and the calculator type is TYPE_BUILD_COMMANDS.

The problem is that the dependency calculator does not seem to be used.
The class is called to determine the type, but when I step into the
calling code, the dependency calculator seems to be discarded.

This is the code I'm looking at:

In
org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildDescription#getDependencyCalculator()

> 		
> 		if(depGenType != null){
> 			switch(depGenType.getCalculatorType()){
> 			case IManagedDependencyGeneratorType.TYPE_NODEPS:
> 			case IManagedDependencyGeneratorType.TYPE_NODEPENDENCIES:
> 				//no dependencies
> 				break;
> 			case IManagedDependencyGeneratorType.TYPE_INDEXER:
> 			case IManagedDependencyGeneratorType.TYPE_EXTERNAL:
> 			case IManagedDependencyGeneratorType.TYPE_CUSTOM:
> 				depGen = depGenType;
> 				break;
> 			case IManagedDependencyGeneratorType.TYPE_COMMAND:
> 			case IManagedDependencyGeneratorType.TYPE_BUILD_COMMANDS:
> 			case IManagedDependencyGeneratorType.TYPE_PREBUILD_COMMANDS:
> 				//TODO: may implement the .d file parsing for deps calculation here
> 				//break;
> 			default:
> 				depGen = getPDOMDependencyGenerator();
> 				break;
> 			}
> 		} else {
> 			depGen = getPDOMDependencyGenerator();
> 		}

The switch-statements falls through and depGen gets set to the result of
getPDOMDependencyGenerator(). It looks like the TYPE_*COMMAND[s]
constants are ignored.

Any clues on what's going on?

-- 
/Jesper


Back to the top