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
NextNext commit
move the routines that find the matching scheme path into their own m…
…ethods.This `populate` method is getting pretty big - let's refactor it a bit.
  • Loading branch information
@fpotter
fpotter committedJul 10, 2013
commit4136a199862e88c64d10cea39f115184fea68c14
46 changes: 33 additions & 13 deletionsxctool/xctool/XcodeSubjectInfo.m
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -771,6 +771,34 @@ - (NSDictionary *)buildSettingsForFirstBuildable
return settings;
}

- (NSString *)matchingSchemePathForWorkspace
{
NSString *matchingSchemePath = nil;

NSArray *schemePaths = [XcodeSubjectInfo schemePathsInWorkspace:self.subjectWorkspace];
for (NSString *schemePath in schemePaths) {
if ([schemePath hasSuffix:[NSString stringWithFormat:@"/%@.xcscheme", self.subjectScheme]]) {
matchingSchemePath = schemePath;
}
}

return matchingSchemePath;
}

- (NSString *)matchingSchemePathForProject
{
NSString *matchingSchemePath = nil;

NSArray *schemePaths = [XcodeSubjectInfo schemePathsInContainer:self.subjectProject];
for (NSString *schemePath in schemePaths) {
if ([schemePath hasSuffix:[NSString stringWithFormat:@"/%@.xcscheme", self.subjectScheme]]) {
matchingSchemePath = schemePath;
}
}

return matchingSchemePath;
}

- (void)populate
{
if (_didPopulate) {
Expand DownExpand Up@@ -798,13 +826,12 @@ - (void)populate
NSString *matchingSchemePath = nil;

if (self.subjectWorkspace) {
NSArray *schemePaths = [XcodeSubjectInfo schemePathsInWorkspace:self.subjectWorkspace];
for (NSString *schemePath in schemePaths) {
if ([schemePath hasSuffix:[NSString stringWithFormat:@"/%@.xcscheme", self.subjectScheme]]) {
matchingSchemePath = schemePath;
}
}
matchingSchemePath = [self matchingSchemePathForWorkspace];
} else {
matchingSchemePath = [self matchingSchemePathForProject];
}

if (self.subjectWorkspace) {
NSArray *testables = [[self class] testablesInSchemePath:matchingSchemePath
basePath:BasePathFromSchemePath(matchingSchemePath)];
NSArray *buildables = [[self class] buildablesInSchemePath:matchingSchemePath
Expand DownExpand Up@@ -837,13 +864,6 @@ - (void)populate
[[obj objectForKey:@"forTesting"] boolValue]);
}]];
} else {
NSArray *schemePaths = [XcodeSubjectInfo schemePathsInContainer:self.subjectProject];
for (NSString *schemePath in schemePaths) {
if ([schemePath hasSuffix:[NSString stringWithFormat:@"/%@.xcscheme", self.subjectScheme]]) {
matchingSchemePath = schemePath;
}
}

self.testables = [[self class] testablesInSchemePath:matchingSchemePath
basePath:BasePathFromSchemePath(matchingSchemePath)];

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp