From 69a989c233eba85956fb6b96d42fa4b58166d75f Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Mon, 21 May 2012 23:30:28 -0700 Subject: [PATCH 01/76] Validating project settings (updating base sdk to "latest") --- XcodeColors.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 3a35393..e1cfc75 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -160,7 +160,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0420; + LastUpgradeCheck = 0430; }; buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */; compatibilityVersion = "Xcode 3.2"; @@ -276,7 +276,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.5; ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx10.6; + SDKROOT = macosx; }; name = Debug; }; @@ -290,7 +290,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.5; - SDKROOT = macosx10.6; + SDKROOT = macosx; }; name = Release; }; From 9b056ee0e9642b6bf290c3fc0b678d095cf0a7b6 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Mon, 21 May 2012 23:35:21 -0700 Subject: [PATCH 02/76] Removing outdated / unnecessary settings --- XcodeColors.xcodeproj/project.pbxproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index e1cfc75..7e57981 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -238,8 +238,6 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; INFOPLIST_FILE = Info.plist; @@ -254,7 +252,6 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; INFOPLIST_FILE = Info.plist; From 53409ed5398c4bb09d1cbbeac4346fc2915fa87f Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Mon, 21 May 2012 23:35:45 -0700 Subject: [PATCH 03/76] Updating deployment target to 10.6 --- XcodeColors.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 7e57981..65f692b 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -271,7 +271,7 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.5; + MACOSX_DEPLOYMENT_TARGET = 10.6; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -286,7 +286,7 @@ GCC_ENABLE_OBJC_GC = supported; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.5; + MACOSX_DEPLOYMENT_TARGET = 10.6; SDKROOT = macosx; }; name = Release; From 207276f195c83b395a15bea913dec42696771d01 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Mon, 21 May 2012 23:36:01 -0700 Subject: [PATCH 04/76] Removing code signing identity --- XcodeColors.xcodeproj/project.pbxproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 65f692b..f61ad88 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -265,7 +265,6 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application: Igor Belyaletdinov"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_GC = supported; GCC_OPTIMIZATION_LEVEL = 0; @@ -281,7 +280,6 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application: Igor Belyaletdinov"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_GC = supported; GCC_WARN_ABOUT_RETURN_TYPE = YES; From 278c4d3fd8ae739f0f342881cf6e46408069587f Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Mon, 21 May 2012 23:43:07 -0700 Subject: [PATCH 05/76] Fixing install script --- install | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install b/install index d3a74f5..12be5da 100755 --- a/install +++ b/install @@ -1,11 +1,14 @@ #!/usr/bin/env bash -rm -rf ~/Library/Application\ Support/SIMBL/Plugins/XcodeColors.bundle 2>/dev/null -#mkdir -p ~/Library/Application\ Support/SIMBL/Plugins/ 2>/dev/null -#cp -r build/Release/XcodeColors.bundle ~/Library/Application\ Support/SIMBL/Plugins/ +# Uninstall old version(s) +rm -rf ~/Library/Application\ Support/SIMBL/Plugins/XcodeColors.bundle 2>/dev/null rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin 2>/dev/null + +# Install new version + + mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins 2>/dev/null -cp -r build/Release/XcodeColors.bundle ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin +cp -r ${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME} ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin echo Installed From 74e13671fa54ec77b8f42c3c988b0808824e3b87 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Mon, 21 May 2012 23:47:11 -0700 Subject: [PATCH 06/76] Support full color spectrum by allowing rgb values to be directly passed (for foreground and background colors). --- MethodReplace.h | 37 -- MethodReplace.m | 42 -- XcodeColors.h | 29 +- XcodeColors.m | 578 ++++++++++++++------------ XcodeColors.xcodeproj/project.pbxproj | 6 - 5 files changed, 321 insertions(+), 371 deletions(-) delete mode 100644 MethodReplace.h delete mode 100644 MethodReplace.m diff --git a/MethodReplace.h b/MethodReplace.h deleted file mode 100644 index 861c54d..0000000 --- a/MethodReplace.h +++ /dev/null @@ -1,37 +0,0 @@ -// COMMON FILE: Common - -// -// MethodReplace.h -// XcodeColors -// -// Created by Uncle MiF on 9/15/10. -// Copyright 2010 Deep IT. All rights reserved. -// - -/* The Black Magic begins here */ -#import - -typedef enum { CLASS_METHOD, INSTANCE_METHOD} t_target; - -#define ReplaceClassMethod(sourceClassName,sourceSelName,destinationClassName) ReplaceMethod(CLASS_METHOD, [sourceClassName class], @selector(sourceSelName), [destinationClassName class], 0) -#define ReplaceInstanceMethod(sourceClassName,sourceSelName,destinationClassName) ReplaceMethod(INSTANCE_METHOD, [sourceClassName class], @selector(sourceSelName), [destinationClassName class], 0) - -#define DynamicMessage(targetMode,targetClassName,instance,targetSelName,...) \ -do\ -{\ -Method (*get_targetMethod)(Class,SEL) = targetMode == CLASS_METHOD ? class_getClassMethod : class_getInstanceMethod;\ -Method method = get_targetMethod([targetClassName class],@selector(targetSelName));\ -if (method)\ -{\ -IMP imp = method_getImplementation(method);\ -if (imp)\ -imp(instance,@selector(targetSelName),##__VA_ARGS__);\ -}\ -} while(0) - -#define DynamicClassMessage(...) DynamicMessage(CLASS_METHOD,##__VA_ARGS__) -#define DynamicInstanceMessage(...) DynamicMessage(INSTANCE_METHOD,##__VA_ARGS__) - -IMP ReplaceMethod(t_target target, - Class sourceClass,SEL sourceSel, - Class destinationClass,SEL destinationSel); \ No newline at end of file diff --git a/MethodReplace.m b/MethodReplace.m deleted file mode 100644 index 173936a..0000000 --- a/MethodReplace.m +++ /dev/null @@ -1,42 +0,0 @@ -// COMMON FILE: Common - -// -// MethodReplace.m -// XcodeColors -// -// Created by Uncle MiF on 9/15/10. -// Copyright 2010 Deep IT. All rights reserved. -// - -#import "MethodReplace.h" - -IMP ReplaceMethod(t_target target, - Class sourceClass,SEL sourceSel, - Class destinationClass,SEL destinationSel) -{ - if (!sourceSel || !sourceClass || !destinationClass) - return nil; - - if (!destinationSel) - destinationSel = sourceSel; - - Method (*get_targetMethod)(Class,SEL) = target == CLASS_METHOD ? class_getClassMethod : class_getInstanceMethod; - - Method sourceMethod = get_targetMethod(sourceClass, sourceSel); - if (!sourceMethod) - return nil; - - IMP prevImplementation = method_getImplementation(sourceMethod); - - Method destinationMethod = get_targetMethod(destinationClass, destinationSel); - if (!destinationMethod) - return nil; - - IMP newImplementation = method_getImplementation(destinationMethod); - if (!newImplementation) - return nil; - - method_setImplementation(sourceMethod, newImplementation); - - return prevImplementation; -} \ No newline at end of file diff --git a/XcodeColors.h b/XcodeColors.h index adeeb50..27d4095 100644 --- a/XcodeColors.h +++ b/XcodeColors.h @@ -8,32 +8,15 @@ #import -@interface XcodeColors : NSObject - -// Foreground +@interface XcodeColors_NSTextStorage : NSTextStorage -+(NSColor*)blackColor; -+(NSColor*)redColor; -+(NSColor*)greenColor; -+(NSColor*)yellowColor; -+(NSColor*)blueColor; -+(NSColor*)magentaColor; -+(NSColor*)cyanColor; -+(NSColor*)whiteColor; +- (void)fixAttributesInRange:(NSRange)aRange; -// Background +@end -+(NSColor*)blackBackgroundColor; -+(NSColor*)redBackgroundColor; -+(NSColor*)greenBackgroundColor; -+(NSColor*)yellowBackgroundColor; -+(NSColor*)blueBackgroundColor; -+(NSColor*)magentaBackgroundColor; -+(NSColor*)cyanBackgroundColor; -+(NSColor*)whiteBackgroundColor; +@interface XcodeColors : NSObject -// Plugin -+(void)pluginDidLoad:(id)xcodeDirectCompatibility; --(void)registerLaunchSystemDescriptions; ++ (void)pluginDidLoad:(id)xcodeDirectCompatibility; +- (void)registerLaunchSystemDescriptions; @end diff --git a/XcodeColors.m b/XcodeColors.m index 244cbcc..1dbdf97 100644 --- a/XcodeColors.m +++ b/XcodeColors.m @@ -7,318 +7,370 @@ // #import "XcodeColors.h" -#import "MethodReplace.h" +#import #define XCODE_COLORS "XcodeColors" -#define LC_SEQ_MAC @"\033[" -#define LC_SEQ_IOS @"\xC2\xA0[" +// How to apply color formatting to your log statements: +// +// To set the foreground color: +// Insert the ESCAPE_SEQ into your string, followed by "fg124,12,255;" where r=124, g=12, b=255. +// +// To set the background color: +// Insert the ESCAPE_SEQ into your string, followed by "bg12,24,36;" where r=12, g=24, b=36. +// +// To reset the foreground color (to default value): +// Insert the ESCAPE_SEQ into your string, followed by "fg;" +// +// To reset the background color (to default value): +// Insert the ESCAPE_SEQ into your string, followed by "bg;" +// +// To reset the foreground and background color (to default values) in one operation: +// Insert the ESCAPE_SEQ into your string, followed by ";" +// +// +// Feel free to copy the define statements below into your code. +// + +#define ESCAPE_SEQ_MAC @"\033[" +#define ESCAPE_SEQ_IOS @"\xC2\xA0[" + +#if TARGET_OS_IPHONE + #define ESCAPE_SEQ ESCAPE_SEQ_IOS +#else + #define ESCAPE_SEQ ESCAPE_SEQ_MAC +#endif + +#define SEQ_RESET_FG ESCAPE_SEQ @"fg;" // Clear any foreground color +#define SEQ_RESET_BG ESCAPE_SEQ @"bg;" // Clear any background color +#define SEQ_RESET ESCAPE_SEQ @";" // Clear any foreground or background color + +// + +static IMP IMP_NSTextStorage_fixAttributesInRange = nil; -static IMP imp_ts_fixAttributesInRange = nil; -@interface XcodeColors_NSTextStorage : NSTextStorage - --(void)fixAttributesInRange:(NSRange)aRange; - -@end @implementation XcodeColors_NSTextStorage -void ApplyANSIColors(NSTextStorage * textStorage, NSRange range, NSString * seq) +void ApplyANSIColors(NSTextStorage *textStorage, NSRange textStorageRange, NSString *escapeSeq) { - NSString * affectedString = [[textStorage string] substringWithRange:range]; - if ([affectedString rangeOfString:seq].location != NSNotFound) + NSRange range = [[textStorage string] rangeOfString:escapeSeq options:0 range:textStorageRange]; + if (range.location == NSNotFound) + { + // No escape sequence(s) in the string. + return; + } + + // Architecture: + // + // We're going to split the string into components separated by the given escape sequence. + // Then we're going to loop over the components, looking for color codes at the beginning of each component. + // + // For example, if the input string is "Hello__fg124,12,12;World" (with __ representing the escape sequence), + // then our components would be: ( + // "Hello" + // "fg124,12,12;World" + // ) + // + // We would find a color code (rgb 124, 12, 12) for the foreground color in the second component. + // At that point, the parsed foreground color goes into an attributes dictionary (attrs), + // and the foreground color stays in effect (for the current component & future components) + // until it gets cleared via a different foreground color, or a clear sequence. + // + // The attributes are applied to the entire range of the component, and then we move onto the next component. + // + // At the very end, we go back and apply "invisible" attributes (zero font, and clear text) + // to the escape and color sequences. + + + NSString *affectedString = [[textStorage string] substringWithRange:textStorageRange]; + + // Split the string into components separated by the given escape sequence. + + NSArray *components = [affectedString componentsSeparatedByString:escapeSeq]; + + NSRange componentRange = textStorageRange; + componentRange.length = 0; + + BOOL firstPass = YES; + + NSMutableArray *seqRanges = [NSMutableArray arrayWithCapacity:[components count]]; + NSMutableDictionary *attrs = [NSMutableDictionary dictionaryWithCapacity:2]; + + for (NSString *component in components) { - NSArray * components = [affectedString componentsSeparatedByString:seq]; - NSRange componentRange = range; - componentRange.length = 0; - BOOL firstPass = YES; - NSMutableArray * clearSEQ = [NSMutableArray array]; - NSMutableDictionary * attrs = [NSMutableDictionary dictionary]; - for (NSString * component in components) + if (firstPass) + { + // The first component in the array won't need processing. + // If there was an escape sequence at the very beginning of the string, + // then the first component in the array will be an empty string. + // Otherwise the first component is everything before the first escape sequence. + } + else { - if (!firstPass) + // componentSeqRange : Range of escape sequence within component, e.g. "fg124,12,12;" + + NSColor *color = nil; + NSUInteger colorCodeSeqLength = 0; + + BOOL stop = NO; + + BOOL reset = !stop && (stop = [component hasPrefix:@";"]); + BOOL fg = !stop && (stop = [component hasPrefix:@"fg"]); + BOOL bg = !stop && (stop = [component hasPrefix:@"bg"]); + + BOOL resetFg = fg && [component hasPrefix:@"fg;"]; + BOOL resetBg = bg && [component hasPrefix:@"bg;"]; + + if (reset) { - NSString * realString = component; - static NSString * ctrlSEQ[] = { - // Foreground LCL_* - @"0;30m"/*black*/,@"0;31m"/*red*/,@"0;32m"/*green*/,@"0;33m"/*yellow*/,@"0;34m"/*blue*/,@"0;35m"/*magenta*/,@"0;36m"/*cyan*/,@"0;37m"/*white*/, - - // Background LBCL_* - @"0;40m"/*black*/,@"0;41m"/*red*/,@"0;42m"/*green*/,@"0;43m"/*yellow*/,@"0;44m"/*blue*/,@"0;45m"/*magenta*/,@"0;46m"/*cyan*/,@"0;47m"/*white*/, - - @"0m"/*nothing*/,@"00m"/*nothing*/}; - int i; - for (i = 0; i < sizeof(ctrlSEQ)/sizeof(ctrlSEQ[0]); i++) + // Reset attributes + [attrs removeObjectForKey:NSForegroundColorAttributeName]; + [attrs removeObjectForKey:NSBackgroundColorAttributeName]; + + // Mark the range of the sequence (escape sequence + reset color sequence). + NSRange seqRange = (NSRange){ + .location = componentRange.location - [escapeSeq length], + .length = 1 + [escapeSeq length], + }; + [seqRanges addObject:[NSValue valueWithRange:seqRange]]; + } + else if (resetFg || resetBg) + { + // Reset attributes + if (resetFg) + [attrs removeObjectForKey:NSForegroundColorAttributeName]; + else + [attrs removeObjectForKey:NSBackgroundColorAttributeName]; + + // Mark the range of the sequence (escape sequence + reset color sequence). + NSRange seqRange = (NSRange){ + .location = componentRange.location - [escapeSeq length], + .length = 3 + [escapeSeq length], + }; + [seqRanges addObject:[NSValue valueWithRange:seqRange]]; + } + else if (fg || bg) + { + // Looking for something like this: "fg124,22,12;" or "bg17,24,210;". + // These are the rgb values for the foreground or background. + + NSString *str_r = nil; + NSString *str_g = nil; + NSString *str_b = nil; + + NSRange range_search = NSMakeRange(2, MIN(4, [component length] - 2)); + NSRange range_separator; + NSRange range_value; + + // Search for red separator + range_separator = [component rangeOfString:@"," options:0 range:range_search]; + if (range_separator.location != NSNotFound) { - if ([component rangeOfString:ctrlSEQ[i]].location != NSNotFound) + // Extract red substring + range_value.location = range_search.location; + range_value.length = range_separator.location - range_search.location; + + str_r = [component substringWithRange:range_value]; + + // Update search range + range_search.location = range_separator.location + range_separator.length; + range_search.length = MIN(4, [component length] - range_search.location); + + // Search for green separator + range_separator = [component rangeOfString:@"," options:0 range:range_search]; + if (range_separator.location != NSNotFound) { - switch(i) + // Extract green substring + range_value.location = range_search.location; + range_value.length = range_separator.location - range_search.location; + + str_g = [component substringWithRange:range_value]; + + // Update search range + range_search.location = range_separator.location + range_separator.length; + range_search.length = MIN(4, [component length] - range_search.location); + + // Search for blue separator + range_separator = [component rangeOfString:@";" options:0 range:range_search]; + if (range_separator.location != NSNotFound) { - case 0: - [attrs setObject:[XcodeColors blackColor] forKey:NSForegroundColorAttributeName]; - break; - case 1: - [attrs setObject:[XcodeColors redColor] forKey:NSForegroundColorAttributeName]; - break; - case 2: - [attrs setObject:[XcodeColors greenColor] forKey:NSForegroundColorAttributeName]; - break; - case 3: - [attrs setObject:[XcodeColors yellowColor] forKey:NSForegroundColorAttributeName]; - break; - case 4: - [attrs setObject:[XcodeColors blueColor] forKey:NSForegroundColorAttributeName]; - break; - case 5: - [attrs setObject:[XcodeColors magentaColor] forKey:NSForegroundColorAttributeName]; - break; - case 6: - [attrs setObject:[XcodeColors cyanColor] forKey:NSForegroundColorAttributeName]; - break; - case 7: - [attrs setObject:[XcodeColors whiteColor] forKey:NSForegroundColorAttributeName]; - break; - - case 8: - [attrs setObject:[XcodeColors blackBackgroundColor] forKey:NSBackgroundColorAttributeName]; - break; - case 9: - [attrs setObject:[XcodeColors redBackgroundColor] forKey:NSBackgroundColorAttributeName]; - break; - case 10: - [attrs setObject:[XcodeColors greenBackgroundColor] forKey:NSBackgroundColorAttributeName]; - break; - case 11: - [attrs setObject:[XcodeColors yellowBackgroundColor] forKey:NSBackgroundColorAttributeName]; - break; - case 12: - [attrs setObject:[XcodeColors blueBackgroundColor] forKey:NSBackgroundColorAttributeName]; - break; - case 13: - [attrs setObject:[XcodeColors magentaBackgroundColor] forKey:NSBackgroundColorAttributeName]; - break; - case 14: - [attrs setObject:[XcodeColors cyanBackgroundColor] forKey:NSBackgroundColorAttributeName]; - break; - case 15: - [attrs setObject:[XcodeColors whiteBackgroundColor] forKey:NSBackgroundColorAttributeName]; - break; - - default: - [attrs removeObjectForKey:NSForegroundColorAttributeName]; - [attrs removeObjectForKey:NSBackgroundColorAttributeName]; + // Extract blue substring + range_value.location = range_search.location; + range_value.length = range_separator.location - range_search.location; + + str_b = [component substringWithRange:range_value]; + + // Mark the length of the entire color code sequence. + colorCodeSeqLength = range_separator.location + range_separator.length; } - realString = [component substringFromIndex:[ctrlSEQ[i] length]]; - [clearSEQ addObject:[NSValue valueWithRange:NSMakeRange(componentRange.location - [seq length],[ctrlSEQ[i] length] + [seq length])]]; - break; } } + + if (str_r && str_g && str_b) + { + // Parse rgb values and create color + + int r = MAX(0, MIN(255, [str_r intValue])); + int g = MAX(0, MIN(255, [str_g intValue])); + int b = MAX(0, MIN(255, [str_b intValue])); + + color = [NSColor colorWithCalibratedRed:(r/255.0) + green:(g/255.0) + blue:(b/255.0) + alpha:1.0]; + + if (fg) + { + [attrs setObject:color forKey:NSForegroundColorAttributeName]; + } + else + { + [attrs setObject:color forKey:NSBackgroundColorAttributeName]; + } + + //NSString *realString = [component substringFromIndex:colorCodeSeqLength]; + + // Mark the range of the entire sequence (escape sequence + color code sequence). + NSRange seqRange = (NSRange){ + .location = componentRange.location - [escapeSeq length], + .length = colorCodeSeqLength + [escapeSeq length], + }; + [seqRanges addObject:[NSValue valueWithRange:seqRange]]; + } + else + { + // Wasn't able to parse a color code + + [attrs removeObjectForKey:NSForegroundColorAttributeName]; + [attrs removeObjectForKey:NSBackgroundColorAttributeName]; + + NSRange seqRange = (NSRange){ + .location = componentRange.location - [escapeSeq length], + .length = [escapeSeq length], + }; + [seqRanges addObject:[NSValue valueWithRange:seqRange]]; + } } - componentRange.length = [component length]; - [textStorage addAttributes:attrs range:componentRange]; - componentRange.location += componentRange.length + [seq length]; - firstPass = NO; } - for (NSValue * clearValue in clearSEQ) + componentRange.length = [component length]; + + [textStorage addAttributes:attrs range:componentRange]; + + componentRange.location += componentRange.length + [escapeSeq length]; + firstPass = NO; + + } // END: for (NSString *component in components) + + + // Now loop over all the discovered sequences, and apply "invisible" attributes to them. + + if ([seqRanges count] > 0) + { + NSDictionary *clearAttrs = + [NSDictionary dictionaryWithObjectsAndKeys: + [NSFont systemFontOfSize:0.001], NSFontAttributeName, + [NSColor clearColor], NSForegroundColorAttributeName, nil]; + + for (NSValue *seqRangeValue in seqRanges) { - NSRange range = [clearValue rangeValue]; - [textStorage addAttributes: - [NSDictionary dictionaryWithObjectsAndKeys: - [NSFont systemFontOfSize:0.001],NSFontAttributeName, - [NSColor clearColor],NSForegroundColorAttributeName, - nil] range:range]; + NSRange seqRange = [seqRangeValue rangeValue]; + [textStorage addAttributes:clearAttrs range:seqRange]; } } } --(void)fixAttributesInRange:(NSRange)aRange// NSTextStorage -{ - imp_ts_fixAttributesInRange(self,_cmd,aRange); - if (getenv(XCODE_COLORS) && !strcmp(getenv(XCODE_COLORS),"YES")) +- (void)fixAttributesInRange:(NSRange)aRange +{ + // This method "overrides" the method within NSTextStorage. + + // First we invoke the actual NSTextStorage method. + // This allows it to do any normal processing. + + IMP_NSTextStorage_fixAttributesInRange(self, _cmd, aRange); + + // Then we scan for our special escape sequences, and apply desired color attributes. + + char *xcode_colors = getenv(XCODE_COLORS); + if (xcode_colors && (strcmp(xcode_colors, "YES") == 0)) { - ApplyANSIColors(self,aRange,LC_SEQ_MAC); - ApplyANSIColors(self,aRange,LC_SEQ_IOS); + ApplyANSIColors(self, aRange, ESCAPE_SEQ_MAC); + ApplyANSIColors(self, aRange, ESCAPE_SEQ_IOS); } } @end -@implementation XcodeColors - -+(void)pluginDidLoad:(id)xcodeDirectCompatibility -{ - /* nothing */ - NSLog(@"%s",__PRETTY_FUNCTION__); -} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma mark - +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --(void)registerLaunchSystemDescriptions -{ - /* nothing */ - NSLog(@"%s",__PRETTY_FUNCTION__); -} +@implementation XcodeColors -+(void)load +IMP ReplaceInstanceMethod(Class sourceClass, SEL sourceSel, Class destinationClass, SEL destinationSel) { - NSLog(@"%s,v,9",__PRETTY_FUNCTION__); - if (getenv(XCODE_COLORS) && !strcmp(getenv(XCODE_COLORS), "YES")) - return; - - imp_ts_fixAttributesInRange = ReplaceInstanceMethod(NSTextStorage,fixAttributesInRange:,XcodeColors_NSTextStorage); + if (!sourceSel || !sourceClass || !destinationClass) + { + NSLog(@"XcodeColors: Missing parameter to ReplaceInstanceMethod"); + return nil; + } - setenv(XCODE_COLORS, "YES", 0); -} - -+(NSString*)defaultColorKeyByName:(NSString*)colorName -{ - return [NSString stringWithFormat:@"ColorLog_%@",colorName]; -} - -+(NSColor*)defaultColorWithName:(NSString*)colorName defaultColor:(NSColor*)color -{ - NSUserDefaults * pref = [NSUserDefaults standardUserDefaults]; - id defColor = [pref objectForKey:[self defaultColorKeyByName:colorName]]; - if (!defColor) + if (!destinationSel) + destinationSel = sourceSel; + + Method sourceMethod = class_getInstanceMethod(sourceClass, sourceSel); + if (!sourceMethod) { - if (!color) - return nil; - [pref setObject:[NSArchiver archivedDataWithRootObject:color] forKey:[self defaultColorKeyByName:colorName]]; - return color; + NSLog(@"XcodeColors: Unable to get sourceMethod"); + return nil; } - if ([defColor isKindOfClass:[NSData class]]) - defColor = [NSUnarchiver unarchiveObjectWithData:defColor]; - if ([defColor isKindOfClass:[NSColor class]]) - return defColor; - if ([defColor isKindOfClass:[NSString class]]) + + IMP prevImplementation = method_getImplementation(sourceMethod); + + Method destinationMethod = class_getInstanceMethod(destinationClass, destinationSel); + if (!destinationMethod) { - NSArray * components = [defColor componentsSeparatedByString:@","]; - if ([components count] == 4) - { - return [NSColor - colorWithDeviceRed:[[components objectAtIndex:0] floatValue] - green:[[components objectAtIndex:1] floatValue] - blue:[[components objectAtIndex:2] floatValue] - alpha:[[components objectAtIndex:3] floatValue]]; - } - if ([components count] == 1) - { - SEL sel = NSSelectorFromString(defColor); - if (sel && [NSColor respondsToSelector:sel]) - return [NSColor performSelector:sel]; - } + NSLog(@"XcodeColors: Unable to get destinationMethod"); + return nil; } - return color; -} - -// Foreground - -+(NSColor*)blackColor -{ - return [self defaultColorWithName:@"blackColor" defaultColor:[NSColor blackColor]]; -} - -+(NSColor*)redColor -{ - return [self defaultColorWithName:@"redColor" defaultColor: - [NSColor colorWithCalibratedRed:0x89/255.0 green:0x2A/255.0 blue:0x27/255.0 alpha:0xFF/255.0]/* 892A27 */ - ]; -} - -+(NSColor*)greenColor -{ - return [self defaultColorWithName:@"greenColor" defaultColor: - [NSColor colorWithCalibratedRed:0x1A/255.0 green:0x89/255.0 blue:0x3B/255.0 alpha:0xFF/255.0]/* 1A893B */ - ]; -} - -+(NSColor*)yellowColor -{ - return [self defaultColorWithName:@"yellowColor" defaultColor: - [NSColor colorWithCalibratedRed:0xD8/255.0 green:0xD2/255.0 blue:0x53/255.0 alpha:0xFF/255.0]/* D8D253 */ - ]; -} - -+(NSColor*)blueColor -{ - return [self defaultColorWithName:@"blueColor" defaultColor: - [NSColor colorWithCalibratedRed:0x41/255.0 green:0x87/255.0 blue:0xD8/255.0 alpha:0xFF/255.0]/* 4187D8 */ - ]; -} - -+(NSColor*)magentaColor -{ - return [self defaultColorWithName:@"magentaColor" defaultColor: - [NSColor colorWithCalibratedRed:0xC2/255.0 green:0x5E/255.0 blue:0xD8/255.0 alpha:0xFF/255.0]/* C25ED8 */ - ]; -} - -+(NSColor*)cyanColor -{ - return [self defaultColorWithName:@"cyanColor" defaultColor: - [NSColor colorWithCalibratedRed:0x3F/255.0 green:0xC6/255.0 blue:0xD8/255.0 alpha:0xFF/255.0]/* 3FC6D8 */ - ]; -} - -+(NSColor*)whiteColor -{ - return [self defaultColorWithName:@"whiteColor" defaultColor: - [NSColor colorWithCalibratedRed:0xCC/255.0 green:0xCB/255.0 blue:0xC9/255.0 alpha:0xFF/255.0]/* CCCBC9 */ - ]; -} - -// Background - -+(NSColor*)blackBackgroundColor -{ - return [self defaultColorWithName:@"blackBackgroundColor" defaultColor:[NSColor blackColor]]; -} - -+(NSColor*)redBackgroundColor -{ - return [self defaultColorWithName:@"redBackgroundColor" defaultColor: - [NSColor colorWithCalibratedRed:0xCC/255.0 green:0x8B/255.0 blue:0x8D/255.0 alpha:0xFF/255.0]/* CC8B8D */ - ]; -} - -+(NSColor*)greenBackgroundColor -{ - return [self defaultColorWithName:@"greenBackgroundColor" defaultColor: - [NSColor colorWithCalibratedRed:0xAA/255.0 green:0xCC/255.0 blue:0xAD/255.0 alpha:0xFF/255.0]/* AACCAD */ - ]; -} - -+(NSColor*)yellowBackgroundColor -{ - return [self defaultColorWithName:@"yellowBackgroundColor" defaultColor: - [NSColor colorWithCalibratedRed:0xCC/255.0 green:0xBC/255.0 blue:0x91/255.0 alpha:0xFF/255.0]/* CCBC91 */ - ]; -} - -+(NSColor*)blueBackgroundColor -{ - return [self defaultColorWithName:@"blueBackgroundColor" defaultColor: - [NSColor colorWithCalibratedRed:0xA9/255.0 green:0xC0/255.0 blue:0xCC/255.0 alpha:0xFF/255.0]/* A9C0CC */ - ]; + + IMP newImplementation = method_getImplementation(destinationMethod); + if (!newImplementation) + { + NSLog(@"XcodeColors: Unable to get newImplementation"); + return nil; + } + + method_setImplementation(sourceMethod, newImplementation); + + return prevImplementation; } -+(NSColor*)magentaBackgroundColor ++ (void)load { - return [self defaultColorWithName:@"magentaBackgroundColor" defaultColor: - [NSColor colorWithCalibratedRed:0xCC/255.0 green:0xB1/255.0 blue:0xC0/255.0 alpha:0xFF/255.0]/* CCB1C0 */ - ]; + NSLog(@"XcodeColors: %@ (v10)", NSStringFromSelector(_cmd)); + + char *xcode_colors = getenv(XCODE_COLORS); + if (xcode_colors && (strcmp(xcode_colors, "YES") != 0)) + return; + + IMP_NSTextStorage_fixAttributesInRange = + ReplaceInstanceMethod([NSTextStorage class], @selector(fixAttributesInRange:), + [XcodeColors_NSTextStorage class], @selector(fixAttributesInRange:)); + + setenv(XCODE_COLORS, "YES", 0); } -+(NSColor*)cyanBackgroundColor ++ (void)pluginDidLoad:(id)xcodeDirectCompatibility { - return [self defaultColorWithName:@"cyanBackgroundColor" defaultColor: - [NSColor colorWithCalibratedRed:0xB3/255.0 green:0xCA/255.0 blue:0xCC/255.0 alpha:0xFF/255.0]/* B3CACC */ - ]; + NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); } -+(NSColor*)whiteBackgroundColor +- (void)registerLaunchSystemDescriptions { - return [self defaultColorWithName:@"whiteBackgroundColor" defaultColor:[NSColor whiteColor]]; + NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); } @end diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index f61ad88..2bcf3b6 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 19A131E8123E5A9800B2532F /* XcodeColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 19A131E7123E5A9800B2532F /* XcodeColors.m */; }; - 19FCB50612410E410095CF63 /* MethodReplace.m in Sources */ = {isa = PBXBuildFile; fileRef = 19FCB50512410E410095CF63 /* MethodReplace.m */; }; 19FD4826133A59190072594E /* version.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 19FD4822133A58110072594E /* version.plist */; }; 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; @@ -34,8 +33,6 @@ 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 19A131E6123E5A9800B2532F /* XcodeColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeColors.h; sourceTree = ""; }; 19A131E7123E5A9800B2532F /* XcodeColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XcodeColors.m; sourceTree = ""; }; - 19FCB50412410E410095CF63 /* MethodReplace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MethodReplace.h; sourceTree = ""; }; - 19FCB50512410E410095CF63 /* MethodReplace.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MethodReplace.m; sourceTree = ""; }; 19FD4822133A58110072594E /* version.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = version.plist; sourceTree = ""; }; 32DBCF630370AF2F00C91783 /* XcodeColors_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeColors_Prefix.pch; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeColors.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -91,8 +88,6 @@ children = ( 19A131E6123E5A9800B2532F /* XcodeColors.h */, 19A131E7123E5A9800B2532F /* XcodeColors.m */, - 19FCB50412410E410095CF63 /* MethodReplace.h */, - 19FCB50512410E410095CF63 /* MethodReplace.m */, ); name = Classes; sourceTree = ""; @@ -214,7 +209,6 @@ buildActionMask = 2147483647; files = ( 19A131E8123E5A9800B2532F /* XcodeColors.m in Sources */, - 19FCB50612410E410095CF63 /* MethodReplace.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 9245ef59c770b68503153cdfe70500d9bfb9b035 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Tue, 22 May 2012 00:16:20 -0700 Subject: [PATCH 07/76] Adding TestXcodeColors demo target --- TestXcodeColors/AppDelegate.h | 8 + TestXcodeColors/AppDelegate.m | 50 + TestXcodeColors/TestXcodeColors-Info.plist | 34 + TestXcodeColors/TestXcodeColors-Prefix.pch | 7 + TestXcodeColors/en.lproj/Credits.rtf | 29 + TestXcodeColors/en.lproj/InfoPlist.strings | 2 + TestXcodeColors/en.lproj/MainMenu.xib | 4587 ++++++++++++++++++++ TestXcodeColors/main.m | 14 + XcodeColors.xcodeproj/project.pbxproj | 193 +- 9 files changed, 4922 insertions(+), 2 deletions(-) create mode 100644 TestXcodeColors/AppDelegate.h create mode 100644 TestXcodeColors/AppDelegate.m create mode 100644 TestXcodeColors/TestXcodeColors-Info.plist create mode 100644 TestXcodeColors/TestXcodeColors-Prefix.pch create mode 100644 TestXcodeColors/en.lproj/Credits.rtf create mode 100644 TestXcodeColors/en.lproj/InfoPlist.strings create mode 100644 TestXcodeColors/en.lproj/MainMenu.xib create mode 100644 TestXcodeColors/main.m diff --git a/TestXcodeColors/AppDelegate.h b/TestXcodeColors/AppDelegate.h new file mode 100644 index 0000000..806abd1 --- /dev/null +++ b/TestXcodeColors/AppDelegate.h @@ -0,0 +1,8 @@ +#import + + +@interface AppDelegate : NSObject + +@property (assign) IBOutlet NSWindow *window; + +@end diff --git a/TestXcodeColors/AppDelegate.m b/TestXcodeColors/AppDelegate.m new file mode 100644 index 0000000..c7be751 --- /dev/null +++ b/TestXcodeColors/AppDelegate.m @@ -0,0 +1,50 @@ +#import "AppDelegate.h" + +// How to apply color formatting to your log statements: +// +// To set the foreground color: +// Insert the ESCAPE_SEQ into your string, followed by "fg124,12,255;" where r=124, g=12, b=255. +// +// To set the background color: +// Insert the ESCAPE_SEQ into your string, followed by "bg12,24,36;" where r=12, g=24, b=36. +// +// To reset the foreground color (to default value): +// Insert the ESCAPE_SEQ into your string, followed by "fg;" +// +// To reset the background color (to default value): +// Insert the ESCAPE_SEQ into your string, followed by "bg;" +// +// To reset the foreground and background color (to default values) in one operation: +// Insert the ESCAPE_SEQ into your string, followed by ";" + +#define ESCAPE_SEQ_MAC @"\033[" +#define ESCAPE_SEQ_IOS @"\xC2\xA0[" + +#if TARGET_OS_IPHONE + #define ESCAPE_SEQ ESCAPE_SEQ_IOS +#else + #define ESCAPE_SEQ ESCAPE_SEQ_MAC +#endif + +#define SEQ_RESET_FG ESCAPE_SEQ @"fg;" // Clear any foreground color +#define SEQ_RESET_BG ESCAPE_SEQ @"bg;" // Clear any background color +#define SEQ_RESET ESCAPE_SEQ @";" // Clear any foreground or background color + +@implementation AppDelegate + +@synthesize window = _window; + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + NSLog(@"If you don't see colors below, make sure you follow the installation instructions in the README."); + + NSLog(ESCAPE_SEQ @"fg0,0,255;" @"Blue text" SEQ_RESET); + + NSLog(ESCAPE_SEQ @"bg220,0,0;" @"Red background" SEQ_RESET); + + NSLog(ESCAPE_SEQ @"fg0,0,255;" ESCAPE_SEQ @"bg220,0,0;" @"Blue text on red background" SEQ_RESET); + + NSLog(ESCAPE_SEQ @"fg209,57,168;" @"You can supply your own RGB values!" SEQ_RESET); +} + +@end diff --git a/TestXcodeColors/TestXcodeColors-Info.plist b/TestXcodeColors/TestXcodeColors-Info.plist new file mode 100644 index 0000000..6c196f1 --- /dev/null +++ b/TestXcodeColors/TestXcodeColors-Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.deusty.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2012 __MyCompanyName__. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/TestXcodeColors/TestXcodeColors-Prefix.pch b/TestXcodeColors/TestXcodeColors-Prefix.pch new file mode 100644 index 0000000..0d96891 --- /dev/null +++ b/TestXcodeColors/TestXcodeColors-Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'TestXcodeColors' target in the 'TestXcodeColors' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/TestXcodeColors/en.lproj/Credits.rtf b/TestXcodeColors/en.lproj/Credits.rtf new file mode 100644 index 0000000..46576ef --- /dev/null +++ b/TestXcodeColors/en.lproj/Credits.rtf @@ -0,0 +1,29 @@ +{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw9840\paperh8400 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\b\fs24 \cf0 Engineering: +\b0 \ + Some people\ +\ + +\b Human Interface Design: +\b0 \ + Some other people\ +\ + +\b Testing: +\b0 \ + Hopefully not nobody\ +\ + +\b Documentation: +\b0 \ + Whoever\ +\ + +\b With special thanks to: +\b0 \ + Mom\ +} diff --git a/TestXcodeColors/en.lproj/InfoPlist.strings b/TestXcodeColors/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/TestXcodeColors/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/TestXcodeColors/en.lproj/MainMenu.xib b/TestXcodeColors/en.lproj/MainMenu.xib new file mode 100644 index 0000000..277fb68 --- /dev/null +++ b/TestXcodeColors/en.lproj/MainMenu.xib @@ -0,0 +1,4587 @@ + + + + 1070 + 11C42 + 1938 + 1138.17 + 567.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + NSWindowTemplate + NSView + NSMenu + NSMenuItem + NSCustomObject + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + + + TestXcodeColors + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + TestXcodeColors + + + + About TestXcodeColors + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide TestXcodeColors + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit TestXcodeColors + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + + + New + n + 1048576 + 2147483647 + + + + + + Open… + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save… + s + 1048576 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find and Replace… + f + 1572864 + 2147483647 + + + 12 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling and Grammar + + 1048576 + 2147483647 + + + submenuAction: + + Spelling and Grammar + + + + Show Spelling and Grammar + : + 1048576 + 2147483647 + + + + + + Check Document Now + ; + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Check Spelling While Typing + + 1048576 + 2147483647 + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + + + + Correct Spelling Automatically + + 2147483647 + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + + + Show Substitutions + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Smart Copy/Paste + f + 1048576 + 2147483647 + + + 1 + + + + Smart Quotes + g + 1048576 + 2147483647 + + + 2 + + + + Smart Dashes + + 2147483647 + + + + + + Smart Links + G + 1179648 + 2147483647 + + + 3 + + + + Text Replacement + + 2147483647 + + + + + + + + + Transformations + + 2147483647 + + + submenuAction: + + Transformations + + + + Make Upper Case + + 2147483647 + + + + + + Make Lower Case + + 2147483647 + + + + + + Capitalize + + 2147483647 + + + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + + + Start Speaking + + 1048576 + 2147483647 + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + + + Font + + 2147483647 + + + submenuAction: + + Font + + + + Show Fonts + t + 1048576 + 2147483647 + + + + + + Bold + b + 1048576 + 2147483647 + + + 2 + + + + Italic + i + 1048576 + 2147483647 + + + 1 + + + + Underline + u + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bigger + + + 1048576 + 2147483647 + + + 3 + + + + Smaller + - + 1048576 + 2147483647 + + + 4 + + + + YES + YES + + + 2147483647 + + + + + + Kern + + 2147483647 + + + submenuAction: + + Kern + + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligature + + 2147483647 + + + submenuAction: + + Ligature + + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + + + Use Default + + 2147483647 + + + + + + Superscript + + 2147483647 + + + + + + Subscript + + 2147483647 + + + + + + Raise + + 2147483647 + + + + + + Lower + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Colors + C + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Copy Style + c + 1572864 + 2147483647 + + + + + + Paste Style + v + 1572864 + 2147483647 + + + + + _NSFontMenu + + + + + Text + + 2147483647 + + + submenuAction: + + Text + + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Writing Direction + + 2147483647 + + + submenuAction: + + Writing Direction + + + + YES + Paragraph + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + YES + Selection + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Customize Toolbar… + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 2147483647 + + + submenuAction: + + Help + + + + TestXcodeColors Help + ? + 1048576 + 2147483647 + + + + + _NSHelpMenu + + + + _NSMainMenu + + + 15 + 2 + {{335, 390}, {480, 360}} + 1954021376 + TestXcodeColors + NSWindow + + + + + 256 + {480, 360} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + AppDelegate + + + NSFontManager + + + + + + + terminate: + + + + 449 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + delegate + + + + 495 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + performClose: + + + + 193 + + + + toggleContinuousSpellChecking: + + + + 222 + + + + undo: + + + + 223 + + + + copy: + + + + 224 + + + + checkSpelling: + + + + 225 + + + + paste: + + + + 226 + + + + stopSpeaking: + + + + 227 + + + + cut: + + + + 228 + + + + showGuessPanel: + + + + 230 + + + + redo: + + + + 231 + + + + selectAll: + + + + 232 + + + + startSpeaking: + + + + 233 + + + + delete: + + + + 235 + + + + performZoom: + + + + 240 + + + + performFindPanelAction: + + + + 241 + + + + centerSelectionInVisibleArea: + + + + 245 + + + + toggleGrammarChecking: + + + + 347 + + + + toggleSmartInsertDelete: + + + + 355 + + + + toggleAutomaticQuoteSubstitution: + + + + 356 + + + + toggleAutomaticLinkDetection: + + + + 357 + + + + saveDocument: + + + + 362 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + unhideAllApplications: + + + + 370 + + + + newDocument: + + + + 373 + + + + openDocument: + + + + 374 + + + + raiseBaseline: + + + + 426 + + + + lowerBaseline: + + + + 427 + + + + copyFont: + + + + 428 + + + + subscript: + + + + 429 + + + + superscript: + + + + 430 + + + + tightenKerning: + + + + 431 + + + + underline: + + + + 432 + + + + orderFrontColorPanel: + + + + 433 + + + + useAllLigatures: + + + + 434 + + + + loosenKerning: + + + + 435 + + + + pasteFont: + + + + 436 + + + + unscript: + + + + 437 + + + + useStandardKerning: + + + + 438 + + + + useStandardLigatures: + + + + 439 + + + + turnOffLigatures: + + + + 440 + + + + turnOffKerning: + + + + 441 + + + + toggleAutomaticSpellingCorrection: + + + + 456 + + + + orderFrontSubstitutionsPanel: + + + + 458 + + + + toggleAutomaticDashSubstitution: + + + + 461 + + + + toggleAutomaticTextReplacement: + + + + 463 + + + + uppercaseWord: + + + + 464 + + + + capitalizeWord: + + + + 467 + + + + lowercaseWord: + + + + 468 + + + + pasteAsPlainText: + + + + 486 + + + + performFindPanelAction: + + + + 487 + + + + performFindPanelAction: + + + + 488 + + + + performFindPanelAction: + + + + 489 + + + + showHelp: + + + + 493 + + + + alignCenter: + + + + 518 + + + + pasteRuler: + + + + 519 + + + + toggleRuler: + + + + 520 + + + + alignRight: + + + + 521 + + + + copyRuler: + + + + 522 + + + + alignJustified: + + + + 523 + + + + alignLeft: + + + + 524 + + + + makeBaseWritingDirectionNatural: + + + + 525 + + + + makeBaseWritingDirectionLeftToRight: + + + + 526 + + + + makeBaseWritingDirectionRightToLeft: + + + + 527 + + + + makeTextWritingDirectionNatural: + + + + 528 + + + + makeTextWritingDirectionLeftToRight: + + + + 529 + + + + makeTextWritingDirectionRightToLeft: + + + + 530 + + + + performFindPanelAction: + + + + 535 + + + + addFontTrait: + + + + 421 + + + + addFontTrait: + + + + 422 + + + + modifyFont: + + + + 423 + + + + orderFrontFontPanel: + + + + 424 + + + + modifyFont: + + + + 425 + + + + window + + + + 532 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + + + + + + + + + + + + 19 + + + + + + + + 56 + + + + + + + + 217 + + + + + + + + 83 + + + + + + + + 81 + + + + + + + + + + + + + + + + + 75 + + + + + 78 + + + + + 72 + + + + + 82 + + + + + 124 + + + + + + + + 77 + + + + + 73 + + + + + 79 + + + + + 112 + + + + + 74 + + + + + 125 + + + + + + + + 126 + + + + + 205 + + + + + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + + + + + + 216 + + + + + + + + 200 + + + + + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 57 + + + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + + + 144 + + + + + 129 + + + + + 143 + + + + + 236 + + + + + 131 + + + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + + + + + + 296 + + + + + + + + + 297 + + + + + 298 + + + + + 211 + + + + + + + + 212 + + + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + + + + + + 349 + + + + + + + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 371 + + + + + + + + 372 + + + + + 375 + + + + + + + + 376 + + + + + + + + + 377 + + + + + + + + 388 + + + + + + + + + + + + + + + + + + + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + 397 + + + + + + + + 398 + + + + + + + + 399 + + + + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + 405 + + + + + + + + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + 411 + + + + + + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + + + + + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 420 + + + + + 450 + + + + + + + + 451 + + + + + + + + + + 452 + + + + + 453 + + + + + 454 + + + + + 457 + + + + + 459 + + + + + 460 + + + + + 462 + + + + + 465 + + + + + 466 + + + + + 485 + + + + + 490 + + + + + + + + 491 + + + + + + + + 492 + + + + + 494 + + + + + 496 + + + + + + + + 497 + + + + + + + + + + + + + + + + + 498 + + + + + 499 + + + + + 500 + + + + + 501 + + + + + 502 + + + + + 503 + + + + + + + + 504 + + + + + 505 + + + + + 506 + + + + + 507 + + + + + 508 + + + + + + + + + + + + + + + + 509 + + + + + 510 + + + + + 511 + + + + + 512 + + + + + 513 + + + + + 514 + + + + + 515 + + + + + 516 + + + + + 517 + + + + + 534 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{380, 496}, {480, 360}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 535 + + + + + ABCardController + NSObject + + id + id + id + id + id + id + id + + + + addCardViewField: + id + + + copy: + id + + + cut: + id + + + doDelete: + id + + + find: + id + + + paste: + id + + + saveChanges: + id + + + + ABCardView + NSButton + NSManagedObjectContext + NSSearchField + NSTextField + NSWindow + + + + mCardView + ABCardView + + + mEditButton + NSButton + + + mManagedObjectContext + NSManagedObjectContext + + + mSearchField + NSSearchField + + + mStatusTextField + NSTextField + + + mWindow + NSWindow + + + + IBProjectSource + ./Classes/ABCardController.h + + + + ABCardView + NSView + + id + id + + + + commitAndSave: + id + + + statusImageClicked: + id + + + + NSImageView + NSView + ABNameFrameView + NSView + NSImage + ABImageView + + + + mBuddyStatusImage + NSImageView + + + mHeaderView + NSView + + + mNameView + ABNameFrameView + + + mNextKeyView + NSView + + + mUserImage + NSImage + + + mUserImageView + ABImageView + + + + IBProjectSource + ./Classes/ABCardView.h + + + + ABImageView + NSImageView + + id + id + id + id + + + + copy: + id + + + cut: + id + + + delete: + id + + + paste: + id + + + + IBProjectSource + ./Classes/ABImageView.h + + + + DVTAutoLayoutView + NSView + + IBProjectSource + ./Classes/DVTAutoLayoutView.h + + + + DVTBorderedView + DVTAutoLayoutView + + contentView + NSView + + + contentView + + contentView + NSView + + + + IBProjectSource + ./Classes/DVTBorderedView.h + + + + DVTDelayedMenuButton + NSButton + + IBProjectSource + ./Classes/DVTDelayedMenuButton.h + + + + DVTGradientImageButton + NSButton + + IBProjectSource + ./Classes/DVTGradientImageButton.h + + + + DVTImageAndTextCell + NSTextFieldCell + + IBProjectSource + ./Classes/DVTImageAndTextCell.h + + + + DVTImageAndTextColumn + NSTableColumn + + IBProjectSource + ./Classes/DVTImageAndTextColumn.h + + + + DVTOutlineView + NSOutlineView + + IBProjectSource + ./Classes/DVTOutlineView.h + + + + DVTSplitView + NSSplitView + + IBProjectSource + ./Classes/DVTSplitView.h + + + + DVTStackView + DVTAutoLayoutView + + IBProjectSource + ./Classes/DVTStackView.h + + + + DVTViewController + NSViewController + + IBProjectSource + ./Classes/DVTViewController.h + + + + HFController + NSObject + + selectAll: + id + + + selectAll: + + selectAll: + id + + + + IBProjectSource + ./Classes/HFController.h + + + + HFRepresenterTextView + NSView + + selectAll: + id + + + selectAll: + + selectAll: + id + + + + IBProjectSource + ./Classes/HFRepresenterTextView.h + + + + IBEditor + NSObject + + id + id + id + + + + changeFont: + id + + + selectAll: + id + + + sizeSelectionToFit: + id + + + + IBProjectSource + ./Classes/IBEditor.h + + + + IDECapsuleListView + DVTStackView + + dataSource + id + + + dataSource + + dataSource + id + + + + IBProjectSource + ./Classes/IDECapsuleListView.h + + + + IDEDMArrayController + NSArrayController + + IBProjectSource + ./Classes/IDEDMArrayController.h + + + + IDEDMEditor + IDEEditor + + DVTBorderedView + NSView + IDEDMEditorSourceListController + DVTSplitView + + + + bottomToolbarBorderView + DVTBorderedView + + + sourceListSplitViewPane + NSView + + + sourceListViewController + IDEDMEditorSourceListController + + + splitView + DVTSplitView + + + + IBProjectSource + ./Classes/IDEDMEditor.h + + + + IDEDMEditorController + IDEViewController + + IBProjectSource + ./Classes/IDEDMEditorController.h + + + + IDEDMEditorSourceListController + IDEDMEditorController + + DVTBorderedView + IDEDMEditor + DVTImageAndTextColumn + DVTOutlineView + NSTreeController + + + + borderedView + DVTBorderedView + + + parentEditor + IDEDMEditor + + + primaryColumn + DVTImageAndTextColumn + + + sourceListOutlineView + DVTOutlineView + + + sourceListTreeController + NSTreeController + + + + IBProjectSource + ./Classes/IDEDMEditorSourceListController.h + + + + IDEDMHighlightImageAndTextCell + DVTImageAndTextCell + + IBProjectSource + ./Classes/IDEDMHighlightImageAndTextCell.h + + + + IDEDataModelBrowserEditor + IDEDMEditorController + + IDEDataModelPropertiesTableController + IDECapsuleListView + NSArrayController + IDEDataModelPropertiesTableController + IDEDataModelEntityContentsEditor + IDEDataModelPropertiesTableController + + + + attributesTableViewController + IDEDataModelPropertiesTableController + + + capsuleView + IDECapsuleListView + + + entityArrayController + NSArrayController + + + fetchedPropertiesTableViewController + IDEDataModelPropertiesTableController + + + parentEditor + IDEDataModelEntityContentsEditor + + + relationshipsTableViewController + IDEDataModelPropertiesTableController + + + + IBProjectSource + ./Classes/IDEDataModelBrowserEditor.h + + + + IDEDataModelConfigurationEditor + IDEDMEditorController + + IDECapsuleListView + IDEDataModelEditor + IDEDataModelConfigurationTableController + + + + capsuleListView + IDECapsuleListView + + + parentEditor + IDEDataModelEditor + + + tableController + IDEDataModelConfigurationTableController + + + + IBProjectSource + ./Classes/IDEDataModelConfigurationEditor.h + + + + IDEDataModelConfigurationTableController + IDEDMEditorController + + NSArrayController + NSArrayController + IDEDataModelConfigurationEditor + XDTableView + + + + configurationsArrayController + NSArrayController + + + entitiesArrayController + NSArrayController + + + parentEditor + IDEDataModelConfigurationEditor + + + tableView + XDTableView + + + + IBProjectSource + ./Classes/IDEDataModelConfigurationTableController.h + + + + IDEDataModelDiagramEditor + IDEDMEditorController + + XDDiagramView + IDEDataModelEntityContentsEditor + + + + diagramView + XDDiagramView + + + parentEditor + IDEDataModelEntityContentsEditor + + + + IBProjectSource + ./Classes/IDEDataModelDiagramEditor.h + + + + IDEDataModelEditor + IDEDMEditor + + DVTDelayedMenuButton + DVTDelayedMenuButton + NSSegmentedControl + IDEDataModelConfigurationEditor + IDEDataModelEntityContentsEditor + IDEDataModelFetchRequestEditor + NSSegmentedControl + NSTabView + + + + addEntityButton + DVTDelayedMenuButton + + + addPropertyButton + DVTDelayedMenuButton + + + browserDiagramSegmentControl + NSSegmentedControl + + + configurationViewController + IDEDataModelConfigurationEditor + + + entityContentsViewController + IDEDataModelEntityContentsEditor + + + fetchRequestViewController + IDEDataModelFetchRequestEditor + + + hierarchySegmentControl + NSSegmentedControl + + + tabView + NSTabView + + + + IBProjectSource + ./Classes/IDEDataModelEditor.h + + + + IDEDataModelEntityContentsEditor + IDEDMEditorController + + IDEDataModelBrowserEditor + IDEDataModelDiagramEditor + IDEDataModelEditor + NSTabView + + + + browserViewController + IDEDataModelBrowserEditor + + + diagramViewController + IDEDataModelDiagramEditor + + + parentEditor + IDEDataModelEditor + + + tabView + NSTabView + + + + IBProjectSource + ./Classes/IDEDataModelEntityContentsEditor.h + + + + IDEDataModelFetchRequestEditor + IDEDMEditorController + + NSArrayController + IDEDataModelEditor + IDECapsuleListView + + + + entityController + NSArrayController + + + parentEditor + IDEDataModelEditor + + + tableView + IDECapsuleListView + + + + IBProjectSource + ./Classes/IDEDataModelFetchRequestEditor.h + + + + IDEDataModelPropertiesTableController + IDEDMEditorController + + IDEDMArrayController + NSTableColumn + NSArrayController + IDEDataModelBrowserEditor + IDEDMHighlightImageAndTextCell + XDTableView + + + + arrayController + IDEDMArrayController + + + entitiesColumn + NSTableColumn + + + entityArrayController + NSArrayController + + + parentEditor + IDEDataModelBrowserEditor + + + propertyNameAndImageCell + IDEDMHighlightImageAndTextCell + + + tableView + XDTableView + + + + IBProjectSource + ./Classes/IDEDataModelPropertiesTableController.h + + + + IDEDocSetOutlineView + NSOutlineView + + IBProjectSource + ./Classes/IDEDocSetOutlineView.h + + + + IDEDocSetOutlineViewController + NSObject + + id + id + id + id + id + + + + getDocSetAction: + id + + + showProblemInfoForUpdate: + id + + + subscribeToPublisherAction: + id + + + unsubscribeFromPublisher: + id + + + updateDocSetAction: + id + + + + docSetOutlineView + IDEDocSetOutlineView + + + docSetOutlineView + + docSetOutlineView + IDEDocSetOutlineView + + + + IBProjectSource + ./Classes/IDEDocSetOutlineViewController.h + + + + IDEDocViewingPrefPaneController + IDEViewController + + id + id + id + id + id + id + id + id + id + + + + addSubscription: + id + + + checkForAndInstallUpdatesNow: + id + + + minimumFontSizeComboBoxAction: + id + + + minimumFontSizeEnabledAction: + id + + + showHelp: + id + + + showSubscriptionSheet: + id + + + subscriptionCancelAction: + id + + + toggleAutoCheckForAndInstallUpdates: + id + + + toggleDocSetInfo: + id + + + + DVTGradientImageButton + DVTGradientImageButton + DVTGradientImageButton + NSSplitView + NSView + NSView + DVTBorderedView + DVTBorderedView + NSButton + NSTextView + IDEDocSetOutlineViewController + NSComboBox + NSTextField + NSButton + NSTextField + NSWindow + NSButton + + + + _addButton + DVTGradientImageButton + + + _deleteButton + DVTGradientImageButton + + + _showInfoAreaButton + DVTGradientImageButton + + + _splitView + NSSplitView + + + _splitViewDocSetInfoSubview + NSView + + + _splitViewDocSetsListSubview + NSView + + + borderedViewAroundSplitView + DVTBorderedView + + + borderedViewBelowTable + DVTBorderedView + + + checkAndInstallNowButton + NSButton + + + docSetInfoTextView + NSTextView + + + docSetOutlineViewController + IDEDocSetOutlineViewController + + + minimumFontSizeControl + NSComboBox + + + noUpdatesAvailableMessage + NSTextField + + + showInfoButton + NSButton + + + subscriptionTextField + NSTextField + + + subscriptionWindow + NSWindow + + + validateAddSubscriptionButton + NSButton + + + + IBProjectSource + ./Classes/IDEDocViewingPrefPaneController.h + + + + IDEEditor + IDEViewController + + IBProjectSource + ./Classes/IDEEditor.h + + + + IDEViewController + DVTViewController + + IBProjectSource + ./Classes/IDEViewController.h + + + + IKImageView + + id + id + id + id + + + + copy: + id + + + crop: + id + + + cut: + id + + + paste: + id + + + + IBProjectSource + ./Classes/IKImageView.h + + + + NSDocument + + id + id + id + id + id + id + + + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + IBProjectSource + ./Classes/NSDocument.h + + + + QLPreviewBubble + NSObject + + id + id + + + + hide: + id + + + show: + id + + + + parentWindow + NSWindow + + + parentWindow + + parentWindow + NSWindow + + + + IBProjectSource + ./Classes/QLPreviewBubble.h + + + + QTMovieView + + id + id + id + id + id + + + + showAll: + id + + + showCustomButton: + id + + + toggleLoops: + id + + + zoomIn: + id + + + zoomOut: + id + + + + IBProjectSource + ./Classes/QTMovieView.h + + + + WebView + + id + id + id + id + + + + reloadFromOrigin: + id + + + resetPageZoom: + id + + + zoomPageIn: + id + + + zoomPageOut: + id + + + + IBProjectSource + ./Classes/WebView.h + + + + XDDiagramView + NSView + + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + _graphLayouterMenuItemAction: + id + + + _zoomPopUpButtonAction: + id + + + alignBottomEdges: + id + + + alignCentersHorizontallyInContainer: + id + + + alignCentersVerticallyInContainer: + id + + + alignHorizontalCenters: + id + + + alignLeftEdges: + id + + + alignRightEdges: + id + + + alignTopEdges: + id + + + alignVerticalCenters: + id + + + bringToFront: + id + + + collapseAllCompartments: + id + + + copy: + id + + + cut: + id + + + delete: + id + + + deleteBackward: + id + + + deleteForward: + id + + + deselectAll: + id + + + diagramZoomIn: + id + + + diagramZoomOut: + id + + + expandAllCompartments: + id + + + flipHorizontally: + id + + + flipVertically: + id + + + layoutGraphicsConcentrically: + id + + + layoutGraphicsHierarchically: + id + + + lock: + id + + + makeSameHeight: + id + + + makeSameWidth: + id + + + moveDown: + id + + + moveDownAndModifySelection: + id + + + moveLeft: + id + + + moveLeftAndModifySelection: + id + + + moveRight: + id + + + moveRightAndModifySelection: + id + + + moveUp: + id + + + moveUpAndModifySelection: + id + + + paste: + id + + + rollDownAllCompartments: + id + + + rollUpAllCompartments: + id + + + selectAll: + id + + + sendToBack: + id + + + sizeToFit: + id + + + toggleGridShown: + id + + + toggleHiddenGraphicsShown: + id + + + togglePageBreaksShown: + id + + + toggleRuler: + id + + + toggleSnapsToGrid: + id + + + unlock: + id + + + + _diagramController + IDEDataModelDiagramEditor + + + _diagramController + + _diagramController + IDEDataModelDiagramEditor + + + + IBProjectSource + ./Classes/XDDiagramView.h + + + + XDTableView + NSTableView + + showAllTableColumns: + id + + + showAllTableColumns: + + showAllTableColumns: + id + + + + IBProjectSource + ./Classes/XDTableView.h + + + + AppDelegate + NSObject + + id + id + + + + applicationShouldTerminate: + id + + + applicationWillFinishLaunching: + id + + + + IBProjectSource + ./Classes/AppDelegate.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + YES + 3 + + {9, 8} + {7, 2} + + YES + + diff --git a/TestXcodeColors/main.m b/TestXcodeColors/main.m new file mode 100644 index 0000000..81818fb --- /dev/null +++ b/TestXcodeColors/main.m @@ -0,0 +1,14 @@ +// +// main.m +// TestXcodeColors +// +// Created by Robbie Hanson on 5/22/12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +} diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 2bcf3b6..5019ef7 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -11,6 +11,12 @@ 19FD4826133A59190072594E /* version.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 19FD4822133A58110072594E /* version.plist */; }; 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; + DC7131FA156B71A500F0C51A /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC7131F9156B71A500F0C51A /* Cocoa.framework */; }; + DC713204156B71A500F0C51A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DC713202156B71A500F0C51A /* InfoPlist.strings */; }; + DC713206156B71A500F0C51A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DC713205156B71A500F0C51A /* main.m */; }; + DC71320A156B71A500F0C51A /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = DC713208156B71A500F0C51A /* Credits.rtf */; }; + DC71320D156B71A500F0C51A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC71320C156B71A500F0C51A /* AppDelegate.m */; }; + DC713210156B71A600F0C51A /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC71320E156B71A600F0C51A /* MainMenu.xib */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -38,6 +44,19 @@ 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeColors.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; + DC7131F6156B71A500F0C51A /* TestXcodeColors.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestXcodeColors.app; sourceTree = BUILT_PRODUCTS_DIR; }; + DC7131F9156B71A500F0C51A /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + DC7131FC156B71A500F0C51A /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + DC7131FD156B71A500F0C51A /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + DC7131FE156B71A500F0C51A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + DC713201156B71A500F0C51A /* TestXcodeColors-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestXcodeColors-Info.plist"; sourceTree = ""; }; + DC713203156B71A500F0C51A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + DC713205156B71A500F0C51A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + DC713207156B71A500F0C51A /* TestXcodeColors-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TestXcodeColors-Prefix.pch"; sourceTree = ""; }; + DC713209156B71A500F0C51A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + DC71320B156B71A500F0C51A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + DC71320C156B71A500F0C51A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + DC71320F156B71A600F0C51A /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,6 +68,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DC7131F3156B71A500F0C51A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DC7131FA156B71A500F0C51A /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -59,6 +86,8 @@ 32C88E010371C26100C91783 /* Other Sources */, 089C167CFE841241C02AAC07 /* Resources */, 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, + DC7131FF156B71A500F0C51A /* TestXcodeColors */, + DC7131F8156B71A500F0C51A /* Frameworks */, 19C28FB8FE9D52D311CA2CBB /* Products */, ); name = XcodeColors; @@ -114,6 +143,7 @@ isa = PBXGroup; children = ( 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */, + DC7131F6156B71A500F0C51A /* TestXcodeColors.app */, ); name = Products; sourceTree = ""; @@ -126,6 +156,48 @@ name = "Other Sources"; sourceTree = ""; }; + DC7131F8156B71A500F0C51A /* Frameworks */ = { + isa = PBXGroup; + children = ( + DC7131F9156B71A500F0C51A /* Cocoa.framework */, + DC7131FB156B71A500F0C51A /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + DC7131FB156B71A500F0C51A /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + DC7131FC156B71A500F0C51A /* AppKit.framework */, + DC7131FD156B71A500F0C51A /* CoreData.framework */, + DC7131FE156B71A500F0C51A /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + DC7131FF156B71A500F0C51A /* TestXcodeColors */ = { + isa = PBXGroup; + children = ( + DC71320B156B71A500F0C51A /* AppDelegate.h */, + DC71320C156B71A500F0C51A /* AppDelegate.m */, + DC71320E156B71A600F0C51A /* MainMenu.xib */, + DC713200156B71A500F0C51A /* Supporting Files */, + ); + path = TestXcodeColors; + sourceTree = ""; + }; + DC713200156B71A500F0C51A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + DC713201156B71A500F0C51A /* TestXcodeColors-Info.plist */, + DC713202156B71A500F0C51A /* InfoPlist.strings */, + DC713205156B71A500F0C51A /* main.m */, + DC713207156B71A500F0C51A /* TestXcodeColors-Prefix.pch */, + DC713208156B71A500F0C51A /* Credits.rtf */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -149,6 +221,23 @@ productReference = 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */; productType = "com.apple.product-type.bundle"; }; + DC7131F5156B71A500F0C51A /* TestXcodeColors */ = { + isa = PBXNativeTarget; + buildConfigurationList = DC713213156B71A600F0C51A /* Build configuration list for PBXNativeTarget "TestXcodeColors" */; + buildPhases = ( + DC7131F2156B71A500F0C51A /* Sources */, + DC7131F3156B71A500F0C51A /* Frameworks */, + DC7131F4156B71A500F0C51A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TestXcodeColors; + productName = TestXcodeColors; + productReference = DC7131F6156B71A500F0C51A /* TestXcodeColors.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -166,12 +255,14 @@ Japanese, French, German, + en, ); mainGroup = 089C166AFE841209C02AAC07 /* XcodeColors */; projectDirPath = ""; projectRoot = ""; targets = ( 8D5B49AC048680CD000E48DA /* XcodeColors */, + DC7131F5156B71A500F0C51A /* TestXcodeColors */, ); }; /* End PBXProject section */ @@ -185,6 +276,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DC7131F4156B71A500F0C51A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC713204156B71A500F0C51A /* InfoPlist.strings in Resources */, + DC71320A156B71A500F0C51A /* Credits.rtf in Resources */, + DC713210156B71A600F0C51A /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -212,6 +313,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DC7131F2156B71A500F0C51A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC713206156B71A500F0C51A /* main.m in Sources */, + DC71320D156B71A500F0C51A /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ @@ -223,6 +333,30 @@ name = InfoPlist.strings; sourceTree = ""; }; + DC713202156B71A500F0C51A /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + DC713203156B71A500F0C51A /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + DC713208156B71A500F0C51A /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + DC713209156B71A500F0C51A /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + DC71320E156B71A600F0C51A /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + DC71320F156B71A600F0C51A /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -232,6 +366,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_GC = supported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; INFOPLIST_FILE = Info.plist; @@ -246,6 +381,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_OBJC_GC = supported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; INFOPLIST_FILE = Info.plist; @@ -260,7 +396,6 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -275,7 +410,6 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.6; @@ -283,6 +417,53 @@ }; name = Release; }; + DC713211156B71A600F0C51A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "TestXcodeColors/TestXcodeColors-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = "TestXcodeColors/TestXcodeColors-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + DC713212156B71A600F0C51A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "TestXcodeColors/TestXcodeColors-Prefix.pch"; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = "TestXcodeColors/TestXcodeColors-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -304,6 +485,14 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + DC713213156B71A600F0C51A /* Build configuration list for PBXNativeTarget "TestXcodeColors" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DC713211156B71A600F0C51A /* Debug */, + DC713212156B71A600F0C51A /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; /* End XCConfigurationList section */ }; rootObject = 089C1669FE841209C02AAC07 /* Project object */; From 9bce1782b12712b40f3fba4f3545efeafbeb4688 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Tue, 22 May 2012 00:17:26 -0700 Subject: [PATCH 08/76] Removing unnecessary script --- open | 2 -- 1 file changed, 2 deletions(-) delete mode 100755 open diff --git a/open b/open deleted file mode 100755 index 0e1ada2..0000000 --- a/open +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -open *.xcodeproj From 094d1089492f37f07995f8a53e1e820539145d5b Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Tue, 22 May 2012 00:17:50 -0700 Subject: [PATCH 09/76] Updating README file with installation instructions --- README | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/README b/README index addc7e5..fb35f29 100644 --- a/README +++ b/README @@ -1,4 +1,47 @@ -XcodeColors is an easy-to-use plugin for Xcode 3 & 4 developers. -This project is designed to simplify software debugging process by colorizing debugger console output. +XcodeColors is an easy-to-use plugin for Xcode 3 & 4. +This project is designed to enable colorizing debugger console output. -See ColorLog project for usage demo. +XcodeColor installation instructions for Xcode 4: + +1. Compile the XcodeColors target for Release (not Debug). +When you do this, the Xcode plugin is automatically copied to the proper location. +This is done via the install script, run by xcb-install.pl via an Xcode build phase. + +2. Quit Xcode. + +3. Add the following code to ~/.gdbinit: + +define xcodecolors +attach Xcode +p (char)[[NSBundle bundleWithPath:@"~/Library/Application Support/SIMBL/Plugins/XcodeColors.bundle"] load] +detach +end + +But what about LLDB? Relax, it also works for LLDB. + +4. Launch Xcode + +5. Open the Terminal. +Run gdb (Type gdb then hit enter). +You'll get a gdb command prompt. +Run xcodecolors (Type xcodecolors then hit enter). +It should look something like this in the Terminal: + +~ $ gdb +(gdb) xcodecolors +Attaching to process ... +Reading symbols for shared libraries ... +.. done +0x00007fff84d242fa in mach_msg_trap () +$1 = 1 '\001' +(gdb) quit + +This step is required only once after Xcode start. + +5. You're done! +Want to see it in action? +Run the TestXcodeColors target in this project. + + +For installation instructions for earlier versions of Xcode: +http://deepitpro.com/en/articles/XcodeColors/info/index.shtml From 6847d125763b5256cace2f741c00cadfd8522458 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 24 May 2012 01:18:19 -0700 Subject: [PATCH 10/76] Prefixing define's with "XCODE_COLORS" --- TestXcodeColors/AppDelegate.m | 25 ++++++++++++++----------- XcodeColors.m | 18 +++++++++--------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/TestXcodeColors/AppDelegate.m b/TestXcodeColors/AppDelegate.m index c7be751..1b7cdbd 100644 --- a/TestXcodeColors/AppDelegate.m +++ b/TestXcodeColors/AppDelegate.m @@ -17,18 +17,18 @@ // To reset the foreground and background color (to default values) in one operation: // Insert the ESCAPE_SEQ into your string, followed by ";" -#define ESCAPE_SEQ_MAC @"\033[" -#define ESCAPE_SEQ_IOS @"\xC2\xA0[" +#define XCODE_COLORS_ESCAPE_MAC @"\033[" +#define XCODE_COLORS_ESCAPE_IOS @"\xC2\xA0[" #if TARGET_OS_IPHONE - #define ESCAPE_SEQ ESCAPE_SEQ_IOS + #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_IOS #else - #define ESCAPE_SEQ ESCAPE_SEQ_MAC + #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_MAC #endif -#define SEQ_RESET_FG ESCAPE_SEQ @"fg;" // Clear any foreground color -#define SEQ_RESET_BG ESCAPE_SEQ @"bg;" // Clear any background color -#define SEQ_RESET ESCAPE_SEQ @";" // Clear any foreground or background color +#define XCODE_COLORS_RESET_FG XCODE_COLORS_ESCAPE @"fg;" // Clear any foreground color +#define XCODE_COLORS_RESET_BG XCODE_COLORS_ESCAPE @"bg;" // Clear any background color +#define XCODE_COLORS_RESET XCODE_COLORS_ESCAPE @";" // Clear any foreground or background color @implementation AppDelegate @@ -38,13 +38,16 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { NSLog(@"If you don't see colors below, make sure you follow the installation instructions in the README."); - NSLog(ESCAPE_SEQ @"fg0,0,255;" @"Blue text" SEQ_RESET); + NSLog(XCODE_COLORS_ESCAPE @"fg0,0,255;" @"Blue text" XCODE_COLORS_RESET); - NSLog(ESCAPE_SEQ @"bg220,0,0;" @"Red background" SEQ_RESET); + NSLog(XCODE_COLORS_ESCAPE @"bg220,0,0;" @"Red background" XCODE_COLORS_RESET); - NSLog(ESCAPE_SEQ @"fg0,0,255;" ESCAPE_SEQ @"bg220,0,0;" @"Blue text on red background" SEQ_RESET); + NSLog(XCODE_COLORS_ESCAPE @"fg0,0,255;" + XCODE_COLORS_ESCAPE @"bg220,0,0;" + @"Blue text on red background" + XCODE_COLORS_RESET); - NSLog(ESCAPE_SEQ @"fg209,57,168;" @"You can supply your own RGB values!" SEQ_RESET); + NSLog(XCODE_COLORS_ESCAPE @"fg209,57,168;" @"You can supply your own RGB values!" XCODE_COLORS_RESET); } @end diff --git a/XcodeColors.m b/XcodeColors.m index 1dbdf97..bde16d4 100644 --- a/XcodeColors.m +++ b/XcodeColors.m @@ -32,18 +32,18 @@ // Feel free to copy the define statements below into your code. // -#define ESCAPE_SEQ_MAC @"\033[" -#define ESCAPE_SEQ_IOS @"\xC2\xA0[" +#define XCODE_COLORS_ESCAPE_MAC @"\033[" +#define XCODE_COLORS_ESCAPE_IOS @"\xC2\xA0[" #if TARGET_OS_IPHONE - #define ESCAPE_SEQ ESCAPE_SEQ_IOS + #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_IOS #else - #define ESCAPE_SEQ ESCAPE_SEQ_MAC + #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_MAC #endif -#define SEQ_RESET_FG ESCAPE_SEQ @"fg;" // Clear any foreground color -#define SEQ_RESET_BG ESCAPE_SEQ @"bg;" // Clear any background color -#define SEQ_RESET ESCAPE_SEQ @";" // Clear any foreground or background color +#define XCODE_COLORS_RESET_FG XCODE_COLORS_ESCAPE @"fg;" // Clear any foreground color +#define XCODE_COLORS_RESET_BG XCODE_COLORS_ESCAPE @"bg;" // Clear any background color +#define XCODE_COLORS_RESET XCODE_COLORS_ESCAPE @";" // Clear any foreground or background color // @@ -296,8 +296,8 @@ - (void)fixAttributesInRange:(NSRange)aRange char *xcode_colors = getenv(XCODE_COLORS); if (xcode_colors && (strcmp(xcode_colors, "YES") == 0)) { - ApplyANSIColors(self, aRange, ESCAPE_SEQ_MAC); - ApplyANSIColors(self, aRange, ESCAPE_SEQ_IOS); + ApplyANSIColors(self, aRange, XCODE_COLORS_ESCAPE_MAC); + ApplyANSIColors(self, aRange, XCODE_COLORS_ESCAPE_IOS); } } From 7b44a23582caea42c263f57bc85f3f43ee654813 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 24 May 2012 01:19:12 -0700 Subject: [PATCH 11/76] Updating README, and converting it to markdown --- README | 47 ------------ README.markdown | 186 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+), 47 deletions(-) delete mode 100644 README create mode 100644 README.markdown diff --git a/README b/README deleted file mode 100644 index fb35f29..0000000 --- a/README +++ /dev/null @@ -1,47 +0,0 @@ -XcodeColors is an easy-to-use plugin for Xcode 3 & 4. -This project is designed to enable colorizing debugger console output. - -XcodeColor installation instructions for Xcode 4: - -1. Compile the XcodeColors target for Release (not Debug). -When you do this, the Xcode plugin is automatically copied to the proper location. -This is done via the install script, run by xcb-install.pl via an Xcode build phase. - -2. Quit Xcode. - -3. Add the following code to ~/.gdbinit: - -define xcodecolors -attach Xcode -p (char)[[NSBundle bundleWithPath:@"~/Library/Application Support/SIMBL/Plugins/XcodeColors.bundle"] load] -detach -end - -But what about LLDB? Relax, it also works for LLDB. - -4. Launch Xcode - -5. Open the Terminal. -Run gdb (Type gdb then hit enter). -You'll get a gdb command prompt. -Run xcodecolors (Type xcodecolors then hit enter). -It should look something like this in the Terminal: - -~ $ gdb -(gdb) xcodecolors -Attaching to process ... -Reading symbols for shared libraries ... -.. done -0x00007fff84d242fa in mach_msg_trap () -$1 = 1 '\001' -(gdb) quit - -This step is required only once after Xcode start. - -5. You're done! -Want to see it in action? -Run the TestXcodeColors target in this project. - - -For installation instructions for earlier versions of Xcode: -http://deepitpro.com/en/articles/XcodeColors/info/index.shtml diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..0418c8c --- /dev/null +++ b/README.markdown @@ -0,0 +1,186 @@ +XcodeColors is an easy-to-use plugin for Xcode 3 & 4. +This project is designed to enable colorizing debugger console output. + +*** + +### XcodeColors installation instructions for Xcode 4: + +1. Compile the XcodeColors target for Release (not Debug). + + When you do this, the Xcode plugin is automatically copied to the proper location. + This is done via the install script, run by xcb-install.pl via an Xcode build phase. + +2. Quit Xcode. + +3. Add the following code to ~/.gdbinit: + + ```shell + define xcodecolors + attach Xcode + p (char)[[NSBundle bundleWithPath:@"~/Library/Application Support/SIMBL/Plugins/XcodeColors.bundle"] load] + detach + end + ``` + + But what about LLDB? Relax, it also works for LLDB. + +4. Launch Xcode + +5. Open the Terminal. + + Run gdb (Type gdb then hit enter). + You'll get a gdb command prompt. + Run xcodecolors (Type xcodecolors then hit enter). + It should look something like this in the Terminal: + + ```shell + ~ $ gdb + (gdb) xcodecolors + Attaching to process ... + Reading symbols for shared libraries ... + .. done + 0x00007fff84d242fa in mach_msg_trap () + $1 = 1 '\001' + (gdb) quit + ``` + + This step is required only once after Xcode start. + +5. You're done! + + Want to see it in action? + Run the TestXcodeColors target in this project. + + +### XcodeColors installation instructions for Xcode 3: + +Wow, you're still running Xcode 3? + +See this page for installation instructions: +http://deepitpro.com/en/articles/XcodeColors/info/index.shtml + +*** + +### How to use XcodeColors + +- Testing to see if XcodeColors is installed and enabled: + + ```objective-c + char *xcode_colors = getenv(XCODE_COLORS); + if (xcode_colors && (strcmp(xcode_colors, "YES") == 0)) + { + // XcodeColors is installed and enabled! + } + ``` + +- Enabling / Disabling XcodeColors + + ```objective-c + setenv(XCODE_COLORS, "YES", 0); // Enables XcodeColors (you obviously have to install it too) + + setenv(XCODE_COLORS, "NO", 0); // Disables XcodeColors + ``` + +- Using XcodeColors + + The following is copied from the top of the XcodeColors.m file: + + ```objective-c + // How to apply color formatting to your log statements: + // + // To set the foreground color: + // Insert the ESCAPE_SEQ into your string, followed by "fg124,12,255;" where r=124, g=12, b=255. + // + // To set the background color: + // Insert the ESCAPE_SEQ into your string, followed by "bg12,24,36;" where r=12, g=24, b=36. + // + // To reset the foreground color (to default value): + // Insert the ESCAPE_SEQ into your string, followed by "fg;" + // + // To reset the background color (to default value): + // Insert the ESCAPE_SEQ into your string, followed by "bg;" + // + // To reset the foreground and background color (to default values) in one operation: + // Insert the ESCAPE_SEQ into your string, followed by ";" + + #define XCODE_COLORS_ESCAPE_MAC @"\033[" + #define XCODE_COLORS_ESCAPE_IOS @"\xC2\xA0[" + + #if TARGET_OS_IPHONE + #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_IOS + #else + #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_MAC + #endif + + #define XCODE_COLORS_RESET_FG XCODE_COLORS_ESCAPE @"fg;" // Clear any foreground color + #define XCODE_COLORS_RESET_BG XCODE_COLORS_ESCAPE @"bg;" // Clear any background color + #define XCODE_COLORS_RESET XCODE_COLORS_ESCAPE @";" // Clear any foreground or background color + ``` + + Then feel free to colorize your log statements however you see fit! + Here's an example to get you started: + + ```objective-c + NSLog(XCODE_COLORS_ESCAPE @"fg0,0,255;" @"Blue text" XCODE_COLORS_RESET); + + NSLog(XCODE_COLORS_ESCAPE @"bg220,0,0;" @"Red background" XCODE_COLORS_RESET); + + NSLog(XCODE_COLORS_ESCAPE @"fg0,0,255;" + XCODE_COLORS_ESCAPE @"bg220,0,0;" + @"Blue text on red background" + XCODE_COLORS_RESET); + + NSLog(XCODE_COLORS_ESCAPE @"fg209,57,168;" @"You can supply your own RGB values!" XCODE_COLORS_RESET); + ``` + +*** + +### CocoaLumberjack + +The [CocoaLumberjack](https://github.com/robbiehanson/CocoaLumberjack) framework natively supports XcodeColors! +Lumberjack is a fast & simple, yet powerful & flexible logging framework for Mac and iOS. + +From it's GitHub page: + +> [Lumberjack] is similar in concept to other popular logging frameworks such as log4j, +> yet is designed specifically for Objective-C, and takes advantage of features such as +> multi-threading, grand central dispatch (if available), lockless atomic operations, +> and the dynamic nature of the Objective-C runtime. +> +> In most cases it is an order of magnitude faster than NSLog. + +It's super easy to use XcodeColors with Lumberjack! + +And if color isn't available (e.g. XcodeColors isn't installed), then the framework just automatically does the right thing. So if you install XcodeColors on your machine, and enable colors in your team project, your teammates (without XcodeColors... yet) won't suffer, or even notice. + +Plus Lumberjack colors automatically work if you run your application from within a terminal! (E.g. Terminal.app, not Xcode) If your terminal supports color (xterm-color or xterm-256color) like the Terminal.app in Lion, then Lumberjack automatically maps your color customizations to the closest available color supported by the shell! + +```objective-c +// Standard lumberjack initialization +[DDLog addLogger:[DDTTYLogger sharedInstance]]; + +// And then enable colors +[[DDTTYLogger sharedInstance] setColorsEnabled:YES]; + +// Check out default colors: +// Error : Red +// Warn : Orange + +DDLogError(@"Paper jam"); // Red +DDLogWarn(@"Toner is low"); // Orange +DDLogInfo(@"Warming up printer (pre-customization)"); // Default (black) +DDLogVerbose(@"Intializing protcol x26"); // Default (black) + +// Now let's do some customization: +// Info : Pink + +#if TARGET_OS_IPHONE +UIColor *pink = [UIColor colorWithRed:(255/255.0) green:(58/255.0) blue:(159/255.0) alpha:1.0]; +#else +NSColor *pink = [NSColor colorWithCalibratedRed:(255/255.0) green:(58/255.0) blue:(159/255.0) alpha:1.0]; +#endif + +[[DDTTYLogger sharedInstance] setForegroundColor:pink backgroundColor:nil forFlag:LOG_FLAG_INFO]; + +DDLogInfo(@"Warming up printer (post-customization)"); // Pink ! +``` From 108d610d93cfd27874c2e3d0ad56918fdd0239bc Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 24 May 2012 13:26:40 -0700 Subject: [PATCH 12/76] Updating README instructions --- README.markdown | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.markdown b/README.markdown index 0418c8c..78e31bc 100644 --- a/README.markdown +++ b/README.markdown @@ -5,10 +5,18 @@ This project is designed to enable colorizing debugger console output. ### XcodeColors installation instructions for Xcode 4: -1. Compile the XcodeColors target for Release (not Debug). - - When you do this, the Xcode plugin is automatically copied to the proper location. - This is done via the install script, run by xcb-install.pl via an Xcode build phase. +1. Install the XcodeColors.xcplugin package. + + There are 2 ways to accomplish this: + - Download the XcodeColors.xcplugin.zip file from the downloads page. + Unzip the file, which will give you a XcodeColors.xcplugin folder. + Copy this folder to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" + - Compile from source. + Download or clone the repository. + Compile the XcodeColors target for Release (not Debug). + When you do this, the Xcode plugin is automatically copied to the proper location. + This is done via the xcb-install.pl install script that is run as part of an Xcode build phase. + Validate the plugin was copied to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" 2. Quit Xcode. @@ -44,7 +52,7 @@ This project is designed to enable colorizing debugger console output. (gdb) quit ``` - This step is required only once after Xcode start. + This step is required only once after Xcode starts. 5. You're done! From f1ae31f61c886ea706c044a40d137597bd5d2a78 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Fri, 25 May 2012 12:59:32 -0700 Subject: [PATCH 13/76] Updating installation instructions (gdb stuff isn't necessary for Xcode 4) --- README.markdown | 80 ++++++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 54 deletions(-) diff --git a/README.markdown b/README.markdown index 78e31bc..cee3963 100644 --- a/README.markdown +++ b/README.markdown @@ -5,60 +5,32 @@ This project is designed to enable colorizing debugger console output. ### XcodeColors installation instructions for Xcode 4: -1. Install the XcodeColors.xcplugin package. - - There are 2 ways to accomplish this: - - Download the XcodeColors.xcplugin.zip file from the downloads page. - Unzip the file, which will give you a XcodeColors.xcplugin folder. - Copy this folder to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" - - Compile from source. - Download or clone the repository. - Compile the XcodeColors target for Release (not Debug). +There are 2 ways to accomplish this: + +1. **Simple install using precompiled xcode plugin** + - Download the XcodeColors.xcplugin.zip file from the downloads page + https://github.com/robbiehanson/XcodeColors/downloads + - Unzip the downloaded file, which will give you the "XcodeColors.xcplugin" folder. + Note that finder will likely not display the ".xcplugin" extension. This is normal. + If you want you can verify the extension is there via Finder's "get info" or via the Terminal. + - Copy this folder to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" + You might need to create the "Plug-ins" folder if it doesn't already exist. If so, double-check your spelling. + - Quit Xcode (if it's running) + - Launch Xcode. + - Want to see it in action? + The repository contains an Xcode project with a TestXcodeColors target. + You can run this target to see XcodeColors in action. + +2. **Compile from source** + - Download or clone the repository. + - Compile the XcodeColors target for Release (not Debug). When you do this, the Xcode plugin is automatically copied to the proper location. This is done via the xcb-install.pl install script that is run as part of an Xcode build phase. - Validate the plugin was copied to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" - -2. Quit Xcode. - -3. Add the following code to ~/.gdbinit: - - ```shell - define xcodecolors - attach Xcode - p (char)[[NSBundle bundleWithPath:@"~/Library/Application Support/SIMBL/Plugins/XcodeColors.bundle"] load] - detach - end - ``` - - But what about LLDB? Relax, it also works for LLDB. - -4. Launch Xcode - -5. Open the Terminal. - - Run gdb (Type gdb then hit enter). - You'll get a gdb command prompt. - Run xcodecolors (Type xcodecolors then hit enter). - It should look something like this in the Terminal: - - ```shell - ~ $ gdb - (gdb) xcodecolors - Attaching to process ... - Reading symbols for shared libraries ... - .. done - 0x00007fff84d242fa in mach_msg_trap () - $1 = 1 '\001' - (gdb) quit - ``` - - This step is required only once after Xcode starts. - -5. You're done! - - Want to see it in action? - Run the TestXcodeColors target in this project. - + Validate the plugin was copied to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" + - Quit Xcode (if it's running) + - Launch Xcode. + - Now compile and run the TestXcodeColors target (debug or release, doesn't matter). + This will test your installation, and you should see colors in your Xcode console. ### XcodeColors installation instructions for Xcode 3: @@ -84,9 +56,9 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml - Enabling / Disabling XcodeColors ```objective-c - setenv(XCODE_COLORS, "YES", 0); // Enables XcodeColors (you obviously have to install it too) + setenv("XcodeColors", "YES", 0); // Enables XcodeColors (you obviously have to install it too) - setenv(XCODE_COLORS, "NO", 0); // Disables XcodeColors + setenv("XcodeColors", "NO", 0); // Disables XcodeColors ``` - Using XcodeColors From c35c67ae4ae7a8262feee1f446a796f8757dd688 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Fri, 25 May 2012 13:08:58 -0700 Subject: [PATCH 14/76] Updating description to better describe what it does. --- README.markdown | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.markdown b/README.markdown index cee3963..fbaf9a9 100644 --- a/README.markdown +++ b/README.markdown @@ -1,5 +1,13 @@ -XcodeColors is an easy-to-use plugin for Xcode 3 & 4. -This project is designed to enable colorizing debugger console output. +XcodeColors allows you to use colors in the Xcode debugging console. +It's designed to aid in the debugging process. For example: +- Make error messages stand out by printing them out in red. +- Use different colors for logically separate parts of your code. + +You're not limited to a restricted color palate. +You can specify, in your source code, the exact RGB values you'd like to use. +You can specify foreground and/or background color(s). + +XcodeColors is a simple plugin for Xcode 3 & 4. *** @@ -29,7 +37,7 @@ There are 2 ways to accomplish this: Validate the plugin was copied to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" - Quit Xcode (if it's running) - Launch Xcode. - - Now compile and run the TestXcodeColors target (debug or release, doesn't matter). + - Now compile and run the TestXcodeColors target (debug or release, doesn't matter). This will test your installation, and you should see colors in your Xcode console. ### XcodeColors installation instructions for Xcode 3: From c6e304e798dc5565819704409c0ab03bf3678193 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Fri, 25 May 2012 13:13:45 -0700 Subject: [PATCH 15/76] Tweaking README markdown --- README.markdown | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.markdown b/README.markdown index fbaf9a9..6239caa 100644 --- a/README.markdown +++ b/README.markdown @@ -77,19 +77,19 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml // How to apply color formatting to your log statements: // // To set the foreground color: - // Insert the ESCAPE_SEQ into your string, followed by "fg124,12,255;" where r=124, g=12, b=255. + // Insert the ESCAPE into your string, followed by "fg124,12,255;" where r=124, g=12, b=255. // // To set the background color: - // Insert the ESCAPE_SEQ into your string, followed by "bg12,24,36;" where r=12, g=24, b=36. + // Insert the ESCAPE into your string, followed by "bg12,24,36;" where r=12, g=24, b=36. // // To reset the foreground color (to default value): - // Insert the ESCAPE_SEQ into your string, followed by "fg;" + // Insert the ESCAPE into your string, followed by "fg;" // // To reset the background color (to default value): - // Insert the ESCAPE_SEQ into your string, followed by "bg;" + // Insert the ESCAPE into your string, followed by "bg;" // // To reset the foreground and background color (to default values) in one operation: - // Insert the ESCAPE_SEQ into your string, followed by ";" + // Insert the ESCAPE into your string, followed by ";" #define XCODE_COLORS_ESCAPE_MAC @"\033[" #define XCODE_COLORS_ESCAPE_IOS @"\xC2\xA0[" From 72a472e46f2c665eea8272b42a584f8dc62f1705 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 31 May 2012 17:09:03 -0700 Subject: [PATCH 16/76] Bug fix when running on iOS device (XCODE_COLORS_ESCAPE_IOS wasn't working. But XCODE_COLORS_ESCAPE_MAC seems to work everywhere. This actually simplifies things!) --- XcodeColors.m | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/XcodeColors.m b/XcodeColors.m index bde16d4..709b48b 100644 --- a/XcodeColors.m +++ b/XcodeColors.m @@ -32,14 +32,7 @@ // Feel free to copy the define statements below into your code. // -#define XCODE_COLORS_ESCAPE_MAC @"\033[" -#define XCODE_COLORS_ESCAPE_IOS @"\xC2\xA0[" - -#if TARGET_OS_IPHONE - #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_IOS -#else - #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_MAC -#endif +#define XCODE_COLORS_ESCAPE @"\033[" #define XCODE_COLORS_RESET_FG XCODE_COLORS_ESCAPE @"fg;" // Clear any foreground color #define XCODE_COLORS_RESET_BG XCODE_COLORS_ESCAPE @"bg;" // Clear any background color @@ -296,8 +289,7 @@ - (void)fixAttributesInRange:(NSRange)aRange char *xcode_colors = getenv(XCODE_COLORS); if (xcode_colors && (strcmp(xcode_colors, "YES") == 0)) { - ApplyANSIColors(self, aRange, XCODE_COLORS_ESCAPE_MAC); - ApplyANSIColors(self, aRange, XCODE_COLORS_ESCAPE_IOS); + ApplyANSIColors(self, aRange, XCODE_COLORS_ESCAPE); } } @@ -350,7 +342,7 @@ IMP ReplaceInstanceMethod(Class sourceClass, SEL sourceSel, Class destinationCla + (void)load { - NSLog(@"XcodeColors: %@ (v10)", NSStringFromSelector(_cmd)); + NSLog(@"XcodeColors: %@ (v10.1)", NSStringFromSelector(_cmd)); char *xcode_colors = getenv(XCODE_COLORS); if (xcode_colors && (strcmp(xcode_colors, "YES") != 0)) From 158c02be9a50acca5196fc230a7d774664b18156 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 31 May 2012 17:26:08 -0700 Subject: [PATCH 17/76] Updating README --- README.markdown | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.markdown b/README.markdown index 6239caa..866be67 100644 --- a/README.markdown +++ b/README.markdown @@ -92,13 +92,6 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml // Insert the ESCAPE into your string, followed by ";" #define XCODE_COLORS_ESCAPE_MAC @"\033[" - #define XCODE_COLORS_ESCAPE_IOS @"\xC2\xA0[" - - #if TARGET_OS_IPHONE - #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_IOS - #else - #define XCODE_COLORS_ESCAPE XCODE_COLORS_ESCAPE_MAC - #endif #define XCODE_COLORS_RESET_FG XCODE_COLORS_ESCAPE @"fg;" // Clear any foreground color #define XCODE_COLORS_RESET_BG XCODE_COLORS_ESCAPE @"bg;" // Clear any background color From d51c694f8af4c4a3f1d3e012960a41a1870b805b Mon Sep 17 00:00:00 2001 From: Nicholas Tau Date: Wed, 25 Sep 2013 11:26:27 +0800 Subject: [PATCH 18/76] change default scheme from 'debug' to 'release' --- XcodeColors.xcodeproj/project.pbxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 5019ef7..fcddba9 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -492,6 +492,7 @@ DC713212156B71A600F0C51A /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; From 5ff288dd86841c8ff7848a1909f45f183fbf4721 Mon Sep 17 00:00:00 2001 From: Nicholas Tau Date: Wed, 25 Sep 2013 11:26:48 +0800 Subject: [PATCH 19/76] remove unused 'version.plist ' --- XcodeColors.xcodeproj/project.pbxproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index fcddba9..b589a07 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 19A131E8123E5A9800B2532F /* XcodeColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 19A131E7123E5A9800B2532F /* XcodeColors.m */; }; - 19FD4826133A59190072594E /* version.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 19FD4822133A58110072594E /* version.plist */; }; 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; DC7131FA156B71A500F0C51A /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC7131F9156B71A500F0C51A /* Cocoa.framework */; }; @@ -26,7 +25,6 @@ dstPath = Contents; dstSubfolderSpec = 1; files = ( - 19FD4826133A59190072594E /* version.plist in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -39,7 +37,6 @@ 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 19A131E6123E5A9800B2532F /* XcodeColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeColors.h; sourceTree = ""; }; 19A131E7123E5A9800B2532F /* XcodeColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XcodeColors.m; sourceTree = ""; }; - 19FD4822133A58110072594E /* version.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = version.plist; sourceTree = ""; }; 32DBCF630370AF2F00C91783 /* XcodeColors_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeColors_Prefix.pch; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeColors.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -105,7 +102,6 @@ 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( - 19FD4822133A58110072594E /* version.plist */, 8D5B49B7048680CD000E48DA /* Info.plist */, 089C167DFE841241C02AAC07 /* InfoPlist.strings */, ); From 3a0ce5084c310e97b534b94242bef7166716923c Mon Sep 17 00:00:00 2001 From: Nicholas Tau Date: Wed, 25 Sep 2013 11:27:03 +0800 Subject: [PATCH 20/76] support to xcode5 --- Info.plist | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Info.plist b/Info.plist index feaf522..f8fb473 100644 --- a/Info.plist +++ b/Info.plist @@ -12,6 +12,11 @@ ru.DeepIT.${PRODUCT_NAME} CFBundleInfoDictionaryVersion 6.0 + DVTPlugInCompatibilityUUIDs + + 63FC1C47-140D-42B0-BB4D-A10B2D225574 + 37B30044-3B14-46BA-ABAA-F01000C27B63 + CFBundleName ${PRODUCT_NAME} CFBundlePackageType From c8b1d6cf388658aa887004c135d978de7fcd690c Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 26 Sep 2013 15:33:37 -0700 Subject: [PATCH 21/76] Replaced install script with simple compiler directives. (thanks mralexgray) --- Info.plist | 3 ++ XcodeColors.xcodeproj/project.pbxproj | 44 +++++---------------------- xcb-install.pl | 3 -- 3 files changed, 11 insertions(+), 39 deletions(-) delete mode 100755 xcb-install.pl diff --git a/Info.plist b/Info.plist index f8fb473..be512a1 100644 --- a/Info.plist +++ b/Info.plist @@ -48,5 +48,8 @@ XC4Compatible + XC5Compatible + + diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index b589a07..cdebcfb 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -18,18 +18,6 @@ DC713210156B71A600F0C51A /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC71320E156B71A600F0C51A /* MainMenu.xib */; }; /* End PBXBuildFile section */ -/* Begin PBXCopyFilesBuildPhase section */ - 19FD4825133A590C0072594E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = Contents; - dstSubfolderSpec = 1; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -202,10 +190,8 @@ buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "XcodeColors" */; buildPhases = ( 8D5B49AF048680CD000E48DA /* Resources */, - 19FD4825133A590C0072594E /* CopyFiles */, 8D5B49B1048680CD000E48DA /* Sources */, 8D5B49B3048680CD000E48DA /* Frameworks */, - 19863EE81240DD900067FA40 /* ShellScript */, ); buildRules = ( ); @@ -284,22 +270,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 19863EE81240DD900067FA40 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "./xcb-install.pl"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 8D5B49B1048680CD000E48DA /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -361,14 +331,16 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; + DEPLOYMENT_LOCATION = YES; + DSTROOT = "$(HOME)"; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_GC = supported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Library/Bundles"; + INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; PRODUCT_NAME = XcodeColors; - WRAPPER_EXTENSION = bundle; + WRAPPER_EXTENSION = xcplugin; }; name = Debug; }; @@ -377,13 +349,15 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEPLOYMENT_LOCATION = YES; + DSTROOT = "$(HOME)"; GCC_ENABLE_OBJC_GC = supported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Library/Bundles"; + INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; PRODUCT_NAME = XcodeColors; - WRAPPER_EXTENSION = bundle; + WRAPPER_EXTENSION = xcplugin; }; name = Release; }; @@ -395,7 +369,6 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -408,7 +381,6 @@ GCC_C_LANGUAGE_STANDARD = gnu99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; SDKROOT = macosx; }; name = Release; diff --git a/xcb-install.pl b/xcb-install.pl deleted file mode 100755 index fa8ee55..0000000 --- a/xcb-install.pl +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env perl - -system("./install") if ($ENV{BUILD_STYLE} =~ /Release/ || $ENV{CONFIGURATION} =~ 'Release'); From 3e95201324c09a763086123a97c5cfea8c3eb0d1 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 26 Sep 2013 15:39:12 -0700 Subject: [PATCH 22/76] Removing unused files --- install | 14 -------------- version.plist | 16 ---------------- 2 files changed, 30 deletions(-) delete mode 100755 install delete mode 100644 version.plist diff --git a/install b/install deleted file mode 100755 index 12be5da..0000000 --- a/install +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# Uninstall old version(s) - -rm -rf ~/Library/Application\ Support/SIMBL/Plugins/XcodeColors.bundle 2>/dev/null -rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin 2>/dev/null - -# Install new version - - -mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins 2>/dev/null -cp -r ${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME} ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin - -echo Installed diff --git a/version.plist b/version.plist deleted file mode 100644 index e7ead11..0000000 --- a/version.plist +++ /dev/null @@ -1,16 +0,0 @@ - - - - - BuildVersion - 3 - CFBundleShortVersionString - 6.0 - CFBundleVersion - 262 - ProjectName - IDEXcode3ProjectSupport - SourceVersion - 2620000 - - From bbd1d43a0816351717845329f238d4471fd89530 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 26 Sep 2013 15:59:20 -0700 Subject: [PATCH 23/76] Switching build configurations from Debug/Release to Xcode4/Xcode5. (thanks @mralexgray) --- XcodeColors.xcodeproj/project.pbxproj | 118 ++++++++++++-------------- 1 file changed, 54 insertions(+), 64 deletions(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index cdebcfb..92f44c8 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -26,7 +26,7 @@ 19A131E6123E5A9800B2532F /* XcodeColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeColors.h; sourceTree = ""; }; 19A131E7123E5A9800B2532F /* XcodeColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XcodeColors.m; sourceTree = ""; }; 32DBCF630370AF2F00C91783 /* XcodeColors_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeColors_Prefix.pch; sourceTree = ""; }; - 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeColors.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D5B49B6048680CD000E48DA /* XcodeColors.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeColors.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; DC7131F6156B71A500F0C51A /* TestXcodeColors.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestXcodeColors.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -126,7 +126,7 @@ 19C28FB8FE9D52D311CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */, + 8D5B49B6048680CD000E48DA /* XcodeColors.xcplugin */, DC7131F6156B71A500F0C51A /* TestXcodeColors.app */, ); name = Products; @@ -200,7 +200,7 @@ name = XcodeColors; productInstallPath = "$(HOME)/Library/Bundles"; productName = XcodeColors; - productReference = 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */; + productReference = 8D5B49B6048680CD000E48DA /* XcodeColors.xcplugin */; productType = "com.apple.product-type.bundle"; }; DC7131F5156B71A500F0C51A /* TestXcodeColors */ = { @@ -326,32 +326,25 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 1DEB913B08733D840010E9CD /* Debug */ = { + DC6E8ED417F4F0B400373006 /* Xcode5 */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - DEPLOYMENT_LOCATION = YES; - DSTROOT = "$(HOME)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_GC = supported; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; - PRODUCT_NAME = XcodeColors; - WRAPPER_EXTENSION = xcplugin; + ARCHS = "$(ARCHS_STANDARD)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + SDKROOT = macosx; }; - name = Debug; + name = Xcode5; }; - 1DEB913C08733D840010E9CD /* Release */ = { + DC6E8ED517F4F0B400373006 /* Xcode5 */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEPLOYMENT_LOCATION = YES; DSTROOT = "$(HOME)"; - GCC_ENABLE_OBJC_GC = supported; + GCC_ENABLE_OBJC_GC = unsupported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; INFOPLIST_FILE = Info.plist; @@ -359,63 +352,60 @@ PRODUCT_NAME = XcodeColors; WRAPPER_EXTENSION = xcplugin; }; - name = Release; + name = Xcode5; }; - 1DEB913F08733D840010E9CD /* Debug */ = { + DC6E8ED617F4F0B400373006 /* Xcode5 */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "TestXcodeColors/TestXcodeColors-Prefix.pch"; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INFOPLIST_FILE = "TestXcodeColors/TestXcodeColors-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; }; - name = Debug; + name = Xcode5; }; - 1DEB914008733D840010E9CD /* Release */ = { + DC6E8ED717F4F0BD00373006 /* Xcode4 */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + ARCHS = "$(ARCHS_STANDARD)"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; SDKROOT = macosx; }; - name = Release; + name = Xcode4; }; - DC713211156B71A600F0C51A /* Debug */ = { + DC6E8ED817F4F0BD00373006 /* Xcode4 */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEPLOYMENT_LOCATION = YES; + DSTROOT = "$(HOME)"; + GCC_ENABLE_OBJC_GC = supported; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "TestXcodeColors/TestXcodeColors-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - INFOPLIST_FILE = "TestXcodeColors/TestXcodeColors-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.7; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; + GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; + PRODUCT_NAME = XcodeColors; + WRAPPER_EXTENSION = xcplugin; }; - name = Debug; + name = Xcode4; }; - DC713212156B71A600F0C51A /* Release */ = { + DC6E8ED917F4F0BD00373006 /* Xcode4 */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -430,7 +420,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; - name = Release; + name = Xcode4; }; /* End XCBuildConfiguration section */ @@ -438,29 +428,29 @@ 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "XcodeColors" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1DEB913B08733D840010E9CD /* Debug */, - 1DEB913C08733D840010E9CD /* Release */, + DC6E8ED817F4F0BD00373006 /* Xcode4 */, + DC6E8ED517F4F0B400373006 /* Xcode5 */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Xcode5; }; 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1DEB913F08733D840010E9CD /* Debug */, - 1DEB914008733D840010E9CD /* Release */, + DC6E8ED717F4F0BD00373006 /* Xcode4 */, + DC6E8ED417F4F0B400373006 /* Xcode5 */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Xcode5; }; DC713213156B71A600F0C51A /* Build configuration list for PBXNativeTarget "TestXcodeColors" */ = { isa = XCConfigurationList; buildConfigurations = ( - DC713211156B71A600F0C51A /* Debug */, - DC713212156B71A600F0C51A /* Release */, + DC6E8ED917F4F0BD00373006 /* Xcode4 */, + DC6E8ED617F4F0B400373006 /* Xcode5 */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Xcode5; }; /* End XCConfigurationList section */ }; From 0390674c898c4ba5a056fe9ede210d6e9869b49c Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 26 Sep 2013 16:12:42 -0700 Subject: [PATCH 24/76] Adding XcodeColors plugin as a dependency of the TestXcodeColors target. Also adding common instructions via NSLog. This should make it easier to build and install. --- TestXcodeColors/AppDelegate.m | 3 ++- XcodeColors.xcodeproj/project.pbxproj | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/TestXcodeColors/AppDelegate.m b/TestXcodeColors/AppDelegate.m index 1b7cdbd..5394d8d 100644 --- a/TestXcodeColors/AppDelegate.m +++ b/TestXcodeColors/AppDelegate.m @@ -36,7 +36,8 @@ @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - NSLog(@"If you don't see colors below, make sure you follow the installation instructions in the README."); + NSLog(@"After building the XcodeColors plugin for the first time, you MUST RESTART XCODE."); + NSLog(@"If you still don't see colors below, please consult the README."); NSLog(XCODE_COLORS_ESCAPE @"fg0,0,255;" @"Blue text" XCODE_COLORS_RESET); diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 92f44c8..c6a5680 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -18,6 +18,16 @@ DC713210156B71A600F0C51A /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC71320E156B71A600F0C51A /* MainMenu.xib */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + DC3E080417F4F57600994B5F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8D5B49AC048680CD000E48DA; + remoteInfo = XcodeColors; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -214,6 +224,7 @@ buildRules = ( ); dependencies = ( + DC3E080517F4F57600994B5F /* PBXTargetDependency */, ); name = TestXcodeColors; productName = TestXcodeColors; @@ -290,6 +301,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + DC3E080517F4F57600994B5F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8D5B49AC048680CD000E48DA /* XcodeColors */; + targetProxy = DC3E080417F4F57600994B5F /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; From 05853cf2a03b7da1c7b65452b0b3a0b7bedacc83 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 26 Sep 2013 16:20:53 -0700 Subject: [PATCH 25/76] File system organization --- XcodeColors.xcodeproj/project.pbxproj | 105 ++++++++++-------- .../English.lproj}/InfoPlist.strings | 0 Info.plist => XcodeColors/Info.plist | 0 XcodeColors.h => XcodeColors/XcodeColors.h | 0 XcodeColors.m => XcodeColors/XcodeColors.m | 0 .../XcodeColors_Prefix.pch | 0 6 files changed, 61 insertions(+), 44 deletions(-) rename {English.lproj => XcodeColors/English.lproj}/InfoPlist.strings (100%) rename Info.plist => XcodeColors/Info.plist (100%) rename XcodeColors.h => XcodeColors/XcodeColors.h (100%) rename XcodeColors.m => XcodeColors/XcodeColors.m (100%) rename XcodeColors_Prefix.pch => XcodeColors/XcodeColors_Prefix.pch (100%) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index c6a5680..87a7a33 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -7,8 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 19A131E8123E5A9800B2532F /* XcodeColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 19A131E7123E5A9800B2532F /* XcodeColors.m */; }; - 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; DC7131FA156B71A500F0C51A /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC7131F9156B71A500F0C51A /* Cocoa.framework */; }; DC713204156B71A500F0C51A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DC713202156B71A500F0C51A /* InfoPlist.strings */; }; @@ -16,6 +14,8 @@ DC71320A156B71A500F0C51A /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = DC713208156B71A500F0C51A /* Credits.rtf */; }; DC71320D156B71A500F0C51A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC71320C156B71A500F0C51A /* AppDelegate.m */; }; DC713210156B71A600F0C51A /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC71320E156B71A600F0C51A /* MainMenu.xib */; }; + DCCCCFF517F4F7630097500C /* XcodeColors.m in Sources */ = {isa = PBXBuildFile; fileRef = DCCCCFF417F4F7630097500C /* XcodeColors.m */; }; + DCCCCFFC17F4F7C40097500C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DCCCCFFA17F4F7C30097500C /* InfoPlist.strings */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -30,14 +30,9 @@ /* Begin PBXFileReference section */ 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 19A131E6123E5A9800B2532F /* XcodeColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeColors.h; sourceTree = ""; }; - 19A131E7123E5A9800B2532F /* XcodeColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XcodeColors.m; sourceTree = ""; }; - 32DBCF630370AF2F00C91783 /* XcodeColors_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeColors_Prefix.pch; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* XcodeColors.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeColors.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; }; - 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; DC7131F6156B71A500F0C51A /* TestXcodeColors.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestXcodeColors.app; sourceTree = BUILT_PRODUCTS_DIR; }; DC7131F9156B71A500F0C51A /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; @@ -52,6 +47,11 @@ DC71320B156B71A500F0C51A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; DC71320C156B71A500F0C51A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; DC71320F156B71A600F0C51A /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; + DCCCCFF317F4F7630097500C /* XcodeColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XcodeColors.h; path = XcodeColors/XcodeColors.h; sourceTree = ""; }; + DCCCCFF417F4F7630097500C /* XcodeColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XcodeColors.m; path = XcodeColors/XcodeColors.m; sourceTree = ""; }; + DCCCCFF717F4F77C0097500C /* XcodeColors_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XcodeColors_Prefix.pch; path = XcodeColors/XcodeColors_Prefix.pch; sourceTree = ""; }; + DCCCCFF817F4F7AE0097500C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = XcodeColors/Info.plist; sourceTree = ""; }; + DCCCCFFB17F4F7C30097500C /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = XcodeColors/English.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -77,12 +77,8 @@ 089C166AFE841209C02AAC07 /* XcodeColors */ = { isa = PBXGroup; children = ( - 08FB77AFFE84173DC02AAC07 /* Classes */, - 32C88E010371C26100C91783 /* Other Sources */, - 089C167CFE841241C02AAC07 /* Resources */, - 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, + DCCCCFF617F4F7690097500C /* XcodeColors */, DC7131FF156B71A500F0C51A /* TestXcodeColors */, - DC7131F8156B71A500F0C51A /* Frameworks */, 19C28FB8FE9D52D311CA2CBB /* Products */, ); name = XcodeColors; @@ -97,20 +93,11 @@ name = "Frameworks and Libraries"; sourceTree = ""; }; - 089C167CFE841241C02AAC07 /* Resources */ = { - isa = PBXGroup; - children = ( - 8D5B49B7048680CD000E48DA /* Info.plist */, - 089C167DFE841241C02AAC07 /* InfoPlist.strings */, - ); - name = Resources; - sourceTree = ""; - }; 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( - 19A131E6123E5A9800B2532F /* XcodeColors.h */, - 19A131E7123E5A9800B2532F /* XcodeColors.m */, + DCCCCFF317F4F7630097500C /* XcodeColors.h */, + DCCCCFF417F4F7630097500C /* XcodeColors.m */, ); name = Classes; sourceTree = ""; @@ -142,21 +129,24 @@ name = Products; sourceTree = ""; }; - 32C88E010371C26100C91783 /* Other Sources */ = { + 32C88E010371C26100C91783 /* Supporting Files */ = { isa = PBXGroup; children = ( - 32DBCF630370AF2F00C91783 /* XcodeColors_Prefix.pch */, + DCCCCFF817F4F7AE0097500C /* Info.plist */, + DCCCCFFA17F4F7C30097500C /* InfoPlist.strings */, + DCCCCFF717F4F77C0097500C /* XcodeColors_Prefix.pch */, ); - name = "Other Sources"; + name = "Supporting Files"; sourceTree = ""; }; DC7131F8156B71A500F0C51A /* Frameworks */ = { isa = PBXGroup; children = ( - DC7131F9156B71A500F0C51A /* Cocoa.framework */, + DCCCCFFD17F4F7E20097500C /* Linked Frameworks */, DC7131FB156B71A500F0C51A /* Other Frameworks */, ); name = Frameworks; + path = ..; sourceTree = ""; }; DC7131FB156B71A500F0C51A /* Other Frameworks */ = { @@ -172,10 +162,9 @@ DC7131FF156B71A500F0C51A /* TestXcodeColors */ = { isa = PBXGroup; children = ( - DC71320B156B71A500F0C51A /* AppDelegate.h */, - DC71320C156B71A500F0C51A /* AppDelegate.m */, - DC71320E156B71A600F0C51A /* MainMenu.xib */, + DCCCCFFE17F4F8020097500C /* Classes */, DC713200156B71A500F0C51A /* Supporting Files */, + DC7131F8156B71A500F0C51A /* Frameworks */, ); path = TestXcodeColors; sourceTree = ""; @@ -192,6 +181,34 @@ name = "Supporting Files"; sourceTree = ""; }; + DCCCCFF617F4F7690097500C /* XcodeColors */ = { + isa = PBXGroup; + children = ( + 08FB77AFFE84173DC02AAC07 /* Classes */, + 32C88E010371C26100C91783 /* Supporting Files */, + 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, + ); + name = XcodeColors; + sourceTree = ""; + }; + DCCCCFFD17F4F7E20097500C /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + DC7131F9156B71A500F0C51A /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + DCCCCFFE17F4F8020097500C /* Classes */ = { + isa = PBXGroup; + children = ( + DC71320B156B71A500F0C51A /* AppDelegate.h */, + DC71320C156B71A500F0C51A /* AppDelegate.m */, + DC71320E156B71A600F0C51A /* MainMenu.xib */, + ); + name = Classes; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -265,7 +282,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */, + DCCCCFFC17F4F7C40097500C /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -286,7 +303,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 19A131E8123E5A9800B2532F /* XcodeColors.m in Sources */, + DCCCCFF517F4F7630097500C /* XcodeColors.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -310,14 +327,6 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C167EFE841241C02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; DC713202156B71A500F0C51A /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( @@ -342,6 +351,14 @@ name = MainMenu.xib; sourceTree = ""; }; + DCCCCFFA17F4F7C30097500C /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + DCCCCFFB17F4F7C30097500C /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -365,8 +382,8 @@ DSTROOT = "$(HOME)"; GCC_ENABLE_OBJC_GC = unsupported; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; - INFOPLIST_FILE = Info.plist; + GCC_PREFIX_HEADER = XcodeColors/XcodeColors_Prefix.pch; + INFOPLIST_FILE = XcodeColors/Info.plist; INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; PRODUCT_NAME = XcodeColors; WRAPPER_EXTENSION = xcplugin; @@ -413,8 +430,8 @@ DSTROOT = "$(HOME)"; GCC_ENABLE_OBJC_GC = supported; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; - INFOPLIST_FILE = Info.plist; + GCC_PREFIX_HEADER = XcodeColors/XcodeColors_Prefix.pch; + INFOPLIST_FILE = XcodeColors/Info.plist; INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; PRODUCT_NAME = XcodeColors; WRAPPER_EXTENSION = xcplugin; diff --git a/English.lproj/InfoPlist.strings b/XcodeColors/English.lproj/InfoPlist.strings similarity index 100% rename from English.lproj/InfoPlist.strings rename to XcodeColors/English.lproj/InfoPlist.strings diff --git a/Info.plist b/XcodeColors/Info.plist similarity index 100% rename from Info.plist rename to XcodeColors/Info.plist diff --git a/XcodeColors.h b/XcodeColors/XcodeColors.h similarity index 100% rename from XcodeColors.h rename to XcodeColors/XcodeColors.h diff --git a/XcodeColors.m b/XcodeColors/XcodeColors.m similarity index 100% rename from XcodeColors.m rename to XcodeColors/XcodeColors.m diff --git a/XcodeColors_Prefix.pch b/XcodeColors/XcodeColors_Prefix.pch similarity index 100% rename from XcodeColors_Prefix.pch rename to XcodeColors/XcodeColors_Prefix.pch From 11041fbaf620a17d253047b96f9cccd2a34758e1 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 26 Sep 2013 16:47:27 -0700 Subject: [PATCH 26/76] Update README.markdown --- README.markdown | 74 ++++++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/README.markdown b/README.markdown index 866be67..6951291 100644 --- a/README.markdown +++ b/README.markdown @@ -7,38 +7,23 @@ You're not limited to a restricted color palate. You can specify, in your source code, the exact RGB values you'd like to use. You can specify foreground and/or background color(s). -XcodeColors is a simple plugin for Xcode 3 & 4. +XcodeColors is a simple plugin for Xcode 3, 4 & 5. *** -### XcodeColors installation instructions for Xcode 4: - -There are 2 ways to accomplish this: - -1. **Simple install using precompiled xcode plugin** - - Download the XcodeColors.xcplugin.zip file from the downloads page - https://github.com/robbiehanson/XcodeColors/downloads - - Unzip the downloaded file, which will give you the "XcodeColors.xcplugin" folder. - Note that finder will likely not display the ".xcplugin" extension. This is normal. - If you want you can verify the extension is there via Finder's "get info" or via the Terminal. - - Copy this folder to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" - You might need to create the "Plug-ins" folder if it doesn't already exist. If so, double-check your spelling. - - Quit Xcode (if it's running) - - Launch Xcode. - - Want to see it in action? - The repository contains an Xcode project with a TestXcodeColors target. - You can run this target to see XcodeColors in action. - -2. **Compile from source** - - Download or clone the repository. - - Compile the XcodeColors target for Release (not Debug). - When you do this, the Xcode plugin is automatically copied to the proper location. - This is done via the xcb-install.pl install script that is run as part of an Xcode build phase. - Validate the plugin was copied to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" - - Quit Xcode (if it's running) - - Launch Xcode. - - Now compile and run the TestXcodeColors target (debug or release, doesn't matter). - This will test your installation, and you should see colors in your Xcode console. +### XcodeColors installation instructions for Xcode 4 & 5: + +- Download or clone the repository. +- Open the XcodeColors project with Xcode +- If compiling for Xcode 4, then change the schemes to use the Xcode4 build configuration (instead of the Xcode5 build configuration which is the default) +- Compile the XcodeColors target. + When you do this, the Xcode plugin is automatically copied to the proper location. + This is done via the build settings. + You can validate the plugin was copied to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" +- Now completely Quit Xcode +- Re-Launch Xcode, and re-open the XcodeColors project +- Now run the TestXcodeColors target + This will test your installation, and you should see colors in your Xcode console. ### XcodeColors installation instructions for Xcode 3: @@ -51,6 +36,15 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml ### How to use XcodeColors +**There are 2 ways to use XcodeColors:** + +1. **Manually specify the colors inside NSLog (or create custom macros)** +2. **Use CocoaLumberjack** + +*** + +### Option 1: Manual Use / Custom Macros + - Testing to see if XcodeColors is installed and enabled: ```objective-c @@ -98,8 +92,7 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml #define XCODE_COLORS_RESET XCODE_COLORS_ESCAPE @";" // Clear any foreground or background color ``` - Then feel free to colorize your log statements however you see fit! - Here's an example to get you started: + To manually colorize your log statements, you surround the log statements with the color options: ```objective-c NSLog(XCODE_COLORS_ESCAPE @"fg0,0,255;" @"Blue text" XCODE_COLORS_RESET); @@ -114,9 +107,26 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml NSLog(XCODE_COLORS_ESCAPE @"fg209,57,168;" @"You can supply your own RGB values!" XCODE_COLORS_RESET); ``` +- Defining macros + + You may prefer to use macros to keep your code looking a bit cleaner. + Here's an example to get you started: + + ```objective-c + #define LogBlue(frmt, ...) NSLog((XCODE_COLORS_ESCAPE @"fg0,0,255;" frmt XCODE_COLORS_RESET), ##__VA_ARGS__) + #define LogRed(frmt, ...) NSLog((XCODE_COLORS_ESCAPE @"fg255,0,0;" frmt XCODE_COLORS_RESET), ##__VA_ARGS__) + ``` + + And then you could just replace NSLog with LogBlue like so: + + ```objective-c + LogBlue(@"Configuring sprocket..."); + LogRed(@"Sprocket error: %@", error); + ``` + *** -### CocoaLumberjack +### Option 2: CocoaLumberjack The [CocoaLumberjack](https://github.com/robbiehanson/CocoaLumberjack) framework natively supports XcodeColors! Lumberjack is a fast & simple, yet powerful & flexible logging framework for Mac and iOS. From 997084aeb20f78da1cff9daab6758f727fab7ce4 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 26 Sep 2013 16:48:54 -0700 Subject: [PATCH 27/76] Update README.markdown --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 6951291..35ce2ef 100644 --- a/README.markdown +++ b/README.markdown @@ -22,7 +22,7 @@ XcodeColors is a simple plugin for Xcode 3, 4 & 5. You can validate the plugin was copied to "~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin" - Now completely Quit Xcode - Re-Launch Xcode, and re-open the XcodeColors project -- Now run the TestXcodeColors target +- Now run the TestXcodeColors target. This will test your installation, and you should see colors in your Xcode console. ### XcodeColors installation instructions for Xcode 3: From 4169c6f7a0eb8a97d03dab0ebbfe41d3416ab131 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 26 Sep 2013 16:49:59 -0700 Subject: [PATCH 28/76] Adding sample macro to test code --- TestXcodeColors/AppDelegate.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TestXcodeColors/AppDelegate.m b/TestXcodeColors/AppDelegate.m index 5394d8d..e1cb0a3 100644 --- a/TestXcodeColors/AppDelegate.m +++ b/TestXcodeColors/AppDelegate.m @@ -30,6 +30,8 @@ #define XCODE_COLORS_RESET_BG XCODE_COLORS_ESCAPE @"bg;" // Clear any background color #define XCODE_COLORS_RESET XCODE_COLORS_ESCAPE @";" // Clear any foreground or background color +#define LogBlue(frmt, ...) NSLog((XCODE_COLORS_ESCAPE @"fg0,0,255;" frmt XCODE_COLORS_RESET), ##__VA_ARGS__) + @implementation AppDelegate @synthesize window = _window; @@ -49,6 +51,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification XCODE_COLORS_RESET); NSLog(XCODE_COLORS_ESCAPE @"fg209,57,168;" @"You can supply your own RGB values!" XCODE_COLORS_RESET); + + LogBlue(@"Blue text via macro"); } @end From 2bf4e188c11e6a534d2cb4965749544be505ec81 Mon Sep 17 00:00:00 2001 From: Isidoro Ghezzi Date: Mon, 9 Dec 2013 16:40:59 +0100 Subject: [PATCH 29/76] TextXcodeColors: applicationShouldTerminateAfterLastWindowClosed YES --- TestXcodeColors/AppDelegate.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TestXcodeColors/AppDelegate.m b/TestXcodeColors/AppDelegate.m index e1cb0a3..55ab546 100644 --- a/TestXcodeColors/AppDelegate.m +++ b/TestXcodeColors/AppDelegate.m @@ -55,4 +55,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification LogBlue(@"Blue text via macro"); } +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication +{ + return YES; +} @end From 007b8a66a45836431d4f97b7ba4de66eaa83b55c Mon Sep 17 00:00:00 2001 From: rochefort Date: Sat, 28 Dec 2013 19:51:37 +0900 Subject: [PATCH 30/76] fix typo --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 35ce2ef..3b0a273 100644 --- a/README.markdown +++ b/README.markdown @@ -85,7 +85,7 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml // To reset the foreground and background color (to default values) in one operation: // Insert the ESCAPE into your string, followed by ";" - #define XCODE_COLORS_ESCAPE_MAC @"\033[" + #define XCODE_COLORS_ESCAPE @"\033[" #define XCODE_COLORS_RESET_FG XCODE_COLORS_ESCAPE @"fg;" // Clear any foreground color #define XCODE_COLORS_RESET_BG XCODE_COLORS_ESCAPE @"bg;" // Clear any background color From e76f4d6e76b6095ab3118bb79d61193b4078e885 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Wed, 5 Feb 2014 14:19:08 -0800 Subject: [PATCH 31/76] Update README.markdown --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 3b0a273..2e72af7 100644 --- a/README.markdown +++ b/README.markdown @@ -11,7 +11,7 @@ XcodeColors is a simple plugin for Xcode 3, 4 & 5. *** -### XcodeColors installation instructions for Xcode 4 & 5: +### XcodeColors installation instructions for Xcode 4 & 5.X: - Download or clone the repository. - Open the XcodeColors project with Xcode From 752aaf95f4ad336e3829887dfbead0d6295dd186 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Wed, 5 Feb 2014 14:56:47 -0800 Subject: [PATCH 32/76] Minor (inconsequential) changes. --- TestXcodeColors/TestXcodeColors-Info.plist | 2 +- TestXcodeColors/main.m | 9 +-------- XcodeColors.xcodeproj/project.pbxproj | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/TestXcodeColors/TestXcodeColors-Info.plist b/TestXcodeColors/TestXcodeColors-Info.plist index 6c196f1..6998f9d 100644 --- a/TestXcodeColors/TestXcodeColors-Info.plist +++ b/TestXcodeColors/TestXcodeColors-Info.plist @@ -25,7 +25,7 @@ LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright - Copyright © 2012 __MyCompanyName__. All rights reserved. + Copyright © 2012 Deusty LLC. All rights reserved. NSMainNibFile MainMenu NSPrincipalClass diff --git a/TestXcodeColors/main.m b/TestXcodeColors/main.m index 81818fb..684d457 100644 --- a/TestXcodeColors/main.m +++ b/TestXcodeColors/main.m @@ -1,13 +1,6 @@ -// -// main.m -// TestXcodeColors -// -// Created by Robbie Hanson on 5/22/12. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - #import + int main(int argc, char *argv[]) { return NSApplicationMain(argc, (const char **)argv); diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 87a7a33..8b3858f 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -174,8 +174,8 @@ children = ( DC713201156B71A500F0C51A /* TestXcodeColors-Info.plist */, DC713202156B71A500F0C51A /* InfoPlist.strings */, - DC713205156B71A500F0C51A /* main.m */, DC713207156B71A500F0C51A /* TestXcodeColors-Prefix.pch */, + DC713205156B71A500F0C51A /* main.m */, DC713208156B71A500F0C51A /* Credits.rtf */, ); name = "Supporting Files"; From fa51203e8d56f886734f0a75ff38b6b29a552e47 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Wed, 5 Feb 2014 14:58:52 -0800 Subject: [PATCH 33/76] Adding support for Xcode 5.1 Beta 5 --- XcodeColors/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index be512a1..b90b4cf 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -16,6 +16,7 @@ 63FC1C47-140D-42B0-BB4D-A10B2D225574 37B30044-3B14-46BA-ABAA-F01000C27B63 + 640F884E-CE55-4B40-87C0-8869546CAB7A CFBundleName ${PRODUCT_NAME} @@ -50,6 +51,5 @@ XC5Compatible - From ac0695edf2eb9736b1764af4deb9f7546e026495 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Wed, 5 Feb 2014 15:05:02 -0800 Subject: [PATCH 34/76] Update README.markdown --- README.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.markdown b/README.markdown index 2e72af7..8b82f41 100644 --- a/README.markdown +++ b/README.markdown @@ -25,6 +25,8 @@ XcodeColors is a simple plugin for Xcode 3, 4 & 5. - Now run the TestXcodeColors target. This will test your installation, and you should see colors in your Xcode console. +Did you **upgrade Xcode** and now XcodeColors is **"broken"**? Get the fix here: **[XcodeUpdates](https://github.com/robbiehanson/XcodeColors/wiki/XcodeUpdates)**. + ### XcodeColors installation instructions for Xcode 3: Wow, you're still running Xcode 3? From d84a8b54837e608da73dfcc7a2ffcdb3f1764a32 Mon Sep 17 00:00:00 2001 From: Tom Hamming Date: Mon, 10 Mar 2014 14:05:21 -0700 Subject: [PATCH 35/76] Add support for Xcode 5.1 --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index b90b4cf..7a237b5 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -17,6 +17,7 @@ 63FC1C47-140D-42B0-BB4D-A10B2D225574 37B30044-3B14-46BA-ABAA-F01000C27B63 640F884E-CE55-4B40-87C0-8869546CAB7A + A2E4D43F-41F4-4FB9-BB94-7177011C9AED CFBundleName ${PRODUCT_NAME} From bb0e48692d1fd2574ad4f45e5f36d4d646e1ac84 Mon Sep 17 00:00:00 2001 From: Gordon Fontenot Date: Fri, 21 Mar 2014 14:28:38 -0400 Subject: [PATCH 36/76] Remove unneeded log statements These log statements aren't annoying if you're using Xcode, but they also show up every time you run `xcodebuild`. Since they aren't used for anything, we should just get rid of them. --- XcodeColors/XcodeColors.m | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/XcodeColors/XcodeColors.m b/XcodeColors/XcodeColors.m index 709b48b..544ab39 100644 --- a/XcodeColors/XcodeColors.m +++ b/XcodeColors/XcodeColors.m @@ -342,8 +342,6 @@ IMP ReplaceInstanceMethod(Class sourceClass, SEL sourceSel, Class destinationCla + (void)load { - NSLog(@"XcodeColors: %@ (v10.1)", NSStringFromSelector(_cmd)); - char *xcode_colors = getenv(XCODE_COLORS); if (xcode_colors && (strcmp(xcode_colors, "YES") != 0)) return; @@ -355,14 +353,4 @@ + (void)load setenv(XCODE_COLORS, "YES", 0); } -+ (void)pluginDidLoad:(id)xcodeDirectCompatibility -{ - NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); -} - -- (void)registerLaunchSystemDescriptions -{ - NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); -} - @end From 727411b158059ed1b6bf3bf68f93f0323e10313a Mon Sep 17 00:00:00 2001 From: Andreas Kern Date: Fri, 20 Jun 2014 10:32:43 +0200 Subject: [PATCH 37/76] Add support for Xcode 6 Xcode 6b1 & 6b2 have the same UUID --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 7a237b5..3c5a462 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -18,6 +18,7 @@ 37B30044-3B14-46BA-ABAA-F01000C27B63 640F884E-CE55-4B40-87C0-8869546CAB7A A2E4D43F-41F4-4FB9-BB94-7177011C9AED + AD68E85B-441B-4301-B564-A45E4919A6AD CFBundleName ${PRODUCT_NAME} From a88b7a80a194c42990fafa6ee8e2478fd458583b Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Mon, 11 Aug 2014 15:55:52 -0700 Subject: [PATCH 38/76] Dropping Xcode 4 support. This was causing a lot of people confusion because Xcode was incorrectly reporting problems with "garbage collection" even though this was disabled except for a specific "Xcode 4" target. --- XcodeColors.xcodeproj/project.pbxproj | 80 +++++---------------------- 1 file changed, 15 insertions(+), 65 deletions(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 8b3858f..2013bab 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -254,7 +254,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0430; + LastUpgradeCheck = 0600; }; buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */; compatibilityVersion = "Xcode 3.2"; @@ -362,73 +362,25 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - DC6E8ED417F4F0B400373006 /* Xcode5 */ = { + DC6E8ED417F4F0B400373006 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; SDKROOT = macosx; }; - name = Xcode5; + name = Release; }; - DC6E8ED517F4F0B400373006 /* Xcode5 */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEPLOYMENT_LOCATION = YES; - DSTROOT = "$(HOME)"; - GCC_ENABLE_OBJC_GC = unsupported; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = XcodeColors/XcodeColors_Prefix.pch; - INFOPLIST_FILE = XcodeColors/Info.plist; - INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; - PRODUCT_NAME = XcodeColors; - WRAPPER_EXTENSION = xcplugin; - }; - name = Xcode5; - }; - DC6E8ED617F4F0B400373006 /* Xcode5 */ = { + DC6E8ED517F4F0B400373006 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "TestXcodeColors/TestXcodeColors-Prefix.pch"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - INFOPLIST_FILE = "TestXcodeColors/TestXcodeColors-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.7; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Xcode5; - }; - DC6E8ED717F4F0BD00373006 /* Xcode4 */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - SDKROOT = macosx; - }; - name = Xcode4; - }; - DC6E8ED817F4F0BD00373006 /* Xcode4 */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; + COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEPLOYMENT_LOCATION = YES; DSTROOT = "$(HOME)"; - GCC_ENABLE_OBJC_GC = supported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = XcodeColors/XcodeColors_Prefix.pch; INFOPLIST_FILE = XcodeColors/Info.plist; @@ -436,13 +388,14 @@ PRODUCT_NAME = XcodeColors; WRAPPER_EXTENSION = xcplugin; }; - name = Xcode4; + name = Release; }; - DC6E8ED917F4F0BD00373006 /* Xcode4 */ = { + DC6E8ED617F4F0B400373006 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -456,7 +409,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; - name = Xcode4; + name = Release; }; /* End XCBuildConfiguration section */ @@ -464,29 +417,26 @@ 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "XcodeColors" */ = { isa = XCConfigurationList; buildConfigurations = ( - DC6E8ED817F4F0BD00373006 /* Xcode4 */, - DC6E8ED517F4F0B400373006 /* Xcode5 */, + DC6E8ED517F4F0B400373006 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Xcode5; + defaultConfigurationName = Release; }; 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */ = { isa = XCConfigurationList; buildConfigurations = ( - DC6E8ED717F4F0BD00373006 /* Xcode4 */, - DC6E8ED417F4F0B400373006 /* Xcode5 */, + DC6E8ED417F4F0B400373006 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Xcode5; + defaultConfigurationName = Release; }; DC713213156B71A600F0C51A /* Build configuration list for PBXNativeTarget "TestXcodeColors" */ = { isa = XCConfigurationList; buildConfigurations = ( - DC6E8ED917F4F0BD00373006 /* Xcode4 */, - DC6E8ED617F4F0B400373006 /* Xcode5 */, + DC6E8ED617F4F0B400373006 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Xcode5; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; From f7d4b9c8746c0a391e8cae39d737506c784c10a5 Mon Sep 17 00:00:00 2001 From: NachoSoto Date: Tue, 9 Sep 2014 22:13:28 +0000 Subject: [PATCH 39/76] Added support for Xcode 6 GM --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 3c5a462..55aa498 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -19,6 +19,7 @@ 640F884E-CE55-4B40-87C0-8869546CAB7A A2E4D43F-41F4-4FB9-BB94-7177011C9AED AD68E85B-441B-4301-B564-A45E4919A6AD + C4A681B0-4A26-480E-93EC-1218098B9AA0 CFBundleName ${PRODUCT_NAME} From fe992e746e4e64f7f75971fcda3d3a2699a315f5 Mon Sep 17 00:00:00 2001 From: Klaas Date: Tue, 23 Sep 2014 14:22:31 +0200 Subject: [PATCH 40/76] Added Swift version --- README.markdown | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.markdown b/README.markdown index 8b82f41..32f241f 100644 --- a/README.markdown +++ b/README.markdown @@ -126,6 +126,48 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml LogRed(@"Sprocket error: %@", error); ``` +- Swift struct with static methods + + ```swift + struct ColorLog { + static let ESCAPE = "\u{001b}[" + + static let RESET_FG = ESCAPE + "fg;" // Clear any foreground color + static let RESET_BG = ESCAPE + "bg;" // Clear any background color + static let RESET = ESCAPE + ";" // Clear any foreground or background color + + static func red(object:T) { + println("\(ESCAPE)fg255,0,0;\(object)\(RESET)") + } + + static func green(object:T) { + println("\(ESCAPE)fg0,255,0;\(object)\(RESET)") + } + + static func blue(object:T) { + println("\(ESCAPE)fg0,0,255;\(object)\(RESET)") + } + + static func yellow(object:T) { + println("\(ESCAPE)fg255,255,0;\(object)\(RESET)") + } + + static func purple(object:T) { + println("\(ESCAPE)fg255,0,255;\(object)\(RESET)") + } + + static func cyan(object:T) { + println("\(ESCAPE)fg0,255,255;\(object)\(RESET)") + } + } + ``` +And then you can log within a Swift method like so: + + ```Swift + ColorLog.red( "This is a log." ) + ColorLog.blue( "Number one hundred: \(100)." ) + ``` + *** ### Option 2: CocoaLumberjack From 66d4ab35272a1cdbfad8ed9960d0d214a945f086 Mon Sep 17 00:00:00 2001 From: Nathaniel Gray Date: Wed, 8 Oct 2014 14:59:06 -0700 Subject: [PATCH 41/76] Fix for crash when inspecting details of an Xcode Server Bot This uses Jon Rentzsch's battle-tested JRSwizzle to inject the fixAttributesInRange: replacement into NSTextStorage. --- XcodeColors.xcodeproj/project.pbxproj | 6 ++ XcodeColors/JRSwizzle.h | 13 +++ XcodeColors/JRSwizzle.m | 134 ++++++++++++++++++++++++++ XcodeColors/XcodeColors.h | 4 +- XcodeColors/XcodeColors.m | 77 +++++---------- 5 files changed, 179 insertions(+), 55 deletions(-) create mode 100644 XcodeColors/JRSwizzle.h create mode 100644 XcodeColors/JRSwizzle.m diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 2013bab..f1bd373 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; + D253754619E5E84700AF94FA /* JRSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = D253754519E5E84700AF94FA /* JRSwizzle.m */; }; DC7131FA156B71A500F0C51A /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC7131F9156B71A500F0C51A /* Cocoa.framework */; }; DC713204156B71A500F0C51A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DC713202156B71A500F0C51A /* InfoPlist.strings */; }; DC713206156B71A500F0C51A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DC713205156B71A500F0C51A /* main.m */; }; @@ -33,6 +34,8 @@ 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* XcodeColors.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeColors.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + D253754419E5E84700AF94FA /* JRSwizzle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JRSwizzle.h; path = XcodeColors/JRSwizzle.h; sourceTree = ""; }; + D253754519E5E84700AF94FA /* JRSwizzle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JRSwizzle.m; path = XcodeColors/JRSwizzle.m; sourceTree = ""; }; D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; DC7131F6156B71A500F0C51A /* TestXcodeColors.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestXcodeColors.app; sourceTree = BUILT_PRODUCTS_DIR; }; DC7131F9156B71A500F0C51A /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; @@ -98,6 +101,8 @@ children = ( DCCCCFF317F4F7630097500C /* XcodeColors.h */, DCCCCFF417F4F7630097500C /* XcodeColors.m */, + D253754419E5E84700AF94FA /* JRSwizzle.h */, + D253754519E5E84700AF94FA /* JRSwizzle.m */, ); name = Classes; sourceTree = ""; @@ -303,6 +308,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + D253754619E5E84700AF94FA /* JRSwizzle.m in Sources */, DCCCCFF517F4F7630097500C /* XcodeColors.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/XcodeColors/JRSwizzle.h b/XcodeColors/JRSwizzle.h new file mode 100644 index 0000000..7d29bc2 --- /dev/null +++ b/XcodeColors/JRSwizzle.h @@ -0,0 +1,13 @@ +// JRSwizzle.h semver:1.0 +// Copyright (c) 2007-2011 Jonathan 'Wolf' Rentzsch: http://rentzsch.com +// Some rights reserved: http://opensource.org/licenses/MIT +// https://github.com/rentzsch/jrswizzle + +#import + +@interface NSObject (JRSwizzle) + ++ (BOOL)jr_swizzleMethod:(SEL)origSel_ withMethod:(SEL)altSel_ error:(NSError**)error_; ++ (BOOL)jr_swizzleClassMethod:(SEL)origSel_ withClassMethod:(SEL)altSel_ error:(NSError**)error_; + +@end diff --git a/XcodeColors/JRSwizzle.m b/XcodeColors/JRSwizzle.m new file mode 100644 index 0000000..28b6add --- /dev/null +++ b/XcodeColors/JRSwizzle.m @@ -0,0 +1,134 @@ +// JRSwizzle.m semver:1.0 +// Copyright (c) 2007-2011 Jonathan 'Wolf' Rentzsch: http://rentzsch.com +// Some rights reserved: http://opensource.org/licenses/MIT +// https://github.com/rentzsch/jrswizzle + +#import "JRSwizzle.h" + +#if TARGET_OS_IPHONE +#import +#import +#else +#import +#endif + +#define SetNSErrorFor(FUNC, ERROR_VAR, FORMAT,...) \ +if (ERROR_VAR) { \ +NSString *errStr = [NSString stringWithFormat:@"%s: " FORMAT,FUNC,##__VA_ARGS__]; \ +*ERROR_VAR = [NSError errorWithDomain:@"NSCocoaErrorDomain" \ +code:-1 \ +userInfo:[NSDictionary dictionaryWithObject:errStr forKey:NSLocalizedDescriptionKey]]; \ +} +#define SetNSError(ERROR_VAR, FORMAT,...) SetNSErrorFor(__func__, ERROR_VAR, FORMAT, ##__VA_ARGS__) + +#if OBJC_API_VERSION >= 2 +#define GetClass(obj) object_getClass(obj) +#else +#define GetClass(obj) (obj ? obj->isa : Nil) +#endif + +@implementation NSObject (JRSwizzle) + ++ (BOOL)jr_swizzleMethod:(SEL)origSel_ withMethod:(SEL)altSel_ error:(NSError**)error_ { +#if OBJC_API_VERSION >= 2 + Method origMethod = class_getInstanceMethod(self, origSel_); + if (!origMethod) { +#if TARGET_OS_IPHONE + SetNSError(error_, @"original method %@ not found for class %@", NSStringFromSelector(origSel_), [self class]); +#else + SetNSError(error_, @"original method %@ not found for class %@", NSStringFromSelector(origSel_), [self className]); +#endif + return NO; + } + + Method altMethod = class_getInstanceMethod(self, altSel_); + if (!altMethod) { +#if TARGET_OS_IPHONE + SetNSError(error_, @"alternate method %@ not found for class %@", NSStringFromSelector(altSel_), [self class]); +#else + SetNSError(error_, @"alternate method %@ not found for class %@", NSStringFromSelector(altSel_), [self className]); +#endif + return NO; + } + + class_addMethod(self, + origSel_, + class_getMethodImplementation(self, origSel_), + method_getTypeEncoding(origMethod)); + class_addMethod(self, + altSel_, + class_getMethodImplementation(self, altSel_), + method_getTypeEncoding(altMethod)); + + method_exchangeImplementations(class_getInstanceMethod(self, origSel_), class_getInstanceMethod(self, altSel_)); + return YES; +#else + // Scan for non-inherited methods. + Method directOriginalMethod = NULL, directAlternateMethod = NULL; + + void *iterator = NULL; + struct objc_method_list *mlist = class_nextMethodList(self, &iterator); + while (mlist) { + int method_index = 0; + for (; method_index < mlist->method_count; method_index++) { + if (mlist->method_list[method_index].method_name == origSel_) { + assert(!directOriginalMethod); + directOriginalMethod = &mlist->method_list[method_index]; + } + if (mlist->method_list[method_index].method_name == altSel_) { + assert(!directAlternateMethod); + directAlternateMethod = &mlist->method_list[method_index]; + } + } + mlist = class_nextMethodList(self, &iterator); + } + + // If either method is inherited, copy it up to the target class to make it non-inherited. + if (!directOriginalMethod || !directAlternateMethod) { + Method inheritedOriginalMethod = NULL, inheritedAlternateMethod = NULL; + if (!directOriginalMethod) { + inheritedOriginalMethod = class_getInstanceMethod(self, origSel_); + if (!inheritedOriginalMethod) { + SetNSError(error_, @"original method %@ not found for class %@", NSStringFromSelector(origSel_), [self className]); + return NO; + } + } + if (!directAlternateMethod) { + inheritedAlternateMethod = class_getInstanceMethod(self, altSel_); + if (!inheritedAlternateMethod) { + SetNSError(error_, @"alternate method %@ not found for class %@", NSStringFromSelector(altSel_), [self className]); + return NO; + } + } + + int hoisted_method_count = !directOriginalMethod && !directAlternateMethod ? 2 : 1; + struct objc_method_list *hoisted_method_list = malloc(sizeof(struct objc_method_list) + (sizeof(struct objc_method)*(hoisted_method_count-1))); + hoisted_method_list->obsolete = NULL; // soothe valgrind - apparently ObjC runtime accesses this value and it shows as uninitialized in valgrind + hoisted_method_list->method_count = hoisted_method_count; + Method hoisted_method = hoisted_method_list->method_list; + + if (!directOriginalMethod) { + bcopy(inheritedOriginalMethod, hoisted_method, sizeof(struct objc_method)); + directOriginalMethod = hoisted_method++; + } + if (!directAlternateMethod) { + bcopy(inheritedAlternateMethod, hoisted_method, sizeof(struct objc_method)); + directAlternateMethod = hoisted_method; + } + class_addMethods(self, hoisted_method_list); + } + + // Swizzle. + IMP temp = directOriginalMethod->method_imp; + directOriginalMethod->method_imp = directAlternateMethod->method_imp; + directAlternateMethod->method_imp = temp; + + return YES; +#endif +} + ++ (BOOL)jr_swizzleClassMethod:(SEL)origSel_ withClassMethod:(SEL)altSel_ error:(NSError**)error_ { + return [GetClass((id)self) jr_swizzleMethod:origSel_ withMethod:altSel_ error:error_]; +} + +@end diff --git a/XcodeColors/XcodeColors.h b/XcodeColors/XcodeColors.h index 27d4095..80bc3be 100644 --- a/XcodeColors/XcodeColors.h +++ b/XcodeColors/XcodeColors.h @@ -8,9 +8,9 @@ #import -@interface XcodeColors_NSTextStorage : NSTextStorage +@interface NSTextStorage(XcodeColors) -- (void)fixAttributesInRange:(NSRange)aRange; +- (void)xc_fixAttributesInRange:(NSRange)aRange; @end diff --git a/XcodeColors/XcodeColors.m b/XcodeColors/XcodeColors.m index 544ab39..8f596e8 100644 --- a/XcodeColors/XcodeColors.m +++ b/XcodeColors/XcodeColors.m @@ -8,6 +8,7 @@ #import "XcodeColors.h" #import +#import "JRSwizzle.h" #define XCODE_COLORS "XcodeColors" @@ -40,11 +41,9 @@ // -static IMP IMP_NSTextStorage_fixAttributesInRange = nil; - -@implementation XcodeColors_NSTextStorage +@implementation NSTextStorage (XcodeColors) void ApplyANSIColors(NSTextStorage *textStorage, NSRange textStorageRange, NSString *escapeSeq) { @@ -275,14 +274,15 @@ void ApplyANSIColors(NSTextStorage *textStorage, NSRange textStorageRange, NSStr } } -- (void)fixAttributesInRange:(NSRange)aRange +- (void)xc_fixAttributesInRange:(NSRange)aRange { // This method "overrides" the method within NSTextStorage. // First we invoke the actual NSTextStorage method. // This allows it to do any normal processing. - IMP_NSTextStorage_fixAttributesInRange(self, _cmd, aRange); + // Swizzling makes this look like a recursive call but it's not -- it calls the original! + [self xc_fixAttributesInRange:aRange]; // Then we scan for our special escape sequences, and apply desired color attributes. @@ -295,62 +295,33 @@ - (void)fixAttributesInRange:(NSRange)aRange @end + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation XcodeColors -IMP ReplaceInstanceMethod(Class sourceClass, SEL sourceSel, Class destinationClass, SEL destinationSel) -{ - if (!sourceSel || !sourceClass || !destinationClass) - { - NSLog(@"XcodeColors: Missing parameter to ReplaceInstanceMethod"); - return nil; - } - - if (!destinationSel) - destinationSel = sourceSel; - - Method sourceMethod = class_getInstanceMethod(sourceClass, sourceSel); - if (!sourceMethod) - { - NSLog(@"XcodeColors: Unable to get sourceMethod"); - return nil; - } - - IMP prevImplementation = method_getImplementation(sourceMethod); - - Method destinationMethod = class_getInstanceMethod(destinationClass, destinationSel); - if (!destinationMethod) - { - NSLog(@"XcodeColors: Unable to get destinationMethod"); - return nil; - } - - IMP newImplementation = method_getImplementation(destinationMethod); - if (!newImplementation) - { - NSLog(@"XcodeColors: Unable to get newImplementation"); - return nil; - } - - method_setImplementation(sourceMethod, newImplementation); - - return prevImplementation; -} +@implementation XcodeColors + (void)load { - char *xcode_colors = getenv(XCODE_COLORS); - if (xcode_colors && (strcmp(xcode_colors, "YES") != 0)) - return; - - IMP_NSTextStorage_fixAttributesInRange = - ReplaceInstanceMethod([NSTextStorage class], @selector(fixAttributesInRange:), - [XcodeColors_NSTextStorage class], @selector(fixAttributesInRange:)); - - setenv(XCODE_COLORS, "YES", 0); + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + char *xcode_colors = getenv(XCODE_COLORS); + if (xcode_colors && (strcmp(xcode_colors, "YES") != 0)) + return; + + SEL origSel = @selector(fixAttributesInRange:); + SEL altSel = @selector(xc_fixAttributesInRange:); + NSError *error = nil; + + if (![NSTextStorage jr_swizzleMethod:origSel withMethod:altSel error:&error]) { + NSLog(@"XcodeColors: Error swizzling methods: %@", error); + return; + } + + setenv(XCODE_COLORS, "YES", 0); + }); } @end From b55e0f0432ad0a6b43e959ea54668cf3b4f3d55d Mon Sep 17 00:00:00 2001 From: Caesar Wirth Date: Fri, 28 Nov 2014 11:53:41 +0900 Subject: [PATCH 42/76] Added support for Xcode 6.2 beta (6C86e) --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 55aa498..91b21f2 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -20,6 +20,7 @@ A2E4D43F-41F4-4FB9-BB94-7177011C9AED AD68E85B-441B-4301-B564-A45E4919A6AD C4A681B0-4A26-480E-93EC-1218098B9AA0 + FEC992CC-CA4A-4CFD-8881-77300FCB848A CFBundleName ${PRODUCT_NAME} From bc2e4f96395667829cdb499ed7ebc6a569f3a933 Mon Sep 17 00:00:00 2001 From: Martin Conte Mac Donell Date: Mon, 9 Feb 2015 17:05:21 -0800 Subject: [PATCH 43/76] Added UUID of new xcode beta 6.3 --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 91b21f2..a88efd2 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -21,6 +21,7 @@ AD68E85B-441B-4301-B564-A45E4919A6AD C4A681B0-4A26-480E-93EC-1218098B9AA0 FEC992CC-CA4A-4CFD-8881-77300FCB848A + 992275C1-432A-4CF7-B659-D84ED6D42D3F CFBundleName ${PRODUCT_NAME} From d2d443044e12b292028c6d89bb686e671b126b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Virin?= Date: Thu, 19 Feb 2015 17:35:25 +0100 Subject: [PATCH 44/76] Update readme - I added this line `setenv("XcodeColors", "YES", 0);` because it's not working if we don't add it, I lost a lot of time on this. I hope it will be usefull for someone. - The flag `LOG_FLAG_INFO` changed to `DDLogFlagInfo` --- README.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 32f241f..42e8d4d 100644 --- a/README.markdown +++ b/README.markdown @@ -191,6 +191,9 @@ And if color isn't available (e.g. XcodeColors isn't installed), then the framew Plus Lumberjack colors automatically work if you run your application from within a terminal! (E.g. Terminal.app, not Xcode) If your terminal supports color (xterm-color or xterm-256color) like the Terminal.app in Lion, then Lumberjack automatically maps your color customizations to the closest available color supported by the shell! ```objective-c +// Enable XcodeColors +setenv("XcodeColors", "YES", 0); + // Standard lumberjack initialization [DDLog addLogger:[DDTTYLogger sharedInstance]]; @@ -215,7 +218,7 @@ UIColor *pink = [UIColor colorWithRed:(255/255.0) green:(58/255.0) blue:(159/255 NSColor *pink = [NSColor colorWithCalibratedRed:(255/255.0) green:(58/255.0) blue:(159/255.0) alpha:1.0]; #endif -[[DDTTYLogger sharedInstance] setForegroundColor:pink backgroundColor:nil forFlag:LOG_FLAG_INFO]; +[[DDTTYLogger sharedInstance] setForegroundColor:pink backgroundColor:nil forFlag:DDLogFlagInfo]; DDLogInfo(@"Warming up printer (post-customization)"); // Pink ! ``` From 1b733d9c512b6baca48a201ad984d154b88080d4 Mon Sep 17 00:00:00 2001 From: pwnified Date: Mon, 9 Mar 2015 14:15:12 -0700 Subject: [PATCH 45/76] Xcode Version 6.2 (6C131e) support. --- XcodeColors/Info.plist | 3 +++ 1 file changed, 3 insertions(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 91b21f2..c88c8f2 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -21,7 +21,10 @@ AD68E85B-441B-4301-B564-A45E4919A6AD C4A681B0-4A26-480E-93EC-1218098B9AA0 FEC992CC-CA4A-4CFD-8881-77300FCB848A + A16FF353-8441-459E-A50C-B071F53F51B7 + LSApplicationCategoryType + CFBundleName ${PRODUCT_NAME} CFBundlePackageType From 9755be14e37eacabd9c56b5082fe5e05997e6a38 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Tue, 10 Mar 2015 23:42:26 -0700 Subject: [PATCH 46/76] Fixing compiler warnings. And restoring hook methods (for possible future debugging needs). --- XcodeColors.xcodeproj/project.pbxproj | 2 +- XcodeColors/XcodeColors.m | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index f1bd373..308b1a9 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -259,7 +259,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0610; }; buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */; compatibilityVersion = "Xcode 3.2"; diff --git a/XcodeColors/XcodeColors.m b/XcodeColors/XcodeColors.m index 8f596e8..96099ec 100644 --- a/XcodeColors/XcodeColors.m +++ b/XcodeColors/XcodeColors.m @@ -305,6 +305,8 @@ @implementation XcodeColors + (void)load { +// NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); + static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ char *xcode_colors = getenv(XCODE_COLORS); @@ -324,4 +326,15 @@ + (void)load }); } ++ (void)pluginDidLoad:(id)xcodeDirectCompatibility +{ +// NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); +} + +- (void)registerLaunchSystemDescriptions +{ +// NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); +} + + @end From d7b2396b98f8619ac1bc1b86b5878376f76c8e8c Mon Sep 17 00:00:00 2001 From: pwnified Date: Wed, 8 Apr 2015 22:40:08 -0700 Subject: [PATCH 47/76] Xcode Version 6.3 (6D570) support. --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index c88c8f2..d4408c1 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -22,6 +22,7 @@ C4A681B0-4A26-480E-93EC-1218098B9AA0 FEC992CC-CA4A-4CFD-8881-77300FCB848A A16FF353-8441-459E-A50C-B071F53F51B7 + 9F75337B-21B4-4ADC-B558-F9CADF7073A7 LSApplicationCategoryType From 0ae8e5fd76eb20c287858ba4b123cae00a1eebac Mon Sep 17 00:00:00 2001 From: Ben Kreeger Date: Thu, 30 Apr 2015 08:42:34 -0500 Subject: [PATCH 48/76] Add DVTPlugInCompatibilityUUIDs for Xcode 6.4 betas 1, 2. --- XcodeColors/Info.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 711328f..bd08a59 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -24,6 +24,8 @@ A16FF353-8441-459E-A50C-B071F53F51B7 992275C1-432A-4CF7-B659-D84ED6D42D3F 9F75337B-21B4-4ADC-B558-F9CADF7073A7 + 992275C1-432A-4CF7-B659-D84ED6D42D3F + 8DC44374-2B35-4C57-A6FE-2AD66A36AAD9 LSApplicationCategoryType From b419689313118a20d5e30fce92290f90257614da Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 30 Apr 2015 10:49:58 -0500 Subject: [PATCH 49/76] Update README.markdown --- README.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 42e8d4d..ca1e43c 100644 --- a/README.markdown +++ b/README.markdown @@ -7,11 +7,11 @@ You're not limited to a restricted color palate. You can specify, in your source code, the exact RGB values you'd like to use. You can specify foreground and/or background color(s). -XcodeColors is a simple plugin for Xcode 3, 4 & 5. +XcodeColors is a simple plugin for Xcode 3, 4, 5 & 6 *** -### XcodeColors installation instructions for Xcode 4 & 5.X: +### XcodeColors installation instructions for Xcode 4, 5 & 6: - Download or clone the repository. - Open the XcodeColors project with Xcode From fcfb22f9c7261c2a02561149d5ea7fecab873788 Mon Sep 17 00:00:00 2001 From: Ben Kreeger Date: Fri, 8 May 2015 16:54:37 -0500 Subject: [PATCH 50/76] Add compatibility UUID for Xcode 6.3.2. --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index bd08a59..8583362 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -26,6 +26,7 @@ 9F75337B-21B4-4ADC-B558-F9CADF7073A7 992275C1-432A-4CF7-B659-D84ED6D42D3F 8DC44374-2B35-4C57-A6FE-2AD66A36AAD9 + E969541F-E6F9-4D25-8158-72DC3545A6C6 LSApplicationCategoryType From 8ba88fbc5e4548772647a78fc494ef9332c68c81 Mon Sep 17 00:00:00 2001 From: Dwarven YANG Date: Tue, 19 May 2015 18:17:20 +0800 Subject: [PATCH 51/76] Update for Xcode 6.3 --- XcodeColors.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 308b1a9..9e8b718 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -259,7 +259,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; + LastUpgradeCheck = 0630; }; buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */; compatibilityVersion = "Xcode 3.2"; From b4eb87bec62f5d61ec9e045ee9b68818cda16432 Mon Sep 17 00:00:00 2001 From: Doron Adler Date: Tue, 9 Jun 2015 16:48:38 +0300 Subject: [PATCH 52/76] Added "AABB7188-E14E-4433-AD3B-5CD791EAD9A3" to DVTPlugInCompatibilityUUIDs i order to support Xcode 7 (Beta 1) --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 8583362..f52cd88 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -27,6 +27,7 @@ 992275C1-432A-4CF7-B659-D84ED6D42D3F 8DC44374-2B35-4C57-A6FE-2AD66A36AAD9 E969541F-E6F9-4D25-8158-72DC3545A6C6 + AABB7188-E14E-4433-AD3B-5CD791EAD9A3 LSApplicationCategoryType From fd5006c7861855acc6ac7991dcf19aa2b182facf Mon Sep 17 00:00:00 2001 From: Ben Kreeger Date: Tue, 30 Jun 2015 08:18:42 -0500 Subject: [PATCH 53/76] Add Xcode 6.4b4 compat UUID. --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index f52cd88..6b97ac7 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -28,6 +28,7 @@ 8DC44374-2B35-4C57-A6FE-2AD66A36AAD9 E969541F-E6F9-4D25-8158-72DC3545A6C6 AABB7188-E14E-4433-AD3B-5CD791EAD9A3 + 5EDAC44F-8E0B-42C9-9BEF-E9C12EEC4949 LSApplicationCategoryType From 87ed272a8ac71e6217160259ee7356bb1d1b5408 Mon Sep 17 00:00:00 2001 From: Ben Kreeger Date: Tue, 30 Jun 2015 11:38:49 -0500 Subject: [PATCH 54/76] Add UUID for Xcode 6.4 compatibility. --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 6b97ac7..d0b014d 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -29,6 +29,7 @@ E969541F-E6F9-4D25-8158-72DC3545A6C6 AABB7188-E14E-4433-AD3B-5CD791EAD9A3 5EDAC44F-8E0B-42C9-9BEF-E9C12EEC4949 + 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90 LSApplicationCategoryType From bbbe6bbd0fe70ae7d7d60f7881ee51a82095a253 Mon Sep 17 00:00:00 2001 From: zlargon Date: Wed, 1 Jul 2015 02:48:29 +0800 Subject: [PATCH 55/76] add script to update Xcode compatibility $ ./update_compat.sh --- README.markdown | 4 ++++ update_compat.sh | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100755 update_compat.sh diff --git a/README.markdown b/README.markdown index ca1e43c..6a767bd 100644 --- a/README.markdown +++ b/README.markdown @@ -27,6 +27,10 @@ XcodeColors is a simple plugin for Xcode 3, 4, 5 & 6 Did you **upgrade Xcode** and now XcodeColors is **"broken"**? Get the fix here: **[XcodeUpdates](https://github.com/robbiehanson/XcodeColors/wiki/XcodeUpdates)**. +``` +$ ./update_compat.sh +``` + ### XcodeColors installation instructions for Xcode 3: Wow, you're still running Xcode 3? diff --git a/update_compat.sh b/update_compat.sh new file mode 100755 index 0000000..28f60e1 --- /dev/null +++ b/update_compat.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# show Xcode version and UUID +xcodebuild -version +uuid=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID) +echo "UUID $uuid" +echo "" + +# check UUID +plist=$(pwd)/XcodeColors/Info +if [ -n "$(defaults read '$plist' | grep $uuid)" ] ; then + echo "UUID is already added to Info.plist" + exit +fi + +# add UUID to .plist +echo "Add UUID to '$plist'" +defaults write '$plist' DVTPlugInCompatibilityUUIDs -array-add $uuid + +# show the result +defaults read '$plist' From b142233629eda750af8a5659f5047f79aa86aa18 Mon Sep 17 00:00:00 2001 From: Dwarven YANG Date: Thu, 2 Jul 2015 15:02:52 +0800 Subject: [PATCH 56/76] Update for Xcode 6.4 --- XcodeColors.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 9e8b718..5b649d1 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -259,7 +259,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0630; + LastUpgradeCheck = 0640; }; buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */; compatibilityVersion = "Xcode 3.2"; From 4e933c48e9090adfbdd217f438e20cc5305f3354 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 2 Jul 2015 14:12:52 -0700 Subject: [PATCH 57/76] Fixing update_compat.sh script. --- update_compat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update_compat.sh b/update_compat.sh index 28f60e1..cd3d6f5 100755 --- a/update_compat.sh +++ b/update_compat.sh @@ -7,7 +7,7 @@ echo "UUID $uuid" echo "" # check UUID -plist=$(pwd)/XcodeColors/Info +plist=$(pwd)/XcodeColors/Info.plist if [ -n "$(defaults read '$plist' | grep $uuid)" ] ; then echo "UUID is already added to Info.plist" exit From 4fab1a6f5f7da89241273a850d9b6c19b749f636 Mon Sep 17 00:00:00 2001 From: zlargon Date: Fri, 3 Jul 2015 18:47:15 +0800 Subject: [PATCH 58/76] [fix bug] replace '$plist' to "$plist" in update_compat.sh using ' will not work --- update_compat.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/update_compat.sh b/update_compat.sh index cd3d6f5..d65cfca 100755 --- a/update_compat.sh +++ b/update_compat.sh @@ -8,14 +8,14 @@ echo "" # check UUID plist=$(pwd)/XcodeColors/Info.plist -if [ -n "$(defaults read '$plist' | grep $uuid)" ] ; then - echo "UUID is already added to Info.plist" +if [ -n "$(defaults read "$plist" | grep $uuid)" ] ; then + echo "UUID is already added to $plist" exit fi # add UUID to .plist -echo "Add UUID to '$plist'" -defaults write '$plist' DVTPlugInCompatibilityUUIDs -array-add $uuid +echo "Add UUID to $plist" +defaults write "$plist" DVTPlugInCompatibilityUUIDs -array-add $uuid # show the result -defaults read '$plist' +defaults read "$plist" From ce2b8a3237adf3fd5c970d9e7139085411ecb001 Mon Sep 17 00:00:00 2001 From: Caesar Wirth Date: Thu, 10 Sep 2015 11:33:43 +0900 Subject: [PATCH 59/76] Update for Xcode 7 GM Seed --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index d0b014d..e772c76 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -30,6 +30,7 @@ AABB7188-E14E-4433-AD3B-5CD791EAD9A3 5EDAC44F-8E0B-42C9-9BEF-E9C12EEC4949 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90 + 0420B86A-AA43-4792-9ED0-6FE0F2B16A13 LSApplicationCategoryType From 15f03d6218019869f735f2c511127ef0e4a8844e Mon Sep 17 00:00:00 2001 From: DanSkeel Date: Thu, 10 Sep 2015 22:52:06 +0300 Subject: [PATCH 60/76] Added support for Xcode 7.1 beta (7B60) --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index e772c76..850d5be 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -31,6 +31,7 @@ 5EDAC44F-8E0B-42C9-9BEF-E9C12EEC4949 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90 0420B86A-AA43-4792-9ED0-6FE0F2B16A13 + CC0D0F4F-05B3-431A-8F33-F84AFCB2C651 LSApplicationCategoryType From 521ca951ea5d61e9e5999428e72b24e114c451dd Mon Sep 17 00:00:00 2001 From: Amitai Blickstein Date: Tue, 22 Sep 2015 01:00:04 -0400 Subject: [PATCH 61/76] Corrects minor typo: it's --> its --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 6a767bd..5a52ac6 100644 --- a/README.markdown +++ b/README.markdown @@ -179,7 +179,7 @@ And then you can log within a Swift method like so: The [CocoaLumberjack](https://github.com/robbiehanson/CocoaLumberjack) framework natively supports XcodeColors! Lumberjack is a fast & simple, yet powerful & flexible logging framework for Mac and iOS. -From it's GitHub page: +From its GitHub page: > [Lumberjack] is similar in concept to other popular logging frameworks such as log4j, > yet is designed specifically for Objective-C, and takes advantage of features such as From 8a47a736ad2fb7b3f10dcdb048bceb3e1c53d47a Mon Sep 17 00:00:00 2001 From: DanSkeel Date: Thu, 22 Oct 2015 17:48:23 +0300 Subject: [PATCH 62/76] Added support for Xcode 7.1 Build version 7B91b --- XcodeColors/Info.plist | Bin 2371 -> 1502 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 850d5be63951b4e5c90411d5e50d75049bb50d8a..9696fe3a8b6b60f293bf515ba7b84e3183291177 100644 GIT binary patch delta 909 zcmZ9KPfXKL9LM|T6&Z+>O~o+=D#br&n|A9qrh?hJA~RzyY~T!#rgU{QcJ1i8L_!RS zcMfDRG4W>N!2?lm#)BM)7ZVdnJm^7<2e^2_goKM4A6u6Y-{q6{{r%qW{r+vbzqL=# zmvyaTv+Q@$gJL)!T8^~3+S-qH9P1>z+@9knPF@_kbeU#oc8CiE=_~ZLSz#<*H43_# zmP@Kcx|`QzK{agcuBKWN>8tIcK3pRGwU?+L(p&SjcvmE{v*|poS{2PS4m}s|t4h_D z=XG^9Wy*z^osz4DvLKOUI-9XHL($5zF6eTlawjj`5GGZ*uq2UP&45|0XvlWef*Fxb zEvcBsn5IL?b0Cc$B%P6!dva0DEtS=|ypYkWMa>wOD^p2{?9L`9;;Ec$6;(S{hHX(~ z8|GMne!O6o%J2rWgT<`9@~%KJbXe?Zewtk{E!!zCYs18guxx5MGkGg9CFG=ZY(jhh zV^~!tp{nI%j``2_g7kEs^7i<8{eAtX`_G&mpa##KzaWuRI5;M70w19{o=wyOSU2n| zRhz@8Iv+Xw;E=!@`iR4-!*z$-4*j6vx9aen!#@r~M8jTk_{`x~f`ap;B7txy5aa|p z7>)BZ&jti~I4W{97v{nd*ft>=WwT+1&15+?3a3pii+NF)%EjU-vC#|HOkObys$lA- zRdMC6!;_1r6RFmxd}J#WhU08(+u`-UPY6rf-a(~=o9oc`X1due`5pK zO>7Z+jBQ{$cn8koGx$UNIsOsf2Yp~d1UjgJH{dPU0Gr@5_yV@U4)_Un!7s1}_K7y4 Ym*^*WB1DW3qe%T=XoJXzLkC3SALi!&9RL6T literal 2371 zcmb_eU2oz>6n##91x5Qhc*dU3icK`1EfSkW0ao;>@`6LGB{niGy1_jiN{|my0Zl+{m>C{oZiYf*eug@7k^QV_h$QjiTr0=T5qf>P*Y0 zZQv>zROK?O>P;V#Apmq{^{fpvui4+pfnR6&w7$8%>VC^MH#V4cFR-v7v^>pK0q$WDPDe)@^GLf|L2|l|i>>f)hvP!_m&T5Z0(_U|++ z@8DA@?#pPfSkHTfEuWTYoqx?2dA%8rdv0|=r&X11D|sj-Pl6?u3PdP&h{gsZW2i%# zU=zDIW=zl{q601wCc&6elo&!0LR1u}Q zZp2xtxg<~xs$-6*#2%@{TSQ_av64n2?6B_)<`Ow z??-qD2}_U!p@=f&k!IK;g9QmJ35*!gbUz@A1+xH2;uk)F3}*^CsIlXY#x4nsxFA>p zO++yu#oBSM6Rx#WO**~W&IJj` z^PmuQF+-AoP7ynsFv>Kyya}hZF@i{mJb_^Y>I7+*7{sg-ig;ktjq}O8)1VY~qsK5W zu~kSJ5A@2C*n3MAZPY1(3(N|QNCILhup{N6sM4|^12$5t#(BXshC>c-kERKtLd9Dg zMo=3ZVnetljXJHx4hPVQnE_lvG?D=>86?#(X0hdr9Mz>8?ce;DP1_%CS9?B%Em0OW zt+RPqZAP2r*}^GWGV&zjiGo$Fs>96pv+y<3LE7aKS%wVexW zz2>+#?>uFg&x^EPS7)kk;d6=e!tN#bjHX|vGhO%7buk57+PPI-t+QxvZg;~0c-J&v zrVG1BS8pqMr+xy)oY`_wR&ey**M_}Mrawxnc~&2_?JdK;wO4yLh4sFb@am?$GiQ3+ z{$ScW`+lK6BEITIJ8S+gS!Z?Ua^jPjoY>#&eU{EP&Gnnut-0mJ@9ApXJA^!>i`83= cCzkHL@5s5|wP9k}<&gcIyV1*^m7D9o0bp;zn*aa+ From 970bb0a8b75a59d282cea912b3601290a7eb10c2 Mon Sep 17 00:00:00 2001 From: Jawwad Ahmad Date: Thu, 22 Oct 2015 11:37:05 -0500 Subject: [PATCH 63/76] Fix "use of undeclared identifier" error Updated the getenv(XCODE_COLORS) to getenv("XcodeColors") --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 5a52ac6..6b25e92 100644 --- a/README.markdown +++ b/README.markdown @@ -54,7 +54,7 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml - Testing to see if XcodeColors is installed and enabled: ```objective-c - char *xcode_colors = getenv(XCODE_COLORS); + char *xcode_colors = getenv("XcodeColors"); if (xcode_colors && (strcmp(xcode_colors, "YES") == 0)) { // XcodeColors is installed and enabled! From 4d41c5386cd2ef713038c92e465d9c8b21f0a3f0 Mon Sep 17 00:00:00 2001 From: Jawwad Ahmad Date: Thu, 22 Oct 2015 11:45:40 -0500 Subject: [PATCH 64/76] Update println to print for Swift 2.0 Also some minor spacing updates --- README.markdown | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/README.markdown b/README.markdown index 5a52ac6..f45af50 100644 --- a/README.markdown +++ b/README.markdown @@ -136,40 +136,40 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml struct ColorLog { static let ESCAPE = "\u{001b}[" - static let RESET_FG = ESCAPE + "fg;" // Clear any foreground color + static let RESET_FG = ESCAPE + "fg;" // Clear any foreground color static let RESET_BG = ESCAPE + "bg;" // Clear any background color static let RESET = ESCAPE + ";" // Clear any foreground or background color - static func red(object:T) { - println("\(ESCAPE)fg255,0,0;\(object)\(RESET)") - } + static func red(object: T) { + print("\(ESCAPE)fg255,0,0;\(object)\(RESET)") + } - static func green(object:T) { - println("\(ESCAPE)fg0,255,0;\(object)\(RESET)") - } + static func green(object: T) { + print("\(ESCAPE)fg0,255,0;\(object)\(RESET)") + } - static func blue(object:T) { - println("\(ESCAPE)fg0,0,255;\(object)\(RESET)") - } + static func blue(object: T) { + print("\(ESCAPE)fg0,0,255;\(object)\(RESET)") + } - static func yellow(object:T) { - println("\(ESCAPE)fg255,255,0;\(object)\(RESET)") - } + static func yellow(object: T) { + print("\(ESCAPE)fg255,255,0;\(object)\(RESET)") + } - static func purple(object:T) { - println("\(ESCAPE)fg255,0,255;\(object)\(RESET)") - } + static func purple(object: T) { + print("\(ESCAPE)fg255,0,255;\(object)\(RESET)") + } - static func cyan(object:T) { - println("\(ESCAPE)fg0,255,255;\(object)\(RESET)") - } + static func cyan(object: T) { + print("\(ESCAPE)fg0,255,255;\(object)\(RESET)") + } } ``` And then you can log within a Swift method like so: ```Swift - ColorLog.red( "This is a log." ) - ColorLog.blue( "Number one hundred: \(100)." ) + ColorLog.red("This is a log.") + ColorLog.blue("Number one hundred: \(100).") ``` *** From 796faa80c3b7995d2571ddf4c184291319908cac Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 22 Oct 2015 16:10:35 -0700 Subject: [PATCH 65/76] Performing recommended project changes for Xcode 7. --- TestXcodeColors/TestXcodeColors-Info.plist | 2 +- XcodeColors.xcodeproj/project.pbxproj | 4 +++- XcodeColors/Info.plist | Bin 1502 -> 1505 bytes 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TestXcodeColors/TestXcodeColors-Info.plist b/TestXcodeColors/TestXcodeColors-Info.plist index 6998f9d..019440c 100644 --- a/TestXcodeColors/TestXcodeColors-Info.plist +++ b/TestXcodeColors/TestXcodeColors-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - com.deusty.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 5b649d1..d28e953 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -259,7 +259,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0640; + LastUpgradeCheck = 0700; }; buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */; compatibilityVersion = "Xcode 3.2"; @@ -391,6 +391,7 @@ GCC_PREFIX_HEADER = XcodeColors/XcodeColors_Prefix.pch; INFOPLIST_FILE = XcodeColors/Info.plist; INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; + PRODUCT_BUNDLE_IDENTIFIER = "ru.DeepIT.${PRODUCT_NAME}"; PRODUCT_NAME = XcodeColors; WRAPPER_EXTENSION = xcplugin; }; @@ -412,6 +413,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; INFOPLIST_FILE = "TestXcodeColors/TestXcodeColors-Info.plist"; MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_BUNDLE_IDENTIFIER = "com.deusty.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 9696fe3a8b6b60f293bf515ba7b84e3183291177..8a57e96b9d70223f3d39967701ac3a1fd4c400b4 100644 GIT binary patch delta 264 zcmcb|{g8Wt8n>>#ftI0>v96V_&E(mP@)I2vaz#csyE_M^CZ<$Qd?-Be-&~^@XE&$P zyp)_&zr@_sP(wWfJ#OFl#dhF;_A#U_Q?L zjzyHkh9#M$i)ACrR+eonyI9V%TwuA#a+l>1%X5|&EU#JKvGOvq3bTr_YP0IFny{Kq K-p4A>=neprxK616 delta 275 zcmaFJeUE#BnuMONftI0>v96V_O^mafQ)ymGPO4vGZt6t8#j^1N0)D{(MVWcYnFWbC z&N+$2#gP%t?#@A}i7Azn`55O;G?drjSE&vN@^=Y!4vF`3^mVO`7mzF})pJQrE$|G{ zLzCNlm+>2A6B*Vr>}R;b z@Q~pP!#_qLMpZ^@Mo-3M#zMwk#@UQJ7*8=iWBkLU%;d#X$TWj#Khra2US<>KXyzv7 zmCP5Izq81(xU%H1OlH}|vX5my%VCxqEH_!6vOHsX&GLceBg+?-@2p&`GOY5fCak8c PwycbHlMk}WGr9l(gmF`& From 3d7197b5220c2a904906cfec0a62b754ec804331 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 22 Oct 2015 16:19:06 -0700 Subject: [PATCH 66/76] Adding mention of Xcode 7 to readme. --- README.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.markdown b/README.markdown index e70b07f..7493a6f 100644 --- a/README.markdown +++ b/README.markdown @@ -7,11 +7,11 @@ You're not limited to a restricted color palate. You can specify, in your source code, the exact RGB values you'd like to use. You can specify foreground and/or background color(s). -XcodeColors is a simple plugin for Xcode 3, 4, 5 & 6 +XcodeColors is a simple plugin for Xcode 3, 4, 5, 6 & 7 *** -### XcodeColors installation instructions for Xcode 4, 5 & 6: +### XcodeColors installation instructions for Xcode 4, 5, 6 & 7: - Download or clone the repository. - Open the XcodeColors project with Xcode @@ -181,7 +181,7 @@ Lumberjack is a fast & simple, yet powerful & flexible logging framework for Mac From its GitHub page: -> [Lumberjack] is similar in concept to other popular logging frameworks such as log4j, +> Lumberjack is similar in concept to other popular logging frameworks such as log4j, > yet is designed specifically for Objective-C, and takes advantage of features such as > multi-threading, grand central dispatch (if available), lockless atomic operations, > and the dynamic nature of the Objective-C runtime. From 0ac37f4e3f1e796ad5375a7833444a658169c979 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 22 Oct 2015 16:23:13 -0700 Subject: [PATCH 67/76] Updating bundle identifier. --- XcodeColors.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index d28e953..e85b12d 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -391,7 +391,7 @@ GCC_PREFIX_HEADER = XcodeColors/XcodeColors_Prefix.pch; INFOPLIST_FILE = XcodeColors/Info.plist; INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; - PRODUCT_BUNDLE_IDENTIFIER = "ru.DeepIT.${PRODUCT_NAME}"; + PRODUCT_BUNDLE_IDENTIFIER = "com.deusty.${PRODUCT_NAME}"; PRODUCT_NAME = XcodeColors; WRAPPER_EXTENSION = xcplugin; }; From 3050baae35f5a97bc972ed2a9de78a7c09f116be Mon Sep 17 00:00:00 2001 From: DanSkeel Date: Fri, 23 Oct 2015 18:24:44 +0300 Subject: [PATCH 68/76] Converted plist file back to XML format --- XcodeColors/Info.plist | Bin 1505 -> 2430 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 8a57e96b9d70223f3d39967701ac3a1fd4c400b4..03580f188fe3488fe9321e7e2062f0278cf754b9 100644 GIT binary patch literal 2430 zcmb_e%Wm676kR7@p$c8Ji)+q%IECV1o~;1I5o{@NR{R^{<^Fd-TBKGqd&^sxliu4UarefelFL| z=BBK>%W{R{N7?=uZ*994#h=G|g;GC_vcvZ$`1rM4+;+u>b@>$dq8wbjR}Y@c!dG`)Nq=6?3x%`XD-jzhedjng<@{(Lf8{jmvH z8O*(Cckk|7_%yIOBd72e#Z6D{4?6xa@oBO6qga)*-R4;Yhw@J`UVUoX?jZE)u1inl z?nl9#gjcJ&=x*C*oUie73Us0_lsuye?`G5W?P^^6=4MlL)rV?bb-Vd|9JY@#i?%KH zL-sgjiYHIK&_D$VAebZIoCshkaV#(;DRIdmN1-63iC`u1;E1M4@+7I#efc37)6ye^vpYTw zPDuj+YaCP%Eb!EeOImVlA~5Q(o;DzrlsP2hZAhAEZvR)lJa{3v7Qh_GzI&;`suY3Q zpp@mx+HgG3kM)dZKNmDXRLOt{OhQgkr)I%(DWp|i_2p-+bDHKkM2f?P)EsQ!4x|s- z(1>idcRpnd7L}rHM1u3eyaD4P(i=}%j9wVgt5c_tq}LWGN3jCg!9*--?q$joak(|U z^Fjo}LxukyD>w*k*d9j!YeN!qR9V`q(|Zy~LY+i9#BpjNPncxNg~c&rUP;`LqKOo!qDp(=ae9w+j~oeun@_Se{* z!(u;j?C)xL?d88;`PE;R#d6o*g=@dJkgEQz*v`j~S3VZ&?Y>hFIghft_nh;We**)p B&xHU0 delta 891 zcmYk4%}*0S7{+&YXMu{s(8@>o5QM6HwYEqR4MyAT0*$3M-BwG)Y=-U9Zd`Vo-EBfc z4B=+H_`%skJ(+k=4iaOc@uoNA4bI zf~uI7-~S1@0L?(Qrnb&;sQ&PghDOxnbRBJO85kTI_IgkI2LmH#yyv|WB5LO*!$mEt z%0gZ@tgEtND!L|EhN9&}R791I{HM^wQp(*dPI>dau6FOyM&0` zYg(;)MMRC&ef!RSS$;{DiWZ(%<++%Svmq;ni<*?5&2Up(QpVYmh)`TekjF?$0jr#f zO;bco)q;YO)38-EWU{TQMI~LER8%6l%F=W>S^`TqaZXN^3i6E%mr#p2MVrQEIx3=8 zAvzO|rLd8ctx$oqPr~IKCfPU2>5B#OMP5h3++TOk5;1rn&Q-6B<3%|g@cDh`MAYf& zPb9BI(p*Xmr{j?rFGeGLJQbac^2vec$kp2BZtv*qI@aCOeZ05NbK>Nwei3=rE-@aa z%q5#IZ0^|XffYYv^PbHQ6+U1q_PEWbHb2{JtEu=2o40Mgv-#Vmzt*!NjQRWtA>b!r zoStPq!*l6WC`^LHLo@s>hvRxi(z7zBtGZ#PE|QfBlbm%=M$c{q$H4E?47>tw!8Z6sx6>gyPv50C=xqivLrjt>F^`z{%r0z(6HtP8 y;5vK>H{ffy2|vOuxDCI;?{H@X{(!qIU|nnrJH!sNqim4cTQsPUx?s}=JM|BC3H^}( From 364d6c413f2c635264315ebb073ab4734a8d5066 Mon Sep 17 00:00:00 2001 From: ReadmeCritic Date: Tue, 10 Nov 2015 10:45:12 -0800 Subject: [PATCH 69/76] Readme: Update redirects --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 7493a6f..5915ce8 100644 --- a/README.markdown +++ b/README.markdown @@ -176,7 +176,7 @@ And then you can log within a Swift method like so: ### Option 2: CocoaLumberjack -The [CocoaLumberjack](https://github.com/robbiehanson/CocoaLumberjack) framework natively supports XcodeColors! +The [CocoaLumberjack](https://github.com/CocoaLumberjack/CocoaLumberjack) framework natively supports XcodeColors! Lumberjack is a fast & simple, yet powerful & flexible logging framework for Mac and iOS. From its GitHub page: From 0d2f7aa7e938ad83307a5be1a3e28e967ba997b6 Mon Sep 17 00:00:00 2001 From: Tom Meier Date: Wed, 9 Dec 2015 11:52:41 +1100 Subject: [PATCH 70/76] XCode Version 7.2 (7C68) release --- XcodeColors/Info.plist | Bin 2430 -> 1547 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 03580f188fe3488fe9321e7e2062f0278cf754b9..82443e07566752b5455faa4f96838c873458c3b1 100644 GIT binary patch delta 942 zcmY+CPfXKL9LM|b0TXm@fWR0CVigcpTiDx_B zH{^nv*(f6wHdRqE^tkqKqpK;UwSq2NRWqO>FaJTW-n2LuO=M)VpjweKDw%@*V(67C zIewO3Q04rF1l`*&-CO8js#Gm#`bD{t6(!ie?_D%Z%YJ6sLKiQf=hK_1h51;P&q&G0 zoN!Zu1N2x^iDr|rgdmAAA(;{5qOdUj9Cr8ix%)i>gU5!3hmMb&piiC}9UGS*9hi>u z9PbNyYa;0(kx*MF={jH7{AzQUYUnwe_iVmz@IGjyLpGn<{A9DQrIAnBylwNX&0jXz zRvI;tj{CT1Y?>3iQ-RR5*XN6dyb&Q7_xj^(SO|0BV3-xs0ftR;Y&eCQPHzf1fzM_l zQS|b9NgP*mijh}&qhy#BM<$ADl9@r_c}AjeoH%%P}ky#@a9ryMU#!HEbJug1y0ZvCr5~oWT3=348{h!wdKt zeiwg;zrsJ@djv*|5=o*;JR;r^-$)l3A|>(``Hb8pe^VpWyhxR)2h?lo3$;gmr+xqu lPyhlK=m8!u0EWN_@Pk=!2}s~NC;|R^{<^Fd-TBKGqd&^sxliu4UarefelFL| z=BBK>%W{R{N7?=uZ*994#h=G|g;GC_vcvZ$`1rM4+;+u>b@>$dq8wbjR}Y@c!dG`)Nq=6?3x%`XD-jzhedjng<@{(Lf8{jmvH z8O*(Cckk|7_%yIOBd72e#Z6D{4?6xa@oBO6qga)*-R4;Yhw@J`UVUoX?jZE)u1inl z?nl9#gjcJ&=x*C*oUie73Us0_lsuye?`G5W?P^^6=4MlL)rV?bb-Vd|9JY@#i?%KH zL-sgjiYHIK&_D$VAebZIoCshkaV#(;DRIdmN1-63iC`u1;E1M4@+7I#efc37)6ye^vpYTw zPDuj+YaCP%Eb!EeOImVlA~5Q(o;DzrlsP2hZAhAEZvR)lJa{3v7Qh_GzI&;`suY3Q zpp@mx+HgG3kM)dZKNmDXRLOt{OhQgkr)I%(DWp|i_2p-+bDHKkM2f?P)EsQ!4x|s- z(1>idcRpnd7L}rHM1u3eyaD4P(i=}%j9wVgt5c_tq}LWGN3jCg!9*--?q$joak(|U z^Fjo}LxukyD>w*k*d9j!YeN!qR9V`q(|Zy~LY+i9#BpjNPncxNg~c&rUP;`LqKOo!qDp(=ae9w+j~oeun@_Se{* z!(u;j?C)xL?d88;`PE;R#d6o*g=@dJkgEQz*v`j~S3VZ&?Y>hFIghft_nh;We**)p B&xHU0 From 5ce04b324cc083475bb28114f87a2846dbc1a353 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Wed, 9 Dec 2015 16:36:19 -0800 Subject: [PATCH 71/76] Fix update_compat tool to output plist in XML format to make the diff's readable. --- update_compat.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/update_compat.sh b/update_compat.sh index d65cfca..0d9b246 100755 --- a/update_compat.sh +++ b/update_compat.sh @@ -17,5 +17,9 @@ fi echo "Add UUID to $plist" defaults write "$plist" DVTPlugInCompatibilityUUIDs -array-add $uuid +# The defaults tool will write a binary plist +# Convert it back to XML to make the diff's readable +plutil -convert xml1 "$plist" + # show the result defaults read "$plist" From ba9ccdbd67d398377331e2335ac28ef28026fdbf Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Wed, 9 Dec 2015 16:37:35 -0800 Subject: [PATCH 72/76] Convert Info.plist back to XML. --- XcodeColors/Info.plist | Bin 1547 -> 2486 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 82443e07566752b5455faa4f96838c873458c3b1..5123c77739bb4bcc4b047e7a4a204e221ac2bc20 100644 GIT binary patch literal 2486 zcmb_e%Wm676kR7@p$c8Ji)+qs-i6{|o~Z!E5o{@NR{;W`k!A5>I2e9x+wE^z_T|f$v!dH| zwy1Bqjk|2x)Z4OY_Y({T2sm4|%OTQyi~fTge7md`?fLU(qfh1j+$VRtS+2`aelFMb z_NLslm*on@kFstVckS8+#h=H`3Z;G=WrzQd@bPQ8xNVE~>+&)1=Rf0h^z)f@llbn! zzK(yLiZNc)n^ZlGaB}|=)m9&>vU$S!%k=V1nETl~H@^tTI}Y(;HcsPs`RmDOn-6us z%3$tAvw!=og^vTvGja-lQQY+8ey`&n6Q34~PsOU7?YB=NIFx^i@#5?-w~MSI&k;e3g|Q=k)dq2viocsrY}Z&%}uuWzMn&hY@25|@WO7eetPX%9H293zBtV2*O&(pj+1T1bQvLVT{A zWPLcvNz$4}@KFfhjuX(z<3md$xb)U3+lRAxy)n7> z;4QbneF~VGrl1s-D|x56?$3|Pl$cB3MB@IHG70ED7pVUw%lIE8!8s@;g2S zP6`77YaC?Yd0?p*my}@GM98VbdfI?gLTE_F+mIAd%>J)@I(W{R;*dLrefL6vl_^4Q zgOrv@Ys2wCKh!gtZZ2qoD3bvmasis6PL&7G1Q%9%*_WTS&MB%jM2f?P)C_E34ulWN z(1>idcRoc77L}rHM1u2@djrNrq&J@CF?w!zuTGUh5?)!L48?L}2NSWV+KZ$UaoU>R zc_BQT-D9K@AN$m(b?goE|#{P6t|lNI^n?}+vc{+?)~)QYKnHbsJ6x0 zuZ!LHqwZjv*LW8weZ8(5T>8;Uug0(4WL7k*vOSXbJ;Hqo&+ZKzkIhcPHv=C(F~jet zD&7+gH-~I_SFHx86+3CQKYJZJgJs84~)BjMzYcKwN%PW6b7R!Bq7p{G0 dJ=Ny-VmBW@Z23^EcU`CMa~@@P_oMUYe*-A!-RS@T delta 932 zcmY+CPfXKr6vzAT2TV|YV+f3aAWi{+x+x5Zf5_H#STp8AH=Geue{`j59PQ}3goT*h zjEON3Ie5?$Uc4CfVmzsd7vqhDyLvDY6Fqq_@#2rQ!}%_s_WR!N`+Ki_uRM2K7M2Qm zt!M=TpP+}NXa+PiHn|Qow;Vjw3f*m<_QM?~M@GlkQ*3bbG&|0oJ$HVQi$zL$Hm@Ym ziXy?b+N+RNbW2;-6jOq}&1TwHkzntBQeQTrnrvx?j?D6cVixg}1Y2wQeZ?CW!v)-u zjP`0dWGSj)mQ&?I{Z;&$B9|<*lvftx2Fix5I4bFKPJ%EYCQVJ3wF1g>l{_jIuV=V% z&R8j6J6tY7PwmDel5Zkav7KQ}6=Xw?X?un4nj~tfj;xZYV5^CGt4>jvi^NmNR28eP z=i=22H_Oc{2xQ9=^lrTLR`AJWzNBjUMN~`+671gh&KaiV%r08Ea}|FR|9W!%ax~4Q zq(pd*za_yQ|4>bdq!ZCNF9}gTkrHA8KR^5&ws&@UyL~;qNBa8vjt(62A3rfTG%P`X z=uC_Ya^sU@n*!~lv9P&D`>TB6@SDSa#?~_q?>qcp^8v8aQx2ax{Oqu+!OkZg-f{TO z;cth5M!PQ8=&y(&HXsHA(@DHR{&haXbLmt#f=8>)?7EhbjjX~MdBZHaQV~3KY6gdE zYhr3UG>Lz-y@K^S*D4z;EW*2^u+_ucp=s>>Pt01j?z+P3Y6UNSt|=X41MD=>LbK Lq)pt$e*uiYNU;SD From f6cf98d6f5d618728b2df1105b70030072b65c20 Mon Sep 17 00:00:00 2001 From: emaloney Date: Wed, 30 Dec 2015 12:35:13 -0500 Subject: [PATCH 73/76] Add reference to CleanroomLogger CleanroomLogger is to Swift as CocoaLumberjack is to Objective-C, so naturally we added XcodeColors support! This update to the README shows how XcodeColors can be used from the pure-Swift console logging API. --- README.markdown | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/README.markdown b/README.markdown index 5915ce8..54e3c3c 100644 --- a/README.markdown +++ b/README.markdown @@ -42,10 +42,11 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml ### How to use XcodeColors -**There are 2 ways to use XcodeColors:** +**There are 3 ways to use XcodeColors:** -1. **Manually specify the colors inside NSLog (or create custom macros)** -2. **Use CocoaLumberjack** +1. [**Manually specify the colors inside NSLog (or create custom macros)**](#option-1-manual-use--custom-macros) +2. [**Use CocoaLumberjack**](#option-2-cocoalumberjack) (for Objective-C projects) +3. [**Use CleanroomLogger**](#option-3-cleanroomlogger) (for Swift projects) *** @@ -226,3 +227,33 @@ NSColor *pink = [NSColor colorWithCalibratedRed:(255/255.0) green:(58/255.0) blu DDLogInfo(@"Warming up printer (post-customization)"); // Pink ! ``` + +*** + +### Option 3: CleanroomLogger + +[CleanroomLogger](https://github.com/emaloney/CleanroomLogger) is a popular pure-Swift logging API for iOS, Mac OS X, tvOS and watchOS that is designed to be simple, extensible, lightweight and performant. + +CleanroomLogger is a *real* console logger, meaning that it writes to the Apple System Log (ASL) facility and not just to standard output. + +[XcodeColors support](https://github.com/emaloney/CleanroomLogger#xcodecolors-support) is included in CleanroomLogger, and by default, when the `XcodeColors` environment variable is set to `YES`, CleanroomLogger will colorize log output based on the [*severity*](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Enums/LogSeverity.html) of the message: + +CleanroomLogger's default XcodeColors log severity colorization + +Let's say you had an `AppDelegate.swift` file with an `import CleanroomLogger` statement and the lines: + +```swift +Log.verbose?.trace() +Log.debug?.value(self) +Log.info?.message("These pretzels are making me thirsty") +Log.warning?.message("The ocean called, they're running out of shrimp!") +Log.error?.message("The database connection failed") +``` + +With CleanroomLogger and XcodeColors, you would see colorized log output looking something like: + +CleanroomLogger code example + +CleanroomLogger lets developers supply their own [`ColorTable`](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Protocols/ColorTable.html) to customize the default color scheme. Default colorization can also be turned off entirely, and an [`XcodeColorsColorizer`](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Structs/XcodeColorsColorizer.html) instance can be used to manually apply XcodeColors escape sequences to strings. + +For further details, visit [the CleanroomLogger API documentation](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/index.html). From d9bc43a09a8e985a1a3c92456609d4ecf732cae0 Mon Sep 17 00:00:00 2001 From: Bill Waggoner Date: Thu, 28 Jan 2016 11:30:57 -0500 Subject: [PATCH 74/76] Add check for Xcode-beta --- update_compat.sh | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/update_compat.sh b/update_compat.sh index 0d9b246..ffa0b70 100755 --- a/update_compat.sh +++ b/update_compat.sh @@ -2,20 +2,26 @@ # show Xcode version and UUID xcodebuild -version -uuid=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID) -echo "UUID $uuid" -echo "" +for xc in Xcode Xcode-beta; do + app=/Applications/$xc.app + if [[ -e $app ]]; then + echo "Updating for $app" + uuid=$(defaults read $app/Contents/Info DVTPlugInCompatibilityUUID) + echo "UUID $uuid" + echo "" -# check UUID -plist=$(pwd)/XcodeColors/Info.plist -if [ -n "$(defaults read "$plist" | grep $uuid)" ] ; then - echo "UUID is already added to $plist" - exit -fi + # check UUID + plist=$(pwd)/XcodeColors/Info.plist + if [ -n "$(defaults read "$plist" | grep $uuid)" ] ; then + echo "UUID is already added to $plist" + continue + fi -# add UUID to .plist -echo "Add UUID to $plist" -defaults write "$plist" DVTPlugInCompatibilityUUIDs -array-add $uuid + # add UUID to .plist + echo "Add UUID to $plist" + defaults write "$plist" DVTPlugInCompatibilityUUIDs -array-add $uuid + fi +done # The defaults tool will write a binary plist # Convert it back to XML to make the diff's readable From f0b7c646d9614ceca4cc8e874685f3e42ffc00f0 Mon Sep 17 00:00:00 2001 From: Tom Meier Date: Tue, 22 Mar 2016 14:53:13 +1100 Subject: [PATCH 75/76] XCode 7.3 (7D175) added --- XcodeColors/Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/XcodeColors/Info.plist b/XcodeColors/Info.plist index 5123c77..4791741 100644 --- a/XcodeColors/Info.plist +++ b/XcodeColors/Info.plist @@ -44,6 +44,7 @@ CC0D0F4F-05B3-431A-8F33-F84AFCB2C651 7265231C-39B4-402C-89E1-16167C4CC990 F41BD31E-2683-44B8-AE7F-5F09E919790E + ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C LSApplicationCategoryType From d2f119b14e0cb5d5b8f3cfe415a1fccd52248955 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Sun, 27 Mar 2016 13:58:01 -0700 Subject: [PATCH 76/76] Update README.markdown --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 54e3c3c..7ee7314 100644 --- a/README.markdown +++ b/README.markdown @@ -45,7 +45,7 @@ http://deepitpro.com/en/articles/XcodeColors/info/index.shtml **There are 3 ways to use XcodeColors:** 1. [**Manually specify the colors inside NSLog (or create custom macros)**](#option-1-manual-use--custom-macros) -2. [**Use CocoaLumberjack**](#option-2-cocoalumberjack) (for Objective-C projects) +2. [**Use CocoaLumberjack**](#option-2-cocoalumberjack) (for Objective-C & Swift projects) 3. [**Use CleanroomLogger**](#option-3-cleanroomlogger) (for Swift projects) ***