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/README b/README deleted file mode 100644 index addc7e5..0000000 --- a/README +++ /dev/null @@ -1,4 +0,0 @@ -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. - -See ColorLog project for usage demo. diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..7ee7314 --- /dev/null +++ b/README.markdown @@ -0,0 +1,259 @@ +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, 5, 6 & 7 + +*** + +### XcodeColors installation instructions for Xcode 4, 5, 6 & 7: + +- 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. + +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? + +See this page for installation instructions: +http://deepitpro.com/en/articles/XcodeColors/info/index.shtml + +*** + +### How to use XcodeColors + +**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 & Swift projects) +3. [**Use CleanroomLogger**](#option-3-cleanroomlogger) (for Swift projects) + +*** + +### Option 1: Manual Use / Custom Macros + +- Testing to see if XcodeColors is installed and enabled: + + ```objective-c + char *xcode_colors = getenv("XcodeColors"); + if (xcode_colors && (strcmp(xcode_colors, "YES") == 0)) + { + // XcodeColors is installed and enabled! + } + ``` + +- Enabling / Disabling XcodeColors + + ```objective-c + setenv("XcodeColors", "YES", 0); // Enables XcodeColors (you obviously have to install it too) + + setenv("XcodeColors", "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 into your string, followed by "fg124,12,255;" where r=124, g=12, b=255. + // + // To set the background color: + // 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 into your string, followed by "fg;" + // + // To reset the background color (to default value): + // 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 into your string, followed by ";" + + #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 + #define XCODE_COLORS_RESET XCODE_COLORS_ESCAPE @";" // Clear any foreground or background color + ``` + + 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); + + 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); + ``` + +- 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); + ``` + +- 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) { + print("\(ESCAPE)fg255,0,0;\(object)\(RESET)") + } + + static func green(object: T) { + print("\(ESCAPE)fg0,255,0;\(object)\(RESET)") + } + + static func blue(object: T) { + print("\(ESCAPE)fg0,0,255;\(object)\(RESET)") + } + + static func yellow(object: T) { + print("\(ESCAPE)fg255,255,0;\(object)\(RESET)") + } + + static func purple(object: T) { + print("\(ESCAPE)fg255,0,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).") + ``` + +*** + +### Option 2: CocoaLumberjack + +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: + +> 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 +// Enable XcodeColors +setenv("XcodeColors", "YES", 0); + +// 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:DDLogFlagInfo]; + +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). 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..55ab546 --- /dev/null +++ b/TestXcodeColors/AppDelegate.m @@ -0,0 +1,62 @@ +#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 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 + +#define LogBlue(frmt, ...) NSLog((XCODE_COLORS_ESCAPE @"fg0,0,255;" frmt XCODE_COLORS_RESET), ##__VA_ARGS__) + +@implementation AppDelegate + +@synthesize window = _window; + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + 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); + + 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); + + LogBlue(@"Blue text via macro"); +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication +{ + return YES; +} +@end diff --git a/Info.plist b/TestXcodeColors/TestXcodeColors-Info.plist similarity index 55% rename from Info.plist rename to TestXcodeColors/TestXcodeColors-Info.plist index feaf522..019440c 100644 --- a/Info.plist +++ b/TestXcodeColors/TestXcodeColors-Info.plist @@ -3,45 +3,32 @@ CFBundleDevelopmentRegion - English + en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier - ru.DeepIT.${PRODUCT_NAME} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType - BNDL + APPL CFBundleShortVersionString - 1.0.9 + 1.0 CFBundleSignature ???? CFBundleVersion - 109 - LoadAtLaunch - + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2012 Deusty LLC. All rights reserved. + NSMainNibFile + MainMenu NSPrincipalClass - XcodeColors - SIMBLTargetApplications - - - BundleIdentifier - com.apple.Xcode - - - BundleIdentifier - com.apple.dt.Xcode - - - XCGCReady - - XCPluginHasUI - - XC4Compatible - + 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..684d457 --- /dev/null +++ b/TestXcodeColors/main.m @@ -0,0 +1,7 @@ +#import + + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +} diff --git a/XcodeColors.h b/XcodeColors.h deleted file mode 100644 index adeeb50..0000000 --- a/XcodeColors.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// XcodeColors.h -// XcodeColors -// -// Created by Uncle MiF on 9/13/10. -// Copyright 2010 Deep IT. All rights reserved. -// - -#import - -@interface XcodeColors : NSObject - -// Foreground - -+(NSColor*)blackColor; -+(NSColor*)redColor; -+(NSColor*)greenColor; -+(NSColor*)yellowColor; -+(NSColor*)blueColor; -+(NSColor*)magentaColor; -+(NSColor*)cyanColor; -+(NSColor*)whiteColor; - -// Background - -+(NSColor*)blackBackgroundColor; -+(NSColor*)redBackgroundColor; -+(NSColor*)greenBackgroundColor; -+(NSColor*)yellowBackgroundColor; -+(NSColor*)blueBackgroundColor; -+(NSColor*)magentaBackgroundColor; -+(NSColor*)cyanBackgroundColor; -+(NSColor*)whiteBackgroundColor; - -// Plugin -+(void)pluginDidLoad:(id)xcodeDirectCompatibility; --(void)registerLaunchSystemDescriptions; - -@end diff --git a/XcodeColors.m b/XcodeColors.m deleted file mode 100644 index 244cbcc..0000000 --- a/XcodeColors.m +++ /dev/null @@ -1,324 +0,0 @@ -// -// XcodeColors.m -// XcodeColors -// -// Created by Uncle MiF on 9/13/10. -// Copyright 2010 Deep IT. All rights reserved. -// - -#import "XcodeColors.h" -#import "MethodReplace.h" - -#define XCODE_COLORS "XcodeColors" - -#define LC_SEQ_MAC @"\033[" -#define LC_SEQ_IOS @"\xC2\xA0[" - -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) -{ - NSString * affectedString = [[textStorage string] substringWithRange:range]; - if ([affectedString rangeOfString:seq].location != NSNotFound) - { - 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) - { - 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++) - { - if ([component rangeOfString:ctrlSEQ[i]].location != NSNotFound) - { - switch(i) - { - 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]; - } - realString = [component substringFromIndex:[ctrlSEQ[i] length]]; - [clearSEQ addObject:[NSValue valueWithRange:NSMakeRange(componentRange.location - [seq length],[ctrlSEQ[i] length] + [seq length])]]; - break; - } - } - } - componentRange.length = [component length]; - [textStorage addAttributes:attrs range:componentRange]; - componentRange.location += componentRange.length + [seq length]; - firstPass = NO; - } - - for (NSValue * clearValue in clearSEQ) - { - NSRange range = [clearValue rangeValue]; - [textStorage addAttributes: - [NSDictionary dictionaryWithObjectsAndKeys: - [NSFont systemFontOfSize:0.001],NSFontAttributeName, - [NSColor clearColor],NSForegroundColorAttributeName, - nil] range:range]; - } - } -} - --(void)fixAttributesInRange:(NSRange)aRange// NSTextStorage -{ - imp_ts_fixAttributesInRange(self,_cmd,aRange); - if (getenv(XCODE_COLORS) && !strcmp(getenv(XCODE_COLORS),"YES")) - { - ApplyANSIColors(self,aRange,LC_SEQ_MAC); - ApplyANSIColors(self,aRange,LC_SEQ_IOS); - } -} - -@end - -@implementation XcodeColors - -+(void)pluginDidLoad:(id)xcodeDirectCompatibility -{ - /* nothing */ - NSLog(@"%s",__PRETTY_FUNCTION__); -} - --(void)registerLaunchSystemDescriptions -{ - /* nothing */ - NSLog(@"%s",__PRETTY_FUNCTION__); -} - -+(void)load -{ - NSLog(@"%s,v,9",__PRETTY_FUNCTION__); - if (getenv(XCODE_COLORS) && !strcmp(getenv(XCODE_COLORS), "YES")) - return; - - imp_ts_fixAttributesInRange = ReplaceInstanceMethod(NSTextStorage,fixAttributesInRange:,XcodeColors_NSTextStorage); - - 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 (!color) - return nil; - [pref setObject:[NSArchiver archivedDataWithRootObject:color] forKey:[self defaultColorKeyByName:colorName]]; - return color; - } - if ([defColor isKindOfClass:[NSData class]]) - defColor = [NSUnarchiver unarchiveObjectWithData:defColor]; - if ([defColor isKindOfClass:[NSColor class]]) - return defColor; - if ([defColor isKindOfClass:[NSString class]]) - { - 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]; - } - } - 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 */ - ]; -} - -+(NSColor*)magentaBackgroundColor -{ - return [self defaultColorWithName:@"magentaBackgroundColor" defaultColor: - [NSColor colorWithCalibratedRed:0xCC/255.0 green:0xB1/255.0 blue:0xC0/255.0 alpha:0xFF/255.0]/* CCB1C0 */ - ]; -} - -+(NSColor*)cyanBackgroundColor -{ - return [self defaultColorWithName:@"cyanBackgroundColor" defaultColor: - [NSColor colorWithCalibratedRed:0xB3/255.0 green:0xCA/255.0 blue:0xCC/255.0 alpha:0xFF/255.0]/* B3CACC */ - ]; -} - -+(NSColor*)whiteBackgroundColor -{ - return [self defaultColorWithName:@"whiteBackgroundColor" defaultColor:[NSColor whiteColor]]; -} - -@end diff --git a/XcodeColors.xcodeproj/project.pbxproj b/XcodeColors.xcodeproj/project.pbxproj index 3a35393..e85b12d 100644 --- a/XcodeColors.xcodeproj/project.pbxproj +++ b/XcodeColors.xcodeproj/project.pbxproj @@ -7,40 +7,54 @@ objects = { /* 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 */; }; + 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 */; }; + 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 PBXCopyFilesBuildPhase section */ - 19FD4825133A590C0072594E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = Contents; - dstSubfolderSpec = 1; - files = ( - 19FD4826133A59190072594E /* version.plist in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; +/* Begin PBXContainerItemProxy section */ + DC3E080417F4F57600994B5F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8D5B49AC048680CD000E48DA; + remoteInfo = XcodeColors; }; -/* End PBXCopyFilesBuildPhase section */ +/* 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 = ""; }; 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 = ""; }; - 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; }; - 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; 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; }; + 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 = ""; }; + 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 */ @@ -52,16 +66,22 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DC7131F3156B71A500F0C51A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DC7131FA156B71A500F0C51A /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 089C166AFE841209C02AAC07 /* XcodeColors */ = { isa = PBXGroup; children = ( - 08FB77AFFE84173DC02AAC07 /* Classes */, - 32C88E010371C26100C91783 /* Other Sources */, - 089C167CFE841241C02AAC07 /* Resources */, - 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, + DCCCCFF617F4F7690097500C /* XcodeColors */, + DC7131FF156B71A500F0C51A /* TestXcodeColors */, 19C28FB8FE9D52D311CA2CBB /* Products */, ); name = XcodeColors; @@ -76,23 +96,13 @@ name = "Frameworks and Libraries"; sourceTree = ""; }; - 089C167CFE841241C02AAC07 /* Resources */ = { - isa = PBXGroup; - children = ( - 19FD4822133A58110072594E /* version.plist */, - 8D5B49B7048680CD000E48DA /* Info.plist */, - 089C167DFE841241C02AAC07 /* InfoPlist.strings */, - ); - name = Resources; - sourceTree = ""; - }; 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( - 19A131E6123E5A9800B2532F /* XcodeColors.h */, - 19A131E7123E5A9800B2532F /* XcodeColors.m */, - 19FCB50412410E410095CF63 /* MethodReplace.h */, - 19FCB50512410E410095CF63 /* MethodReplace.m */, + DCCCCFF317F4F7630097500C /* XcodeColors.h */, + DCCCCFF417F4F7630097500C /* XcodeColors.m */, + D253754419E5E84700AF94FA /* JRSwizzle.h */, + D253754519E5E84700AF94FA /* JRSwizzle.m */, ); name = Classes; sourceTree = ""; @@ -118,17 +128,90 @@ 19C28FB8FE9D52D311CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */, + 8D5B49B6048680CD000E48DA /* XcodeColors.xcplugin */, + DC7131F6156B71A500F0C51A /* TestXcodeColors.app */, ); name = Products; sourceTree = ""; }; - 32C88E010371C26100C91783 /* Other Sources */ = { + 32C88E010371C26100C91783 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + DCCCCFF817F4F7AE0097500C /* Info.plist */, + DCCCCFFA17F4F7C30097500C /* InfoPlist.strings */, + DCCCCFF717F4F77C0097500C /* XcodeColors_Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + DC7131F8156B71A500F0C51A /* Frameworks */ = { isa = PBXGroup; children = ( - 32DBCF630370AF2F00C91783 /* XcodeColors_Prefix.pch */, + DCCCCFFD17F4F7E20097500C /* Linked Frameworks */, + DC7131FB156B71A500F0C51A /* Other Frameworks */, ); - name = "Other Sources"; + name = Frameworks; + path = ..; + 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 = ( + DCCCCFFE17F4F8020097500C /* Classes */, + DC713200156B71A500F0C51A /* Supporting Files */, + DC7131F8156B71A500F0C51A /* Frameworks */, + ); + path = TestXcodeColors; + sourceTree = ""; + }; + DC713200156B71A500F0C51A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + DC713201156B71A500F0C51A /* TestXcodeColors-Info.plist */, + DC713202156B71A500F0C51A /* InfoPlist.strings */, + DC713207156B71A500F0C51A /* TestXcodeColors-Prefix.pch */, + DC713205156B71A500F0C51A /* main.m */, + DC713208156B71A500F0C51A /* Credits.rtf */, + ); + 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 */ @@ -139,10 +222,8 @@ buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "XcodeColors" */; buildPhases = ( 8D5B49AF048680CD000E48DA /* Resources */, - 19FD4825133A590C0072594E /* CopyFiles */, 8D5B49B1048680CD000E48DA /* Sources */, 8D5B49B3048680CD000E48DA /* Frameworks */, - 19863EE81240DD900067FA40 /* ShellScript */, ); buildRules = ( ); @@ -151,16 +232,34 @@ name = XcodeColors; productInstallPath = "$(HOME)/Library/Bundles"; productName = XcodeColors; - productReference = 8D5B49B6048680CD000E48DA /* XcodeColors.bundle */; + productReference = 8D5B49B6048680CD000E48DA /* XcodeColors.xcplugin */; 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 = ( + DC3E080517F4F57600994B5F /* PBXTargetDependency */, + ); + name = TestXcodeColors; + productName = TestXcodeColors; + productReference = DC7131F6156B71A500F0C51A /* TestXcodeColors.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0420; + LastUpgradeCheck = 0700; }; buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */; compatibilityVersion = "Xcode 3.2"; @@ -171,12 +270,14 @@ Japanese, French, German, + en, ); mainGroup = 089C166AFE841209C02AAC07 /* XcodeColors */; projectDirPath = ""; projectRoot = ""; targets = ( 8D5B49AC048680CD000E48DA /* XcodeColors */, + DC7131F5156B71A500F0C51A /* TestXcodeColors */, ); }; /* End PBXProject section */ @@ -186,45 +287,80 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */, + DCCCCFFC17F4F7C40097500C /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 19863EE81240DD900067FA40 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; + DC7131F4156B71A500F0C51A /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - ); - inputPaths = ( - ); - outputPaths = ( + DC713204156B71A500F0C51A /* InfoPlist.strings in Resources */, + DC71320A156B71A500F0C51A /* Credits.rtf in Resources */, + DC713210156B71A600F0C51A /* MainMenu.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "./xcb-install.pl"; }; -/* End PBXShellScriptBuildPhase section */ +/* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 8D5B49B1048680CD000E48DA /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 19A131E8123E5A9800B2532F /* XcodeColors.m in Sources */, - 19FCB50612410E410095CF63 /* MethodReplace.m in Sources */, + D253754619E5E84700AF94FA /* JRSwizzle.m in Sources */, + DCCCCFF517F4F7630097500C /* XcodeColors.m in Sources */, + ); + 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 PBXTargetDependency section */ + DC3E080517F4F57600994B5F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8D5B49AC048680CD000E48DA /* XcodeColors */; + targetProxy = DC3E080417F4F57600994B5F /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ - 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + DC713202156B71A500F0C51A /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 089C167EFE841241C02AAC07 /* English */, + 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 = ""; + }; + DCCCCFFA17F4F7C30097500C /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + DCCCCFFB17F4F7C30097500C /* English */, ); name = InfoPlist.strings; sourceTree = ""; @@ -232,65 +368,54 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 1DEB913B08733D840010E9CD /* Debug */ = { + DC6E8ED417F4F0B400373006 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - 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; - INSTALL_PATH = "$(HOME)/Library/Bundles"; - PRODUCT_NAME = XcodeColors; - WRAPPER_EXTENSION = bundle; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + SDKROOT = macosx; }; - name = Debug; + name = Release; }; - 1DEB913C08733D840010E9CD /* Release */ = { + DC6E8ED517F4F0B400373006 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; + DEPLOYMENT_LOCATION = YES; + DSTROOT = "$(HOME)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = XcodeColors_Prefix.pch; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Library/Bundles"; + 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 = "com.deusty.${PRODUCT_NAME}"; PRODUCT_NAME = XcodeColors; - WRAPPER_EXTENSION = bundle; + WRAPPER_EXTENSION = xcplugin; }; name = Release; }; - 1DEB913F08733D840010E9CD /* Debug */ = { - 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; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.5; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx10.6; - }; - name = Debug; - }; - 1DEB914008733D840010E9CD /* Release */ = { + DC6E8ED617F4F0B400373006 /* Release */ = { 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; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.5; - SDKROOT = macosx10.6; + 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; + 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_BUNDLE_IDENTIFIER = "com.deusty.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; }; name = Release; }; @@ -300,8 +425,7 @@ 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "XcodeColors" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1DEB913B08733D840010E9CD /* Debug */, - 1DEB913C08733D840010E9CD /* Release */, + DC6E8ED517F4F0B400373006 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -309,8 +433,15 @@ 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "XcodeColors" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1DEB913F08733D840010E9CD /* Debug */, - 1DEB914008733D840010E9CD /* Release */, + DC6E8ED417F4F0B400373006 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DC713213156B71A600F0C51A /* Build configuration list for PBXNativeTarget "TestXcodeColors" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DC6E8ED617F4F0B400373006 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; 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/XcodeColors/Info.plist b/XcodeColors/Info.plist new file mode 100644 index 0000000..4791741 --- /dev/null +++ b/XcodeColors/Info.plist @@ -0,0 +1,75 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0.9 + CFBundleSignature + ???? + CFBundleVersion + 109 + DVTPlugInCompatibilityUUIDs + + 63FC1C47-140D-42B0-BB4D-A10B2D225574 + 37B30044-3B14-46BA-ABAA-F01000C27B63 + 640F884E-CE55-4B40-87C0-8869546CAB7A + A2E4D43F-41F4-4FB9-BB94-7177011C9AED + AD68E85B-441B-4301-B564-A45E4919A6AD + C4A681B0-4A26-480E-93EC-1218098B9AA0 + FEC992CC-CA4A-4CFD-8881-77300FCB848A + 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 + E969541F-E6F9-4D25-8158-72DC3545A6C6 + AABB7188-E14E-4433-AD3B-5CD791EAD9A3 + 5EDAC44F-8E0B-42C9-9BEF-E9C12EEC4949 + 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90 + 0420B86A-AA43-4792-9ED0-6FE0F2B16A13 + CC0D0F4F-05B3-431A-8F33-F84AFCB2C651 + 7265231C-39B4-402C-89E1-16167C4CC990 + F41BD31E-2683-44B8-AE7F-5F09E919790E + ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C + + LSApplicationCategoryType + + LoadAtLaunch + + NSPrincipalClass + XcodeColors + SIMBLTargetApplications + + + BundleIdentifier + com.apple.Xcode + + + BundleIdentifier + com.apple.dt.Xcode + + + XC4Compatible + + XC5Compatible + + XCGCReady + + XCPluginHasUI + + + 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 new file mode 100644 index 0000000..80bc3be --- /dev/null +++ b/XcodeColors/XcodeColors.h @@ -0,0 +1,22 @@ +// +// XcodeColors.h +// XcodeColors +// +// Created by Uncle MiF on 9/13/10. +// Copyright 2010 Deep IT. All rights reserved. +// + +#import + +@interface NSTextStorage(XcodeColors) + +- (void)xc_fixAttributesInRange:(NSRange)aRange; + +@end + +@interface XcodeColors : NSObject + ++ (void)pluginDidLoad:(id)xcodeDirectCompatibility; +- (void)registerLaunchSystemDescriptions; + +@end diff --git a/XcodeColors/XcodeColors.m b/XcodeColors/XcodeColors.m new file mode 100644 index 0000000..96099ec --- /dev/null +++ b/XcodeColors/XcodeColors.m @@ -0,0 +1,340 @@ +// +// XcodeColors.m +// XcodeColors +// +// Created by Uncle MiF on 9/13/10. +// Copyright 2010 Deep IT. All rights reserved. +// + +#import "XcodeColors.h" +#import +#import "JRSwizzle.h" + +#define XCODE_COLORS "XcodeColors" + +// 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 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 +#define XCODE_COLORS_RESET XCODE_COLORS_ESCAPE @";" // Clear any foreground or background color + +// + + + +@implementation NSTextStorage (XcodeColors) + +void ApplyANSIColors(NSTextStorage *textStorage, NSRange textStorageRange, NSString *escapeSeq) +{ + 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) + { + 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 + { + // 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) + { + // 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) + { + // 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) + { + // 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) + { + // 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; + } + } + } + + 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 + [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 seqRange = [seqRangeValue rangeValue]; + [textStorage addAttributes:clearAttrs range:seqRange]; + } + } +} + +- (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. + + // 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. + + char *xcode_colors = getenv(XCODE_COLORS); + if (xcode_colors && (strcmp(xcode_colors, "YES") == 0)) + { + ApplyANSIColors(self, aRange, XCODE_COLORS_ESCAPE); + } +} + +@end + + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#pragma mark - +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +@implementation XcodeColors + ++ (void)load +{ +// NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); + + 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); + }); +} + ++ (void)pluginDidLoad:(id)xcodeDirectCompatibility +{ +// NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); +} + +- (void)registerLaunchSystemDescriptions +{ +// NSLog(@"XcodeColors: %@", NSStringFromSelector(_cmd)); +} + + +@end 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 diff --git a/install b/install deleted file mode 100755 index d3a74f5..0000000 --- a/install +++ /dev/null @@ -1,11 +0,0 @@ -#!/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/ - -rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin 2>/dev/null -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 - -echo Installed 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 diff --git a/update_compat.sh b/update_compat.sh new file mode 100755 index 0000000..ffa0b70 --- /dev/null +++ b/update_compat.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# show Xcode version and UUID +xcodebuild -version +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" + continue + fi + + # 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 +plutil -convert xml1 "$plist" + +# show the result +defaults read "$plist" 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 - - 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');