From a523faf05a54113232954cb0fd1a72d9846e416f Mon Sep 17 00:00:00 2001
From: Prolospro <273481701@qq.com>
Date: Sun, 24 Apr 2016 11:13:51 +0800
Subject: [PATCH] fix for 7.2 above
---
.../ACCodeSnippetGitDataStoreTests.m | 0
.../ACCodeSnippetRepository Tests-Info.plist | 2 +-
.../ACCodeSnippetRepository Tests-Prefix.pch | 0
.../ACCodeSnippetSerializationTests.m | 0
.../ACGitRepositoryTests.m | 0
.../NSDictionary+MergeTests.m | 0
.../en.lproj/InfoPlist.strings | 0
.../project.pbxproj | 29 +++-
.../contents.xcworkspacedata | 0
.../ACCodeSnippetRepository-Info.plist | 14 +-
.../ACCodeSnippetRepository-Prefix.pch | 0
.../ACCodeSnippetRepositoryPlugin.h | 0
.../ACCodeSnippetRepositoryPlugin.m | 60 +++++---
.../Categories/NSDictionary+Merge.h | 0
.../Categories/NSDictionary+Merge.m | 0
.../Categories/NSString+Path.h | 0
.../Categories/NSString+Path.m | 0
.../Categories/NSTask+Extras.h | 0
.../Categories/NSTask+Extras.m | 0
.../Classes/ACGitRepository.h | 0
.../Classes/ACGitRepository.m | 0
.../ACCodeSnippetDataStoreProtocol.h | 0
.../DataStores/ACCodeSnippetGitDataStore.h | 0
.../DataStores/ACCodeSnippetGitDataStore.m | 2 +-
.../ACCodeSnippetSerialization.h | 0
.../ACCodeSnippetSerialization.m | 0
...tRepositoryConfigurationWindowController.h | 0
...tRepositoryConfigurationWindowController.m | 0
...epositoryConfigurationWindowController.xib | 0
ACCodeSnippetRepository/IDE/Headers/IDE.h | 0
.../IDE/Headers/IDECodeSnippet.h | 0
.../IDE/Headers/IDECodeSnippetLibrary.h | 0
.../IDE/Headers/IDECodeSnippetRepository.h | 0
.../IDECodeSnippetRepositorySwizzler.h | 0
.../IDECodeSnippetRepositorySwizzler.m | 0
.../IDE/Swizzle/Swizzler.h | 0
.../IDE/Swizzle/Swizzler.m | 0
ACCodeSnippetRepository/IDE/classdump.txt | 0
.../Images/GitHub-Mark-120px-plus.png | Bin
.../Resources/Images/GitHub-Mark-32px.png | Bin
.../Resources/Images/GitHub-Mark-64px.png | Bin
.../en.lproj/InfoPlist.strings | 0
Documentation/architecture.jpg | Bin
...hineseOahu_EN_00317_2040x1360-small-12.jpg | Bin
...yChineseOahu_EN_02016_981x654-small-14.jpg | Bin
...hineseOahu_EN_02390_2880x1921-small-10.jpg | Bin
.../architecture.key/Data/mt10@2x-92.jpg | Bin
.../architecture.key/Data/mt1@2x-83.jpg | Bin
.../architecture.key/Data/mt2@2x-84.jpg | Bin
.../architecture.key/Data/mt3@2x-85.jpg | Bin
.../architecture.key/Data/mt4@2x-86.jpg | Bin
.../architecture.key/Data/mt5@2x-87.jpg | Bin
.../architecture.key/Data/mt6@2x-88.jpg | Bin
.../architecture.key/Data/mt7@2x-89.jpg | Bin
.../architecture.key/Data/mt8@2x-90.jpg | Bin
.../architecture.key/Data/mt9@2x-91.jpg | Bin
.../architecture.key/Data/st0-332.jpg | Bin
Documentation/architecture.key/Index.zip | Bin
.../Metadata/BuildVersionHistory.plist | 0
.../Metadata/DocumentIdentifier | 0
.../Metadata/Properties.plist | Bin
.../architecture.key/preview-micro.jpg | Bin
.../architecture.key/preview-web.jpg | Bin
Documentation/architecture.key/preview.jpg | Bin
LICENSE | 0
README.md | 140 +++++-------------
Screenshots/screenshot01.png | Bin
Screenshots/screenshot02.png | Bin
Screenshots/screenshot03.png | Bin
Screenshots/screenshot04.png | Bin
70 files changed, 111 insertions(+), 136 deletions(-)
mode change 100644 => 100755 ACCodeSnippetRepository Tests/ACCodeSnippetGitDataStoreTests.m
mode change 100644 => 100755 ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Info.plist
mode change 100644 => 100755 ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Prefix.pch
mode change 100644 => 100755 ACCodeSnippetRepository Tests/ACCodeSnippetSerializationTests.m
mode change 100644 => 100755 ACCodeSnippetRepository Tests/ACGitRepositoryTests.m
mode change 100644 => 100755 ACCodeSnippetRepository Tests/NSDictionary+MergeTests.m
mode change 100644 => 100755 ACCodeSnippetRepository Tests/en.lproj/InfoPlist.strings
mode change 100644 => 100755 ACCodeSnippetRepository.xcodeproj/project.pbxproj
mode change 100644 => 100755 ACCodeSnippetRepository.xcodeproj/project.xcworkspace/contents.xcworkspacedata
mode change 100644 => 100755 ACCodeSnippetRepository/ACCodeSnippetRepository-Info.plist
mode change 100644 => 100755 ACCodeSnippetRepository/ACCodeSnippetRepository-Prefix.pch
mode change 100644 => 100755 ACCodeSnippetRepository/ACCodeSnippetRepositoryPlugin.h
mode change 100644 => 100755 ACCodeSnippetRepository/ACCodeSnippetRepositoryPlugin.m
mode change 100644 => 100755 ACCodeSnippetRepository/Categories/NSDictionary+Merge.h
mode change 100644 => 100755 ACCodeSnippetRepository/Categories/NSDictionary+Merge.m
mode change 100644 => 100755 ACCodeSnippetRepository/Categories/NSString+Path.h
mode change 100644 => 100755 ACCodeSnippetRepository/Categories/NSString+Path.m
mode change 100644 => 100755 ACCodeSnippetRepository/Categories/NSTask+Extras.h
mode change 100644 => 100755 ACCodeSnippetRepository/Categories/NSTask+Extras.m
mode change 100644 => 100755 ACCodeSnippetRepository/Classes/ACGitRepository.h
mode change 100644 => 100755 ACCodeSnippetRepository/Classes/ACGitRepository.m
mode change 100644 => 100755 ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetDataStoreProtocol.h
mode change 100644 => 100755 ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetGitDataStore.h
mode change 100644 => 100755 ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetGitDataStore.m
mode change 100644 => 100755 ACCodeSnippetRepository/Classes/Serialization/ACCodeSnippetSerialization.h
mode change 100644 => 100755 ACCodeSnippetRepository/Classes/Serialization/ACCodeSnippetSerialization.m
mode change 100644 => 100755 ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.h
mode change 100644 => 100755 ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.m
mode change 100644 => 100755 ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.xib
mode change 100644 => 100755 ACCodeSnippetRepository/IDE/Headers/IDE.h
mode change 100644 => 100755 ACCodeSnippetRepository/IDE/Headers/IDECodeSnippet.h
mode change 100644 => 100755 ACCodeSnippetRepository/IDE/Headers/IDECodeSnippetLibrary.h
mode change 100644 => 100755 ACCodeSnippetRepository/IDE/Headers/IDECodeSnippetRepository.h
mode change 100644 => 100755 ACCodeSnippetRepository/IDE/Swizzle/IDECodeSnippetRepositorySwizzler.h
mode change 100644 => 100755 ACCodeSnippetRepository/IDE/Swizzle/IDECodeSnippetRepositorySwizzler.m
mode change 100644 => 100755 ACCodeSnippetRepository/IDE/Swizzle/Swizzler.h
mode change 100644 => 100755 ACCodeSnippetRepository/IDE/Swizzle/Swizzler.m
mode change 100644 => 100755 ACCodeSnippetRepository/IDE/classdump.txt
mode change 100644 => 100755 ACCodeSnippetRepository/Resources/Images/GitHub-Mark-120px-plus.png
mode change 100644 => 100755 ACCodeSnippetRepository/Resources/Images/GitHub-Mark-32px.png
mode change 100644 => 100755 ACCodeSnippetRepository/Resources/Images/GitHub-Mark-64px.png
mode change 100644 => 100755 ACCodeSnippetRepository/en.lproj/InfoPlist.strings
mode change 100644 => 100755 Documentation/architecture.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt10@2x-92.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt1@2x-83.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt2@2x-84.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt3@2x-85.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt4@2x-86.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt5@2x-87.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt6@2x-88.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt7@2x-89.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt8@2x-90.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/mt9@2x-91.jpg
mode change 100644 => 100755 Documentation/architecture.key/Data/st0-332.jpg
mode change 100644 => 100755 Documentation/architecture.key/Index.zip
mode change 100644 => 100755 Documentation/architecture.key/Metadata/BuildVersionHistory.plist
mode change 100644 => 100755 Documentation/architecture.key/Metadata/DocumentIdentifier
mode change 100644 => 100755 Documentation/architecture.key/Metadata/Properties.plist
mode change 100644 => 100755 Documentation/architecture.key/preview-micro.jpg
mode change 100644 => 100755 Documentation/architecture.key/preview-web.jpg
mode change 100644 => 100755 Documentation/architecture.key/preview.jpg
mode change 100644 => 100755 LICENSE
mode change 100644 => 100755 README.md
mode change 100644 => 100755 Screenshots/screenshot01.png
mode change 100644 => 100755 Screenshots/screenshot02.png
mode change 100644 => 100755 Screenshots/screenshot03.png
mode change 100644 => 100755 Screenshots/screenshot04.png
diff --git a/ACCodeSnippetRepository Tests/ACCodeSnippetGitDataStoreTests.m b/ACCodeSnippetRepository Tests/ACCodeSnippetGitDataStoreTests.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Info.plist b/ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Info.plist
old mode 100644
new mode 100755
index 17c7d4b..169b6f7
--- a/ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Info.plist
+++ b/ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Info.plist
@@ -7,7 +7,7 @@
CFBundleExecutable
${EXECUTABLE_NAME}
CFBundleIdentifier
- com.acoomans.${PRODUCT_NAME:rfc1034identifier}
+ $(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
diff --git a/ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Prefix.pch b/ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Prefix.pch
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository Tests/ACCodeSnippetSerializationTests.m b/ACCodeSnippetRepository Tests/ACCodeSnippetSerializationTests.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository Tests/ACGitRepositoryTests.m b/ACCodeSnippetRepository Tests/ACGitRepositoryTests.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository Tests/NSDictionary+MergeTests.m b/ACCodeSnippetRepository Tests/NSDictionary+MergeTests.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository Tests/en.lproj/InfoPlist.strings b/ACCodeSnippetRepository Tests/en.lproj/InfoPlist.strings
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository.xcodeproj/project.pbxproj b/ACCodeSnippetRepository.xcodeproj/project.pbxproj
old mode 100644
new mode 100755
index b052723..7176be0
--- a/ACCodeSnippetRepository.xcodeproj/project.pbxproj
+++ b/ACCodeSnippetRepository.xcodeproj/project.pbxproj
@@ -319,7 +319,7 @@
name = "ACCodeSnippetRepository Tests";
productName = "ACCodeSnippetRepository Tests";
productReference = 5154068318AC4B500065CA33 /* ACCodeSnippetRepository Tests.octest */;
- productType = "com.apple.product-type.bundle";
+ productType = "com.apple.product-type.bundle.ocunit-test";
};
518E699E18AC4A8900C57456 /* ACCodeSnippetRepository */ = {
isa = PBXNativeTarget;
@@ -328,6 +328,7 @@
518E699B18AC4A8900C57456 /* Sources */,
518E699C18AC4A8900C57456 /* Frameworks */,
518E699D18AC4A8900C57456 /* Resources */,
+ 11AE833A1CAABCC800EA6FB6 /* ShellScript */,
);
buildRules = (
);
@@ -344,7 +345,8 @@
518E699718AC4A8900C57456 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0500;
+ LastTestingUpgradeCheck = 0720;
+ LastUpgradeCheck = 0720;
ORGANIZATIONNAME = "Arnaud Coomans";
TargetAttributes = {
5154068218AC4B500065CA33 = {
@@ -393,6 +395,22 @@
};
/* End PBXResourcesBuildPhase section */
+/* Begin PBXShellScriptBuildPhase section */
+ 11AE833A1CAABCC800EA6FB6 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 12;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "#!/bin/bash\n\n\n\n\nPLISTBUDDY=\"/usr/libexec/PlistBuddy\"\n\n\n\n\n#Get current Xcode DVTPlugInCompatibilityUUID\n\nUUID=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID)\n\necho Xcode DVTPlugInCompatibilityUUID is $UUID\n\n\n\n\n#Traversal all plugins, and update UUID\n\nfor MyPlugin in ~/Library/Application\\ Support/Developer/Shared/Xcode/Plug-ins/ACCodeSnippetRepository.xcplugin/*\n \n do\n \n $PLISTBUDDY -c \"Add :DVTPlugInCompatibilityUUIDs: string $UUID\" \"$MyPlugin\"/Info.plist\n \n echo write DVTPlugInCompatibilityUUID to $MyPlugin succeed!\n \n done";
+ };
+/* End PBXShellScriptBuildPhase section */
+
/* Begin PBXSourcesBuildPhase section */
5154067F18AC4B500065CA33 /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -463,6 +481,7 @@
5154069118AC4B500065CA33 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
"$(inherited)",
@@ -474,6 +493,7 @@
"$(inherited)",
);
INFOPLIST_FILE = "ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Info.plist";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.acoomans.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
};
@@ -482,6 +502,7 @@
5154069218AC4B500065CA33 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
"$(inherited)",
@@ -489,6 +510,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Prefix.pch";
INFOPLIST_FILE = "ACCodeSnippetRepository Tests/ACCodeSnippetRepository Tests-Info.plist";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.acoomans.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
};
@@ -510,6 +532,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
+ ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -573,6 +596,7 @@
INFOPLIST_FILE = "ACCodeSnippetRepository/ACCodeSnippetRepository-Info.plist";
INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins";
OTHER_LDFLAGS = "";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.acoomans.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = xcplugin;
};
@@ -589,6 +613,7 @@
INFOPLIST_FILE = "ACCodeSnippetRepository/ACCodeSnippetRepository-Info.plist";
INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins";
OTHER_LDFLAGS = "";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.acoomans.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = xcplugin;
};
diff --git a/ACCodeSnippetRepository.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ACCodeSnippetRepository.xcodeproj/project.xcworkspace/contents.xcworkspacedata
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/ACCodeSnippetRepository-Info.plist b/ACCodeSnippetRepository/ACCodeSnippetRepository-Info.plist
old mode 100644
new mode 100755
index ee568a4..85e998e
--- a/ACCodeSnippetRepository/ACCodeSnippetRepository-Info.plist
+++ b/ACCodeSnippetRepository/ACCodeSnippetRepository-Info.plist
@@ -9,7 +9,7 @@
CFBundleIconFile
CFBundleIdentifier
- com.acoomans.${PRODUCT_NAME:rfc1034identifier}
+ $(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
@@ -22,18 +22,10 @@
????
CFBundleVersion
1
- DVTPlugInCompatibilityUUIDs
-
- 640F884E-CE55-4B40-87C0-8869546CAB7A
- C4A681B0-4A26-480E-93EC-1218098B9AA0
- 37B30044-3B14-46BA-ABAA-F01000C27B63
- A2E4D43F-41F4-4FB9-BB94-7177011C9AED
- FEC992CC-CA4A-4CFD-8881-77300FCB848A
- A16FF353-8441-459E-A50C-B071F53F51B7
- 9F75337B-21B4-4ADC-B558-F9CADF7073A7
-
NSPrincipalClass
ACCodeSnippetRepositoryPlugin
+ DVTPlugInCompatibilityUUIDs
+
XC4Compatible
XCGCReady
diff --git a/ACCodeSnippetRepository/ACCodeSnippetRepository-Prefix.pch b/ACCodeSnippetRepository/ACCodeSnippetRepository-Prefix.pch
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/ACCodeSnippetRepositoryPlugin.h b/ACCodeSnippetRepository/ACCodeSnippetRepositoryPlugin.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/ACCodeSnippetRepositoryPlugin.m b/ACCodeSnippetRepository/ACCodeSnippetRepositoryPlugin.m
old mode 100644
new mode 100755
index 80b1b44..ac74d8f
--- a/ACCodeSnippetRepository/ACCodeSnippetRepositoryPlugin.m
+++ b/ACCodeSnippetRepository/ACCodeSnippetRepositoryPlugin.m
@@ -14,7 +14,7 @@
static ACCodeSnippetRepositoryPlugin *sharedPlugin;
-static NSString * const pluginMenuTitle = @"Plug-ins";
+static NSString * const pluginMenuTitle = @"Source Control";
@interface ACCodeSnippetRepositoryPlugin()
@property (nonatomic, strong) NSBundle *bundle;
@@ -34,12 +34,21 @@ + (void)pluginDidLoad:(NSBundle *)plugin {
}
}
+
+
- (id)initWithBundle:(NSBundle *)plugin {
if (self = [super init]) {
// reference to plugin's bundle, for resource acccess
self.bundle = plugin;
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(didApplicationFinishLaunchingNotification:)
+ name:NSApplicationDidFinishLaunchingNotification
+ object:nil];
+
+
// add data stores to Xcode's snippet repository
ACCodeSnippetGitDataStore *gitDataStore = [[ACCodeSnippetGitDataStore alloc] init];
[gitDataStore addObserver:self forKeyPath:@"mainQueue.operationCount" options:0 context:NULL];
@@ -58,29 +67,44 @@ - (id)initWithBundle:(NSBundle *)plugin {
[self startTimer];
}
+
+ }
+ return self;
+}
+- (void)didApplicationFinishLaunchingNotification:(NSNotification*)noti
+{
+ //removeObserver
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:NSApplicationDidFinishLaunchingNotification object:nil];
+
// Create menu items, initialize UI, etc.
- NSMenu *pluginMenu = [self pluginMenu];
- pluginMenu.autoenablesItems = NO;
+ // Sample Menu Item:
+ // Create menu items, initialize UI, etc.
+ NSMenuItem *menuItem = [[NSApp mainMenu] itemWithTitle:@"Source Control"];
+ if (menuItem) {
+ [[menuItem submenu] addItem:[NSMenuItem separatorItem]];
+ NSMenuItem *actionMenuItem = nil;
- if (pluginMenu) {
-
- NSMenuItem *actionMenuItem = nil;
-
- self.updateMenuItem = actionMenuItem = [[NSMenuItem alloc] initWithTitle:@"Update snippets" action:@selector(updateAction:) keyEquivalent:@""];
- actionMenuItem.target = self;
- [pluginMenu addItem:actionMenuItem];
-
- actionMenuItem = [[NSMenuItem alloc] initWithTitle:@"Configure snippets repository" action:@selector(configureAction:) keyEquivalent:@""];
- actionMenuItem.target = self;
- [pluginMenu addItem:actionMenuItem];
-
- //[pluginMenu addItem:[NSMenuItem separatorItem]];
- }
+ self.updateMenuItem = actionMenuItem = [[NSMenuItem alloc] initWithTitle:@"Update snippets" action:@selector(updateAction:) keyEquivalent:@""];
+ [actionMenuItem setTarget:self];
+ [[menuItem submenu] addItem:actionMenuItem];
+ actionMenuItem = [[NSMenuItem alloc] initWithTitle:@"Configure snippets repository" action:@selector(configureAction:) keyEquivalent:@""];
+ [actionMenuItem setTarget:self];
+ [[menuItem submenu] addItem:actionMenuItem];
}
- return self;
+
}
+
+ // Sample Action, for menu item:
+- (void)doMenuAction
+{
+ NSAlert *alert = [[NSAlert alloc] init];
+ [alert setMessageText:@"Hello, World"];
+ [alert runModal];
+}
+
+
- (id)init {
return [self initWithBundle:nil];
}
diff --git a/ACCodeSnippetRepository/Categories/NSDictionary+Merge.h b/ACCodeSnippetRepository/Categories/NSDictionary+Merge.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Categories/NSDictionary+Merge.m b/ACCodeSnippetRepository/Categories/NSDictionary+Merge.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Categories/NSString+Path.h b/ACCodeSnippetRepository/Categories/NSString+Path.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Categories/NSString+Path.m b/ACCodeSnippetRepository/Categories/NSString+Path.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Categories/NSTask+Extras.h b/ACCodeSnippetRepository/Categories/NSTask+Extras.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Categories/NSTask+Extras.m b/ACCodeSnippetRepository/Categories/NSTask+Extras.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Classes/ACGitRepository.h b/ACCodeSnippetRepository/Classes/ACGitRepository.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Classes/ACGitRepository.m b/ACCodeSnippetRepository/Classes/ACGitRepository.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetDataStoreProtocol.h b/ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetDataStoreProtocol.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetGitDataStore.h b/ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetGitDataStore.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetGitDataStore.m b/ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetGitDataStore.m
old mode 100644
new mode 100755
index 588b553..23d20b0
--- a/ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetGitDataStore.m
+++ b/ACCodeSnippetRepository/Classes/DataStores/ACCodeSnippetGitDataStore.m
@@ -323,7 +323,7 @@ - (NSString*)pathForSnippetDirectory {
}
- (NSString*)localRepositoryPath {
- return [NSString pathWithComponents:@[self.pathForSnippetDirectory, @"git"]];
+ return [self pathForSnippetDirectory];
}
- (BOOL)isSnippetFileAtPath:(NSString*)path {
diff --git a/ACCodeSnippetRepository/Classes/Serialization/ACCodeSnippetSerialization.h b/ACCodeSnippetRepository/Classes/Serialization/ACCodeSnippetSerialization.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Classes/Serialization/ACCodeSnippetSerialization.m b/ACCodeSnippetRepository/Classes/Serialization/ACCodeSnippetSerialization.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.h b/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.m b/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.xib b/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.xib
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/IDE/Headers/IDE.h b/ACCodeSnippetRepository/IDE/Headers/IDE.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/IDE/Headers/IDECodeSnippet.h b/ACCodeSnippetRepository/IDE/Headers/IDECodeSnippet.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/IDE/Headers/IDECodeSnippetLibrary.h b/ACCodeSnippetRepository/IDE/Headers/IDECodeSnippetLibrary.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/IDE/Headers/IDECodeSnippetRepository.h b/ACCodeSnippetRepository/IDE/Headers/IDECodeSnippetRepository.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/IDE/Swizzle/IDECodeSnippetRepositorySwizzler.h b/ACCodeSnippetRepository/IDE/Swizzle/IDECodeSnippetRepositorySwizzler.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/IDE/Swizzle/IDECodeSnippetRepositorySwizzler.m b/ACCodeSnippetRepository/IDE/Swizzle/IDECodeSnippetRepositorySwizzler.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/IDE/Swizzle/Swizzler.h b/ACCodeSnippetRepository/IDE/Swizzle/Swizzler.h
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/IDE/Swizzle/Swizzler.m b/ACCodeSnippetRepository/IDE/Swizzle/Swizzler.m
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/IDE/classdump.txt b/ACCodeSnippetRepository/IDE/classdump.txt
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Resources/Images/GitHub-Mark-120px-plus.png b/ACCodeSnippetRepository/Resources/Images/GitHub-Mark-120px-plus.png
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Resources/Images/GitHub-Mark-32px.png b/ACCodeSnippetRepository/Resources/Images/GitHub-Mark-32px.png
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/Resources/Images/GitHub-Mark-64px.png b/ACCodeSnippetRepository/Resources/Images/GitHub-Mark-64px.png
old mode 100644
new mode 100755
diff --git a/ACCodeSnippetRepository/en.lproj/InfoPlist.strings b/ACCodeSnippetRepository/en.lproj/InfoPlist.strings
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.jpg b/Documentation/architecture.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg b/Documentation/architecture.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg b/Documentation/architecture.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg b/Documentation/architecture.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt10@2x-92.jpg b/Documentation/architecture.key/Data/mt10@2x-92.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt1@2x-83.jpg b/Documentation/architecture.key/Data/mt1@2x-83.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt2@2x-84.jpg b/Documentation/architecture.key/Data/mt2@2x-84.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt3@2x-85.jpg b/Documentation/architecture.key/Data/mt3@2x-85.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt4@2x-86.jpg b/Documentation/architecture.key/Data/mt4@2x-86.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt5@2x-87.jpg b/Documentation/architecture.key/Data/mt5@2x-87.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt6@2x-88.jpg b/Documentation/architecture.key/Data/mt6@2x-88.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt7@2x-89.jpg b/Documentation/architecture.key/Data/mt7@2x-89.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt8@2x-90.jpg b/Documentation/architecture.key/Data/mt8@2x-90.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/mt9@2x-91.jpg b/Documentation/architecture.key/Data/mt9@2x-91.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Data/st0-332.jpg b/Documentation/architecture.key/Data/st0-332.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Index.zip b/Documentation/architecture.key/Index.zip
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Metadata/BuildVersionHistory.plist b/Documentation/architecture.key/Metadata/BuildVersionHistory.plist
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Metadata/DocumentIdentifier b/Documentation/architecture.key/Metadata/DocumentIdentifier
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/Metadata/Properties.plist b/Documentation/architecture.key/Metadata/Properties.plist
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/preview-micro.jpg b/Documentation/architecture.key/preview-micro.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/preview-web.jpg b/Documentation/architecture.key/preview-web.jpg
old mode 100644
new mode 100755
diff --git a/Documentation/architecture.key/preview.jpg b/Documentation/architecture.key/preview.jpg
old mode 100644
new mode 100755
diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index b86219b..e03b6c6
--- a/README.md
+++ b/README.md
@@ -1,106 +1,40 @@
-# ACCodeSnippetRepositoryPlugin
-
-ACCodeSnippetRepositoryPlugin is a Xcode plugin for seemless synchronization of snippets with a git repository.
-
-The snippets are synchronized as human-readable text (and not an obscure _.codesnippet_ plist).
+# ACCodeSnippetRepositoryPlugin_Fixed
[](https://api.travis-ci.org/acoomans/ACCodeSnippetRepositoryPlugin.png)
-If you want to know more about snippets in Xcode, I recommend reading [Xcode Snippets on NSHipster](http://nshipster.com/xcode-snippets/).
-
-Want to try the plugin with an existing public repository? Try [acoomans](https://github.com/acoomans/xcode-snippets) or [mattt](https://github.com/mattt/Xcode-Snippets.git)'s snippets.
-
-
-## Install
-
-1. Build the project to install the plugin. The plugin is installed in `/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ACCodeSnippetRepository.xcplugin`.
-
-2. Restart Xcode for the plugin to be activated.
-
-Alternatively, install through [Alcatraz](https://github.com/supermarin/Alcatraz) plugin manager.
-
-
-## Configuration
-
-There should be a `Plug-ins` item in the xcode menu:
-
-
-
-First configure the plugin by forking a remote repository:
-
-
-
-When you fork, all snippets from the repository (with the right format, see below _Format_) will be imported in Xcode. Your existing snippets, that do not belong to any repository yet, will not be affected.
-
-After forking, you will given the choice to import (user) snippets from Xcode to the repository.
-
-Also, you can remove the system snippets if you don't use them.
-
-In case of any problem (see below, _Bugs and limitations_), you can go to the user snippets folder and backup your user snippets. Note that user snippets are automatically backed up before any fork.
-
-
-## Usage
-
-Use snippets like you always do in Xcode. Snippets are automatically added/edited/removed and pushed to the git repository.
-
-
-
-### Format
-
-The snippets are text files with a _.m_ file extension, in the following format:
-
-* a header, containing:
- * the title
- * description
- * various Xcode-related information in a _Key: Value_ format (keys ordered alphabetically)
-* the code
-
-If your snippet does not contain any header, the header will be added, committed and pushed when imported.
-
-**Note**: do not remove the Xcode-related information as they are needed for synchronization.
-
-**Note**: if you manually create a snippet by copying an existing one, change or remove the _IDECodeSnippetIdentifier_ as Xcode does not like having two snippets with the same identifier (will crash).
-
-
-
-### Synchronization
-
-Every change in a snippet is commited and pushed independently.
-
-Snippets are synchronized (pulled) with the remote repository is done every 10 minutes (if the option is enabled) or when the `Update snippets` item was chosen in the menu.
-
-In case of conflict during the merge, the remote repository has priority.
-
-
-## Bugs and limitations
-
-Probably a lot.
-
-Backup your snippets and your git repository. Expect bugs, crashes, synchronization issues, data and hair loss.
-
-
-## Contributing
-
-### Architecture
-
-First a quick word on the architecture:
-
-The plugin does some swizzling with the _IDECodeSnippetRepository_ class from _IDECodeSnippetLibrary.ideplugin_ (_/Applications/Xcode.app/Contents/PlugIns/IDECodeSnippetLibrary.ideplugin_).
-
-_IDECodeSnippetRepository_ is modified so to make it possible to attach data stores (_ACCodeSnippetDataStoreProtocol_).
-
-Here's a colourful schematic to make you even more confused:
-
-
-
-### Pull requests
-
-If you want to contribute, send me a pull request.
-
-### Improvements
-
-Ideas of improvements:
-
-- synchronize _.codesnippet_ plists
-- multiple data stores (in progress but need to be careful when synchronizing)
-- github's gist support
+ This is a fixed edition for ACCodeSnippetRepositoryPlugin for support Xcode 7.2 and above.
+
+
+## 1.Fix issues:
+
+ 1. Fix MenuItems (I move the menuItems to 'Source Control' menu from 'Plugins' to avoid plugin conflicts);
+
+ 2. Fix Snippets Path (Because Xcode 7.2 no longer recognize snippets in subfolders,
+ and I change the path to ../CodeSnippets/ ).
+
+### 2.ReactiveCocoa and PromiseKit codesnippets from myself:
+
+ * [ReactiveCocoa][ADCodeSnippet]
+
+### 3.Follows the [acoomans][acoomans]'s guide, and noticing my fix issues above.
+
+ * [ACCodeSnippetRepositoryPlugin][ACCodeSnippetRepositoryPlugin]
+
+
+### 4.Thanks to
+
+ * [Xcode-Plugin-Template][Xcode-Plugin-Template]
+
+ * [UpdateXcodePluginsUUID][updateXcodePluginsUUID]
+
+
+ 
+
+
+[acoomans]: https://github.com/acoomans/ "Title"
+[ACCodeSnippetRepositoryPlugin]: https://github.com/acoomans/ACCodeSnippetRepositoryPlugin/ "Title"
+[Xcode-Plugin-Template]: https://github.com/kattrali/Xcode-Plugin-Template/ "Title"
+[updateXcodePluginsUUID]: https://github.com/homtang/updateXcodePluginsUUID/ "Title"
+[ADCodeSnippet]: https://github.com/ForrestAlfred/ADCodeSnippet/ "Title"
+
+
diff --git a/Screenshots/screenshot01.png b/Screenshots/screenshot01.png
old mode 100644
new mode 100755
diff --git a/Screenshots/screenshot02.png b/Screenshots/screenshot02.png
old mode 100644
new mode 100755
diff --git a/Screenshots/screenshot03.png b/Screenshots/screenshot03.png
old mode 100644
new mode 100755
diff --git a/Screenshots/screenshot04.png b/Screenshots/screenshot04.png
old mode 100644
new mode 100755