From 5a1a87dbfba0ad19a9bb9a8a3ea36496cc359da8 Mon Sep 17 00:00:00 2001 From: "thomasvl@gmail.com" Date: Thu, 21 Aug 2008 03:02:17 +0000 Subject: - Added GTMGetURLHandler class that gives you a very easy way of supporting Get URL events just by adding a key to your plists, and adding a single method to your class. See GTMGetURLHandler.m for more details. - Added XcodeProject, AppleScript, and InterfaceBuilder Spotlight Plugins. Allows you to index .xcodeproj, .scpt, .scptd, .xib, .nib, and .aib files. See Readmes beside individual projects in SpotlightPlugins. --- Foundation/GTMGetURLHandler.m | 270 ++ Foundation/GTMStackTrace.m | 4 +- GTM.xcodeproj/project.pbxproj | 4 + ReleaseNotes.txt | 9 +- .../AppleScript.xcodeproj/project.pbxproj | 335 +++ .../AppleScript/English.lproj/InfoPlist.strings | Bin 0 -> 452 bytes SpotlightPlugins/AppleScript/GetMetadataForFile.m | 121 + SpotlightPlugins/AppleScript/Info.plist | 74 + SpotlightPlugins/AppleScript/PluginID.h | 19 + SpotlightPlugins/AppleScript/ReadMe.rtf | 31 + SpotlightPlugins/AppleScript/TestData/test.scpt | Bin 0 -> 296 bytes .../TestData/test.scptd/Contents/Info.plist | 17 + .../Contents/Resources/Scripts/main.scpt | Bin 0 -> 296 bytes .../Contents/Resources/description.rtfd/TXT.rtf | 6 + SpotlightPlugins/Common/main.c | 204 ++ .../English.lproj/InfoPlist.strings | Bin 0 -> 480 bytes .../InterfaceBuilder/GetMetadataForFile.m | 168 ++ SpotlightPlugins/InterfaceBuilder/Info.plist | 51 + .../InterfaceBuilder.xcodeproj/project.pbxproj | 345 +++ SpotlightPlugins/InterfaceBuilder/PluginID.h | 19 + SpotlightPlugins/InterfaceBuilder/ReadMe.rtf | 34 + .../TestData/NibCarbonTest.nib/designable.nib | 3106 ++++++++++++++++++++ .../TestData/NibCarbonTest.nib/objects.xib | 627 ++++ .../TestData/NibCocoaTest.nib/designable.nib | 3075 +++++++++++++++++++ .../TestData/NibCocoaTest.nib/keyedobjects.nib | Bin 0 -> 27869 bytes .../InterfaceBuilder/TestData/XibCarbonTest.xib | 3106 ++++++++++++++++++++ .../InterfaceBuilder/TestData/XibCocoaTest.xib | 3075 +++++++++++++++++++ .../XcodeProject/English.lproj/InfoPlist.strings | Bin 0 -> 472 bytes SpotlightPlugins/XcodeProject/GetMetadataForFile.m | 85 + SpotlightPlugins/XcodeProject/Info.plist | 49 + SpotlightPlugins/XcodeProject/PluginID.h | 19 + SpotlightPlugins/XcodeProject/ReadMe.rtf | 31 + .../TestData/test.xcodeproj/project.pbxproj | 277 ++ .../XcodeProject.xcodeproj/project.pbxproj | 335 +++ XcodeConfig/subconfig/Debug.xcconfig | 3 - 35 files changed, 15494 insertions(+), 5 deletions(-) create mode 100644 Foundation/GTMGetURLHandler.m create mode 100644 SpotlightPlugins/AppleScript/AppleScript.xcodeproj/project.pbxproj create mode 100644 SpotlightPlugins/AppleScript/English.lproj/InfoPlist.strings create mode 100644 SpotlightPlugins/AppleScript/GetMetadataForFile.m create mode 100644 SpotlightPlugins/AppleScript/Info.plist create mode 100644 SpotlightPlugins/AppleScript/PluginID.h create mode 100644 SpotlightPlugins/AppleScript/ReadMe.rtf create mode 100644 SpotlightPlugins/AppleScript/TestData/test.scpt create mode 100644 SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Info.plist create mode 100644 SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Resources/Scripts/main.scpt create mode 100644 SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Resources/description.rtfd/TXT.rtf create mode 100644 SpotlightPlugins/Common/main.c create mode 100644 SpotlightPlugins/InterfaceBuilder/English.lproj/InfoPlist.strings create mode 100644 SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m create mode 100644 SpotlightPlugins/InterfaceBuilder/Info.plist create mode 100644 SpotlightPlugins/InterfaceBuilder/InterfaceBuilder.xcodeproj/project.pbxproj create mode 100644 SpotlightPlugins/InterfaceBuilder/PluginID.h create mode 100644 SpotlightPlugins/InterfaceBuilder/ReadMe.rtf create mode 100644 SpotlightPlugins/InterfaceBuilder/TestData/NibCarbonTest.nib/designable.nib create mode 100644 SpotlightPlugins/InterfaceBuilder/TestData/NibCarbonTest.nib/objects.xib create mode 100644 SpotlightPlugins/InterfaceBuilder/TestData/NibCocoaTest.nib/designable.nib create mode 100644 SpotlightPlugins/InterfaceBuilder/TestData/NibCocoaTest.nib/keyedobjects.nib create mode 100644 SpotlightPlugins/InterfaceBuilder/TestData/XibCarbonTest.xib create mode 100644 SpotlightPlugins/InterfaceBuilder/TestData/XibCocoaTest.xib create mode 100644 SpotlightPlugins/XcodeProject/English.lproj/InfoPlist.strings create mode 100644 SpotlightPlugins/XcodeProject/GetMetadataForFile.m create mode 100644 SpotlightPlugins/XcodeProject/Info.plist create mode 100644 SpotlightPlugins/XcodeProject/PluginID.h create mode 100644 SpotlightPlugins/XcodeProject/ReadMe.rtf create mode 100644 SpotlightPlugins/XcodeProject/TestData/test.xcodeproj/project.pbxproj create mode 100644 SpotlightPlugins/XcodeProject/XcodeProject.xcodeproj/project.pbxproj diff --git a/Foundation/GTMGetURLHandler.m b/Foundation/GTMGetURLHandler.m new file mode 100644 index 0000000..30d516f --- /dev/null +++ b/Foundation/GTMGetURLHandler.m @@ -0,0 +1,270 @@ +// +// GTMGetURLHandler.m +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +// Add this class to your app to have get URL handled almost automatically for +// you. For each entry in your CFBundleURLTypes dictionaries, add a new +// key/object pair of GTMBundleURLClass/the name of the class you want +// to have handle the scheme(s). +// Then have that class respond to the class method: +// + (BOOL)gtm_openURL:(NSURL*)url +// and voila, it will just work. +// Note that in Debug mode we will do extensive testing to make sure that this +// is all hooked up correctly, and will spew out to the console if we +// find anything amiss. +// +// Example plist entry +// ... +// +// CFBundleURLTypes +// +// +// CFBundleURLName +// Google Suggestion URL +// GTMBundleURLClass +// GoogleSuggestURLHandler +// CFBundleURLSchemes +// +// googlesuggest +// googlesuggestextreme +// +// +// +// +// +// Example implementation +// @interface GoogleSuggestURLHandler +// @end +// @implementation GoogleSuggestURLHandler +// + (BOOL)gtm_openURL:(NSURL*)url { +// NSLog(@"%@", url); +// } +// @end + +#import +#import "GTMGarbageCollection.h" +#import "GTMNSAppleEventDescriptor+Foundation.h" +#import "GTMMethodCheck.h" + +static NSString *const kGTMBundleURLClassKey = @"GTMBundleURLClass"; +// A variety of constants Apple really should have defined somewhere to +// allow the compiler to find your typos. +static NSString *const kGTMCFBundleURLSchemesKey = @"CFBundleURLSchemes"; +static NSString *const kGTMCFBundleURLNameKey = @"CFBundleURLName"; +static NSString *const kGTMCFBundleTypeRoleKey = @"CFBundleTypeRole"; +static NSString *const kGTMCFBundleURLTypesKey = @"CFBundleURLTypes"; +static NSString *const kGTMCFBundleViewerRole = @"Viewer"; +static NSString *const kGTMCFBundleEditorRole = @"Editor"; + +// Set this macro elsewhere is you want to force the +// bundle checks on/off. They are nice for debugging +// problems, but shouldn't be required in a release version +// unless you are paranoid about your users messing with your +// Info.plist +#ifndef GTM_CHECK_BUNDLE_URL_CLASSES +#define GTM_CHECK_BUNDLE_URL_CLASSES DEBUG +#endif // GTM_CHECK_BUNDLE_URL_CLASSES + +@protocol GTMGetURLHandlerProtocol ++ (BOOL)gtm_openURL:(NSURL*)url; +@end + +@interface GTMGetURLHandler : NSObject { + NSArray *urlTypes_; +} +- (id)initWithTypes:(NSArray*)urlTypes; +- (void)getUrl:(NSAppleEventDescriptor *)event +withReplyEvent:(NSAppleEventDescriptor *)replyEvent; +- (void)addError:(OSStatus)error + withDescription:(NSString*)string + toDescriptor:(NSAppleEventDescriptor *)desc; ++ (id)handlerForBundle:(NSBundle *)bundle; +@end + +@implementation GTMGetURLHandler +GTM_METHOD_CHECK(NSNumber, gtm_appleEventDescriptor); +GTM_METHOD_CHECK(NSString, gtm_appleEventDescriptor); + ++ (void)load { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSBundle *bundle = [NSBundle mainBundle]; + GTMGetURLHandler *handler = [GTMGetURLHandler handlerForBundle:bundle]; + if (handler) { + [handler retain]; + GTMNSMakeUncollectable(handler); + NSAppleEventManager *man = [NSAppleEventManager sharedAppleEventManager]; + [man setEventHandler:handler + andSelector:@selector(getUrl:withReplyEvent:) + forEventClass:kInternetEventClass + andEventID:kAEGetURL]; + } + [pool release]; +} + ++ (id)handlerForBundle:(NSBundle *)bundle { + GTMGetURLHandler *handler = nil; + NSArray *urlTypes = [bundle objectForInfoDictionaryKey:kGTMCFBundleURLTypesKey]; + if (urlTypes) { + handler = [[[GTMGetURLHandler alloc] initWithTypes:urlTypes] autorelease]; + } else { + _GTMDevLog(@"If you don't have CFBundleURLTypes in your plist, you may want" + @" to remove GTMGetURLHandler.m from your project"); + } + return handler; +} + +- (id)initWithTypes:(NSArray*)urlTypes { + if ((self = [super init])) { + urlTypes_ = [urlTypes retain]; +#if GTM_CHECK_BUNDLE_URL_CLASSES + // Some debug handling to check to make sure we can handle the + // classes properly. + NSEnumerator *enumerator = [urlTypes_ objectEnumerator]; + NSDictionary *urlType; + while ((urlType = [enumerator nextObject])) { + NSString *className = [urlType objectForKey:kGTMBundleURLClassKey]; + if ([className length]) { + Class cls = NSClassFromString(className); + if (cls) { + if (![cls respondsToSelector:@selector(gtm_openURL:)]) { + _GTMDevLog(@"Class %@ for URL handler %@ " + "(URL schemes: %@) doesn't respond to openURL:", + className, + [urlType objectForKey:kGTMCFBundleURLNameKey], + [urlType objectForKey:kGTMCFBundleURLSchemesKey]); + } + } else { + _GTMDevLog(@"Unable to get class %@ for URL handler %@ " + "(URL schemes: %@)", + className, + [urlType objectForKey:kGTMCFBundleURLNameKey], + [urlType objectForKey:kGTMCFBundleURLSchemesKey]); + } + } else { + NSString *role = [urlType objectForKey:kGTMCFBundleTypeRoleKey]; + if ([role caseInsensitiveCompare:kGTMCFBundleViewerRole] == NSOrderedSame || + [role caseInsensitiveCompare:kGTMCFBundleEditorRole] == NSOrderedSame) { + _GTMDevLog(@"Missing %@ for URL handler %@ " + "(URL schemes: %@)", + kGTMBundleURLClassKey, + [urlType objectForKey:kGTMCFBundleURLNameKey], + [urlType objectForKey:kGTMCFBundleURLSchemesKey]); + } + } + } +#endif // GTM_CHECK_BUNDLE_URL_CLASSES + } + return self; +} + +- (void)dealloc { + [urlTypes_ release]; + [super dealloc]; +} + +- (NSURL*)extractURLFromEvent:(NSAppleEventDescriptor*)event + withReplyEvent:(NSAppleEventDescriptor *)replyEvent { + NSAppleEventDescriptor *desc + = [event paramDescriptorForKeyword:keyDirectObject]; + NSString *urlstring = [desc stringValue]; + NSURL *url = [NSURL URLWithString:urlstring]; + if (!url) { + [self addError:errAECoercionFail + withDescription:@"Unable to extract url from key direct object." + toDescriptor:replyEvent]; + } + return url; +} + +- (Class)getClassForScheme:(NSString *)scheme + withReplyEvent:(NSAppleEventDescriptor*)replyEvent { + NSEnumerator *typeEnumerator = [urlTypes_ objectEnumerator]; + NSDictionary *urlType; + Class cls = nil; + NSString *typeScheme = nil; + while (!typeScheme && (urlType = [typeEnumerator nextObject])) { + NSArray *schemes = [urlType objectForKey:kGTMCFBundleURLSchemesKey]; + NSEnumerator *schemeEnumerator = [schemes objectEnumerator]; + while ((typeScheme = [schemeEnumerator nextObject])) { + if ([typeScheme caseInsensitiveCompare:scheme] == NSOrderedSame) { + break; + } + } + } + if (typeScheme) { + NSString *class = [urlType objectForKey:kGTMBundleURLClassKey]; + if (class) { + cls = NSClassFromString(class); + } + if (!cls) { + NSString *errorString + = [NSString stringWithFormat:@"Unable to instantiate class for " + "%@:%@ for scheme:%@.", + kGTMBundleURLClassKey, class, typeScheme]; + [self addError:errAECorruptData + withDescription:errorString + toDescriptor:replyEvent]; + } + } else { + NSString *errorString + = [NSString stringWithFormat:@"Unable to find handler for scheme %@.", + scheme]; + [self addError:errAECorruptData + withDescription:errorString + toDescriptor:replyEvent]; + } + return cls; +} + +- (void)getUrl:(NSAppleEventDescriptor *)event +withReplyEvent:(NSAppleEventDescriptor *)replyEvent { + NSURL *url = [self extractURLFromEvent:event withReplyEvent:replyEvent]; + if (!url) { + return; + } + NSString *scheme = [url scheme]; + Class cls = [self getClassForScheme:scheme withReplyEvent:replyEvent]; + if (!cls) { + return; + } + BOOL wasGood = [cls gtm_openURL:url]; + if (!wasGood) { + NSString *errorString + = [NSString stringWithFormat:@"[%@ gtm_openURL:] failed to handle %@", + NSStringFromClass(cls), url]; + [self addError:errAEEventNotHandled + withDescription:errorString + toDescriptor:replyEvent]; + } +} + +- (void)addError:(OSStatus)error + withDescription:(NSString*)string + toDescriptor:(NSAppleEventDescriptor *)desc { + NSAppleEventDescriptor *errorDesc = nil; + if (error != noErr) { + NSNumber *errNum = [NSNumber numberWithLong:error]; + errorDesc = [errNum gtm_appleEventDescriptor]; + [desc setParamDescriptor:errorDesc forKeyword:keyErrorNumber]; + } + if (string) { + errorDesc = [string gtm_appleEventDescriptor]; + [desc setParamDescriptor:errorDesc forKeyword:keyErrorString]; + } +} +@end + diff --git a/Foundation/GTMStackTrace.m b/Foundation/GTMStackTrace.m index 5dc1c0b..a7198dc 100644 --- a/Foundation/GTMStackTrace.m +++ b/Foundation/GTMStackTrace.m @@ -45,7 +45,7 @@ struct GTMClassDescription { static struct GTMClassDescription *GTMClassDescriptions(int *total_count) { int class_count = objc_getClassList(nil, 0); struct GTMClassDescription *class_descs - = calloc(class_count, sizeof(struct GTMClassDescription)); + = calloc(class_count, sizeof(struct GTMClassDescription)); if (class_descs) { Class *classes = calloc(class_count, sizeof(Class)); if (classes) { @@ -61,8 +61,10 @@ static struct GTMClassDescription *GTMClassDescriptions(int *total_count) { } free(classes); } else { + // COV_NF_START - Don't know how to force this in a unittest free(class_descs); class_count = 0; + // COV_NF_END } } if (total_count) { diff --git a/GTM.xcodeproj/project.pbxproj b/GTM.xcodeproj/project.pbxproj index 94623d9..c51faa8 100644 --- a/GTM.xcodeproj/project.pbxproj +++ b/GTM.xcodeproj/project.pbxproj @@ -79,6 +79,7 @@ 8B4D7A150E40D79200EFEDD8 /* GTMObjC2Runtime.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6F32040DA34A1B0052CA40 /* GTMObjC2Runtime.m */; }; 8B55479C0DB3B7A50014CC1C /* GTMAppKit+UnitTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B55479B0DB3B7A50014CC1C /* GTMAppKit+UnitTesting.m */; }; 8B5547B90DB3BB220014CC1C /* GTMAppKit+UnitTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B55479B0DB3B7A50014CC1C /* GTMAppKit+UnitTesting.m */; }; + 8B58E9950E547EB000A0E02E /* GTMGetURLHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B58E9940E547EB000A0E02E /* GTMGetURLHandler.m */; }; 8B61FDC00E4CDB8000FF9C21 /* GTMStackTrace.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B61FDBF0E4CDB8000FF9C21 /* GTMStackTrace.m */; }; 8B6F32080DA34A1B0052CA40 /* GTMObjC2RuntimeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6F32050DA34A1B0052CA40 /* GTMObjC2RuntimeTest.m */; }; 8B6F32160DA34C830052CA40 /* GTMMethodCheckTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B6F31F10DA347720052CA40 /* GTMMethodCheckTest.m */; }; @@ -329,6 +330,7 @@ 8B45A6B90DA67DD5001148C5 /* GTMUnitTestingImage.gtmUTState */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = GTMUnitTestingImage.gtmUTState; sourceTree = ""; }; 8B55479A0DB3B7A50014CC1C /* GTMAppKit+UnitTesting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTMAppKit+UnitTesting.h"; sourceTree = ""; }; 8B55479B0DB3B7A50014CC1C /* GTMAppKit+UnitTesting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTMAppKit+UnitTesting.m"; sourceTree = ""; }; + 8B58E9940E547EB000A0E02E /* GTMGetURLHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMGetURLHandler.m; sourceTree = ""; }; 8B61FDBF0E4CDB8000FF9C21 /* GTMStackTrace.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMStackTrace.m; sourceTree = ""; }; 8B6F31EF0DA347720052CA40 /* GTMMethodCheck.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMMethodCheck.m; sourceTree = ""; }; 8B6F31F10DA347720052CA40 /* GTMMethodCheckTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMMethodCheckTest.m; sourceTree = ""; }; @@ -700,6 +702,7 @@ F48FE27E0D198D0E009257D2 /* GTMGeometryUtils.h */, F48FE27F0D198D0E009257D2 /* GTMGeometryUtils.m */, F48FE2800D198D0E009257D2 /* GTMGeometryUtilsTest.m */, + 8B58E9940E547EB000A0E02E /* GTMGetURLHandler.m */, F47F1D2D0D4914AD00925B8F /* GTMCalculatedRange.h */, F47F1D2E0D4914AD00925B8F /* GTMCalculatedRange.m */, F47F1D2F0D4914AD00925B8F /* GTMCalculatedRangeTest.m */, @@ -1271,6 +1274,7 @@ F98681970E2C20C800CEE8BF /* GTMLogger+ASL.m in Sources */, F95803F90E2FB0850049A088 /* GTMLoggerRingBufferWriter.m in Sources */, 8B61FDC00E4CDB8000FF9C21 /* GTMStackTrace.m in Sources */, + 8B58E9950E547EB000A0E02E /* GTMGetURLHandler.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index c3bab2b..047935d 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -76,7 +76,14 @@ Changes since 1.5.1 - Significant updates to GTMNSAppleScript+Handler allowing you to list all handlers and properties (including inherited) and cleans up several errors in how scripting was being handled. - + +- Added GTMGetURLHandler class that gives you a very easy way of supporting + Get URL events just by adding a key to your plists, and adding a single + method to your class. See GTMGetURLHandler.m for more details. + +- Added XcodeProject, AppleScript, and InterfaceBuilder Spotlight Plugins. + Allows you to index .xcodeproj, .scpt, .scptd, .xib, .nib, and + .aib files. See Readmes beside individual projects in SpotlightPlugins. Release 1.5.1 Changes since 1.5.0 diff --git a/SpotlightPlugins/AppleScript/AppleScript.xcodeproj/project.pbxproj b/SpotlightPlugins/AppleScript/AppleScript.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ea381b3 --- /dev/null +++ b/SpotlightPlugins/AppleScript/AppleScript.xcodeproj/project.pbxproj @@ -0,0 +1,335 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXAggregateTarget section */ + 8BF1560D0E5B8C7A00D28B05 /* RunAllUnitTests */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 8BF156170E5B8C8F00D28B05 /* Build configuration list for PBXAggregateTarget "RunAllUnitTests" */; + buildPhases = ( + 8BF1560C0E5B8C7A00D28B05 /* ShellScript */, + ); + dependencies = ( + 8BF156110E5B8C8000D28B05 /* PBXTargetDependency */, + ); + name = RunAllUnitTests; + productName = TestPlugin; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 2C05A19C06CAA52B00D84F6F /* GetMetadataForFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */; }; + 8B1D48A10E59F699000EB8CA /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D48A00E59F699000EB8CA /* main.c */; }; + 8B58F8EF0E5726DE00A0E02E /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C86B05260671AA6E00DD9006 /* CoreServices.framework */; }; + 8BF152920E5A334200D28B05 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BF152910E5A334200D28B05 /* AppKit.framework */; }; + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8BF156100E5B8C8000D28B05 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8D57630D048677EA00EA77CD; + remoteInfo = AppleScriptSpotlightPlugin; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GetMetadataForFile.m; sourceTree = ""; }; + 8B1D48A00E59F699000EB8CA /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + 8B1D48A30E59F6D0000EB8CA /* PluginID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginID.h; sourceTree = ""; }; + 8B58F75A0E56502600A0E02E /* ReadMe.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = ReadMe.rtf; sourceTree = ""; }; + 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = LoadableBundle.xcconfig; sourceTree = ""; }; + 8B58F9280E579A1300A0E02E /* DebugTigerOrLater.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugTigerOrLater.xcconfig; sourceTree = ""; }; + 8B58F92B0E579A1300A0E02E /* ReleaseTigerOrLater.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ReleaseTigerOrLater.xcconfig; sourceTree = ""; }; + 8BF152910E5A334200D28B05 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 8D576316048677EA00EA77CD /* AppleScript.mdimporter */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppleScript.mdimporter; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + C86B05260671AA6E00DD9006 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D576313048677EA00EA77CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B58F8EF0E5726DE00A0E02E /* CoreServices.framework in Frameworks */, + 8BF152920E5A334200D28B05 /* AppKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* XcodeProjectSpotlightPlugin */ = { + isa = PBXGroup; + children = ( + 8B58F75A0E56502600A0E02E /* ReadMe.rtf */, + 8B58F84D0E5697B500A0E02E /* XcodeConfig */, + 8B1D489F0E59F699000EB8CA /* Common */, + 08FB77AFFE84173DC02AAC07 /* Source */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + comments = "// Copyright 2008 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License. You may obtain a copy\n// of the License at\n// \n// http://www.apache.org/licenses/LICENSE-2.0\n// \n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n// License for the specific language governing permissions and limitations under\n// the License."; + name = XcodeProjectSpotlightPlugin; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 8BF152910E5A334200D28B05 /* AppKit.framework */, + C86B05260671AA6E00DD9006 /* CoreServices.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D576317048677EA00EA77CD /* Info.plist */, + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77AFFE84173DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 8B1D48A30E59F6D0000EB8CA /* PluginID.h */, + 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D576316048677EA00EA77CD /* AppleScript.mdimporter */, + ); + name = Products; + sourceTree = ""; + }; + 8B1D489F0E59F699000EB8CA /* Common */ = { + isa = PBXGroup; + children = ( + 8B1D48A00E59F699000EB8CA /* main.c */, + ); + name = Common; + path = ../Common; + sourceTree = SOURCE_ROOT; + }; + 8B58F84D0E5697B500A0E02E /* XcodeConfig */ = { + isa = PBXGroup; + children = ( + 8B58F90F0E579A1300A0E02E /* Target */, + 8B58F9250E579A1300A0E02E /* Project */, + ); + name = XcodeConfig; + path = ../../XcodeConfig; + sourceTree = SOURCE_ROOT; + }; + 8B58F90F0E579A1300A0E02E /* Target */ = { + isa = PBXGroup; + children = ( + 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */, + ); + path = Target; + sourceTree = ""; + }; + 8B58F9250E579A1300A0E02E /* Project */ = { + isa = PBXGroup; + children = ( + 8B58F9280E579A1300A0E02E /* DebugTigerOrLater.xcconfig */, + 8B58F92B0E579A1300A0E02E /* ReleaseTigerOrLater.xcconfig */, + ); + path = Project; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D57630D048677EA00EA77CD /* AppleScriptSpotlightPlugin */ = { + isa = PBXNativeTarget; + buildConfigurationList = 70138C840896BE9A00968C2F /* Build configuration list for PBXNativeTarget "AppleScriptSpotlightPlugin" */; + buildPhases = ( + 8D57630F048677EA00EA77CD /* Resources */, + 8D576311048677EA00EA77CD /* Sources */, + 8D576313048677EA00EA77CD /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AppleScriptSpotlightPlugin; + productInstallPath = /Library/Spotlight; + productName = XcodeProjectSpotlightPlugin; + productReference = 8D576316048677EA00EA77CD /* AppleScript.mdimporter */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 70138C880896BE9A00968C2F /* Build configuration list for PBXProject "AppleScript" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 089C166AFE841209C02AAC07 /* XcodeProjectSpotlightPlugin */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8BF1560D0E5B8C7A00D28B05 /* RunAllUnitTests */, + 8D57630D048677EA00EA77CD /* AppleScriptSpotlightPlugin */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D57630F048677EA00EA77CD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 8BF1560C0E5B8C7A00D28B05 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /usr/bin/python; + shellScript = "# Test of scpt and scptd importer\nimport os\nimport subprocess\n\ncmd = \"/usr/bin/mdimport -d 2 -g \" + os.environ[\"BUILT_PRODUCTS_DIR\"] + \"/AppleScript.mdimporter \" + os.environ[\"SOURCE_ROOT\"] + \"/TestData/test.scpt\"\nimporter_out = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE).stderr.read()\nif importer_out.find(\"kMDItemDescription = \\\"This is a description.\\\";\") == -1:\n\tprint \"error: Bad Description for test.scpt\"\n\texit(1)\nif importer_out.find(\"kMDItemTextContent = \\\"1 + 1\\\";\") == -1:\n\tprint \"error: Bad Content for test.scpt\"\n\texit(1)\n\n# quick test of scptd importer\n# Commented out due to radars:\n# 6160685 Need UTI for AppleScript script bundle \n# 6160646 UTIs declared in Spotlight Importers in Library/Spotlight not recognized\n# Basically we don't have a UTI for AppleScript script bundles (.scptd) defined by the system\n# even worse, UTIs defined by Spotlight Importers in the right location\n# don't get their UTIs that they declare recognized by LaunchServices.\n#aCmd = \"/usr/bin/mdimport -d 2 -g \" + os.environ[\"BUILT_PRODUCTS_DIR\"] + \"/AppleScript.mdimporter \" + os.environ[\"SOURCE_ROOT\"] + \"/TestData/test.scptd\"\n#importerOut = subprocess.Popen(aCmd, shell=True, stderr=subprocess.PIPE).stderr.read()\n#if importerOut.find(\"kMDItemDescription = \\\"This is a description.\\\";\") == -1:\n#\tprint \"error: Bad Description for test.scpt\"\n#\texit(1)\n#if importerOut.find(\"kMDItemTextContent = \\\"1 + 1\\\";\") == -1:\n#\tprint \"error: Bad Content for test.scpt\"\n#\texit(1)\n#\nexit(0)"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D576311048677EA00EA77CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C05A19C06CAA52B00D84F6F /* GetMetadataForFile.m in Sources */, + 8B1D48A10E59F699000EB8CA /* main.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 8BF156110E5B8C8000D28B05 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8D57630D048677EA00EA77CD /* AppleScriptSpotlightPlugin */; + targetProxy = 8BF156100E5B8C8000D28B05 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 70138C850896BE9A00968C2F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = AppleScript; + WRAPPER_EXTENSION = mdimporter; + }; + name = Debug; + }; + 70138C860896BE9A00968C2F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = AppleScript; + WRAPPER_EXTENSION = mdimporter; + }; + name = Release; + }; + 70138C890896BE9A00968C2F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F9280E579A1300A0E02E /* DebugTigerOrLater.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + 70138C8A0896BE9A00968C2F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F92B0E579A1300A0E02E /* ReleaseTigerOrLater.xcconfig */; + buildSettings = { + }; + name = Release; + }; + 8BF1560E0E5B8C7A00D28B05 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = RunAllUnitTests; + }; + name = Debug; + }; + 8BF1560F0E5B8C7A00D28B05 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = RunAllUnitTests; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 70138C840896BE9A00968C2F /* Build configuration list for PBXNativeTarget "AppleScriptSpotlightPlugin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70138C850896BE9A00968C2F /* Debug */, + 70138C860896BE9A00968C2F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 70138C880896BE9A00968C2F /* Build configuration list for PBXProject "AppleScript" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70138C890896BE9A00968C2F /* Debug */, + 70138C8A0896BE9A00968C2F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8BF156170E5B8C8F00D28B05 /* Build configuration list for PBXAggregateTarget "RunAllUnitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8BF1560E0E5B8C7A00D28B05 /* Debug */, + 8BF1560F0E5B8C7A00D28B05 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/SpotlightPlugins/AppleScript/English.lproj/InfoPlist.strings b/SpotlightPlugins/AppleScript/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..41ade49 Binary files /dev/null and b/SpotlightPlugins/AppleScript/English.lproj/InfoPlist.strings differ diff --git a/SpotlightPlugins/AppleScript/GetMetadataForFile.m b/SpotlightPlugins/AppleScript/GetMetadataForFile.m new file mode 100644 index 0000000..d635f40 --- /dev/null +++ b/SpotlightPlugins/AppleScript/GetMetadataForFile.m @@ -0,0 +1,121 @@ +// +// GetMetadataForFile.m +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +#import +#import + +static BOOL ImportScriptBundle(NSMutableDictionary *attributes, + NSString *path) { + NSBundle *scriptBundle = [NSBundle bundleWithPath:path]; + NSString *descriptionPath = [scriptBundle pathForResource:@"description" + ofType:@"rtfd"]; + NSAttributedString *attrString = nil; + if (descriptionPath) { + attrString = [[[NSAttributedString alloc] initWithPath:descriptionPath + documentAttributes:NULL] autorelease]; + } + BOOL wasGood = NO; + if (attrString) { + NSString *description = [attrString string]; + [attributes setObject:description forKey:(NSString*)kMDItemDescription]; + wasGood = YES; + } + + NSArray *scripts = [scriptBundle pathsForResourcesOfType:@"scpt" + inDirectory:@"Scripts"]; + NSEnumerator *scriptEnum = [scripts objectEnumerator]; + NSString *scriptPath; + NSMutableArray *scriptSources = [NSMutableArray array]; + while ((scriptPath = [scriptEnum nextObject])) { + NSURL *scriptURL = [NSURL fileURLWithPath:scriptPath]; + NSDictionary *error; + NSAppleScript *script + = [[[NSAppleScript alloc] initWithContentsOfURL:scriptURL + error:&error] + autorelease]; + NSString *scriptSource = [script source]; + if (scriptSource) { + [scriptSources addObject:scriptSource]; + } + } + if ([scriptSources count]) { + NSString *source = [scriptSources componentsJoinedByString:@"\n"]; + [attributes setObject:source forKey:(NSString*)kMDItemTextContent]; + wasGood = YES; + } + return wasGood; +} + +static BOOL ImportScript(NSMutableDictionary *attributes, + NSString *path) { + NSURL *fileURL = [NSURL fileURLWithPath:path]; + FSRef ref; + BOOL wasGood = NO; + if (CFURLGetFSRef((CFURLRef)fileURL, &ref)) { + ResFileRefNum resFile = FSOpenResFile(&ref, fsRdPerm); + if (resFile) { + const ResID kScriptDescriptionResID = 1128; + ResFileRefNum curResFile = CurResFile(); + UseResFile(resFile); + Handle res = Get1Resource('TEXT', kScriptDescriptionResID); + if (res) { + NSString *descString + = [[[NSString alloc]initWithBytes:(char*)(*res) + length:GetHandleSize(res) + encoding:NSMacOSRomanStringEncoding] autorelease]; + ReleaseResource(res); + if (descString) { + [attributes setObject:descString forKey:(NSString*)kMDItemDescription]; + wasGood = YES; + } + } + UseResFile(curResFile); + CloseResFile(resFile); + } + + NSDictionary *error; + NSAppleScript *script = [[[NSAppleScript alloc] initWithContentsOfURL:fileURL + error:&error] + autorelease]; + NSString *scriptSource = [script source]; + if (scriptSource) { + [attributes setObject:scriptSource forKey:(NSString*)kMDItemTextContent]; + wasGood = YES; + } + } + return wasGood; +} + +// Currently grabs the script description and puts it into kMDItemDescription. +// Grabs the script code and puts it into kMDItemTextContent. +Boolean GetMetadataForFile(void* interface, + CFMutableDictionaryRef cfAttributes, + CFStringRef cfContentTypeUTI, + CFStringRef cfPathToFile) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSMutableDictionary *attributes = (NSMutableDictionary*)cfAttributes; + NSString *pathToFile = (NSString*)cfPathToFile; + BOOL wasGood = NO; + if (UTTypeConformsTo(cfContentTypeUTI, CFSTR("com.apple.applescript.scriptbundle"))) { + wasGood = ImportScriptBundle(attributes, pathToFile); + } else if (UTTypeConformsTo(cfContentTypeUTI, CFSTR("com.apple.applescript.script"))) { + wasGood = ImportScript(attributes, pathToFile); + } + [pool release]; + return wasGood ? TRUE : FALSE; +} diff --git a/SpotlightPlugins/AppleScript/Info.plist b/SpotlightPlugins/AppleScript/Info.plist new file mode 100644 index 0000000..be3c622 --- /dev/null +++ b/SpotlightPlugins/AppleScript/Info.plist @@ -0,0 +1,74 @@ + + + + + UTImportedTypeDeclarations + + + UTTypeIdentifier + com.apple.applescript.scriptbundle + UTTypeReferenceURL + http://www.apple.com/applescript/ + UTTypeDescription + Script Bundle + UTTypeConformsTo + + com.apple.package + public.composite-content + public.data + + UTTypeTagSpecification + + public.filename-extension + + scptd + + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeRole + MDImporter + LSItemContentTypes + + com.apple.applescript.script + com.apple.applescript.scriptbundle + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleName + ${PRODUCT_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.google.spotlightimporter.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleVersion + 1.0 + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + CFPlugInFactories + + B498BAB3-7887-4E93-862A-19E74809248D0 + MetadataImporterPluginFactory + + CFPlugInTypes + + 8B08C4BF-415B-11D8-B3F9-0003936726FC + + B498BAB3-7887-4E93-862A-19E74809248D0 + + + CFPlugInUnloadFunction + + + diff --git a/SpotlightPlugins/AppleScript/PluginID.h b/SpotlightPlugins/AppleScript/PluginID.h new file mode 100644 index 0000000..955a476 --- /dev/null +++ b/SpotlightPlugins/AppleScript/PluginID.h @@ -0,0 +1,19 @@ +// +// PluginID.h +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +#define PLUGIN_ID "B498BAB3-7887-4E93-862A-19E74809248D0" diff --git a/SpotlightPlugins/AppleScript/ReadMe.rtf b/SpotlightPlugins/AppleScript/ReadMe.rtf new file mode 100644 index 0000000..ae98045 --- /dev/null +++ b/SpotlightPlugins/AppleScript/ReadMe.rtf @@ -0,0 +1,31 @@ +{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww9860\viewh7900\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural + +\f0\fs24 \cf0 AppleScript Spotlight Plugin\ +\ +Copyright 2008 Google Inc.\ +\ +Licensed under the Apache License, Version 2.0 (the "License"); you may not\ +use this file except in compliance with the License. You may obtain a copy\ +of the License at\ +\ +http://www.apache.org/licenses/LICENSE-2.0\ + \ +Unless required by applicable law or agreed to in writing, software\ +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\ +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\ +License for the specific language governing permissions and limitations under\ +the License.\ +\ +-----------------------\ +\ +This is a spotlight importer for AppleScripts.\ +It imports the description and the code of an AppleScript to make them easily searchable.\ +\ +To install the spotlight plugin, please copy it into /Library/Spotlight or ~/Library/Spotlight.\ +\ +It is part of the Google Toolbox For Mac project\ +http://code.google.com/p/google-toolbox-for-mac/} \ No newline at end of file diff --git a/SpotlightPlugins/AppleScript/TestData/test.scpt b/SpotlightPlugins/AppleScript/TestData/test.scpt new file mode 100644 index 0000000..8dd96c2 Binary files /dev/null and b/SpotlightPlugins/AppleScript/TestData/test.scpt differ diff --git a/SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Info.plist b/SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Info.plist new file mode 100644 index 0000000..68d2098 --- /dev/null +++ b/SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Info.plist @@ -0,0 +1,17 @@ + + + + + WindowState + + name + ScriptWindowState + positionOfDivider + 274 + savedFrame + 39 1099 439 476 0 0 2560 1578 + selectedTabView + result + + + diff --git a/SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Resources/Scripts/main.scpt b/SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Resources/Scripts/main.scpt new file mode 100644 index 0000000..8dd96c2 Binary files /dev/null and b/SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Resources/Scripts/main.scpt differ diff --git a/SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Resources/description.rtfd/TXT.rtf b/SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Resources/description.rtfd/TXT.rtf new file mode 100644 index 0000000..bd022ac --- /dev/null +++ b/SpotlightPlugins/AppleScript/TestData/test.scptd/Contents/Resources/description.rtfd/TXT.rtf @@ -0,0 +1,6 @@ +{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\tx7280\tx7840\tx8400\tx8960\tx9520\tx10080\tx10640\tx11200\tx11760\tx12320\tx12880\tx13440\tx14000\tx14560\tx15120\tx15680\tx16240\tx16800\tx17360\tx17920\tx18480\tx19040\tx19600\tx20160\tx20720\tx21280\tx21840\tx22400\tx22960\tx23520\tx24080\tx24640\tx25200\tx25760\tx26320\tx26880\tx27440\tx28000\tx28560\tx29120\tx29680\tx30240\tx30800\tx31360\tx31920\tx32480\tx33040\tx33600\tx34160\tx34720\tx35280\tx35840\tx36400\tx36960\tx37520\tx38080\tx38640\tx39200\tx39760\tx40320\tx40880\tx41440\tx42000\tx42560\tx43120\tx43680\tx44240\tx44800\tx45360\tx45920\tx46480\tx47040\tx47600\tx48160\tx48720\tx49280\tx49840\tx50400\tx50960\tx51520\tx52080\tx52640\tx53200\tx53760\tx54320\tx54880\tx55440\tx56000\ql\qnatural\pardirnatural + +\f0\fs24 \cf0 \CocoaLigature0 This is a description.} \ No newline at end of file diff --git a/SpotlightPlugins/Common/main.c b/SpotlightPlugins/Common/main.c new file mode 100644 index 0000000..16eecac --- /dev/null +++ b/SpotlightPlugins/Common/main.c @@ -0,0 +1,204 @@ +// +// main.c +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +#include +#include +#include +#include "PluginID.h" + +// ----------------------------------------------------------------------------- +// constants +// ----------------------------------------------------------------------------- + + + +// +// Below is the generic glue code for all plug-ins. +// +// You should not have to modify this code aside from changing +// names if you decide to change the names defined in the Info.plist +// + +// ----------------------------------------------------------------------------- +// typedefs +// ----------------------------------------------------------------------------- + +// The import function to be implemented in GetMetadataForFile.c +Boolean GetMetadataForFile(void *thisInterface, + CFMutableDictionaryRef attributes, + CFStringRef contentTypeUTI, + CFStringRef pathToFile); + +// The layout for an instance of MetaDataImporterPlugIn +typedef struct __MetadataImporterPluginType { + MDImporterInterfaceStruct *conduitInterface; + CFUUIDRef factoryID; + UInt32 refCount; +} MetadataImporterPluginType; + +// ----------------------------------------------------------------------------- +// prototypes +// ----------------------------------------------------------------------------- +// Forward declaration for the IUnknown implementation. +// + +MetadataImporterPluginType* AllocMetadataImporterPluginType(CFUUIDRef inFactoryID); +void DeallocMetadataImporterPluginType(MetadataImporterPluginType *instance); +void* MetadataImporterPluginFactory(CFAllocatorRef allocator, CFUUIDRef typeID); +static ULONG MetadataImporterPluginAddRef(void *instance); +static ULONG MetadataImporterPluginRelease(void *instance); +static HRESULT MetadataImporterQueryInterface(void *instance, REFIID iid, LPVOID *ppv); +// ----------------------------------------------------------------------------- +// testInterfaceFtbl definition +// ----------------------------------------------------------------------------- +// The TestInterface function table. +// + +static MDImporterInterfaceStruct testInterfaceFtbl = { + NULL, + MetadataImporterQueryInterface, + MetadataImporterPluginAddRef, + MetadataImporterPluginRelease, + GetMetadataForFile +}; + + +// ----------------------------------------------------------------------------- +// AllocMetadataImporterPluginType +// ----------------------------------------------------------------------------- +// Utility function that allocates a new instance. +// You can do some initial setup for the importer here if you wish +// like allocating globals etc... +// +MetadataImporterPluginType *AllocMetadataImporterPluginType(CFUUIDRef inFactoryID) { + MetadataImporterPluginType *theNewInstance + = (MetadataImporterPluginType *)malloc(sizeof(MetadataImporterPluginType)); + memset(theNewInstance, 0, sizeof(MetadataImporterPluginType)); + + // Point to the function table + theNewInstance->conduitInterface = &testInterfaceFtbl; + + // Retain and keep an open instance refcount for each factory. + theNewInstance->factoryID = CFRetain(inFactoryID); + CFPlugInAddInstanceForFactory(inFactoryID); + + // This function returns the IUnknown interface so set the refCount to one. + theNewInstance->refCount = 1; + return theNewInstance; +} + +// ----------------------------------------------------------------------------- +// DeallocXcodeProjectSpotlightPluginMDImporterPluginType +// ----------------------------------------------------------------------------- +// Utility function that deallocates the instance when +// the refCount goes to zero. +// In the current implementation importer interfaces are never deallocated +// but implement this as this might change in the future +// +void DeallocMetadataImporterPluginType(MetadataImporterPluginType *instance) { + CFUUIDRef theFactoryID = instance->factoryID; + free(instance); + if (theFactoryID) { + CFPlugInRemoveInstanceForFactory(theFactoryID); + CFRelease(theFactoryID); + } +} + +// ----------------------------------------------------------------------------- +// MetadataImporterQueryInterface +// ----------------------------------------------------------------------------- +// Implementation of the IUnknown QueryInterface function. +// +HRESULT MetadataImporterQueryInterface(void *instance, REFIID iid, LPVOID *ppv) { + CFUUIDRef interfaceID = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault, iid); + MetadataImporterPluginType *plugin = ((MetadataImporterPluginType*)instance); + HRESULT result = E_INVALIDARG; + if (interfaceID) { + if (CFEqual(interfaceID, kMDImporterInterfaceID)) { + // If the Right interface was requested, bump the ref count, + // set the ppv parameter equal to the instance, and + // return good status. + plugin->conduitInterface->AddRef(instance); + *ppv = instance; + result = S_OK; + } else { + if (CFEqual(interfaceID, IUnknownUUID)) { + // If the IUnknown interface was requested, same as above. + plugin->conduitInterface->AddRef(instance); + *ppv = instance; + result = S_OK; + } else { + // Requested interface unknown, bail with error. + *ppv = NULL; + result = E_NOINTERFACE; + } + } + CFRelease(interfaceID); + } + return result; +} + +// ----------------------------------------------------------------------------- +// MetadataImporterPluginAddRef +// ----------------------------------------------------------------------------- +// Implementation of reference counting for this type. Whenever an interface +// is requested, bump the refCount for the instance. NOTE: returning the +// refcount is a convention but is not required so don't rely on it. +// +ULONG MetadataImporterPluginAddRef(void *instance) { + MetadataImporterPluginType *plugin = ((MetadataImporterPluginType*)instance); + plugin->refCount += 1; + return plugin->refCount; +} + +// ----------------------------------------------------------------------------- +// SampleCMPluginRelease +// ----------------------------------------------------------------------------- +// When an interface is released, decrement the refCount. +// If the refCount goes to zero, deallocate the instance. +// +ULONG MetadataImporterPluginRelease(void *instance) { + ULONG refCount = 0; + MetadataImporterPluginType *plugin = ((MetadataImporterPluginType*)instance); + plugin->refCount -= 1; + if (plugin->refCount == 0) { + DeallocMetadataImporterPluginType(plugin); + refCount = 0; + } else { + refCount = (plugin)->refCount; + } + return refCount; +} + +// ----------------------------------------------------------------------------- +// XcodeProjectSpotlightPluginMDImporterPluginFactory +// ----------------------------------------------------------------------------- +// Implementation of the factory function for this type. +// +void *MetadataImporterPluginFactory(CFAllocatorRef allocator, CFUUIDRef typeID) { + // If correct type is being requested, allocate an + //instance of TestType and return the IUnknown interface. + MetadataImporterPluginType *result = NULL; + if (CFEqual(typeID, kMDImporterTypeID)){ + CFUUIDRef uuid = CFUUIDCreateFromString(kCFAllocatorDefault, CFSTR(PLUGIN_ID)); + result = AllocMetadataImporterPluginType(uuid); + CFRelease(uuid); + } + // If the requested type is incorrect, return NULL. + return result; +} diff --git a/SpotlightPlugins/InterfaceBuilder/English.lproj/InfoPlist.strings b/SpotlightPlugins/InterfaceBuilder/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..b150894 Binary files /dev/null and b/SpotlightPlugins/InterfaceBuilder/English.lproj/InfoPlist.strings differ diff --git a/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m b/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m new file mode 100644 index 0000000..8c09f1c --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m @@ -0,0 +1,168 @@ +// +// GetMetadataForFile.m +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +#import +#import "GTMScriptRunner.h" +#import "GTMGarbageCollection.h" + +static BOOL AddStringsToTextContent(NSSet *stringSet, + NSMutableDictionary *attributes) { + BOOL wasGood = NO; + if ([stringSet count]) { + NSString *allStrings = [[stringSet allObjects] componentsJoinedByString:@"\n"]; + NSString *oldContent = [attributes objectForKey:(NSString*)kMDItemTextContent]; + if (oldContent) { + allStrings = [NSString stringWithFormat:@"%@\n%@", allStrings, oldContent]; + } + [attributes setObject:allStrings forKey:(NSString*)kMDItemTextContent]; + wasGood = YES; + } + return wasGood; +} + +static BOOL ExtractClasses(NSDictionary *ibToolData, + NSMutableDictionary *attributes) { + NSString *classesKey = @"com.apple.ibtool.document.classes"; + NSDictionary *classes = [ibToolData objectForKey:classesKey]; + NSMutableSet *classSet = [NSMutableSet set]; + NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; + NSArray *classPrefixesToIgnore + = [ud objectForKey:@"classPrefixesToIgnore"]; + if (!classPrefixesToIgnore) { + classPrefixesToIgnore = [NSArray arrayWithObjects: + @"IB", + @"FirstResponder", + @"NS", + @"Web", + nil]; + [ud setObject:classPrefixesToIgnore forKey:@"classPrefixesToIgnore"]; + [ud synchronize]; + } + NSDictionary *entry; + NSEnumerator *entryEnum = [classes objectEnumerator]; + while ((entry = [entryEnum nextObject])) { + NSString *classStr = [entry objectForKey:@"class"]; + if (classStr) { + NSString *prefix; + NSEnumerator *classPrefixesToIgnoreEnum + = [classPrefixesToIgnore objectEnumerator]; + while (classStr && (prefix = [classPrefixesToIgnoreEnum nextObject])) { + if ([classStr hasPrefix:prefix]) { + classStr = nil; + } + } + if (classStr) { + [classSet addObject:classStr]; + } + } + } + return AddStringsToTextContent(classSet, attributes); +} + +static BOOL ExtractLocalizableStrings(NSDictionary *ibToolData, + NSMutableDictionary *attributes) { + NSString *localStrKey = @"com.apple.ibtool.document.localizable-strings"; + NSDictionary *strings = [ibToolData objectForKey:localStrKey]; + NSMutableSet *stringSet = [NSMutableSet set]; + NSDictionary *entry; + NSEnumerator *entryEnum = [strings objectEnumerator]; + while ((entry = [entryEnum nextObject])) { + NSEnumerator *stringEnum = [entry objectEnumerator]; + NSString *string; + while ((string = [stringEnum nextObject])) { + [stringSet addObject:string]; + } + } + return AddStringsToTextContent(stringSet, attributes); +} + +static BOOL ExtractConnections(NSDictionary *ibToolData, + NSMutableDictionary *attributes) { + NSString *connectionsKey = @"com.apple.ibtool.document.connections"; + NSDictionary *connections = [ibToolData objectForKey:connectionsKey]; + NSMutableSet *connectionsSet = [NSMutableSet set]; + NSDictionary *entry; + NSEnumerator *entryEnum = [connections objectEnumerator]; + while ((entry = [entryEnum nextObject])) { + NSString *typeStr = [entry objectForKey:@"type"]; + NSString *value = nil; + if (typeStr) { + if ([typeStr isEqualToString:@"IBBindingConnection"]) { + value = [entry objectForKey:@"keypath"]; + } else if ([typeStr isEqualToString:@"IBCocoaOutletConnection"] || + [typeStr isEqualToString:@"IBCocoaActionConnection"]) { + value = [entry objectForKey:@"label"]; + } + if (value) { + [connectionsSet addObject:value]; + } + } + } + return AddStringsToTextContent(connectionsSet, attributes); +} + +static BOOL ImportIBFile(NSMutableDictionary *attributes, + NSString *pathToFile) { + BOOL wasGood = NO; + GTMScriptRunner *runner = [GTMScriptRunner runner]; + NSDictionary *environment + = [NSDictionary dictionaryWithObject:@"/usr/bin:/Developer/usr/bin" + forKey:@"PATH"]; + [runner setEnvironment:environment]; + NSString *cmdString + = @"ibtool --classes --localizable-strings --connections \"%@\""; + NSString *cmd = [NSString stringWithFormat:cmdString, pathToFile]; + NSString *dataString = [runner run:cmd]; + CFDataRef data + = (CFDataRef)[dataString dataUsingEncoding:NSUTF8StringEncoding]; + if (data) { + NSDictionary *results + = GTMCFAutorelease(CFPropertyListCreateFromXMLData(NULL, + data , + kCFPropertyListImmutable, + NULL)); + if (results && [results isKindOfClass:[NSDictionary class]]) { + wasGood = ExtractClasses(results, attributes); + wasGood |= ExtractLocalizableStrings(results, attributes); + wasGood |= ExtractConnections(results, attributes); + } + } + return wasGood; +} + +// Grabs all of the classes, localizable strings, bindings, outlets +// and actions and sticks them into kMDItemTextContent. +Boolean GetMetadataForFile(void* interface, + CFMutableDictionaryRef cfAttributes, + CFStringRef contentTypeUTI, + CFStringRef cfPathToFile) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSMutableDictionary *attributes = (NSMutableDictionary*)cfAttributes; + NSString *pathToFile = (NSString*)cfPathToFile; + BOOL wasGood = NO; + if (UTTypeConformsTo(contentTypeUTI, + CFSTR("com.apple.interfacebuilder.document")) + || UTTypeConformsTo(contentTypeUTI, + CFSTR("com.apple.interfacebuilder.document.cocoa")) + || UTTypeConformsTo(contentTypeUTI, + CFSTR("com.apple.interfacebuilder.document.carbon"))) { + wasGood = ImportIBFile(attributes, pathToFile); + } + [pool release]; + return wasGood == NO ? FALSE : TRUE; +} diff --git a/SpotlightPlugins/InterfaceBuilder/Info.plist b/SpotlightPlugins/InterfaceBuilder/Info.plist new file mode 100644 index 0000000..8412ec0 --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeRole + MDImporter + LSItemContentTypes + + com.apple.interfacebuilder.document.cocoa + com.apple.interfacebuilder.document.carbon + com.apple.interfacebuilder.document + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleName + ${PRODUCT_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.google.spotlightimporter.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleVersion + 1.0 + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + CFPlugInFactories + + 556C7CA3-979B-44B2-BF4A-EADD88AFE0D9 + MetadataImporterPluginFactory + + CFPlugInTypes + + 8B08C4BF-415B-11D8-B3F9-0003936726FC + + 556C7CA3-979B-44B2-BF4A-EADD88AFE0D9 + + + CFPlugInUnloadFunction + + + diff --git a/SpotlightPlugins/InterfaceBuilder/InterfaceBuilder.xcodeproj/project.pbxproj b/SpotlightPlugins/InterfaceBuilder/InterfaceBuilder.xcodeproj/project.pbxproj new file mode 100644 index 0000000..8bea28e --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/InterfaceBuilder.xcodeproj/project.pbxproj @@ -0,0 +1,345 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXAggregateTarget section */ + 8BF156AA0E5BA66300D28B05 /* RunAllUnitTests */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 8BF156B10E5BA6A500D28B05 /* Build configuration list for PBXAggregateTarget "RunAllUnitTests" */; + buildPhases = ( + 8BF156A90E5BA66300D28B05 /* ShellScript */, + ); + dependencies = ( + 8BF156AE0E5BA66700D28B05 /* PBXTargetDependency */, + ); + name = RunAllUnitTests; + productName = RunAllUnitTests; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 2C05A19C06CAA52B00D84F6F /* GetMetadataForFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */; }; + 8B1D48820E59F52A000EB8CA /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D48810E59F52A000EB8CA /* main.c */; }; + 8B58F8700E5726D000A0E02E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B58F86F0E5726D000A0E02E /* Foundation.framework */; }; + 8BF153730E5A436600D28B05 /* GTMScriptRunner.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BF153720E5A436600D28B05 /* GTMScriptRunner.m */; }; + 8BF1543C0E5B42F500D28B05 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BF1543B0E5B42F500D28B05 /* ApplicationServices.framework */; }; + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8BF156AD0E5BA66700D28B05 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8D57630D048677EA00EA77CD; + remoteInfo = InterfaceBuilderSpotlightPlugin; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GetMetadataForFile.m; sourceTree = ""; }; + 8B1D48810E59F52A000EB8CA /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + 8B1D48840E59F591000EB8CA /* PluginID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginID.h; sourceTree = ""; }; + 8B58F75A0E56502600A0E02E /* ReadMe.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = ReadMe.rtf; sourceTree = ""; }; + 8B58F86F0E5726D000A0E02E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = LoadableBundle.xcconfig; sourceTree = ""; }; + 8BF153710E5A436600D28B05 /* GTMScriptRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMScriptRunner.h; path = ../../Foundation/GTMScriptRunner.h; sourceTree = SOURCE_ROOT; }; + 8BF153720E5A436600D28B05 /* GTMScriptRunner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMScriptRunner.m; path = ../../Foundation/GTMScriptRunner.m; sourceTree = SOURCE_ROOT; }; + 8BF1537B0E5A456F00D28B05 /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMDefines.h; path = ../../GTMDefines.h; sourceTree = SOURCE_ROOT; }; + 8BF153C30E5A48C400D28B05 /* GTMGarbageCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMGarbageCollection.h; path = ../../Foundation/GTMGarbageCollection.h; sourceTree = SOURCE_ROOT; }; + 8BF1543B0E5B42F500D28B05 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; + 8BF155B40E5B835900D28B05 /* ReleaseLeopardOrLater.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ReleaseLeopardOrLater.xcconfig; sourceTree = ""; }; + 8BF155B50E5B835900D28B05 /* DebugLeopardOrLater.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugLeopardOrLater.xcconfig; sourceTree = ""; }; + 8D576316048677EA00EA77CD /* InterfaceBuilder.mdimporter */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InterfaceBuilder.mdimporter; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D576313048677EA00EA77CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B58F8700E5726D000A0E02E /* Foundation.framework in Frameworks */, + 8BF1543C0E5B42F500D28B05 /* ApplicationServices.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* XcodeProjectSpotlightPlugin */ = { + isa = PBXGroup; + children = ( + 8B58F75A0E56502600A0E02E /* ReadMe.rtf */, + 8B58F84D0E5697B500A0E02E /* XcodeConfig */, + 8B1D48800E59F52A000EB8CA /* Common */, + 08FB77AFFE84173DC02AAC07 /* Source */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + comments = "// Copyright 2008 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License. You may obtain a copy\n// of the License at\n// \n// http://www.apache.org/licenses/LICENSE-2.0\n// \n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n// License for the specific language governing permissions and limitations under\n// the License."; + name = XcodeProjectSpotlightPlugin; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 8BF1543B0E5B42F500D28B05 /* ApplicationServices.framework */, + 8B58F86F0E5726D000A0E02E /* Foundation.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D576317048677EA00EA77CD /* Info.plist */, + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77AFFE84173DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 8BF1537B0E5A456F00D28B05 /* GTMDefines.h */, + 8BF153710E5A436600D28B05 /* GTMScriptRunner.h */, + 8BF153720E5A436600D28B05 /* GTMScriptRunner.m */, + 8BF153C30E5A48C400D28B05 /* GTMGarbageCollection.h */, + 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */, + 8B1D48840E59F591000EB8CA /* PluginID.h */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D576316048677EA00EA77CD /* InterfaceBuilder.mdimporter */, + ); + name = Products; + sourceTree = ""; + }; + 8B1D48800E59F52A000EB8CA /* Common */ = { + isa = PBXGroup; + children = ( + 8B1D48810E59F52A000EB8CA /* main.c */, + ); + name = Common; + path = ../Common; + sourceTree = SOURCE_ROOT; + }; + 8B58F84D0E5697B500A0E02E /* XcodeConfig */ = { + isa = PBXGroup; + children = ( + 8B58F90F0E579A1300A0E02E /* Target */, + 8B58F9250E579A1300A0E02E /* Project */, + ); + name = XcodeConfig; + path = ../../XcodeConfig; + sourceTree = SOURCE_ROOT; + }; + 8B58F90F0E579A1300A0E02E /* Target */ = { + isa = PBXGroup; + children = ( + 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */, + ); + path = Target; + sourceTree = ""; + }; + 8B58F9250E579A1300A0E02E /* Project */ = { + isa = PBXGroup; + children = ( + 8BF155B40E5B835900D28B05 /* ReleaseLeopardOrLater.xcconfig */, + 8BF155B50E5B835900D28B05 /* DebugLeopardOrLater.xcconfig */, + ); + path = Project; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D57630D048677EA00EA77CD /* InterfaceBuilderSpotlightPlugin */ = { + isa = PBXNativeTarget; + buildConfigurationList = 70138C840896BE9A00968C2F /* Build configuration list for PBXNativeTarget "InterfaceBuilderSpotlightPlugin" */; + buildPhases = ( + 8D57630F048677EA00EA77CD /* Resources */, + 8D576311048677EA00EA77CD /* Sources */, + 8D576313048677EA00EA77CD /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = InterfaceBuilderSpotlightPlugin; + productInstallPath = /Library/Spotlight; + productName = XcodeProjectSpotlightPlugin; + productReference = 8D576316048677EA00EA77CD /* InterfaceBuilder.mdimporter */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 70138C880896BE9A00968C2F /* Build configuration list for PBXProject "InterfaceBuilder" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 089C166AFE841209C02AAC07 /* XcodeProjectSpotlightPlugin */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8BF156AA0E5BA66300D28B05 /* RunAllUnitTests */, + 8D57630D048677EA00EA77CD /* InterfaceBuilderSpotlightPlugin */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D57630F048677EA00EA77CD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 8BF156A90E5BA66300D28B05 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /usr/bin/python; + shellScript = "# Test of xib and nib importer for carbon and cocoa\n\nimport os\nimport subprocess\n\nfile_names = [ \"NibCocoaTest.nib\", \"XibCocoaTest.xib\"]\nfor file_name in file_names:\n\tcmd = \"/usr/bin/mdimport -d 2 -g \" + os.environ[\"BUILT_PRODUCTS_DIR\"] + \"/InterfaceBuilder.mdimporter \" + os.environ[\"SOURCE_ROOT\"] + \"/TestData/\" + file_name\n\timporter_out = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE).stderr.read()\n\tif importer_out.find(\"TestCustomClass\") == -1 or importer_out.find(\"testAction:\") == -1 or importer_out.find(\"testBinding\") == -1 or importer_out.find(\"TestLocalizedString\") == -1:\n\t\tprint \"error: Failed to import for \" + file_name\n\t\tprint importer_out\n\t\texit(1)\n\nfile_names = [ \"NibCarbonTest.nib\", \"XibCarbonTest.xib\"]\nfor file_name in file_names:\n\tcmd = \"/usr/bin/mdimport -d 2 -g \" + os.environ[\"BUILT_PRODUCTS_DIR\"] + \"/InterfaceBuilder.mdimporter \" + os.environ[\"SOURCE_ROOT\"] + \"/TestData/\" + file_name\n\timporter_out = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE).stderr.read()\n\tif importer_out.find(\"TestLocalizedString\") == -1:\n\t\tprint \"error: Failed to import for \" + file_name\n\t\tprint importer_out\n\t\texit(1)\n\n#if importer_out.find(\"kMDItemDescription = \\\"This is a description.\\\";\") == -1:\n#\tprint \"error: Bad Description for test.scpt\"\n#\texit(1)\n#if importer_out.find(\"kMDItemTextContent = \\\"1 + 1\\\";\") == -1:\n#\tprint \"error: Bad Content for test.scpt\"\n#\texit(1)\n\nexit(0)"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D576311048677EA00EA77CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C05A19C06CAA52B00D84F6F /* GetMetadataForFile.m in Sources */, + 8B1D48820E59F52A000EB8CA /* main.c in Sources */, + 8BF153730E5A436600D28B05 /* GTMScriptRunner.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 8BF156AE0E5BA66700D28B05 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8D57630D048677EA00EA77CD /* InterfaceBuilderSpotlightPlugin */; + targetProxy = 8BF156AD0E5BA66700D28B05 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 70138C850896BE9A00968C2F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = InterfaceBuilder; + WRAPPER_EXTENSION = mdimporter; + }; + name = Debug; + }; + 70138C860896BE9A00968C2F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = InterfaceBuilder; + WRAPPER_EXTENSION = mdimporter; + }; + name = Release; + }; + 70138C890896BE9A00968C2F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8BF155B50E5B835900D28B05 /* DebugLeopardOrLater.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + 70138C8A0896BE9A00968C2F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8BF155B40E5B835900D28B05 /* ReleaseLeopardOrLater.xcconfig */; + buildSettings = { + }; + name = Release; + }; + 8BF156AB0E5BA66300D28B05 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = RunAllUnitTests; + }; + name = Debug; + }; + 8BF156AC0E5BA66300D28B05 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = RunAllUnitTests; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 70138C840896BE9A00968C2F /* Build configuration list for PBXNativeTarget "InterfaceBuilderSpotlightPlugin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70138C850896BE9A00968C2F /* Debug */, + 70138C860896BE9A00968C2F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 70138C880896BE9A00968C2F /* Build configuration list for PBXProject "InterfaceBuilder" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70138C890896BE9A00968C2F /* Debug */, + 70138C8A0896BE9A00968C2F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8BF156B10E5BA6A500D28B05 /* Build configuration list for PBXAggregateTarget "RunAllUnitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8BF156AB0E5BA66300D28B05 /* Debug */, + 8BF156AC0E5BA66300D28B05 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/SpotlightPlugins/InterfaceBuilder/PluginID.h b/SpotlightPlugins/InterfaceBuilder/PluginID.h new file mode 100644 index 0000000..c89c091 --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/PluginID.h @@ -0,0 +1,19 @@ +// +// PluginID.h +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +#define PLUGIN_ID "556C7CA3-979B-44B2-BF4A-EADD88AFE0D9" diff --git a/SpotlightPlugins/InterfaceBuilder/ReadMe.rtf b/SpotlightPlugins/InterfaceBuilder/ReadMe.rtf new file mode 100644 index 0000000..16cd43d --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/ReadMe.rtf @@ -0,0 +1,34 @@ +{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural + +\f0\fs24 \cf0 InterfaceBuilder Spotlight Plugin\ +\ +Copyright 2008 Google Inc.\ +\ +Licensed under the Apache License, Version 2.0 (the "License"); you may not\ +use this file except in compliance with the License. You may obtain a copy\ +of the License at\ +\ +http://www.apache.org/licenses/LICENSE-2.0\ + \ +Unless required by applicable law or agreed to in writing, software\ +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\ +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\ +License for the specific language governing permissions and limitations under\ +the License.\ +\ +-----------------------\ +\ +This is a spotlight importer for nibs and xibs.\ +Makes it easy for you to search nibs and xibs for classes they use.\ +Class names, bindings, outlets, actions and localizable strings are added \ +to the text content attribute.\ +\ +To install the spotlight plugin, please copy it into /Library/Spotlight or ~/Library/Spotlight.\ +\ +This spotlight plugin requires Xcode 3 or better (specifically ibtool).\ +\ +It is part of the Google Toolbox For Mac project\ +http://code.google.com/p/google-toolbox-for-mac/} \ No newline at end of file diff --git a/SpotlightPlugins/InterfaceBuilder/TestData/NibCarbonTest.nib/designable.nib b/SpotlightPlugins/InterfaceBuilder/TestData/NibCarbonTest.nib/designable.nib new file mode 100644 index 0000000..33bddb1 --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/TestData/NibCarbonTest.nib/designable.nib @@ -0,0 +1,3106 @@ + + + + 1050 + 9E17 + 672 + 949.33 + 352.00 + + YES + + + + + YES + com.apple.InterfaceBuilder.CarbonPlugin + + + YES + + Menu + + YES + + + TestLocalizedString + + 1048576 + 2147483647 + + NSMenuCheckmark + 1623195648 + + + NSMenuMixedState + 1623195648 + + submenuAction: + + TestLocalizedString + + YES + + + About NewApplication + + 2147483647 + + + About NewApplication + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + UHJlZmVyZW5jZXPigKY + , + 1048576 + 2147483647 + + + UHJlZmVyZW5jZXPigKY + , + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + YES + + Services + + + + + + + + + Services + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + Hide NewApplication + h + + + + + + + + + + + + + + + + + + + + + + Hide Others + h + 1572864 + 2147483647 + + + Hide Others + h + + + + + + + + + + + + + + + + + + + + + + Show All + + 1048576 + 2147483647 + + + Show All + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Quit NewApplication + q + 1048576 + 2147483647 + + + Quit NewApplication + q + + + + + + + + + + + + + + + + + + + + + + _NSAppleMenu + + TestLocalizedString + + + + + + + + + TestLocalizedString + + + + + + + + + + + + + + + + + + + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + YES + + + New + n + 1048576 + 2147483647 + + + New + n + + + + + + + + + + + + + + + + + + + + + + T3BlbuKApg + o + 1048576 + 2147483647 + + + T3BlbuKApg + o + + + + + + + + + + + + + + + + + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + Clear Menu + + + + + + + + + + + + + + + + + + + + + + Open Recent + + + + + + + + + Open Recent + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Close + w + 1048576 + 2147483647 + + + Close + w + + + + + + + + + + + + + + + + + + + + + + Save + s + 1048576 + 2147483647 + + + Save + s + + + + + + + + + + + + + + + + + + + + + + U2F2ZSBBc+KApg + S + 1179648 + 2147483647 + + + U2F2ZSBBc+KApg + S + + + + + + + + + + + + + + + + + + + + + + Revert to Saved + + 2147483647 + + + Revert to Saved + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + UGFnZSBTZXR1cOKApg + P + 1179648 + 2147483647 + + + UGFnZSBTZXR1cOKApg + P + + + + + + + + + + + + + + + + + + + + + + UHJpbnTigKY + p + 1048576 + 2147483647 + + + UHJpbnTigKY + p + + + + + + + + + + + + + + + + + + + + + File + + + + + + + + + File + + + + + + + + + + + + + + + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + YES + + + Undo + z + 1048576 + 2147483647 + + + Undo + z + + + + + + + + + + + + + + + + + + + + + + Redo + Z + 1179648 + 2147483647 + + + Redo + Z + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Cut + x + 1048576 + 2147483647 + + + Cut + x + + + + + + + + + + + + + + + + + + + + + + Copy + c + 1048576 + 2147483647 + + + Copy + c + + + + + + + + + + + + + + + + + + + + + + Paste + v + 1048576 + 2147483647 + + + Paste + v + + + + + + + + + + + + + + + + + + + + + + Delete + + 1048576 + 2147483647 + + + Delete + + + + + + + + + + + + + + + + + + + + + + + Select All + a + 1048576 + 2147483647 + + + Select All + a + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + YES + + + RmluZOKApg + f + 1048576 + 2147483647 + + + 1 + RmluZOKApg + f + + + + + + + + + + + + + + + + + + + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + Find Next + g + + + + + + + + + + + + + + + + + + + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + Find Previous + G + + + + + + + + + + + + + + + + + + + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + Use Selection for Find + e + + + + + + + + + + + + + + + + + + + + + + Jump to Selection + j + 1048576 + 2147483647 + + + Jump to Selection + j + + + + + + + + + + + + + + + + + + + + + Find + + + + + + + + + Find + + + + + + + + + + + + + + + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + U2hvdyBTcGVsbGluZ+KApg + : + 1048576 + 2147483647 + + + U2hvdyBTcGVsbGluZ+KApg + : + + + + + + + + + + + + + + + + + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + Check Spelling + ; + + + + + + + + + + + + + + + + + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + Check Spelling as You Type + + + + + + + + + + + + + + + + + + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + Check Grammar With Spelling + + + + + + + + + + + + + + + + + + + + + + Spelling + + + + + + + + + Spelling + + + + + + + + + + + + + + + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + YES + + + Smart Copy Paste + + 1048576 + 2147483647 + + + Smart Copy Paste + + + + + + + + + + + + + + + + + + + + + + + Smart Quotes + + 1048576 + 2147483647 + + + Smart Quotes + + + + + + + + + + + + + + + + + + + + + + + Smart Links + + 1048576 + 2147483647 + + + Smart Links + + + + + + + + + + + + + + + + + + + + + + Substitutions + + + + + + + + + Substitutions + + + + + + + + + + + + + + + + + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + YES + + + Start Speaking + + 1048576 + 2147483647 + + + Start Speaking + + + + + + + + + + + + + + + + + + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + Stop Speaking + + + + + + + + + + + + + + + + + + + + + + Speech + + + + + + + + + Speech + + + + + + + + + + + + + + + + + + + + + + Edit + + + + + + + + + Edit + + + + + + + + + + + + + + + + + + + + + + + Format + + 1048576 + 2147483647 + + + submenuAction: + + Format + + YES + + + Show Fonts + t + 1048576 + 2147483647 + + + Show Fonts + t + + + + + + + + + + + + + + + + + + + + + + Show Colors + C + 1179648 + 2147483647 + + + Show Colors + C + + + + + + + + + + + + + + + + + + + + + + Format + + + + + + + + + Format + + + + + + + + + + + + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + YES + + + Show Toolbar + t + 1572864 + 2147483647 + + + Show Toolbar + t + + + + + + + + + + + + + + + + + + + + + + Q3VzdG9taXplIFRvb2xiYXLigKY + + 1048576 + 2147483647 + + + Q3VzdG9taXplIFRvb2xiYXLigKY + + + + + + + + + + + + + + + + + + + + + + View + + + + + + + + + View + + + + + + + + + + + + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + YES + + + Minimize + m + 1048576 + 2147483647 + + + Minimize + m + + + + + + + + + + + + + + + + + + + + + + Zoom + + 1048576 + 2147483647 + + + Zoom + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + Bring All to Front + + + + + + + + + + + + + + + + + + + + + + + _NSWindowsMenu + + Window + + + + + + + + + Window + + + + + + + + + + + + + + + + + + + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + NewApplication Help + ? + 1048576 + 2147483647 + + + NewApplication Help + ? + + + + + + + + + + + + + + + + + + + + + + _NSWindowsMenu + + Help + + + + + + + + + Help + + + + + + + + + + + + + + + + + + + + + + + _NSMainMenu + + Menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Window + + + 256 + {480, 360} + + + + + + + + + + + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YES + + + + + {{300, 300}, {480, 360}} + {{0, 48}, {1920, 1129}} + + + YES + + + + + + YES + + + + YES + + 0 + + YES + + + + + + 316 + + + YES + + + + Window + + + 317 + + + + + 399 + + + YES + + + + + + + + + + MainMenu + + + 400 + + + YES + + + + + + 401 + + + YES + + + + + + 402 + + + YES + + + + + + 403 + + + YES + + + + + + 404 + + + YES + + + + + + 405 + + + YES + + + + + + 406 + + + YES + + + + + + 407 + + + YES + + + + + + + + + + + + + + + + 408 + + + YES + + + + + + 409 + + + + + 410 + + + + + 411 + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + YES + + + + + + 420 + + + + + 421 + + + YES + + + + + + + + + + + + + + + + + + 422 + + + YES + + + + + + 423 + + + YES + + + + + + 424 + + + YES + + + + + + 425 + + + + + 426 + + + + + 427 + + + YES + + + + + + 428 + + + + + 429 + + + + + 430 + + + + + 431 + + + + + 432 + + + + + 433 + + + + + 434 + + + + + 435 + + + YES + + + + + + + + + 436 + + + + + 437 + + + + + 438 + + + + + 439 + + + + + 440 + + + YES + + + + + + + + + + 441 + + + + + 442 + + + + + 443 + + + + + 444 + + + + + 445 + + + + + 446 + + + YES + + + + + + + 447 + + + + + 448 + + + + + 449 + + + YES + + + + + + + + 450 + + + + + 451 + + + + + 452 + + + + + 453 + + + YES + + + + + + + + + 454 + + + + + 455 + + + + + 456 + + + + + 457 + + + + + 458 + + + YES + + + + + + + + + + + + + + + + 459 + + + + + 460 + + + + + 461 + + + + + 462 + + + + + 463 + + + YES + + + + + + 464 + + + + + 465 + + + + + 466 + + + + + 467 + + + + + 468 + + + + + 469 + + + + + 470 + + + + + 471 + + + YES + + + + + + 472 + + + + + 473 + + + YES + + + + + + + 474 + + + + + 475 + + + + + 476 + + + YES + + + + + + + 477 + + + + + 478 + + + + + + + YES + + YES + 316.IBEditorWindowLastContentRect + 316.IBPluginDependency + 316.IBWindowTemplateEditedContentRect + 316.editorWindowContentRectSynchronizationRect + 317.IBPluginDependency + 399.IBEditorWindowLastContentRect + 399.IBPluginDependency + 399.editorWindowContentRectSynchronizationRect + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 405.IBPluginDependency + 406.IBPluginDependency + 407.IBPluginDependency + 407.editorWindowContentRectSynchronizationRect + 408.IBPluginDependency + 409.IBPluginDependency + 410.IBPluginDependency + 411.IBPluginDependency + 412.IBPluginDependency + 413.IBPluginDependency + 414.IBPluginDependency + 415.IBPluginDependency + 416.IBPluginDependency + 417.IBPluginDependency + 418.IBPluginDependency + 419.IBPluginDependency + 419.editorWindowContentRectSynchronizationRect + 420.IBPluginDependency + 421.IBPluginDependency + 421.editorWindowContentRectSynchronizationRect + 422.IBPluginDependency + 423.IBPluginDependency + 424.IBPluginDependency + 425.IBPluginDependency + 426.IBPluginDependency + 427.IBPluginDependency + 428.IBPluginDependency + 429.IBPluginDependency + 430.IBPluginDependency + 431.IBPluginDependency + 432.IBPluginDependency + 433.IBPluginDependency + 434.IBPluginDependency + 435.IBPluginDependency + 435.editorWindowContentRectSynchronizationRect + 436.IBPluginDependency + 437.IBPluginDependency + 438.IBPluginDependency + 439.IBPluginDependency + 440.IBPluginDependency + 440.editorWindowContentRectSynchronizationRect + 441.IBPluginDependency + 442.IBPluginDependency + 443.IBPluginDependency + 444.IBPluginDependency + 445.IBPluginDependency + 446.IBPluginDependency + 446.editorWindowContentRectSynchronizationRect + 447.IBPluginDependency + 448.IBPluginDependency + 449.IBPluginDependency + 449.editorWindowContentRectSynchronizationRect + 450.IBPluginDependency + 451.IBPluginDependency + 452.IBPluginDependency + 453.IBPluginDependency + 453.editorWindowContentRectSynchronizationRect + 454.IBPluginDependency + 455.IBPluginDependency + 456.IBPluginDependency + 457.IBPluginDependency + 458.IBEditorWindowLastContentRect + 458.IBPluginDependency + 458.editorWindowContentRectSynchronizationRect + 459.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 464.IBPluginDependency + 465.IBPluginDependency + 466.IBPluginDependency + 467.IBPluginDependency + 468.IBPluginDependency + 469.IBPluginDependency + 470.IBPluginDependency + 470.editorWindowContentRectSynchronizationRect + 471.IBPluginDependency + 471.editorWindowContentRectSynchronizationRect + 472.IBPluginDependency + 473.IBPluginDependency + 473.editorWindowContentRectSynchronizationRect + 474.IBPluginDependency + 475.IBPluginDependency + 476.IBPluginDependency + 476.editorWindowContentRectSynchronizationRect + 477.IBPluginDependency + 478.IBPluginDependency + + + YES + {{176, 429}, {480, 360}} + com.apple.InterfaceBuilder.CarbonPlugin + {{176, 429}, {480, 360}} + {{325, 394}, {480, 360}} + com.apple.InterfaceBuilder.CarbonPlugin + {{21, 803}, {507, 20}} + com.apple.InterfaceBuilder.CarbonPlugin + {{325, 836}, {478, 20}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{159, 779}, {199, 203}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{358, 919}, {146, 23}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{511, 593}, {181, 243}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{692, 573}, {275, 83}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{382, 719}, {241, 103}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{382, 719}, {167, 43}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{382, 719}, {188, 63}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{361, 909}, {197, 73}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{33, 620}, {245, 183}} + com.apple.InterfaceBuilder.CarbonPlugin + {{27, 799}, {245, 183}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{272, 916}, {64, 6}} + com.apple.InterfaceBuilder.CarbonPlugin + {{432, 959}, {216, 23}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{311, 939}, {234, 43}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{555, 793}, {176, 43}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 478 + + + 0 + + 3 + + diff --git a/SpotlightPlugins/InterfaceBuilder/TestData/NibCarbonTest.nib/objects.xib b/SpotlightPlugins/InterfaceBuilder/TestData/NibCarbonTest.nib/objects.xib new file mode 100644 index 0000000..5812bff --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/TestData/NibCarbonTest.nib/objects.xib @@ -0,0 +1,627 @@ + + + + + + + TRUE + TRUE + TRUE + + + Open Recent + TRUE + TRUE + + Open Recent + + + Clear Menu + TRUE + TRUE + + + + + + Window + _NSWindowsMenu + + + Minimize + m + TRUE + TRUE + mini + + + Zoom + TRUE + zoom + + + TRUE + TRUE + TRUE + + + Bring All to Front + TRUE + TRUE + bfrt + + + + + + Preferences… + , + TRUE + TRUE + pref + + + Undo + z + TRUE + undo + + + Hide NewApplication + h + TRUE + TRUE + hide + + + Services + + + Start Speaking + TRUE + TRUE + + + Substitutions + TRUE + TRUE + + Substitutions + + + Smart Copy Paste + TRUE + TRUE + + + Smart Quotes + TRUE + TRUE + + + Smart Links + TRUE + TRUE + + + + + + Check Spelling as You Type + TRUE + aspc + + + Show Fonts + t + TRUE + TRUE + + + Print… + p + TRUE + prnt + + + Redo + Z + TRUE + 1179648 + redo + + + TRUE + TRUE + TRUE + + + Format + TRUE + TRUE + + Format + + + + + Show Colors + C + TRUE + TRUE + 1179648 + + + + + + Find… + f + TRUE + TRUE + + + TRUE + TRUE + TRUE + + + TestLocalizedString + _NSAppleMenu + + + About NewApplication + TRUE + 0 + abou + + + TRUE + TRUE + TRUE + + + + TRUE + TRUE + TRUE + + + Services + TRUE + TRUE + + + + + + Hide Others + h + TRUE + TRUE + 1572864 + + + Show All + TRUE + TRUE + + + TRUE + TRUE + TRUE + + + Quit NewApplication + q + TRUE + TRUE + quit + + + + + Cut + x + TRUE + cut + + + + Copy + c + TRUE + copy + + + + + + + TestLocalizedString + + + + New + n + TRUE + new + + + Customize Toolbar… + TRUE + TRUE + + + + Help + + Help + _NSWindowsMenu + + + NewApplication Help + ? + TRUE + + + + + + Close + w + TRUE + clos + + + Speech + TRUE + + Speech + + + + Stop Speaking + TRUE + TRUE + + + + + + Spelling + + + Show Spelling… + : + TRUE + shsp + + + Check Spelling + ; + TRUE + cksp + + + + Check Grammar With Spelling + TRUE + TRUE + + + + + + + + + + View + + + Show Toolbar + t + TRUE + TRUE + 1572864 + + + + + + Edit + + + + + TRUE + TRUE + TRUE + + + + + Paste + v + TRUE + past + + + Delete + TRUE + clea + + + Select All + a + TRUE + sall + + + + Find + TRUE + TRUE + + Find + + + + Find Next + g + TRUE + TRUE + + + Find Previous + G + TRUE + TRUE + 1179648 + + + Use Selection for Find + e + TRUE + TRUE + + + Jump to Selection + j + TRUE + TRUE + + + + + + Spelling + TRUE + + + + + + + + + + Page Setup… + P + TRUE + 1179648 + page + + + 0 0 480 360 + 0 0 360 480 + + + + + + + + Open… + o + TRUE + open + + + + + + + Save As… + S + TRUE + 1179648 + svas + + + Window + + + + + + TRUE + TRUE + TRUE + 1048576 + Window + + 300 300 660 780 + 48 0 1177 1920 + + + TRUE + TRUE + TRUE + + + + + File + + File + + + + + + + + Save + s + TRUE + save + + + + Revert to Saved + TRUE + 0 + rvrt + + + + + + + + + + + + + Menu + _NSMainMenu + + + + + Edit + + + + + View + TRUE + TRUE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + File's Owner + + MainMenu + + Window + + + IBCarbonFramework + 479 + diff --git a/SpotlightPlugins/InterfaceBuilder/TestData/NibCocoaTest.nib/designable.nib b/SpotlightPlugins/InterfaceBuilder/TestData/NibCocoaTest.nib/designable.nib new file mode 100644 index 0000000..af44060 --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/TestData/NibCocoaTest.nib/designable.nib @@ -0,0 +1,3075 @@ + + + + 1050 + 9E17 + 672 + 949.33 + 352.00 + + YES + + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + NSFontManager + + + AMainMenu + + YES + + + TestLocalizedString + + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + TestLocalizedString + + YES + + + About NewApplication + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + UHJlZmVyZW5jZXPigKY + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Services + + 2147483647 + + + submenuAction: + + Services + + YES + + _NSServicesMenu + + + + + YES + YES + + + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Quit NewApplication + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 2147483647 + + + submenuAction: + + File + + YES + + + New + n + 1048576 + 2147483647 + + + + + + T3BlbuKApg + o + 1048576 + 2147483647 + + + + + + Open Recent + + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + U2F2ZSBBc+KApg + S + 1179648 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + UHJpbnTigKY + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 2147483647 + + + submenuAction: + + Edit + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Delete + + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Find + + 2147483647 + + + submenuAction: + + Find + + YES + + + RmluZOKApg + f + 1048576 + 2147483647 + + + 1 + + + + 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 + + 2147483647 + + + submenuAction: + + Spelling and Grammar + + YES + + + U2hvdyBTcGVsbGluZ+KApg + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling While Typing + + 2147483647 + + + + + + Check Grammar With Spelling + + 2147483647 + + + + + + + + + Substitutions + + 2147483647 + + + submenuAction: + + Substitutions + + YES + + + Smart Copy/Paste + + 2147483647 + + + 1 + + + + Smart Quotes + + 2147483647 + + + 2 + + + + Smart Links + + 2147483647 + + + 3 + + + + + + + Speech + + 2147483647 + + + submenuAction: + + Speech + + YES + + + Start Speaking + + 2147483647 + + + + + + Stop Speaking + + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + YES + + + Font + + 2147483647 + + + submenuAction: + + Font + + YES + + + 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 + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligature + + 2147483647 + + + submenuAction: + + Ligature + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + YES + + + 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 + + YES + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 2147483647 + + + submenuAction: + + View + + YES + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Q3VzdG9taXplIFRvb2xiYXLigKY + + 2147483647 + + + + + + + + + Window + + 2147483647 + + + submenuAction: + + Window + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bring All to Front + + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 2147483647 + + + submenuAction: + + Help + + YES + + + NewApplication Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + 15 + 2 + {{196, 240}, {480, 270}} + 603979776 + Window + TestCustomClass + + {3.40282e+38, 3.40282e+38} + + + 256 + + YES + + + 268 + {{66, 214}, {96, 32}} + + YES + + 67239424 + 134217728 + Button + + LucidaGrande + 1.300000e+01 + 1044 + + + -2038284033 + 129 + + + 200 + 25 + + + + {480, 270} + + + {{0, 0}, {1920, 1178}} + {3.40282e+38, 3.40282e+38} + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + 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 + + + + showHelp: + + + + 360 + + + + saveDocument: + + + + 362 + + + + saveDocumentAs: + + + + 363 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 369 + + + + hideOtherApplications: + + + + 370 + + + + unhideAllApplications: + + + + 372 + + + + addFontTrait: + + + + 420 + + + + addFontTrait: + + + + 421 + + + + modifyFont: + + + + 422 + + + + orderFrontFontPanel: + + + + 423 + + + + modifyFont: + + + + 424 + + + + raiseBaseline: + + + + 425 + + + + lowerBaseline: + + + + 426 + + + + copyFont: + + + + 427 + + + + subscript: + + + + 428 + + + + superscript: + + + + 429 + + + + tightenKerning: + + + + 430 + + + + underline: + + + + 431 + + + + orderFrontColorPanel: + + + + 432 + + + + useAllLigatures: + + + + 433 + + + + loosenKerning: + + + + 434 + + + + pasteFont: + + + + 435 + + + + unscript: + + + + 436 + + + + useStandardKerning: + + + + 437 + + + + useStandardLigatures: + + + + 438 + + + + turnOffLigatures: + + + + 439 + + + + turnOffKerning: + + + + 440 + + + + alignLeft: + + + + 441 + + + + alignJustified: + + + + 442 + + + + copyRuler: + + + + 443 + + + + alignCenter: + + + + 444 + + + + toggleRuler: + + + + 445 + + + + alignRight: + + + + 446 + + + + pasteRuler: + + + + 447 + + + + terminate: + + + + 448 + + + + visible: testBinding + + + + + + visible: testBinding + visible + testBinding + 2 + + + 459 + + + + testAction: + + + + 462 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + + + Main Menu + + + 19 + + + YES + + + + + + 56 + + + YES + + + + + + 103 + + + YES + + + + + + 217 + + + YES + + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 75 + + + + + 80 + + + + + 78 + + + + + 72 + + + + + 82 + + + + + 124 + + + YES + + + + + + 77 + + + + + 73 + + + + + 79 + + + + + 112 + + + + + 74 + + + + + 125 + + + YES + + + + + + 126 + + + + + 205 + + + YES + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + YES + + + + + + 216 + + + YES + + + + + + 200 + + + YES + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + YES + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 106 + + + YES + + + + + + 111 + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + + + 144 + + + + + 129 + + + + + 143 + + + + + 236 + + + + + 131 + + + YES + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + YES + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + YES + + + + + + 296 + + + YES + + + + + + + 297 + + + + + 298 + + + + + 211 + + + YES + + + + + + 212 + + + YES + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + YES + + + + + + 349 + + + YES + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 367 + + + YES + + + + + + 368 + + + YES + + + + + + 373 + + + + + 375 + + + YES + + + + + + 376 + + + YES + + + + + + + 377 + + + YES + + + + + + 378 + + + YES + + + + + + 379 + + + YES + + + + + + + + + + + + + 380 + + + + + 381 + + + + + 382 + + + + + 383 + + + + + 384 + + + + + 385 + + + + + 386 + + + + + 387 + + + + + 388 + + + YES + + + + + + + + + + + + + + + + + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + 397 + + + YES + + + + + + 398 + + + YES + + + + + + 399 + + + YES + + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + 405 + + + YES + + + + + + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + 411 + + + YES + + + + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + YES + + + + + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 460 + + + YES + + + + + + 461 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBEditorWindowLastContentRect + 106.IBPluginDependency + 106.ImportedFromIB2 + 106.editorWindowContentRectSynchronizationRect + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBEditorWindowLastContentRect + 125.IBPluginDependency + 125.ImportedFromIB2 + 125.editorWindowContentRectSynchronizationRect + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBEditorWindowLastContentRect + 130.IBPluginDependency + 130.ImportedFromIB2 + 130.editorWindowContentRectSynchronizationRect + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 195.IBPluginDependency + 195.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 198.IBPluginDependency + 198.ImportedFromIB2 + 199.IBPluginDependency + 199.ImportedFromIB2 + 200.IBEditorWindowLastContentRect + 200.IBPluginDependency + 200.ImportedFromIB2 + 200.editorWindowContentRectSynchronizationRect + 201.IBPluginDependency + 201.ImportedFromIB2 + 202.IBPluginDependency + 202.ImportedFromIB2 + 203.IBPluginDependency + 203.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 205.IBEditorWindowLastContentRect + 205.IBPluginDependency + 205.ImportedFromIB2 + 205.editorWindowContentRectSynchronizationRect + 206.IBPluginDependency + 206.ImportedFromIB2 + 207.IBPluginDependency + 207.ImportedFromIB2 + 208.IBPluginDependency + 208.ImportedFromIB2 + 209.IBPluginDependency + 209.ImportedFromIB2 + 210.IBPluginDependency + 210.ImportedFromIB2 + 211.IBPluginDependency + 211.ImportedFromIB2 + 212.IBEditorWindowLastContentRect + 212.IBPluginDependency + 212.ImportedFromIB2 + 212.editorWindowContentRectSynchronizationRect + 213.IBPluginDependency + 213.ImportedFromIB2 + 214.IBPluginDependency + 214.ImportedFromIB2 + 215.IBPluginDependency + 215.ImportedFromIB2 + 216.IBPluginDependency + 216.ImportedFromIB2 + 217.IBPluginDependency + 217.ImportedFromIB2 + 218.IBPluginDependency + 218.ImportedFromIB2 + 219.IBPluginDependency + 219.ImportedFromIB2 + 220.IBEditorWindowLastContentRect + 220.IBPluginDependency + 220.ImportedFromIB2 + 220.editorWindowContentRectSynchronizationRect + 221.IBPluginDependency + 221.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 236.IBPluginDependency + 236.ImportedFromIB2 + 239.IBPluginDependency + 239.ImportedFromIB2 + 24.IBEditorWindowLastContentRect + 24.IBPluginDependency + 24.ImportedFromIB2 + 24.editorWindowContentRectSynchronizationRect + 29.IBEditorWindowLastContentRect + 29.IBPluginDependency + 29.ImportedFromIB2 + 29.WindowOrigin + 29.editorWindowContentRectSynchronizationRect + 295.IBPluginDependency + 296.IBEditorWindowLastContentRect + 296.IBPluginDependency + 296.editorWindowContentRectSynchronizationRect + 297.IBPluginDependency + 298.IBPluginDependency + 346.IBPluginDependency + 346.ImportedFromIB2 + 348.IBPluginDependency + 348.ImportedFromIB2 + 349.IBEditorWindowLastContentRect + 349.IBPluginDependency + 349.ImportedFromIB2 + 349.editorWindowContentRectSynchronizationRect + 350.IBPluginDependency + 350.ImportedFromIB2 + 351.IBPluginDependency + 351.ImportedFromIB2 + 354.IBPluginDependency + 354.ImportedFromIB2 + 367.IBEditorWindowLastContentRect + 367.IBPluginDependency + 367.IBWindowTemplateEditedContentRect + 367.NSWindowTemplate.visibleAtLaunch + 367.editorWindowContentRectSynchronizationRect + 368.IBPluginDependency + 375.IBPluginDependency + 376.IBPluginDependency + 377.IBPluginDependency + 378.IBPluginDependency + 379.IBPluginDependency + 380.IBPluginDependency + 381.IBPluginDependency + 382.IBPluginDependency + 383.IBPluginDependency + 384.IBPluginDependency + 385.IBPluginDependency + 386.IBPluginDependency + 387.IBPluginDependency + 388.IBPluginDependency + 389.IBPluginDependency + 390.IBPluginDependency + 391.IBPluginDependency + 392.IBPluginDependency + 393.IBPluginDependency + 394.IBPluginDependency + 395.IBPluginDependency + 396.IBPluginDependency + 397.IBPluginDependency + 398.IBPluginDependency + 399.IBPluginDependency + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 405.IBPluginDependency + 406.IBPluginDependency + 407.IBPluginDependency + 408.IBPluginDependency + 409.IBPluginDependency + 410.IBPluginDependency + 411.IBPluginDependency + 412.IBPluginDependency + 413.IBPluginDependency + 414.IBPluginDependency + 415.IBPluginDependency + 416.IBPluginDependency + 417.IBPluginDependency + 418.IBPluginDependency + 419.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBEditorWindowLastContentRect + 57.IBPluginDependency + 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBEditorWindowLastContentRect + 81.IBPluginDependency + 81.ImportedFromIB2 + 81.editorWindowContentRectSynchronizationRect + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{518, 723}, {216, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{596, 852}, {216, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{617, 609}, {132, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{522, 812}, {146, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{531, 606}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{436, 809}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{530, 483}, {275, 83}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {275, 83}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{287, 503}, {243, 243}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{197, 734}, {243, 243}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{530, 483}, {153, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {167, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{530, 483}, {241, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {241, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{447, 673}, {197, 73}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{525, 802}, {197, 73}} + {{101, 746}, {507, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {74, 862} + {{11, 977}, {478, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + {{397, 703}, {234, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + {{475, 832}, {234, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{530, 483}, {177, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{440, 714}, {177, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{176, 307}, {480, 270}} + com.apple.InterfaceBuilder.CocoaPlugin + {{176, 307}, {480, 270}} + + {{11, 666}, {480, 270}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{113, 563}, {245, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{23, 794}, {245, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{418, 469}, {199, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{323, 672}, {199, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 462 + + + + YES + + FirstResponder + NSObject + + testAction: + id + + + IBUserSource + + + + + + 0 + + 3 + + diff --git a/SpotlightPlugins/InterfaceBuilder/TestData/NibCocoaTest.nib/keyedobjects.nib b/SpotlightPlugins/InterfaceBuilder/TestData/NibCocoaTest.nib/keyedobjects.nib new file mode 100644 index 0000000..c7fdf57 Binary files /dev/null and b/SpotlightPlugins/InterfaceBuilder/TestData/NibCocoaTest.nib/keyedobjects.nib differ diff --git a/SpotlightPlugins/InterfaceBuilder/TestData/XibCarbonTest.xib b/SpotlightPlugins/InterfaceBuilder/TestData/XibCarbonTest.xib new file mode 100644 index 0000000..aea96ba --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/TestData/XibCarbonTest.xib @@ -0,0 +1,3106 @@ + + + + 1050 + 9E17 + 672 + 949.33 + 352.00 + + YES + + + + + YES + com.apple.InterfaceBuilder.CarbonPlugin + + + YES + + Menu + + YES + + + TestLocalizedString + + 1048576 + 2147483647 + + NSMenuCheckmark + 1623195648 + + + NSMenuMixedState + 1623195648 + + submenuAction: + + TestLocalizedString + + YES + + + About NewApplication + + 2147483647 + + + About NewApplication + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + UHJlZmVyZW5jZXPigKY + , + 1048576 + 2147483647 + + + UHJlZmVyZW5jZXPigKY + , + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + YES + + Services + + + + + + + + + Services + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + Hide NewApplication + h + + + + + + + + + + + + + + + + + + + + + + Hide Others + h + 1572864 + 2147483647 + + + Hide Others + h + + + + + + + + + + + + + + + + + + + + + + Show All + + 1048576 + 2147483647 + + + Show All + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Quit NewApplication + q + 1048576 + 2147483647 + + + Quit NewApplication + q + + + + + + + + + + + + + + + + + + + + + + _NSAppleMenu + + TestLocalizedString + + + + + + + + + TestLocalizedString + + + + + + + + + + + + + + + + + + + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + YES + + + New + n + 1048576 + 2147483647 + + + New + n + + + + + + + + + + + + + + + + + + + + + + T3BlbuKApg + o + 1048576 + 2147483647 + + + T3BlbuKApg + o + + + + + + + + + + + + + + + + + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + Clear Menu + + + + + + + + + + + + + + + + + + + + + + Open Recent + + + + + + + + + Open Recent + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Close + w + 1048576 + 2147483647 + + + Close + w + + + + + + + + + + + + + + + + + + + + + + Save + s + 1048576 + 2147483647 + + + Save + s + + + + + + + + + + + + + + + + + + + + + + U2F2ZSBBc+KApg + S + 1179648 + 2147483647 + + + U2F2ZSBBc+KApg + S + + + + + + + + + + + + + + + + + + + + + + Revert to Saved + + 2147483647 + + + Revert to Saved + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + UGFnZSBTZXR1cOKApg + P + 1179648 + 2147483647 + + + UGFnZSBTZXR1cOKApg + P + + + + + + + + + + + + + + + + + + + + + + UHJpbnTigKY + p + 1048576 + 2147483647 + + + UHJpbnTigKY + p + + + + + + + + + + + + + + + + + + + + + File + + + + + + + + + File + + + + + + + + + + + + + + + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + YES + + + Undo + z + 1048576 + 2147483647 + + + Undo + z + + + + + + + + + + + + + + + + + + + + + + Redo + Z + 1179648 + 2147483647 + + + Redo + Z + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Cut + x + 1048576 + 2147483647 + + + Cut + x + + + + + + + + + + + + + + + + + + + + + + Copy + c + 1048576 + 2147483647 + + + Copy + c + + + + + + + + + + + + + + + + + + + + + + Paste + v + 1048576 + 2147483647 + + + Paste + v + + + + + + + + + + + + + + + + + + + + + + Delete + + 1048576 + 2147483647 + + + Delete + + + + + + + + + + + + + + + + + + + + + + + Select All + a + 1048576 + 2147483647 + + + Select All + a + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + YES + + + RmluZOKApg + f + 1048576 + 2147483647 + + + 1 + RmluZOKApg + f + + + + + + + + + + + + + + + + + + + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + Find Next + g + + + + + + + + + + + + + + + + + + + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + Find Previous + G + + + + + + + + + + + + + + + + + + + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + Use Selection for Find + e + + + + + + + + + + + + + + + + + + + + + + Jump to Selection + j + 1048576 + 2147483647 + + + Jump to Selection + j + + + + + + + + + + + + + + + + + + + + + Find + + + + + + + + + Find + + + + + + + + + + + + + + + + + + + + + + + Spelling + + 1048576 + 2147483647 + + + submenuAction: + + Spelling + + YES + + + U2hvdyBTcGVsbGluZ+KApg + : + 1048576 + 2147483647 + + + U2hvdyBTcGVsbGluZ+KApg + : + + + + + + + + + + + + + + + + + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + Check Spelling + ; + + + + + + + + + + + + + + + + + + + + + + Check Spelling as You Type + + 1048576 + 2147483647 + + + Check Spelling as You Type + + + + + + + + + + + + + + + + + + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + Check Grammar With Spelling + + + + + + + + + + + + + + + + + + + + + + Spelling + + + + + + + + + Spelling + + + + + + + + + + + + + + + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + YES + + + Smart Copy Paste + + 1048576 + 2147483647 + + + Smart Copy Paste + + + + + + + + + + + + + + + + + + + + + + + Smart Quotes + + 1048576 + 2147483647 + + + Smart Quotes + + + + + + + + + + + + + + + + + + + + + + + Smart Links + + 1048576 + 2147483647 + + + Smart Links + + + + + + + + + + + + + + + + + + + + + + Substitutions + + + + + + + + + Substitutions + + + + + + + + + + + + + + + + + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + YES + + + Start Speaking + + 1048576 + 2147483647 + + + Start Speaking + + + + + + + + + + + + + + + + + + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + Stop Speaking + + + + + + + + + + + + + + + + + + + + + + Speech + + + + + + + + + Speech + + + + + + + + + + + + + + + + + + + + + + Edit + + + + + + + + + Edit + + + + + + + + + + + + + + + + + + + + + + + Format + + 1048576 + 2147483647 + + + submenuAction: + + Format + + YES + + + Show Fonts + t + 1048576 + 2147483647 + + + Show Fonts + t + + + + + + + + + + + + + + + + + + + + + + Show Colors + C + 1179648 + 2147483647 + + + Show Colors + C + + + + + + + + + + + + + + + + + + + + + + Format + + + + + + + + + Format + + + + + + + + + + + + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + YES + + + Show Toolbar + t + 1572864 + 2147483647 + + + Show Toolbar + t + + + + + + + + + + + + + + + + + + + + + + Q3VzdG9taXplIFRvb2xiYXLigKY + + 1048576 + 2147483647 + + + Q3VzdG9taXplIFRvb2xiYXLigKY + + + + + + + + + + + + + + + + + + + + + + View + + + + + + + + + View + + + + + + + + + + + + + + + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + YES + + + Minimize + m + 1048576 + 2147483647 + + + Minimize + m + + + + + + + + + + + + + + + + + + + + + + Zoom + + 1048576 + 2147483647 + + + Zoom + + + + + + + + + + + + + + + + + + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + Bring All to Front + + + + + + + + + + + + + + + + + + + + + + + _NSWindowsMenu + + Window + + + + + + + + + Window + + + + + + + + + + + + + + + + + + + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + NewApplication Help + ? + 1048576 + 2147483647 + + + NewApplication Help + ? + + + + + + + + + + + + + + + + + + + + + + _NSWindowsMenu + + Help + + + + + + + + + Help + + + + + + + + + + + + + + + + + + + + + + + _NSMainMenu + + Menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Window + + + 256 + {480, 360} + + + + + + + + + + + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YES + + + + + {{300, 300}, {480, 360}} + {{0, 48}, {1920, 1129}} + + + YES + + + + + + YES + + + + YES + + 0 + + YES + + + + + + 316 + + + YES + + + + Window + + + 317 + + + + + 399 + + + YES + + + + + + + + + + MainMenu + + + 400 + + + YES + + + + + + 401 + + + YES + + + + + + 402 + + + YES + + + + + + 403 + + + YES + + + + + + 404 + + + YES + + + + + + 405 + + + YES + + + + + + 406 + + + YES + + + + + + 407 + + + YES + + + + + + + + + + + + + + + + 408 + + + YES + + + + + + 409 + + + + + 410 + + + + + 411 + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + YES + + + + + + 420 + + + + + 421 + + + YES + + + + + + + + + + + + + + + + + + 422 + + + YES + + + + + + 423 + + + YES + + + + + + 424 + + + YES + + + + + + 425 + + + + + 426 + + + + + 427 + + + YES + + + + + + 428 + + + + + 429 + + + + + 430 + + + + + 431 + + + + + 432 + + + + + 433 + + + + + 434 + + + + + 435 + + + YES + + + + + + + + + 436 + + + + + 437 + + + + + 438 + + + + + 439 + + + + + 440 + + + YES + + + + + + + + + + 441 + + + + + 442 + + + + + 443 + + + + + 444 + + + + + 445 + + + + + 446 + + + YES + + + + + + + 447 + + + + + 448 + + + + + 449 + + + YES + + + + + + + + 450 + + + + + 451 + + + + + 452 + + + + + 453 + + + YES + + + + + + + + + 454 + + + + + 455 + + + + + 456 + + + + + 457 + + + + + 458 + + + YES + + + + + + + + + + + + + + + + 459 + + + + + 460 + + + + + 461 + + + + + 462 + + + + + 463 + + + YES + + + + + + 464 + + + + + 465 + + + + + 466 + + + + + 467 + + + + + 468 + + + + + 469 + + + + + 470 + + + + + 471 + + + YES + + + + + + 472 + + + + + 473 + + + YES + + + + + + + 474 + + + + + 475 + + + + + 476 + + + YES + + + + + + + 477 + + + + + 478 + + + + + + + YES + + YES + 316.IBEditorWindowLastContentRect + 316.IBPluginDependency + 316.IBWindowTemplateEditedContentRect + 316.editorWindowContentRectSynchronizationRect + 317.IBPluginDependency + 399.IBEditorWindowLastContentRect + 399.IBPluginDependency + 399.editorWindowContentRectSynchronizationRect + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 405.IBPluginDependency + 406.IBPluginDependency + 407.IBPluginDependency + 407.editorWindowContentRectSynchronizationRect + 408.IBPluginDependency + 409.IBPluginDependency + 410.IBPluginDependency + 411.IBPluginDependency + 412.IBPluginDependency + 413.IBPluginDependency + 414.IBPluginDependency + 415.IBPluginDependency + 416.IBPluginDependency + 417.IBPluginDependency + 418.IBPluginDependency + 419.IBPluginDependency + 419.editorWindowContentRectSynchronizationRect + 420.IBPluginDependency + 421.IBPluginDependency + 421.editorWindowContentRectSynchronizationRect + 422.IBPluginDependency + 423.IBPluginDependency + 424.IBPluginDependency + 425.IBPluginDependency + 426.IBPluginDependency + 427.IBPluginDependency + 428.IBPluginDependency + 429.IBPluginDependency + 430.IBPluginDependency + 431.IBPluginDependency + 432.IBPluginDependency + 433.IBPluginDependency + 434.IBPluginDependency + 435.IBPluginDependency + 435.editorWindowContentRectSynchronizationRect + 436.IBPluginDependency + 437.IBPluginDependency + 438.IBPluginDependency + 439.IBPluginDependency + 440.IBPluginDependency + 440.editorWindowContentRectSynchronizationRect + 441.IBPluginDependency + 442.IBPluginDependency + 443.IBPluginDependency + 444.IBPluginDependency + 445.IBPluginDependency + 446.IBPluginDependency + 446.editorWindowContentRectSynchronizationRect + 447.IBPluginDependency + 448.IBPluginDependency + 449.IBPluginDependency + 449.editorWindowContentRectSynchronizationRect + 450.IBPluginDependency + 451.IBPluginDependency + 452.IBPluginDependency + 453.IBPluginDependency + 453.editorWindowContentRectSynchronizationRect + 454.IBPluginDependency + 455.IBPluginDependency + 456.IBPluginDependency + 457.IBPluginDependency + 458.IBEditorWindowLastContentRect + 458.IBPluginDependency + 458.editorWindowContentRectSynchronizationRect + 459.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 464.IBPluginDependency + 465.IBPluginDependency + 466.IBPluginDependency + 467.IBPluginDependency + 468.IBPluginDependency + 469.IBPluginDependency + 470.IBPluginDependency + 470.editorWindowContentRectSynchronizationRect + 471.IBPluginDependency + 471.editorWindowContentRectSynchronizationRect + 472.IBPluginDependency + 473.IBPluginDependency + 473.editorWindowContentRectSynchronizationRect + 474.IBPluginDependency + 475.IBPluginDependency + 476.IBPluginDependency + 476.editorWindowContentRectSynchronizationRect + 477.IBPluginDependency + 478.IBPluginDependency + + + YES + {{247, 233}, {480, 360}} + com.apple.InterfaceBuilder.CarbonPlugin + {{247, 233}, {480, 360}} + {{325, 394}, {480, 360}} + com.apple.InterfaceBuilder.CarbonPlugin + {{21, 803}, {507, 20}} + com.apple.InterfaceBuilder.CarbonPlugin + {{325, 836}, {478, 20}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{159, 779}, {199, 203}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{358, 919}, {146, 23}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{511, 593}, {181, 243}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{692, 573}, {275, 83}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{382, 719}, {241, 103}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{382, 719}, {167, 43}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{382, 719}, {188, 63}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{361, 909}, {197, 73}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{33, 620}, {245, 183}} + com.apple.InterfaceBuilder.CarbonPlugin + {{27, 799}, {245, 183}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{272, 916}, {64, 6}} + com.apple.InterfaceBuilder.CarbonPlugin + {{432, 959}, {216, 23}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{311, 939}, {234, 43}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + {{555, 793}, {176, 43}} + com.apple.InterfaceBuilder.CarbonPlugin + com.apple.InterfaceBuilder.CarbonPlugin + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 478 + + + 0 + + 3 + + diff --git a/SpotlightPlugins/InterfaceBuilder/TestData/XibCocoaTest.xib b/SpotlightPlugins/InterfaceBuilder/TestData/XibCocoaTest.xib new file mode 100644 index 0000000..e2119bc --- /dev/null +++ b/SpotlightPlugins/InterfaceBuilder/TestData/XibCocoaTest.xib @@ -0,0 +1,3075 @@ + + + + 1050 + 9E17 + 672 + 949.33 + 352.00 + + YES + + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + NSFontManager + + + AMainMenu + + YES + + + TestLocalizedString + + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + TestLocalizedString + + YES + + + About NewApplication + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + UHJlZmVyZW5jZXPigKY + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Services + + 2147483647 + + + submenuAction: + + Services + + YES + + _NSServicesMenu + + + + + YES + YES + + + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Quit NewApplication + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 2147483647 + + + submenuAction: + + File + + YES + + + New + n + 1048576 + 2147483647 + + + + + + T3BlbuKApg + o + 1048576 + 2147483647 + + + + + + Open Recent + + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + U2F2ZSBBc+KApg + S + 1179648 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + UHJpbnTigKY + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 2147483647 + + + submenuAction: + + Edit + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Delete + + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Find + + 2147483647 + + + submenuAction: + + Find + + YES + + + RmluZOKApg + f + 1048576 + 2147483647 + + + 1 + + + + 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 + + 2147483647 + + + submenuAction: + + Spelling and Grammar + + YES + + + U2hvdyBTcGVsbGluZ+KApg + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling While Typing + + 2147483647 + + + + + + Check Grammar With Spelling + + 2147483647 + + + + + + + + + Substitutions + + 2147483647 + + + submenuAction: + + Substitutions + + YES + + + Smart Copy/Paste + + 2147483647 + + + 1 + + + + Smart Quotes + + 2147483647 + + + 2 + + + + Smart Links + + 2147483647 + + + 3 + + + + + + + Speech + + 2147483647 + + + submenuAction: + + Speech + + YES + + + Start Speaking + + 2147483647 + + + + + + Stop Speaking + + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + YES + + + Font + + 2147483647 + + + submenuAction: + + Font + + YES + + + 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 + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligature + + 2147483647 + + + submenuAction: + + Ligature + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + YES + + + 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 + + YES + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 2147483647 + + + submenuAction: + + View + + YES + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Q3VzdG9taXplIFRvb2xiYXLigKY + + 2147483647 + + + + + + + + + Window + + 2147483647 + + + submenuAction: + + Window + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bring All to Front + + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 2147483647 + + + submenuAction: + + Help + + YES + + + NewApplication Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + 15 + 2 + {{196, 240}, {480, 270}} + 603979776 + Window + TestCustomClass + + {3.40282e+38, 3.40282e+38} + + + 256 + + YES + + + 268 + {{66, 214}, {96, 32}} + + YES + + 67239424 + 134217728 + Button + + LucidaGrande + 1.300000e+01 + 1044 + + + -2038284033 + 129 + + + 200 + 25 + + + + {480, 270} + + + {{0, 0}, {1920, 1178}} + {3.40282e+38, 3.40282e+38} + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + 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 + + + + showHelp: + + + + 360 + + + + saveDocument: + + + + 362 + + + + saveDocumentAs: + + + + 363 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 369 + + + + hideOtherApplications: + + + + 370 + + + + unhideAllApplications: + + + + 372 + + + + addFontTrait: + + + + 420 + + + + addFontTrait: + + + + 421 + + + + modifyFont: + + + + 422 + + + + orderFrontFontPanel: + + + + 423 + + + + modifyFont: + + + + 424 + + + + raiseBaseline: + + + + 425 + + + + lowerBaseline: + + + + 426 + + + + copyFont: + + + + 427 + + + + subscript: + + + + 428 + + + + superscript: + + + + 429 + + + + tightenKerning: + + + + 430 + + + + underline: + + + + 431 + + + + orderFrontColorPanel: + + + + 432 + + + + useAllLigatures: + + + + 433 + + + + loosenKerning: + + + + 434 + + + + pasteFont: + + + + 435 + + + + unscript: + + + + 436 + + + + useStandardKerning: + + + + 437 + + + + useStandardLigatures: + + + + 438 + + + + turnOffLigatures: + + + + 439 + + + + turnOffKerning: + + + + 440 + + + + alignLeft: + + + + 441 + + + + alignJustified: + + + + 442 + + + + copyRuler: + + + + 443 + + + + alignCenter: + + + + 444 + + + + toggleRuler: + + + + 445 + + + + alignRight: + + + + 446 + + + + pasteRuler: + + + + 447 + + + + terminate: + + + + 448 + + + + visible: testBinding + + + + + + visible: testBinding + visible + testBinding + 2 + + + 459 + + + + testAction: + + + + 462 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + + + Main Menu + + + 19 + + + YES + + + + + + 56 + + + YES + + + + + + 103 + + + YES + + + + + + 217 + + + YES + + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 75 + + + + + 80 + + + + + 78 + + + + + 72 + + + + + 82 + + + + + 124 + + + YES + + + + + + 77 + + + + + 73 + + + + + 79 + + + + + 112 + + + + + 74 + + + + + 125 + + + YES + + + + + + 126 + + + + + 205 + + + YES + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + YES + + + + + + 216 + + + YES + + + + + + 200 + + + YES + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + YES + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 106 + + + YES + + + + + + 111 + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + + + 144 + + + + + 129 + + + + + 143 + + + + + 236 + + + + + 131 + + + YES + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + YES + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + YES + + + + + + 296 + + + YES + + + + + + + 297 + + + + + 298 + + + + + 211 + + + YES + + + + + + 212 + + + YES + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + YES + + + + + + 349 + + + YES + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 367 + + + YES + + + + + + 368 + + + YES + + + + + + 373 + + + + + 375 + + + YES + + + + + + 376 + + + YES + + + + + + + 377 + + + YES + + + + + + 378 + + + YES + + + + + + 379 + + + YES + + + + + + + + + + + + + 380 + + + + + 381 + + + + + 382 + + + + + 383 + + + + + 384 + + + + + 385 + + + + + 386 + + + + + 387 + + + + + 388 + + + YES + + + + + + + + + + + + + + + + + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + 397 + + + YES + + + + + + 398 + + + YES + + + + + + 399 + + + YES + + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + 405 + + + YES + + + + + + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + 411 + + + YES + + + + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + YES + + + + + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 460 + + + YES + + + + + + 461 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBEditorWindowLastContentRect + 106.IBPluginDependency + 106.ImportedFromIB2 + 106.editorWindowContentRectSynchronizationRect + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBEditorWindowLastContentRect + 125.IBPluginDependency + 125.ImportedFromIB2 + 125.editorWindowContentRectSynchronizationRect + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBEditorWindowLastContentRect + 130.IBPluginDependency + 130.ImportedFromIB2 + 130.editorWindowContentRectSynchronizationRect + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 195.IBPluginDependency + 195.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 198.IBPluginDependency + 198.ImportedFromIB2 + 199.IBPluginDependency + 199.ImportedFromIB2 + 200.IBEditorWindowLastContentRect + 200.IBPluginDependency + 200.ImportedFromIB2 + 200.editorWindowContentRectSynchronizationRect + 201.IBPluginDependency + 201.ImportedFromIB2 + 202.IBPluginDependency + 202.ImportedFromIB2 + 203.IBPluginDependency + 203.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 205.IBEditorWindowLastContentRect + 205.IBPluginDependency + 205.ImportedFromIB2 + 205.editorWindowContentRectSynchronizationRect + 206.IBPluginDependency + 206.ImportedFromIB2 + 207.IBPluginDependency + 207.ImportedFromIB2 + 208.IBPluginDependency + 208.ImportedFromIB2 + 209.IBPluginDependency + 209.ImportedFromIB2 + 210.IBPluginDependency + 210.ImportedFromIB2 + 211.IBPluginDependency + 211.ImportedFromIB2 + 212.IBEditorWindowLastContentRect + 212.IBPluginDependency + 212.ImportedFromIB2 + 212.editorWindowContentRectSynchronizationRect + 213.IBPluginDependency + 213.ImportedFromIB2 + 214.IBPluginDependency + 214.ImportedFromIB2 + 215.IBPluginDependency + 215.ImportedFromIB2 + 216.IBPluginDependency + 216.ImportedFromIB2 + 217.IBPluginDependency + 217.ImportedFromIB2 + 218.IBPluginDependency + 218.ImportedFromIB2 + 219.IBPluginDependency + 219.ImportedFromIB2 + 220.IBEditorWindowLastContentRect + 220.IBPluginDependency + 220.ImportedFromIB2 + 220.editorWindowContentRectSynchronizationRect + 221.IBPluginDependency + 221.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 236.IBPluginDependency + 236.ImportedFromIB2 + 239.IBPluginDependency + 239.ImportedFromIB2 + 24.IBEditorWindowLastContentRect + 24.IBPluginDependency + 24.ImportedFromIB2 + 24.editorWindowContentRectSynchronizationRect + 29.IBEditorWindowLastContentRect + 29.IBPluginDependency + 29.ImportedFromIB2 + 29.WindowOrigin + 29.editorWindowContentRectSynchronizationRect + 295.IBPluginDependency + 296.IBEditorWindowLastContentRect + 296.IBPluginDependency + 296.editorWindowContentRectSynchronizationRect + 297.IBPluginDependency + 298.IBPluginDependency + 346.IBPluginDependency + 346.ImportedFromIB2 + 348.IBPluginDependency + 348.ImportedFromIB2 + 349.IBEditorWindowLastContentRect + 349.IBPluginDependency + 349.ImportedFromIB2 + 349.editorWindowContentRectSynchronizationRect + 350.IBPluginDependency + 350.ImportedFromIB2 + 351.IBPluginDependency + 351.ImportedFromIB2 + 354.IBPluginDependency + 354.ImportedFromIB2 + 367.IBEditorWindowLastContentRect + 367.IBPluginDependency + 367.IBWindowTemplateEditedContentRect + 367.NSWindowTemplate.visibleAtLaunch + 367.editorWindowContentRectSynchronizationRect + 368.IBPluginDependency + 375.IBPluginDependency + 376.IBPluginDependency + 377.IBPluginDependency + 378.IBPluginDependency + 379.IBPluginDependency + 380.IBPluginDependency + 381.IBPluginDependency + 382.IBPluginDependency + 383.IBPluginDependency + 384.IBPluginDependency + 385.IBPluginDependency + 386.IBPluginDependency + 387.IBPluginDependency + 388.IBPluginDependency + 389.IBPluginDependency + 390.IBPluginDependency + 391.IBPluginDependency + 392.IBPluginDependency + 393.IBPluginDependency + 394.IBPluginDependency + 395.IBPluginDependency + 396.IBPluginDependency + 397.IBPluginDependency + 398.IBPluginDependency + 399.IBPluginDependency + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 405.IBPluginDependency + 406.IBPluginDependency + 407.IBPluginDependency + 408.IBPluginDependency + 409.IBPluginDependency + 410.IBPluginDependency + 411.IBPluginDependency + 412.IBPluginDependency + 413.IBPluginDependency + 414.IBPluginDependency + 415.IBPluginDependency + 416.IBPluginDependency + 417.IBPluginDependency + 418.IBPluginDependency + 419.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBEditorWindowLastContentRect + 57.IBPluginDependency + 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBEditorWindowLastContentRect + 81.IBPluginDependency + 81.ImportedFromIB2 + 81.editorWindowContentRectSynchronizationRect + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{518, 723}, {216, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{596, 852}, {216, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{617, 609}, {132, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{522, 812}, {146, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{531, 606}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{436, 809}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{530, 483}, {275, 83}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {275, 83}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{287, 503}, {243, 243}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{197, 734}, {243, 243}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{530, 483}, {153, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {167, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{530, 483}, {241, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {241, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{447, 673}, {197, 73}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{525, 802}, {197, 73}} + {{101, 746}, {507, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {74, 862} + {{11, 977}, {478, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + {{397, 703}, {234, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + {{475, 832}, {234, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{530, 483}, {177, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{440, 714}, {177, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{490, 307}, {480, 270}} + com.apple.InterfaceBuilder.CocoaPlugin + {{490, 307}, {480, 270}} + + {{11, 666}, {480, 270}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{113, 563}, {245, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{23, 794}, {245, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{418, 469}, {199, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{323, 672}, {199, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 462 + + + + YES + + FirstResponder + NSObject + + testAction: + id + + + IBUserSource + + + + + + 0 + + 3 + + diff --git a/SpotlightPlugins/XcodeProject/English.lproj/InfoPlist.strings b/SpotlightPlugins/XcodeProject/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..7f81cad Binary files /dev/null and b/SpotlightPlugins/XcodeProject/English.lproj/InfoPlist.strings differ diff --git a/SpotlightPlugins/XcodeProject/GetMetadataForFile.m b/SpotlightPlugins/XcodeProject/GetMetadataForFile.m new file mode 100644 index 0000000..5bdab36 --- /dev/null +++ b/SpotlightPlugins/XcodeProject/GetMetadataForFile.m @@ -0,0 +1,85 @@ +// +// GetMetadataForFile.m +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +#import +static BOOL ImportProjectFile(NSMutableDictionary *attributes, + NSString *pathToFile) { + pathToFile = [pathToFile stringByAppendingPathComponent:@"project.pbxproj"]; + NSMutableSet *filenames = [[[NSMutableSet alloc] init] autorelease]; + NSMutableSet *comments = [[[NSMutableSet alloc] init] autorelease]; + BOOL wasGood = NO; + NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:pathToFile]; + if (dict) { + NSDictionary *objects = [dict objectForKey:@"objects"]; + if (objects) { + NSEnumerator *objEnumerator = [objects objectEnumerator]; + NSDictionary *object; + while ((object = [objEnumerator nextObject])) { + NSString *isaType = [object objectForKey:@"isa"]; + if ([isaType caseInsensitiveCompare:@"PBXFileReference"] == NSOrderedSame) { + NSString *path = [object objectForKey:@"path"]; + if (path) { + [filenames addObject:[path lastPathComponent]]; + } + } else if ([isaType caseInsensitiveCompare:@"PBXNativeTarget"] == NSOrderedSame) { + NSString *name = [object objectForKey:@"name"]; + if (name) { + [filenames addObject:name]; + } + name = [object objectForKey:@"productName"]; + if (name) { + [filenames addObject:name]; + } + } + NSString *comment = [object objectForKey:@"comments"]; + if (comment) { + [comments addObject:comment]; + } + } + } + } + if ([filenames count]) { + NSString *description = [[filenames allObjects] componentsJoinedByString:@"\n"]; + [attributes setObject:description forKey:(NSString*)kMDItemDescription]; + wasGood = YES; + } + if ([comments count]) { + NSString *comment = [[comments allObjects] componentsJoinedByString:@"\n"]; + [attributes setObject:comment forKey:(NSString*)kMDItemComment]; + wasGood = YES; + } + return wasGood; +} + +// Currently grabs all the filenames, target names, and product names +// and sticks them into kMDItemDescription. +// It also grabs all of the comments and sticks them into kMDItemComment. +Boolean GetMetadataForFile(void* interface, + CFMutableDictionaryRef cfAttributes, + CFStringRef contentTypeUTI, + CFStringRef cfPathToFile) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSMutableDictionary *attributes = (NSMutableDictionary*)cfAttributes; + NSString *pathToFile = (NSString*)cfPathToFile; + BOOL wasGood = NO; + if (UTTypeConformsTo(contentTypeUTI, CFSTR("com.apple.xcode.project"))) { + wasGood = ImportProjectFile(attributes, pathToFile); + } + [pool release]; + return wasGood == NO ? FALSE : TRUE; +} diff --git a/SpotlightPlugins/XcodeProject/Info.plist b/SpotlightPlugins/XcodeProject/Info.plist new file mode 100644 index 0000000..def1f7f --- /dev/null +++ b/SpotlightPlugins/XcodeProject/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeRole + MDImporter + LSItemContentTypes + + com.apple.xcode.project + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleName + ${PRODUCT_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.google.spotlightimporter.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleVersion + 1.0 + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + CFPlugInFactories + + 1CDB2B3C-CD6F-407D-9217-230E6DED8B00 + MetadataImporterPluginFactory + + CFPlugInTypes + + 8B08C4BF-415B-11D8-B3F9-0003936726FC + + 1CDB2B3C-CD6F-407D-9217-230E6DED8B00 + + + CFPlugInUnloadFunction + + + diff --git a/SpotlightPlugins/XcodeProject/PluginID.h b/SpotlightPlugins/XcodeProject/PluginID.h new file mode 100644 index 0000000..69c7a27 --- /dev/null +++ b/SpotlightPlugins/XcodeProject/PluginID.h @@ -0,0 +1,19 @@ +// +// PluginID.h +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +#define PLUGIN_ID "1CDB2B3C-CD6F-407D-9217-230E6DED8B00" diff --git a/SpotlightPlugins/XcodeProject/ReadMe.rtf b/SpotlightPlugins/XcodeProject/ReadMe.rtf new file mode 100644 index 0000000..bd2eb69 --- /dev/null +++ b/SpotlightPlugins/XcodeProject/ReadMe.rtf @@ -0,0 +1,31 @@ +{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural + +\f0\fs24 \cf0 XcodeProject Spotlight Plugin\ +\ +Copyright 2008 Google Inc.\ +\ +Licensed under the Apache License, Version 2.0 (the "License"); you may not\ +use this file except in compliance with the License. You may obtain a copy\ +of the License at\ +\ +http://www.apache.org/licenses/LICENSE-2.0\ + \ +Unless required by applicable law or agreed to in writing, software\ +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\ +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\ +License for the specific language governing permissions and limitations under\ +the License.\ +\ +-----------------------\ +\ +This is a spotlight importer for Xcode Projects. \ +Makes it easy for you to search xcode project for specific files they include\ +or text in the project comments.\ +\ +To install the spotlight plugin, please copy it into /Library/Spotlight or ~/Library/Spotlight.\ +\ +It is part of the Google Toolbox For Mac project\ +http://code.google.com/p/google-toolbox-for-mac/} \ No newline at end of file diff --git a/SpotlightPlugins/XcodeProject/TestData/test.xcodeproj/project.pbxproj b/SpotlightPlugins/XcodeProject/TestData/test.xcodeproj/project.pbxproj new file mode 100644 index 0000000..21f91d5 --- /dev/null +++ b/SpotlightPlugins/XcodeProject/TestData/test.xcodeproj/project.pbxproj @@ -0,0 +1,277 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; + 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* test_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = test_Prefix.pch; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = test.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* test.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* test */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + comments = "test comment"; + name = test; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* test_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + 1DDD58140DA1D0A300B32029 /* MainMenu.xib */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* test */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "test" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = test; + productInstallPath = "$(HOME)/Applications"; + productName = test; + productReference = 8D1107320486CEB800E47090 /* test.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "test" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* test */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* test */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 1DDD58150DA1D0A300B32029 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = test_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = test; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = test_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = test; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; + SDKROOT = macosx10.5; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = macosx10.5; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/SpotlightPlugins/XcodeProject/XcodeProject.xcodeproj/project.pbxproj b/SpotlightPlugins/XcodeProject/XcodeProject.xcodeproj/project.pbxproj new file mode 100644 index 0000000..920b6e3 --- /dev/null +++ b/SpotlightPlugins/XcodeProject/XcodeProject.xcodeproj/project.pbxproj @@ -0,0 +1,335 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXAggregateTarget section */ + 8BF157070E5BAC8600D28B05 /* RunAllUnitTests */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 8BF157100E5BACBF00D28B05 /* Build configuration list for PBXAggregateTarget "RunAllUnitTests" */; + buildPhases = ( + 8BF157060E5BAC8600D28B05 /* ShellScript */, + ); + dependencies = ( + 8BF1570B0E5BAC8C00D28B05 /* PBXTargetDependency */, + ); + name = RunAllUnitTests; + productName = RunAllUnitTests; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 2C05A19C06CAA52B00D84F6F /* GetMetadataForFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */; }; + 8B1D48820E59F52A000EB8CA /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 8B1D48810E59F52A000EB8CA /* main.c */; }; + 8B58F8700E5726D000A0E02E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B58F86F0E5726D000A0E02E /* Foundation.framework */; }; + 8BF155160E5B442A00D28B05 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BF155150E5B442A00D28B05 /* ApplicationServices.framework */; }; + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8BF1570A0E5BAC8C00D28B05 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8D57630D048677EA00EA77CD; + remoteInfo = XcodeProjectSpotlightPlugin; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GetMetadataForFile.m; sourceTree = ""; }; + 8B1D48810E59F52A000EB8CA /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + 8B1D48840E59F591000EB8CA /* PluginID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginID.h; sourceTree = ""; }; + 8B58F75A0E56502600A0E02E /* ReadMe.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = ReadMe.rtf; sourceTree = ""; }; + 8B58F86F0E5726D000A0E02E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = LoadableBundle.xcconfig; sourceTree = ""; }; + 8B58F9280E579A1300A0E02E /* DebugTigerOrLater.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugTigerOrLater.xcconfig; sourceTree = ""; }; + 8B58F92B0E579A1300A0E02E /* ReleaseTigerOrLater.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ReleaseTigerOrLater.xcconfig; sourceTree = ""; }; + 8BF155150E5B442A00D28B05 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; + 8D576316048677EA00EA77CD /* XcodeProject.mdimporter */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeProject.mdimporter; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D576313048677EA00EA77CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8B58F8700E5726D000A0E02E /* Foundation.framework in Frameworks */, + 8BF155160E5B442A00D28B05 /* ApplicationServices.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* XcodeProjectSpotlightPlugin */ = { + isa = PBXGroup; + children = ( + 8B58F75A0E56502600A0E02E /* ReadMe.rtf */, + 8B58F84D0E5697B500A0E02E /* XcodeConfig */, + 8B1D48800E59F52A000EB8CA /* Common */, + 08FB77AFFE84173DC02AAC07 /* Source */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + comments = "// Copyright 2008 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License. You may obtain a copy\n// of the License at\n// \n// http://www.apache.org/licenses/LICENSE-2.0\n// \n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n// License for the specific language governing permissions and limitations under\n// the License."; + name = XcodeProjectSpotlightPlugin; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 8BF155150E5B442A00D28B05 /* ApplicationServices.framework */, + 8B58F86F0E5726D000A0E02E /* Foundation.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D576317048677EA00EA77CD /* Info.plist */, + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77AFFE84173DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 2C05A19B06CAA52B00D84F6F /* GetMetadataForFile.m */, + 8B1D48840E59F591000EB8CA /* PluginID.h */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D576316048677EA00EA77CD /* XcodeProject.mdimporter */, + ); + name = Products; + sourceTree = ""; + }; + 8B1D48800E59F52A000EB8CA /* Common */ = { + isa = PBXGroup; + children = ( + 8B1D48810E59F52A000EB8CA /* main.c */, + ); + name = Common; + path = ../Common; + sourceTree = SOURCE_ROOT; + }; + 8B58F84D0E5697B500A0E02E /* XcodeConfig */ = { + isa = PBXGroup; + children = ( + 8B58F90F0E579A1300A0E02E /* Target */, + 8B58F9250E579A1300A0E02E /* Project */, + ); + name = XcodeConfig; + path = ../../XcodeConfig; + sourceTree = SOURCE_ROOT; + }; + 8B58F90F0E579A1300A0E02E /* Target */ = { + isa = PBXGroup; + children = ( + 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */, + ); + path = Target; + sourceTree = ""; + }; + 8B58F9250E579A1300A0E02E /* Project */ = { + isa = PBXGroup; + children = ( + 8B58F9280E579A1300A0E02E /* DebugTigerOrLater.xcconfig */, + 8B58F92B0E579A1300A0E02E /* ReleaseTigerOrLater.xcconfig */, + ); + path = Project; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D57630D048677EA00EA77CD /* XcodeProjectSpotlightPlugin */ = { + isa = PBXNativeTarget; + buildConfigurationList = 70138C840896BE9A00968C2F /* Build configuration list for PBXNativeTarget "XcodeProjectSpotlightPlugin" */; + buildPhases = ( + 8D57630F048677EA00EA77CD /* Resources */, + 8D576311048677EA00EA77CD /* Sources */, + 8D576313048677EA00EA77CD /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = XcodeProjectSpotlightPlugin; + productInstallPath = /Library/Spotlight; + productName = XcodeProjectSpotlightPlugin; + productReference = 8D576316048677EA00EA77CD /* XcodeProject.mdimporter */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 70138C880896BE9A00968C2F /* Build configuration list for PBXProject "XcodeProject" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 089C166AFE841209C02AAC07 /* XcodeProjectSpotlightPlugin */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8BF157070E5BAC8600D28B05 /* RunAllUnitTests */, + 8D57630D048677EA00EA77CD /* XcodeProjectSpotlightPlugin */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D57630F048677EA00EA77CD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 8BF157060E5BAC8600D28B05 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /usr/bin/python; + shellScript = "# test of xcodeproj importer\n\nimport os\nimport subprocess\n\ncmd = \"/usr/bin/mdimport -d 2 -g \" + os.environ[\"BUILT_PRODUCTS_DIR\"] + \"/XcodeProject.mdimporter \" + os.environ[\"SOURCE_ROOT\"] + \"/TestData/test.xcodeproj\"\nimporter_out = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE).stderr.read()\n\nif importer_out.find(\"kMDItemDescription = \\\"test_Prefix.pch\\\\nFoundation.framework\\\\nmain.m\\\\nInfo.plist\\\\nCoreData.framework\\\\nCocoa.framework\\\\ntest\\\\nAppKit.framework\\\\nMainMenu.xib\\\\nInfoPlist.strings\\\\ntest.app\\\";\") == -1:\n\tprint \"error: Bad Description for test.xcodeproj\"\n\texit(1)\nif importer_out.find(\"kMDItemComment = \\\"test comment\\\";\") == -1:\n\tprint \"error: Bad comment for test. xcodeproj\"\n\texit(1)"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D576311048677EA00EA77CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C05A19C06CAA52B00D84F6F /* GetMetadataForFile.m in Sources */, + 8B1D48820E59F52A000EB8CA /* main.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 8BF1570B0E5BAC8C00D28B05 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8D57630D048677EA00EA77CD /* XcodeProjectSpotlightPlugin */; + targetProxy = 8BF1570A0E5BAC8C00D28B05 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 70138C850896BE9A00968C2F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = XcodeProject; + WRAPPER_EXTENSION = mdimporter; + }; + name = Debug; + }; + 70138C860896BE9A00968C2F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F9110E579A1300A0E02E /* LoadableBundle.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info.plist; + PRODUCT_NAME = XcodeProject; + WRAPPER_EXTENSION = mdimporter; + }; + name = Release; + }; + 70138C890896BE9A00968C2F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F9280E579A1300A0E02E /* DebugTigerOrLater.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + 70138C8A0896BE9A00968C2F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8B58F92B0E579A1300A0E02E /* ReleaseTigerOrLater.xcconfig */; + buildSettings = { + }; + name = Release; + }; + 8BF157080E5BAC8600D28B05 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = RunAllUnitTests; + }; + name = Debug; + }; + 8BF157090E5BAC8600D28B05 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = RunAllUnitTests; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 70138C840896BE9A00968C2F /* Build configuration list for PBXNativeTarget "XcodeProjectSpotlightPlugin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70138C850896BE9A00968C2F /* Debug */, + 70138C860896BE9A00968C2F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 70138C880896BE9A00968C2F /* Build configuration list for PBXProject "XcodeProject" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70138C890896BE9A00968C2F /* Debug */, + 70138C8A0896BE9A00968C2F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8BF157100E5BACBF00D28B05 /* Build configuration list for PBXAggregateTarget "RunAllUnitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8BF157080E5BAC8600D28B05 /* Debug */, + 8BF157090E5BAC8600D28B05 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/XcodeConfig/subconfig/Debug.xcconfig b/XcodeConfig/subconfig/Debug.xcconfig index 482d451..a6290c3 100644 --- a/XcodeConfig/subconfig/Debug.xcconfig +++ b/XcodeConfig/subconfig/Debug.xcconfig @@ -35,6 +35,3 @@ OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 // Turns on special C++ STL checks to "encourage" good STL use GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS - -// Sets Debug info to DWARF -DEBUG_INFORMATION_FORMAT = dwarf -- cgit v1.2.3