Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 2, 2021. It is now read-only.
/xctoolPublic archive

Make xctool play nice with Find Implicit Dependencies#98

Merged
fpotter merged 4 commits intomasterfromfpotter/fix-implicit-dependencies
Jul 12, 2013
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
move the routines that populate buildable + testables into their own …
…methods.This populate function was getting too long.
  • Loading branch information
@fpotter
fpotter committedJul 10, 2013
commit2d64825c1699c81ba32e5df6d681b768c45c8ed2
92 changes: 51 additions & 41 deletionsxctool/xctool/XcodeSubjectInfo.m
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -799,6 +799,55 @@ - (NSString *)matchingSchemePathForProject
return matchingSchemePath;
}

- (void)populateBuildablesAndTestablesForWorkspaceWithSchemePath:(NSString *)schemePath
{
NSArray *testables = [[self class] testablesInSchemePath:schemePath
basePath:BasePathFromSchemePath(schemePath)];
NSArray *buildables = [[self class] buildablesInSchemePath:schemePath
basePath:BasePathFromSchemePath(schemePath)];


// It's possible that the scheme references projects that aren't part of the workspace. When
// Xcode encounters these, it just skips them so we'll do the same.
NSSet *projectPathsInWorkspace = [NSSet setWithArray:[XcodeSubjectInfo projectPathsInWorkspace:self.subjectWorkspace]];
BOOL (^workspaceContainsProject)(id) = ^(id item) {
return [projectPathsInWorkspace containsObject:[item objectForKey:@"projectPath"]];
};

self.testables = [testables objectsAtIndexes:
[testables indexesOfObjectsPassingTest:
^BOOL(id obj, NSUInteger idx, BOOL *stop) {
return workspaceContainsProject(obj);
}]];

self.buildables = [buildables objectsAtIndexes:
[buildables indexesOfObjectsPassingTest:
^BOOL(id obj, NSUInteger idx, BOOL *stop) {
return workspaceContainsProject(obj);
}]];

self.buildablesForTest = [buildables objectsAtIndexes:
[buildables indexesOfObjectsPassingTest:
^BOOL(id obj, NSUInteger idx, BOOL *stop) {
return (workspaceContainsProject(obj) &&
[[obj objectForKey:@"forTesting"] boolValue]);
}]];
}

- (void)populateBuildablesAndTestablesForProjectWithSchemePath:(NSString *)schemePath
{
self.testables = [[self class] testablesInSchemePath:schemePath
basePath:BasePathFromSchemePath(schemePath)];

NSArray *buildables = [[self class] buildablesInSchemePath:schemePath
basePath:BasePathFromSchemePath(schemePath)];
self.buildablesForTest = [buildables objectsAtIndexes:
[buildables indexesOfObjectsPassingTest:
^BOOL(id obj, NSUInteger idx, BOOL *stop) {
return [[obj objectForKey:@"forTesting"] boolValue];
}]];
}

- (void)populate
{
if (_didPopulate) {
Expand DownExpand Up@@ -832,48 +881,9 @@ - (void)populate
}

if (self.subjectWorkspace) {
NSArray *testables = [[self class] testablesInSchemePath:matchingSchemePath
basePath:BasePathFromSchemePath(matchingSchemePath)];
NSArray *buildables = [[self class] buildablesInSchemePath:matchingSchemePath
basePath:BasePathFromSchemePath(matchingSchemePath)];


// It's possible that the scheme references projects that aren't part of the workspace. When
// Xcode encounters these, it just skips them so we'll do the same.
NSSet *projectPathsInWorkspace = [NSSet setWithArray:[XcodeSubjectInfo projectPathsInWorkspace:self.subjectWorkspace]];
BOOL (^workspaceContainsProject)(id) = ^(id item) {
return [projectPathsInWorkspace containsObject:[item objectForKey:@"projectPath"]];
};

self.testables = [testables objectsAtIndexes:
[testables indexesOfObjectsPassingTest:
^BOOL(id obj, NSUInteger idx, BOOL *stop) {
return workspaceContainsProject(obj);
}]];

self.buildables = [buildables objectsAtIndexes:
[buildables indexesOfObjectsPassingTest:
^BOOL(id obj, NSUInteger idx, BOOL *stop) {
return workspaceContainsProject(obj);
}]];

self.buildablesForTest = [buildables objectsAtIndexes:
[buildables indexesOfObjectsPassingTest:
^BOOL(id obj, NSUInteger idx, BOOL *stop) {
return (workspaceContainsProject(obj) &&
[[obj objectForKey:@"forTesting"] boolValue]);
}]];
[self populateBuildablesAndTestablesForWorkspaceWithSchemePath:matchingSchemePath];
} else {
self.testables = [[self class] testablesInSchemePath:matchingSchemePath
basePath:BasePathFromSchemePath(matchingSchemePath)];

NSArray *buildables = [[self class] buildablesInSchemePath:matchingSchemePath
basePath:BasePathFromSchemePath(matchingSchemePath)];
self.buildablesForTest = [buildables objectsAtIndexes:
[buildables indexesOfObjectsPassingTest:
^BOOL(id obj, NSUInteger idx, BOOL *stop) {
return [[obj objectForKey:@"forTesting"] boolValue];
}]];
[self populateBuildablesAndTestablesForProjectWithSchemePath:matchingSchemePath];
}

_configurationNameByAction =
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp