boolean (BuildTarget<?> target) { if (target instanceof ModuleBasedTarget) { final JpsModule module = ((ModuleBasedTarget<?>)target).getModule(); // this target is associated with module JavaModuleBuildTargetType targetType = JavaModuleBuildTargetType.getInstance(((ModuleBasedTarget<?>)target).isTests()); if (myTypes.contains(targetType) || myTargets.contains(new ModuleBuildTarget(module, targetType))) { return true; } } return false; }