Search in sources :

Example 1 with TargetTypeRegistry

use of org.jetbrains.jps.incremental.TargetTypeRegistry in project intellij-community by JetBrains.

the class BuildSession method scopeContainsModulesOnlyForIncrementalMake.

private static boolean scopeContainsModulesOnlyForIncrementalMake(List<TargetTypeBuildScope> scopes) {
    TargetTypeRegistry typeRegistry = null;
    for (TargetTypeBuildScope scope : scopes) {
        if (scope.getForceBuild())
            return false;
        final String typeId = scope.getTypeId();
        if (isJavaModuleBuildType(typeId)) {
            // fast check
            continue;
        }
        if (typeRegistry == null) {
            // lazy init
            typeRegistry = TargetTypeRegistry.getInstance();
        }
        final BuildTargetType<?> targetType = typeRegistry.getTargetType(typeId);
        if (targetType != null && !(targetType instanceof ModuleInducedTargetType)) {
            return false;
        }
    }
    return true;
}
Also used : TargetTypeRegistry(org.jetbrains.jps.incremental.TargetTypeRegistry) TargetTypeBuildScope(org.jetbrains.jps.api.CmdlineRemoteProto.Message.ControllerMessage.ParametersMessage.TargetTypeBuildScope)

Aggregations

TargetTypeBuildScope (org.jetbrains.jps.api.CmdlineRemoteProto.Message.ControllerMessage.ParametersMessage.TargetTypeBuildScope)1 TargetTypeRegistry (org.jetbrains.jps.incremental.TargetTypeRegistry)1