├── EasyCode
├── Resource
│ ├── add.png
│ ├── edit.png
│ ├── btnbg.png
│ ├── btnbg2.png
│ ├── mainbg.png
│ ├── remove.png
│ ├── btnbg2@2x.png
│ ├── btnbg@2x.png
│ ├── btnguide.png
│ ├── mainbg@2x.png
│ └── btnguide@2x.png
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ ├── Artboard-16.png
│ │ ├── Artboard-32.png
│ │ ├── Artboard-33.png
│ │ ├── Artboard-64.png
│ │ ├── Artboard-1024.png
│ │ ├── Artboard-128.png
│ │ ├── Artboard-129.png
│ │ ├── Artboard-256.png
│ │ ├── Artboard-512.png
│ │ ├── Artboard-513.png
│ │ └── Contents.json
├── MappingEditor
│ ├── CustomButton.h
│ ├── EShortcutEntry.m
│ ├── EEditorTableView.h
│ ├── EEditorTableView.m
│ ├── EVerticalScrollView.h
│ ├── CustomButton.m
│ ├── EShortcutEntry.h
│ ├── EVerticalScrollView.m
│ ├── EditorWindowController.h
│ ├── DetailEditorController
│ │ ├── DetailWindowController.h
│ │ ├── DetailWindowController.m
│ │ └── DetailWindowController.xib
│ ├── EditorWindowController.m
│ └── EditorWindowController.xib
├── main.m
├── EasyCode.entitlements
├── AppDelegate.h
├── SharedLogic
│ ├── ESharedUserDefault.h
│ └── ESharedUserDefault.m
├── Info.plist
└── AppDelegate.m
├── EC
├── Resources
│ ├── Artboard-128.png
│ ├── Artboard-16.png
│ ├── Artboard-256.png
│ ├── Artboard-32.png
│ ├── Artboard-512.png
│ ├── Artboard-64.png
│ └── Artboard-1024.png
├── SwiftMapping.h
├── ECFileParser
│ ├── Models
│ │ ├── FSElementProperty.m
│ │ ├── FSElementCache.m
│ │ ├── FSElementProperty.h
│ │ └── FSElementCache.h
│ ├── Processors
│ │ ├── FSCategoryProcessor.h
│ │ ├── FSInterfaceProcessor.h
│ │ ├── FSExtensionProcessor.h
│ │ ├── FSImpProcessor.h
│ │ ├── FSProtocolProcessor.h
│ │ ├── FSExtensionProcessor.m
│ │ ├── FSCategoryProcessor.m
│ │ ├── FSInterfaceProcessor.m
│ │ ├── FSElementProcessor.h
│ │ ├── FSImpProcessor.m
│ │ ├── FSProtocolProcessor.m
│ │ └── FSElementProcessor.m
│ ├── ECFileParser.h
│ ├── FSElementPool.h
│ ├── ECFileParser.m
│ └── FSElementPool.m
├── ECMapping.h
├── SourceEditorCommand.h
├── ECMapping.m
├── SourceEditorExtension.h
├── ECMappingForSwift.h
├── ECMappingForObjectiveC.h
├── EC.entitlements
├── ECGenerateHelper.h
├── ECMappingHelper.h
├── EasyCodeManager.h
├── ECMappingForSwift.m
├── SourceEditorExtension.m
├── SourceEditorCommand.m
├── 3rdParty
│ └── NSString+PDRegex
│ │ ├── NSString+PDRegex.h
│ │ └── NSString+PDRegex.m
├── EasyCodeManager.m
├── Info.plist
├── ECMappingForObjectiveC.m
├── ECGenerateHelper.m
├── ECMappingHelper.m
└── OCMapping.h
├── EasyCode.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcuserdata
│ └── gaofeng.xcuserdatad
│ │ ├── xcschemes
│ │ ├── xcschememanagement.plist
│ │ ├── EasyCode.xcscheme
│ │ └── EC.xcscheme
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── project.pbxproj
├── .Ulysses-favorites.plist
├── LICENSE
├── README.md
├── PrivacyPolicyTKeyBoard.md
└── .gitignore
/EasyCode/Resource/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/add.png
--------------------------------------------------------------------------------
/EasyCode/Resource/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/edit.png
--------------------------------------------------------------------------------
/EC/Resources/Artboard-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EC/Resources/Artboard-128.png
--------------------------------------------------------------------------------
/EC/Resources/Artboard-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EC/Resources/Artboard-16.png
--------------------------------------------------------------------------------
/EC/Resources/Artboard-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EC/Resources/Artboard-256.png
--------------------------------------------------------------------------------
/EC/Resources/Artboard-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EC/Resources/Artboard-32.png
--------------------------------------------------------------------------------
/EC/Resources/Artboard-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EC/Resources/Artboard-512.png
--------------------------------------------------------------------------------
/EC/Resources/Artboard-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EC/Resources/Artboard-64.png
--------------------------------------------------------------------------------
/EasyCode/Resource/btnbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/btnbg.png
--------------------------------------------------------------------------------
/EasyCode/Resource/btnbg2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/btnbg2.png
--------------------------------------------------------------------------------
/EasyCode/Resource/mainbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/mainbg.png
--------------------------------------------------------------------------------
/EasyCode/Resource/remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/remove.png
--------------------------------------------------------------------------------
/EC/Resources/Artboard-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EC/Resources/Artboard-1024.png
--------------------------------------------------------------------------------
/EasyCode/Resource/btnbg2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/btnbg2@2x.png
--------------------------------------------------------------------------------
/EasyCode/Resource/btnbg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/btnbg@2x.png
--------------------------------------------------------------------------------
/EasyCode/Resource/btnguide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/btnguide.png
--------------------------------------------------------------------------------
/EasyCode/Resource/mainbg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/mainbg@2x.png
--------------------------------------------------------------------------------
/EasyCode/Resource/btnguide@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Resource/btnguide@2x.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-16.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-32.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-33.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-33.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-64.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-1024.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-128.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-129.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-129.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-256.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-512.png
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-513.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/music4kid/EasyCode-Xcode/HEAD/EasyCode/Assets.xcassets/AppIcon.appiconset/Artboard-513.png
--------------------------------------------------------------------------------
/EasyCode.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/EC/SwiftMapping.h:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftMapping.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #ifndef SwiftMapping_h
10 | #define SwiftMapping_h
11 |
12 |
13 | #endif /* SwiftMapping_h */
14 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/CustomButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // CustomButton.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/11/4.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CustomButton : NSButton
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/EShortcutEntry.m:
--------------------------------------------------------------------------------
1 | //
2 | // EShortcutEntry.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "EShortcutEntry.h"
10 |
11 | @implementation EShortcutEntry
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Models/FSElementProperty.m:
--------------------------------------------------------------------------------
1 |
2 | //
3 | // FSElementProperty.m
4 | // FastStub
5 | //
6 | // Created by gao feng on 16/5/27.
7 | // Copyright © 2016年 music4kid. All rights reserved.
8 | //
9 |
10 | #import "FSElementProperty.h"
11 |
12 | @implementation FSElementProperty
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/EC/ECMapping.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECMapping.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ECMapping : NSObject
12 | - (NSDictionary*)provideMapping;
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/EEditorTableView.h:
--------------------------------------------------------------------------------
1 | //
2 | // EEditorTableView.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface EEditorTableView : NSTableView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/EEditorTableView.m:
--------------------------------------------------------------------------------
1 | //
2 | // EEditorTableView.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "EEditorTableView.h"
10 |
11 | @implementation EEditorTableView
12 |
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/EasyCode/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, const char * argv[]) {
12 | return NSApplicationMain(argc, argv);
13 | }
14 |
--------------------------------------------------------------------------------
/EC/SourceEditorCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorCommand.h
3 | // EC
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SourceEditorCommand : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/EVerticalScrollView.h:
--------------------------------------------------------------------------------
1 | //
2 | // EVerticalScrollView.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface EVerticalScrollView : NSScrollView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EC/ECMapping.m:
--------------------------------------------------------------------------------
1 | //
2 | // ECMapping.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "ECMapping.h"
10 |
11 | @implementation ECMapping
12 | - (NSDictionary*)provideMapping {
13 | return nil;
14 | }
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/EC/SourceEditorExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorExtension.h
3 | // EC
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SourceEditorExtension : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSCategoryProcessor.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSCategoryProcessor.h
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/31.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSElementProcessor.h"
10 |
11 | @interface FSCategoryProcessor : FSElementProcessor
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSInterfaceProcessor.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSInterfaceProcessor.h
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSElementProcessor.h"
10 |
11 | @interface FSInterfaceProcessor : FSElementProcessor
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSExtensionProcessor.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSExtensionProcessor.h
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSInterfaceProcessor.h"
10 |
11 | @interface FSExtensionProcessor : FSInterfaceProcessor
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSImpProcessor.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSImpProcessor.h
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/16.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FSInterfaceProcessor.h"
11 |
12 | @interface FSImpProcessor : FSInterfaceProcessor
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSProtocolProcessor.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSProtocolProcessor.h
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/16.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FSElementProcessor.h"
11 |
12 | @interface FSProtocolProcessor : FSElementProcessor
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/EC/ECMappingForSwift.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECMappingForSwift.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ECMapping.h"
11 |
12 | @interface ECMappingForSwift : ECMapping
13 |
14 | - (NSDictionary*)provideMapping;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/EC/ECMappingForObjectiveC.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECMappingForObjectiveC.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ECMapping.h"
11 |
12 | @interface ECMappingForObjectiveC : ECMapping
13 |
14 | - (NSDictionary*)provideMapping;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/CustomButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // CustomButton.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/11/4.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "CustomButton.h"
10 |
11 | @implementation CustomButton
12 |
13 | - (void)drawRect:(NSRect)dirtyRect {
14 | [super drawRect:dirtyRect];
15 |
16 | // Drawing code here.
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/EC/EC.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | 2WQE6AU5PD.group.com.music4kid.easycode
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/EShortcutEntry.h:
--------------------------------------------------------------------------------
1 | //
2 | // EShortcutEntry.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface EShortcutEntry : NSObject
12 | @property (nonatomic, strong) NSString* key;
13 | @property (nonatomic, strong) NSString* code;
14 | @end
15 |
--------------------------------------------------------------------------------
/EasyCode/EasyCode.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | 2WQE6AU5PD.group.com.music4kid.easycode
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/EC/ECGenerateHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECGenerateHelper.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface ECGenerateHelper : NSObject
13 |
14 | + (instancetype)sharedInstance;
15 |
16 | - (BOOL)handleInvocation:(XCSourceEditorCommandInvocation *)invocation;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/EC/ECMappingHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECMappingHelper.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface ECMappingHelper : NSObject
13 |
14 | + (instancetype)sharedInstance;
15 |
16 | - (BOOL)handleInvocation:(XCSourceEditorCommandInvocation *)invocation;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/EasyCode/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : NSObject
12 |
13 | - (IBAction)showEditorWindowForOC:(id)sender;
14 | - (IBAction)showEditorWindowForSwift:(id)sender;
15 | - (IBAction)showHowToUse:(id)sender;
16 |
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/EC/EasyCodeManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // EasyCodeManager.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface EasyCodeManager : NSObject
13 |
14 | + (instancetype)sharedInstance;
15 |
16 | //return number of characters matched
17 | - (void)handleInvocation:(XCSourceEditorCommandInvocation *)invocation;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/EC/ECFileParser/ECFileParser.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECFileParser.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class FSElementCache;
12 |
13 | @interface ECFileParser : NSObject
14 |
15 | - (FSElementCache*)getElementByContent:(NSString*)content selection:(NSRange)range;
16 |
17 | - (FSElementCache*)getImpElementByContent:(NSString*)content;
18 |
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSExtensionProcessor.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSExtensionProcessor.m
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSExtensionProcessor.h"
10 |
11 | @implementation FSExtensionProcessor
12 |
13 | - (NSString *)pattern {
14 | return @"(@interface)\\s+([a-z][a-z0-9_\\s*]+)(.*?)(@end+?)";
15 | }
16 |
17 | - (FSElementCacheType)getElementType
18 | {
19 | return FSElementCacheExtension;
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Models/FSElementCache.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSElementCache.m
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/16.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSElementCache.h"
10 |
11 | @implementation FSElementCache
12 | - (instancetype)init
13 | {
14 | self = [super init];
15 | if (self) {
16 | self.superClasses = [NSMutableSet new];
17 | self.protocols = [NSMutableSet new];
18 | self.selectorList = [NSMutableSet new];
19 | }
20 | return self;
21 | }
22 | @end
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/EVerticalScrollView.m:
--------------------------------------------------------------------------------
1 | //
2 | // EVerticalScrollView.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "EVerticalScrollView.h"
10 |
11 | @implementation EVerticalScrollView
12 |
13 | //- (void)scrollWheel:(NSEvent *)theEvent
14 | //{
15 | // [super scrollWheel:theEvent];
16 | //
17 | // if ([theEvent deltaY] != 0.0)
18 | // {
19 | // [[self nextResponder] scrollWheel:theEvent];
20 | // }
21 | //}
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/EC/ECMappingForSwift.m:
--------------------------------------------------------------------------------
1 | //
2 | // ECMappingForSwift.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "ECMappingForSwift.h"
10 | #import "SwiftMapping.h"
11 |
12 | @implementation ECMappingForSwift
13 |
14 | - (NSDictionary*)provideMapping {
15 | NSDictionary* mapping = @{
16 |
17 |
18 | }.mutableCopy;
19 |
20 | return mapping;
21 | }
22 |
23 |
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSCategoryProcessor.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSCategoryProcessor.m
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/31.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSCategoryProcessor.h"
10 |
11 | @implementation FSCategoryProcessor
12 |
13 | - (NSString *)pattern {
14 | return @"(@interface)\\s+([a-z][a-z0-9_\\s*\()]+)\\s*\\(\\s*(?:[a-z][a-z0-9_\()]+)\\s*\\)(.*?)(@end+?)";
15 | }
16 |
17 | - (FSElementCacheType)getElementType
18 | {
19 | return FSElementCacheCategory;
20 | }
21 |
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/EditorWindowController.h:
--------------------------------------------------------------------------------
1 | //
2 | // EditorWindowController.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum : NSUInteger {
12 | EditorTypeOC,
13 | EditorTypeSwift,
14 | } EditorType;
15 |
16 | @interface EditorWindowController : NSWindowController
17 |
18 | @property (nonatomic, strong) IBOutlet NSTableView* tableView;
19 |
20 | - (void)initEditorWindow:(EditorType)editorType;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/.Ulysses-favorites.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | order
6 |
7 | resolutionData
8 |
9 | order
10 |
11 |
12 | storeFormatVersion
13 | 1
14 | versioning
15 |
16 | order
17 |
18 | 3e4d1dd0e3390e7538564d791907acdffcb56ba89856071760053e27f7311ae0
19 | 1
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSInterfaceProcessor.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSInterfaceProcessor.m
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSInterfaceProcessor.h"
10 | #import "FSElementPool.h"
11 | #import "FSElementCache.h"
12 |
13 | @implementation FSInterfaceProcessor
14 |
15 |
16 | - (NSString *)pattern {
17 | return @"(@interface)\\s+([a-z][a-z0-9_\\s*\()]+)\\s+:?\\s+([a-z][a-z0-9_\()]+)(.*?)(@end+?)";
18 | }
19 |
20 | - (FSElementCacheType)getElementType
21 | {
22 | return FSElementCacheInterface;
23 | }
24 |
25 |
26 |
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/EasyCode/SharedLogic/ESharedUserDefault.h:
--------------------------------------------------------------------------------
1 | //
2 | // ESharedUserDefault.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define _UD [ESharedUserDefault sharedInstance]
12 |
13 | @interface ESharedUserDefault : NSObject
14 |
15 | + (instancetype)sharedInstance;
16 |
17 | - (NSDictionary*)readMappingForOC;
18 | - (void)saveMappingForOC:(NSDictionary*)mapping;
19 |
20 | - (NSDictionary*)readMappingForSwift;
21 | - (void)saveMappingForSwift:(NSDictionary*)mapping;
22 |
23 | - (void)clearMapping;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Models/FSElementProperty.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSElementProperty.h
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/27.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum : NSUInteger {
12 | FSElementPropertyActionInit,
13 | FSElementPropertyActionGetterSetter,
14 | } FSElementPropertyAction;
15 |
16 | @interface FSElementProperty : NSObject
17 |
18 | @property (nonatomic, strong) NSString* propertyName;
19 | @property (nonatomic, strong) NSString* propertyType;
20 | @property (nonatomic, assign) FSElementPropertyAction action;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/EC/ECFileParser/FSElementPool.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSElementPool.h
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/17.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define _Pool [FSElementPool sharedInstance]
12 |
13 | @class FSElementCache;
14 |
15 | @interface FSElementPool : NSObject
16 |
17 | + (instancetype)sharedInstance;
18 |
19 | @property (nonatomic, strong) NSMutableDictionary* elementMap;
20 |
21 | - (void)parseElementFromProjectFile:(NSString*)filePath complete:(dispatch_block_t)completeBlock;
22 | - (void)parseHeaderFile:(NSString*)filePath;
23 |
24 | - (FSElementCache*)getElementFromCache:(NSString*)elementName;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/EC/SourceEditorExtension.m:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorExtension.m
3 | // EC
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "SourceEditorExtension.h"
10 |
11 | @implementation SourceEditorExtension
12 |
13 |
14 | - (void)extensionDidFinishLaunching
15 | {
16 | NSLog(@"extensionDidFinishLaunching...");
17 | // If your extension needs to do any work at launch, implement this optional method.
18 | }
19 |
20 |
21 |
22 | //- (NSArray *> *)commandDefinitions
23 | //{
24 | // // If your extension needs to return a collection of command definitions that differs from those in its Info.plist, implement this optional property getter.
25 | // return @[];
26 | //}
27 | //
28 |
29 |
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/EasyCode.xcodeproj/xcuserdata/gaofeng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | EC.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | EasyCode.xcscheme
13 |
14 | orderHint
15 | 0
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 670F2ECF1DB2284400A1739F
21 |
22 | primary
23 |
24 |
25 | 670F2EE71DB228DC00A1739F
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/EC/SourceEditorCommand.m:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorCommand.m
3 | // EC
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "SourceEditorCommand.h"
10 | #import "EasyCodeManager.h"
11 | #import
12 |
13 | @implementation SourceEditorCommand
14 |
15 | - (void)performCommandWithInvocation:(XCSourceEditorCommandInvocation *)invocation completionHandler:(void (^)(NSError * _Nullable nilOrError))completionHandler
16 | {
17 | if ([invocation.commandIdentifier isEqualToString:@"easycode.insertcode"]) {
18 | [[EasyCodeManager sharedInstance] handleInvocation:invocation];
19 | }
20 | else if ([invocation.commandIdentifier isEqualToString:@"easycode.editmapping"]) {
21 | [[NSWorkspace sharedWorkspace] openURL:[NSURL fileURLWithPath:@"/Applications/EasyCode.app"]];
22 | }
23 |
24 | completionHandler(nil);
25 | }
26 |
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSElementProcessor.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSElementProcessor.h
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/16.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FSElementCache.h"
11 |
12 | typedef void (^processorResultBlock)(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop);
13 |
14 | @interface FSElementProcessor : NSObject
15 |
16 | // must override by subclass
17 | - (NSString *)pattern;
18 | - (FSElementCacheType)getElementType;
19 |
20 | // must override by subclass
21 | - (NSArray *)createElements:(NSString *)content;
22 |
23 | - (NSMutableSet*)buildMethodList:(NSString*)content;
24 |
25 | - (NSMutableSet*)buildSelectorList:(NSString*)content;
26 |
27 | - (void)processContent:(NSString *)content resultBlock:(processorResultBlock)resultBlock;
28 |
29 | - (void)processContent:(NSString *)content withPatternStr:(NSString*)pattern resultBlock:(processorResultBlock)resultBlock;
30 |
31 | @end
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/DetailEditorController/DetailWindowController.h:
--------------------------------------------------------------------------------
1 | //
2 | // DetailWindowController.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "EShortcutEntry.h"
11 |
12 | typedef enum : NSUInteger {
13 | DetailEditorModeUpdate,
14 | DetailEditorModeInsert,
15 | } DetailEditorMode;
16 |
17 | @protocol DetailWindowEditorDelegate
18 |
19 | - (void)onEntryUpdated:(EShortcutEntry*)entry;
20 | - (void)onEntryInserted:(EShortcutEntry*)entry;
21 |
22 | @end
23 |
24 |
25 | @interface DetailWindowController : NSWindowController
26 |
27 | - (void)initWithMappingEntry:(EShortcutEntry*)entry;
28 |
29 | @property (nonatomic, weak) id delegate;
30 | @property (nonatomic, assign) DetailEditorMode editMode;
31 |
32 |
33 | @property (nonatomic, strong) IBOutlet NSTextField* txtKey;
34 | @property (nonatomic, strong) IBOutlet NSTextField* txtCode;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 mrpeak
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/EC/3rdParty/NSString+PDRegex/NSString+PDRegex.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+PDRegex.h
3 | // RegexOnNSString
4 | //
5 | // Created by Carl Brown on 10/3/11.
6 | // Copyright 2011 PDAgent, LLC. Released under MIT License.
7 | //
8 |
9 | #import
10 |
11 | @interface NSString (PDRegex)
12 |
13 | -(NSString *) vv_stringByReplacingRegexPattern:(NSString *)regex withString:(NSString *) replacement;
14 | -(NSString *) vv_stringByReplacingRegexPattern:(NSString *)regex withString:(NSString *) replacement caseInsensitive:(BOOL) ignoreCase;
15 | -(NSString *) vv_stringByReplacingRegexPattern:(NSString *)regex withString:(NSString *) replacement caseInsensitive:(BOOL) ignoreCase treatAsOneLine:(BOOL) assumeMultiLine;
16 | -(NSArray *) vv_stringsByExtractingGroupsUsingRegexPattern:(NSString *)regex;
17 | -(NSArray *) vv_stringsByExtractingGroupsUsingRegexPattern:(NSString *)regex caseInsensitive:(BOOL) ignoreCase treatAsOneLine:(BOOL) assumeMultiLine;
18 | -(BOOL) vv_matchesPatternRegexPattern:(NSString *)regex;
19 | -(BOOL) vv_matchesPatternRegexPattern:(NSString *)regex caseInsensitive:(BOOL) ignoreCase treatAsOneLine:(BOOL) assumeMultiLine;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/EC/EasyCodeManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // EasyCodeManager.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "EasyCodeManager.h"
10 | #import "ECMappingForObjectiveC.h"
11 | #import "ECGenerateHelper.h"
12 | #import "ECMappingHelper.h"
13 |
14 | @interface EasyCodeManager ()
15 |
16 | @end
17 |
18 | @implementation EasyCodeManager
19 |
20 | + (instancetype)sharedInstance
21 | {
22 | static EasyCodeManager* instance = nil;
23 |
24 | static dispatch_once_t onceToken;
25 | dispatch_once(&onceToken, ^{
26 | instance = [EasyCodeManager new];
27 | });
28 |
29 | return instance;
30 | }
31 |
32 | - (void)handleInvocation:(XCSourceEditorCommandInvocation *)invocation
33 | {
34 | //dynamic code generation based on class parsing like FastStub(https://github.com/music4kid/FastStub-Xcode)
35 | if ([[ECGenerateHelper sharedInstance] handleInvocation:invocation]) {
36 | return;
37 | }
38 |
39 | if ([[ECMappingHelper sharedInstance] handleInvocation:invocation]) {
40 | return;
41 | }
42 |
43 |
44 | }
45 |
46 |
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/EC/ECFileParser/ECFileParser.m:
--------------------------------------------------------------------------------
1 | //
2 | // ECFileParser.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "ECFileParser.h"
10 | #import "FSImpProcessor.h"
11 |
12 | @implementation ECFileParser
13 |
14 | - (FSElementCache*)getImpElementByContent:(NSString*)content
15 | {
16 | FSImpProcessor* p = [FSImpProcessor new];
17 | NSArray* elementsInFile = [p createElements:content];
18 | if (elementsInFile.count > 0) {
19 | return [elementsInFile firstObject];
20 | }
21 | else
22 | {
23 | return nil;
24 | }
25 | }
26 |
27 | - (FSElementCache*)getElementByContent:(NSString*)content selection:(NSRange)range {
28 |
29 | FSElementCache* element = nil;
30 |
31 | FSImpProcessor* p = [FSImpProcessor new];
32 | NSArray* elementsInFile = [p createElements:content];
33 | for (FSElementCache* e in elementsInFile) {
34 | if (NSLocationInRange(range.location, e.contentRange)) {
35 | //element match
36 | NSLog(@"get a match");
37 | element = e;
38 | break;
39 | }
40 | }
41 |
42 | return element;
43 | }
44 |
45 |
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/EasyCode/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0.2
21 | CFBundleVersion
22 | 10
23 | LSApplicationCategoryType
24 | public.app-category.developer-tools
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2016年 music4kid. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSImpProcessor.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSImpProcessor.m
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/16.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSImpProcessor.h"
10 | #import "FSElementCache.h"
11 | #import "NSString+PDRegex.h"
12 |
13 | @implementation FSImpProcessor
14 |
15 | - (NSString *)pattern {
16 | return @"(@implementation)\\s+([a-z][a-z0-9_\()]+)(.*?)(@end+?)";
17 | }
18 |
19 | - (FSElementCacheType)getElementType
20 | {
21 | return FSElementCacheImp;
22 | }
23 |
24 | - (NSMutableSet*)buildSelectorList:(NSString*)content
25 | {
26 | NSMutableSet* selectors = [NSMutableSet new];
27 |
28 |
29 | //parse based on file type, better accuracy
30 | NSArray* matchedMethods = nil;
31 |
32 | //only support notification selector
33 | NSString* regex = regex = @"selector:@selector\\((.*?)\\)";
34 |
35 | matchedMethods = [content vv_stringsByExtractingGroupsUsingRegexPattern:regex caseInsensitive:false treatAsOneLine:true];
36 | for (int i = 0; i < matchedMethods.count; i++) {
37 | NSString* selector = [NSString stringWithFormat:@"%@", matchedMethods[i]];
38 | [selectors addObject:selector];
39 | }
40 |
41 | return selectors;
42 | }
43 |
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Models/FSElementCache.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSElementCache.h
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/16.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum : NSUInteger {
12 | FSElementCacheInterface,
13 | FSElementCacheProtocol,
14 | FSElementCacheImp,
15 | FSElementCacheExtension,
16 | FSElementCacheCategory,
17 | } FSElementCacheType;
18 |
19 | @interface FSElementCache : NSObject
20 | @property (nonatomic, strong) NSString* filePath;
21 | @property (nonatomic, strong) NSString* elementName;
22 | @property (nonatomic, strong) NSMutableSet* methodList;
23 | @property (nonatomic, strong) NSMutableSet* propertyList;
24 | @property (nonatomic, strong) NSMutableSet* selectorList;
25 |
26 | @property (nonatomic, assign) FSElementCacheType elementType;
27 | @property (nonatomic, assign) NSRange contentRange;
28 | @property (nonatomic, assign) NSRange contentBeginRange;
29 | @property (nonatomic, assign) NSRange elementBeginRange;
30 |
31 | @property (nonatomic, strong) NSMutableSet* superClasses;
32 | @property (nonatomic, strong) NSMutableSet* protocols;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ### Available on App Store:
2 |
3 | https://itunes.apple.com/us/app/easycode/id1166493362?ls=1&mt=12
4 | ![][image-1]
5 |
6 | ### What is it?
7 |
8 | It's a plugin or extension for Xcode 8, It can be used as a replacement of "Code Snippet Library", It's faster, and highly customizable.
9 |
10 | #### write code like this:
11 |
12 |
13 |
14 | #### generate method for you selector:
15 |
16 |
17 |
18 | #### edit your shortcut in a standalone app:
19 |
20 |
21 |
22 | support both Objective C and Swift.
23 |
24 | ### How to use?
25 | **type code shortcut like "vdl"**
26 |
27 | **select menu item: Editor-\>EC-\>Insert EasyCode**
28 |
29 | **"vdl" is automatically converted to:**
30 |
31 | ```
32 | - (void)viewDidLoad
33 | {
34 | [super viewDidLoad];
35 | }
36 | ```
37 |
38 | type p, you get:
39 |
40 | ```
41 | @property (nonatomic, strong) type name;
42 | ```
43 |
44 | type w, you get:
45 |
46 | ```
47 | weak typeof(self) wself = self;
48 | ```
49 |
50 | There is more out there, try out or create your own shortcut.
51 |
52 | ### Tip
53 |
54 | don't forget to add a Key Binding for fast access to menu item:
55 |
56 |
57 |
58 | [image-1]: http://og4f9bp1x.bkt.clouddn.com/easycode1.0.2.png
--------------------------------------------------------------------------------
/PrivacyPolicyTKeyBoard.md:
--------------------------------------------------------------------------------
1 | Privacy Policy - TKeyBoard
2 |
3 | Your privacy is a great concern to us. Read below to see what information is collected when you use TKeyboard iOS app, why it is collected, and how it is used to improve your overall experience when using the App.
4 |
5 | Collection of Personal Information
6 |
7 | We DO NOT COLLECT ANY INFORMATION THAT YOU TYPE using this app. When you allow full access for TKeyboard, you may be warned that the keyboard can be used to “transmit anything you type, including things you have previously typed with this keyboard.” This is the standard warning message for all third-party input methods, however TKeyboard does not collect any personal information or transmit such information to a server or third party.
8 |
9 | Disclosure of Personal Information
10 |
11 | As we do not collect any personal information, your personal information is safe will not be disclosed to any third party unless you have consented explicitly to such a disclosure, or where there is a legal requirement for this to happen.
12 |
13 | Access Required and Usage
14 |
15 | Some of the features (including bluetooth connection) of TKeyboard needs you to enable “allow full access.” The App need this access in order to read data from Mac server app. TKeyboard will only read data, and no personal information will be stored.
16 |
17 | Policy Changes
18 |
19 | Any changes to this policy will be posted to an update of the App. You are advised to regularly view our most recent privacy policy.
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
55 | #Code Injection
56 | #
57 | # After new code Injection tools there's a generated folder /iOSInjectionProject
58 | # https://github.com/johnno1962/injectionforxcode
59 |
60 | iOSInjectionProject/
61 |
--------------------------------------------------------------------------------
/EasyCode/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "Artboard-16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "Artboard-33.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "Artboard-32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "Artboard-64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "Artboard-129.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "Artboard-256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "Artboard-128.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "Artboard-513.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "Artboard-512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "Artboard-1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/EasyCode/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "EditorWindowController.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @property (weak) IBOutlet NSWindow *window;
15 | @property (nonatomic, strong) EditorWindowController* editorOC;
16 | @property (nonatomic, strong) EditorWindowController* editorSwift;
17 |
18 | @end
19 |
20 | @implementation AppDelegate
21 |
22 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
23 | // Insert code here to initialize your application
24 | }
25 |
26 |
27 | - (void)applicationWillTerminate:(NSNotification *)aNotification {
28 | // Insert code here to tear down your application
29 | }
30 |
31 | - (IBAction)showEditorWindowForOC:(id)sender
32 | {
33 | if (self.editorOC == nil) {
34 | self.editorOC = [[EditorWindowController alloc] initWithWindowNibName:@"EditorWindowController"];
35 | [_editorOC initEditorWindow:EditorTypeOC];
36 | }
37 | [_editorOC showWindow:self];
38 | }
39 |
40 | - (void)showEditorWindowForSwift:(id)sender
41 | {
42 | if (self.editorSwift == nil) {
43 | self.editorSwift = [[EditorWindowController alloc] initWithWindowNibName:@"EditorWindowController"];
44 | [_editorSwift initEditorWindow:EditorTypeSwift];
45 | }
46 | [_editorSwift showWindow:self];
47 | }
48 |
49 | - (IBAction)showHowToUse:(id)sender {
50 | [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString: @"https://github.com/music4kid/EasyCode-Xcode"]];
51 | }
52 |
53 | - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
54 | {
55 | if (flag) {
56 | return NO;
57 | }
58 | else
59 | {
60 | [self.window makeKeyAndOrderFront:self];
61 | return YES;
62 | }
63 | }
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/EasyCode.xcodeproj/xcuserdata/gaofeng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
14 |
15 |
16 |
18 |
30 |
31 |
32 |
34 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/EC/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | EasyCode
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | XPC!
19 | CFBundleShortVersionString
20 | 1.0.2
21 | CFBundleVersion
22 | 10
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSExtension
26 |
27 | NSExtensionAttributes
28 |
29 | XCSourceEditorCommandDefinitions
30 |
31 |
32 | XCSourceEditorCommandClassName
33 | SourceEditorCommand
34 | XCSourceEditorCommandIdentifier
35 | easycode.insertcode
36 | XCSourceEditorCommandName
37 | Insert EasyCode
38 |
39 |
40 | XCSourceEditorCommandClassName
41 | SourceEditorCommand
42 | XCSourceEditorCommandIdentifier
43 | easycode.editmapping
44 | XCSourceEditorCommandName
45 | Edit Mapping
46 |
47 |
48 | XCSourceEditorExtensionPrincipalClass
49 | SourceEditorExtension
50 |
51 | NSExtensionPointIdentifier
52 | com.apple.dt.Xcode.extension.source-editor
53 |
54 | NSHumanReadableCopyright
55 | Copyright © 2016年 music4kid. All rights reserved.
56 |
57 |
58 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSProtocolProcessor.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSProtocolProcessor.m
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/16.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSProtocolProcessor.h"
10 | #import "FSElementPool.h"
11 | #import "FSElementCache.h"
12 |
13 | @implementation FSProtocolProcessor
14 |
15 | - (NSString *)pattern {
16 | return @"(@protocol)\\s+([a-z][a-z0-9_\\s*\()]+)(.*?)(@end+?)";
17 | }
18 |
19 | - (FSElementCacheType)getElementType
20 | {
21 | return FSElementCacheProtocol;
22 | }
23 |
24 | - (NSArray *)createElements:(NSString *)content {
25 | NSMutableArray *array = [NSMutableArray array];
26 | [self processContent:content resultBlock:^(NSTextCheckingResult *match, NSMatchingFlags flags, BOOL *stop) {
27 | FSElementCache* element = [self createClassElement:match from:content];
28 | if (element) {
29 | [array addObject:element];
30 | }
31 | }];
32 |
33 | return array;
34 | }
35 |
36 | - (FSElementCache *)createClassElement:(NSTextCheckingResult *)match from:(NSString *)content {
37 | NSRange matchRange = [match rangeAtIndex:2];
38 | NSString *matchString = [content substringWithRange:matchRange];
39 | NSString *matchTrim = [matchString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
40 | if ([matchTrim rangeOfString:@"("].location == NSNotFound) {
41 | NSRange matchRange = [match rangeAtIndex:2];
42 | NSString *matchString = [content substringWithRange:matchRange];
43 | NSString *matchTrim = [matchString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
44 |
45 | FSElementCache *element = [FSElementCache new];
46 | element.elementName = matchTrim;
47 | element.elementType = FSElementCacheProtocol;
48 |
49 | NSRange matchProtocolRange = [match rangeAtIndex:3];
50 | NSString* matchProtocolString = [content substringWithRange:matchProtocolRange];
51 | element.methodList = [self buildMethodList:matchProtocolString].mutableCopy;
52 |
53 |
54 | return element;
55 | }
56 |
57 | return nil;
58 | }
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/DetailEditorController/DetailWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // DetailWindowController.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "DetailWindowController.h"
10 |
11 | @interface DetailWindowController ()
12 | @property (nonatomic, strong) EShortcutEntry* curEntry;
13 |
14 | @end
15 |
16 | @implementation DetailWindowController
17 |
18 | - (void)windowDidLoad {
19 | [super windowDidLoad];
20 |
21 | [self updateEntryDisplay];
22 |
23 | self.window.delegate = self;
24 |
25 | }
26 |
27 | - (void)windowWillClose:(NSNotification *)notification
28 | {
29 | if (_delegate) {
30 | if (_editMode == DetailEditorModeUpdate) {
31 | [_delegate onEntryUpdated:_curEntry];
32 | }
33 | else if(_editMode == DetailEditorModeInsert)
34 | {
35 | [_delegate onEntryInserted:_curEntry];
36 | }
37 | }
38 | }
39 |
40 | - (void)initWithMappingEntry:(EShortcutEntry*)entry
41 | {
42 | self.curEntry = entry;
43 |
44 | [self updateEntryDisplay];
45 | }
46 |
47 | - (void)updateEntryDisplay
48 | {
49 | self.window.title = [NSString stringWithFormat:@"Create New"];
50 | if (_curEntry.key.length > 0) {
51 | self.window.title = [NSString stringWithFormat:@"Edit %@", _curEntry.key];
52 | }
53 |
54 | [self.txtKey setStringValue:@""];
55 | if (_curEntry.key.length > 0) {
56 | [self.txtKey setStringValue:_curEntry.key];
57 | }
58 |
59 | [self.txtCode setStringValue:@""];
60 | if (_curEntry.code.length > 0) {
61 | [self.txtCode setStringValue:_curEntry.code];
62 | }
63 |
64 | _txtKey.delegate = self;
65 | _txtCode.delegate = self;
66 |
67 | [_txtKey becomeFirstResponder];
68 | }
69 |
70 | - (void)controlTextDidChange:(NSNotification *)notification {
71 | NSTextField *textField = [notification object];
72 |
73 | if (textField == _txtKey) {
74 | _curEntry.key = [textField stringValue];
75 | }
76 | else if(textField == _txtCode)
77 | {
78 | _curEntry.code = [textField stringValue];
79 | }
80 | }
81 |
82 | - (BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector
83 | {
84 | BOOL result = NO;
85 |
86 | if (control == _txtCode) {
87 | if (commandSelector == @selector(insertNewline:))
88 | {
89 | [textView insertNewlineIgnoringFieldEditor:self];
90 | result = YES;
91 | }
92 | else if (commandSelector == @selector(insertTab:))
93 | {
94 | [textView insertTabIgnoringFieldEditor:self];
95 | result = YES;
96 | }
97 | }
98 |
99 | return result;
100 | }
101 |
102 | @end
103 |
--------------------------------------------------------------------------------
/EC/ECMappingForObjectiveC.m:
--------------------------------------------------------------------------------
1 | //
2 | // ECMappingForObjectiveC.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "ECMappingForObjectiveC.h"
10 | #import "OCMapping.h"
11 |
12 | @implementation ECMappingForObjectiveC
13 |
14 | - (NSDictionary*)provideMapping {
15 | NSDictionary* mapping = @{
16 | //UIViewController
17 | KeyOC_UIViewController_VDL:KeyOC_UIViewController_VDL_Value,
18 | KeyOC_UIViewController_VWA:KeyOC_UIViewController_VWA_Value,
19 | KeyOC_UIViewController_VDA:KeyOC_UIViewController_VDA_Value,
20 | KeyOC_UIViewController_VWD:KeyOC_UIViewController_VWD_Value,
21 | KeyOC_UIViewController_VDD:KeyOC_UIViewController_VDD_Value,
22 | KeyOC_UIViewController_DRM:KeyOC_UIViewController_DRM_Value,
23 | KeyOC_UIViewController_SIO:KeyOC_UIViewController_SIO_Value,
24 | KeyOC_UIViewController_PIO:KeyOC_UIViewController_PIO_Value,
25 |
26 | //UIView
27 | KeyOC_UIView_HTW:KeyOC_UIView_HTW_Value,
28 | KeyOC_UIView_PIE:KeyOC_UIView_PIE_Value,
29 | KeyOC_UIView_CPT:KeyOC_UIView_CPT_Value,
30 | KeyOC_UIView_CPF:KeyOC_UIView_CPF_Value,
31 | KeyOC_UIView_CRP:KeyOC_UIView_CRP_Value,
32 | KeyOC_UIView_CRF:KeyOC_UIView_CRF_Value,
33 | KeyOC_UIView_DR:KeyOC_UIView_DR_Value,
34 |
35 | //UIApplication
36 | KeyOC_UIApplication_DRU:KeyOC_UIApplication_DRU_Value,
37 | KeyOC_UIApplication_DRF:KeyOC_UIApplication_DRF_Value,
38 | KeyOC_UIApplication_DRT:KeyOC_UIApplication_DRT_Value,
39 | KeyOC_UIApplication_DRR:KeyOC_UIApplication_DRR_Value,
40 | KeyOC_UIApplication_DRL:KeyOC_UIApplication_DRL_Value,
41 |
42 | //GCD
43 | KeyOC_GCD_DAFM:KeyOC_GCD_DAFM_Value,
44 | KeyOC_GCD_DASM:KeyOC_GCD_DASM_Value,
45 | KeyOC_GCD_DAFG:KeyOC_GCD_DAFG_Value,
46 | KeyOC_GCD_DASG:KeyOC_GCD_DASG_Value,
47 |
48 | //MISC
49 | KeyOC_MISC_DEL:KeyOC_MISC_DEL_Value,
50 | KeyOC_MISC_V:KeyOC_MISC_V_Value,
51 | KeyOC_MISC_C:KeyOC_MISC_C_Value,
52 | KeyOC_MISC_P:KeyOC_MISC_P_Value,
53 | KeyOC_MISC_W:KeyOC_MISC_W_Value,
54 | KeyOC_MISC_N:KeyOC_MISC_N_Value,
55 | KeyOC_MISC_U:KeyOC_MISC_U_Value,
56 | KeyOC_MISC_F:KeyOC_MISC_F_Value,
57 | KeyOC_MISC_M:KeyOC_MISC_M_Value,
58 | KeyOC_MISC_IMG:KeyOC_MISC_IMG_Value,
59 | KeyOC_MISC_BUN:KeyOC_MISC_BUN_Value,
60 |
61 | //Template
62 | KeyOC_Template_Button:KeyOC_Template_Button_Value,
63 | KeyOC_Template_Label:KeyOC_Template_Label_Value,
64 | KeyOC_Template_ImageView:KeyOC_Template_ImageView_Value,
65 |
66 | }.mutableCopy;
67 |
68 | return mapping;
69 | }
70 |
71 |
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/EC/ECGenerateHelper.m:
--------------------------------------------------------------------------------
1 | //
2 | // ECGenerateHelper.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "ECGenerateHelper.h"
10 | #import "ECFileParser.h"
11 | #import "FSImpProcessor.h"
12 | #import "NSString+PDRegex.h"
13 |
14 | @interface ECGenerateHelper ()
15 | @property (nonatomic, strong) ECFileParser* parser;
16 |
17 | @end
18 |
19 | @implementation ECGenerateHelper
20 |
21 | + (instancetype)sharedInstance
22 | {
23 | static ECGenerateHelper* instance = nil;
24 |
25 | static dispatch_once_t onceToken;
26 | dispatch_once(&onceToken, ^{
27 | instance = [ECGenerateHelper new];
28 | });
29 |
30 | return instance;
31 | }
32 |
33 | - (instancetype)init
34 | {
35 | self = [super init];
36 | if (self) {
37 | self.parser = [ECFileParser new];
38 | }
39 | return self;
40 | }
41 |
42 | - (BOOL)handleInvocation:(XCSourceEditorCommandInvocation *)invocation
43 | {
44 | BOOL hasCreatedSelector = [self tryCreateSelectorForCurrentLine:invocation];
45 | if (hasCreatedSelector) {
46 | return true;
47 | }
48 |
49 | return false;
50 | }
51 |
52 | - (BOOL)tryCreateSelectorForCurrentLine:(XCSourceEditorCommandInvocation *)invocation
53 | {
54 | XCSourceTextRange *selection = invocation.buffer.selections.firstObject;
55 | NSMutableArray* lines = invocation.buffer.lines;
56 | NSInteger index = selection.start.line;
57 | NSString* curLineContent = lines[index];
58 | NSMutableString* content = [invocation.buffer.completeBuffer mutableCopy];
59 | NSRange curSelectionRange = NSMakeRange(NSNotFound, 0);
60 | NSString* curLineSelector = nil;
61 |
62 | //extract selector from current line
63 | NSString* regex = regex = @"@selector\\((.*?)\\)";
64 | NSArray* matchedSelectors = [curLineContent vv_stringsByExtractingGroupsUsingRegexPattern:regex caseInsensitive:false treatAsOneLine:true];
65 | if (matchedSelectors.count > 0) {
66 | curLineSelector = [matchedSelectors firstObject];
67 | curSelectionRange = [content rangeOfString:[NSString stringWithFormat:@"@selector(%@)", curLineSelector]];
68 | }
69 |
70 | //parse .m file for implementation
71 | FSElementCache* element = [_parser getElementByContent:content selection:curSelectionRange];
72 | if (element != nil && curLineSelector.length > 0) {
73 | //create method implementation at the end of imp
74 | NSString* methodImp = nil;
75 | if ([curLineSelector hasSuffix:@":"]) {
76 | methodImp = [NSString stringWithFormat:@"- (void)%@(<#type#>)<#name#> {\n\t\n}\n\n", curLineSelector];
77 | }
78 | else
79 | {
80 | methodImp = [NSString stringWithFormat:@"- (void)%@ {\n\t\n}\n\n", curLineSelector];
81 | }
82 |
83 | NSUInteger insertLocation = element.contentRange.location + element.contentRange.length - 1;
84 | [content insertString:methodImp atIndex:insertLocation];
85 |
86 | //invocation.buffer.completeBuffer = content; //crash! (╯‵□′)╯︵┻━┻
87 |
88 | //alternative:find the last @end
89 | for (int i = (int)lines.count-1; i >=0; i --) {
90 | NSString* l = lines[i];
91 | if ([l containsString:@"@end"]) {
92 | [lines insertObject:methodImp atIndex:i];
93 | break;
94 | }
95 | }
96 |
97 | return true;
98 | }
99 |
100 | return false;
101 | }
102 |
103 |
104 | @end
105 |
--------------------------------------------------------------------------------
/EasyCode.xcodeproj/xcuserdata/gaofeng.xcuserdatad/xcschemes/EasyCode.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/EC/3rdParty/NSString+PDRegex/NSString+PDRegex.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+PDRegex.m
3 | // RegexOnNSString
4 | //
5 | // Created by Carl Brown on 10/3/11.
6 | // Copyright 2011 PDAgent, LLC. Released under MIT License.
7 | //
8 |
9 | #import "NSString+PDRegex.h"
10 |
11 | @implementation NSString (PDRegex)
12 |
13 | -(NSString *) vv_stringByReplacingRegexPattern:(NSString *)regex withString:(NSString *) replacement caseInsensitive:(BOOL)ignoreCase {
14 | return [self vv_stringByReplacingRegexPattern:regex withString:replacement caseInsensitive:ignoreCase treatAsOneLine:NO];
15 | }
16 |
17 | -(NSString *) vv_stringByReplacingRegexPattern:(NSString *)regex withString:(NSString *) replacement caseInsensitive:(BOOL) ignoreCase treatAsOneLine:(BOOL) assumeMultiLine {
18 |
19 | NSUInteger options=0;
20 | if (ignoreCase) {
21 | options = options | NSRegularExpressionCaseInsensitive;
22 | }
23 | if (assumeMultiLine) {
24 | options = options | NSRegularExpressionDotMatchesLineSeparators;
25 | }
26 |
27 | NSError *error=nil;
28 | NSRegularExpression *pattern = [NSRegularExpression regularExpressionWithPattern:regex options:options error:&error];
29 | if (error) {
30 | NSLog(@"Error creating Regex: %@",[error description]);
31 | return nil;
32 | }
33 |
34 | NSString *retVal= [pattern stringByReplacingMatchesInString:self options:0 range:NSMakeRange(0, [self length]) withTemplate:replacement];
35 | return retVal;
36 | }
37 |
38 | -(NSString *) vv_stringByReplacingRegexPattern:(NSString *)regex withString:(NSString *) replacement {
39 | return [self vv_stringByReplacingRegexPattern:regex withString:replacement caseInsensitive:NO treatAsOneLine:NO];
40 | }
41 |
42 | -(NSArray *) vv_stringsByExtractingGroupsUsingRegexPattern:(NSString *)regex caseInsensitive:(BOOL) ignoreCase treatAsOneLine:(BOOL) assumeMultiLine {
43 | NSUInteger options=0;
44 | if (ignoreCase) {
45 | options = options | NSRegularExpressionCaseInsensitive;
46 | }
47 | if (assumeMultiLine) {
48 | options = options | NSRegularExpressionDotMatchesLineSeparators;
49 | }
50 |
51 | NSError *error=nil;
52 | NSRegularExpression *pattern = [NSRegularExpression regularExpressionWithPattern:regex options:options error:&error];
53 | if (error) {
54 | NSLog(@"Error creating Regex: %@",[error description]);
55 | return nil;
56 | }
57 |
58 | __block NSMutableArray *retVal = [NSMutableArray array];
59 | [pattern enumerateMatchesInString:self options:0 range:NSMakeRange(0, [self length]) usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {
60 | //Note, we only want to return the things in parens, so we're skipping index 0 intentionally
61 | for (int i=1; i<[result numberOfRanges]; i++) {
62 | NSString *matchedString=[self substringWithRange:[result rangeAtIndex:i]];
63 | [retVal addObject:matchedString];
64 | }
65 | }];
66 | return retVal;
67 | }
68 |
69 | -(NSArray *) vv_stringsByExtractingGroupsUsingRegexPattern:(NSString *)regex {
70 | return [self vv_stringsByExtractingGroupsUsingRegexPattern:regex caseInsensitive:NO treatAsOneLine:NO];
71 | }
72 |
73 | -(BOOL) vv_matchesPatternRegexPattern:(NSString *)regex caseInsensitive:(BOOL) ignoreCase treatAsOneLine:(BOOL) assumeMultiLine {
74 | NSUInteger options=0;
75 | if (ignoreCase) {
76 | options = options | NSRegularExpressionCaseInsensitive;
77 | }
78 | if (assumeMultiLine) {
79 | options = options | NSRegularExpressionDotMatchesLineSeparators;
80 | }
81 |
82 | NSError *error=nil;
83 | NSRegularExpression *pattern = [NSRegularExpression regularExpressionWithPattern:regex options:options error:&error];
84 | if (error) {
85 | NSLog(@"Error creating Regex: %@",[error description]);
86 | return NO; //Can't possibly match an invalid Regex
87 | }
88 |
89 | return ([pattern numberOfMatchesInString:self options:0 range:NSMakeRange(0, [self length])] > 0);
90 | }
91 |
92 | -(BOOL) vv_matchesPatternRegexPattern:(NSString *)regex {
93 | return [self vv_matchesPatternRegexPattern:regex caseInsensitive:NO treatAsOneLine:NO];
94 | }
95 |
96 | @end
97 |
--------------------------------------------------------------------------------
/EasyCode/SharedLogic/ESharedUserDefault.m:
--------------------------------------------------------------------------------
1 | //
2 | // ESharedUserDefault.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "ESharedUserDefault.h"
10 | #import "ECMappingForObjectiveC.h"
11 | #import "ECMappingForSwift.h"
12 |
13 | #define KeySharedContainerGroup @"2WQE6AU5PD.group.com.music4kid.easycode"
14 |
15 | #define KeyCodeShortcutForObjectiveC @"KeyCodeShortcutForObjectiveC"
16 | #define KeyCodeShortcutForSwift @"KeyCodeShortcutForSwift"
17 |
18 | #define KeyCurrentUDVersion @"KeyCurrentUDVersion"
19 | #define ValueCurrentUDVersion @"1"
20 |
21 | @interface ESharedUserDefault ()
22 | @property (nonatomic, strong) NSUserDefaults* sharedUD;
23 |
24 | @property (nonatomic, strong) NSDictionary* ocMappingDefault;
25 | @property (nonatomic, strong) NSDictionary* swiftMappingDefault;
26 |
27 | @property (nonatomic, strong) NSMutableDictionary* ocMapping;
28 | @property (nonatomic, strong) NSMutableDictionary* swiftMapping;
29 |
30 | @end
31 |
32 | @implementation ESharedUserDefault
33 |
34 | + (instancetype)sharedInstance
35 | {
36 | static ESharedUserDefault* instance = nil;
37 |
38 | static dispatch_once_t onceToken;
39 | dispatch_once(&onceToken, ^{
40 | instance = [ESharedUserDefault new];
41 | });
42 |
43 | return instance;
44 | }
45 |
46 | - (instancetype)init
47 | {
48 | self = [super init];
49 | if (self) {
50 |
51 | [self initSharedUD];
52 | }
53 | return self;
54 | }
55 |
56 | - (void)initSharedUD
57 | {
58 | self.sharedUD = [[NSUserDefaults alloc] initWithSuiteName:KeySharedContainerGroup];
59 | if ([_sharedUD objectForKey:KeyCurrentUDVersion] == nil) {
60 | [_sharedUD setObject:ValueCurrentUDVersion forKey:KeyCurrentUDVersion];
61 | }
62 | }
63 |
64 | - (void)clearMapping
65 | {
66 | _ocMapping = nil;
67 | _swiftMapping = nil;
68 | }
69 |
70 | #pragma mark - Objective-C
71 |
72 | - (NSDictionary*)readMappingForOC
73 | {
74 | if (_ocMapping == nil) {
75 | _ocMapping = [_sharedUD dictionaryForKey:KeyCodeShortcutForObjectiveC].mutableCopy;
76 |
77 | BOOL isMappingEmpty = false;
78 | if (_ocMapping == nil || (_ocMapping.allKeys.count == 1 && [_ocMapping[@"key"] isEqualToString:@"code"])) {
79 | isMappingEmpty = true;
80 | }
81 |
82 | if (isMappingEmpty == true) {
83 | _ocMapping = self.ocMappingDefault.mutableCopy;
84 | [self saveMappingForOC:self.ocMappingDefault];
85 | }
86 | }
87 |
88 | return _ocMapping;
89 | }
90 |
91 | - (void)saveMappingForOC:(NSDictionary*)mapping
92 | {
93 | if (mapping.allKeys.count == 0 || mapping.allKeys.count == 1) {
94 | return;
95 | }
96 | self.ocMapping = mapping.mutableCopy;
97 | [_sharedUD setObject:mapping forKey:KeyCodeShortcutForObjectiveC];
98 | [_sharedUD synchronize];
99 | }
100 |
101 | - (NSDictionary*)ocMappingDefault
102 | {
103 | if (_ocMappingDefault == nil) {
104 | _ocMappingDefault = [[ECMappingForObjectiveC new] provideMapping];
105 | }
106 | return _ocMappingDefault;
107 | }
108 |
109 | #pragma mark - Swift
110 |
111 | - (NSDictionary*)readMappingForSwift
112 | {
113 | if (_swiftMapping == nil) {
114 | _swiftMapping = [_sharedUD dictionaryForKey:KeyCodeShortcutForSwift].mutableCopy;
115 |
116 | BOOL isMappingEmpty = false;
117 | if (_ocMapping == nil || (_ocMapping.allKeys.count == 1 && [_ocMapping[@"key"] isEqualToString:@"code"])) {
118 | isMappingEmpty = true;
119 | }
120 |
121 | if (isMappingEmpty) {
122 | _swiftMapping = self.swiftMappingDefault.mutableCopy;
123 | [self saveMappingForOC:self.swiftMappingDefault];
124 | }
125 | }
126 |
127 | return _swiftMapping;
128 | }
129 |
130 | - (void)saveMappingForSwift:(NSDictionary*)mapping
131 | {
132 | self.swiftMapping = mapping.mutableCopy;
133 | [_sharedUD setObject:mapping forKey:KeyCodeShortcutForSwift];
134 | [_sharedUD synchronize];
135 | }
136 |
137 | - (NSDictionary*)swiftMappingDefault
138 | {
139 | if (_swiftMappingDefault == nil) {
140 | _swiftMappingDefault = [[ECMappingForSwift new] provideMapping];
141 | }
142 | return _swiftMappingDefault;
143 | }
144 |
145 | @end
146 |
--------------------------------------------------------------------------------
/EC/ECFileParser/FSElementPool.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSElementPool.m
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/17.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "FSElementPool.h"
10 | //#import "XCProject.h"
11 | //#import "XCSourceFile.h"
12 | //#import "XCSourceFile+Path.h"
13 |
14 | #import "FSInterfaceProcessor.h"
15 | #import "FSProtocolProcessor.h"
16 | #import "FSElementCache.h"
17 |
18 | @interface FSElementPool ()
19 | @property (nonatomic, strong) NSOperationQueue* parseQueue;
20 | @end
21 |
22 | @implementation FSElementPool
23 |
24 | + (instancetype)sharedInstance
25 | {
26 | static FSElementPool* instance = nil;
27 |
28 | static dispatch_once_t onceToken;
29 | dispatch_once(&onceToken, ^{
30 | instance = [FSElementPool new];
31 | });
32 |
33 | return instance;
34 | }
35 |
36 | - (instancetype)init
37 | {
38 | self = [super init];
39 | if (self) {
40 | _elementMap = @{}.mutableCopy;
41 |
42 | _parseQueue = [NSOperationQueue new];
43 | _parseQueue.maxConcurrentOperationCount = 1;
44 | }
45 | return self;
46 | }
47 |
48 | - (FSElementCache*)getElementFromCache:(NSString*)elementName
49 | {
50 | FSElementCache* match = [_elementMap objectForKey:elementName];
51 | return match;
52 | }
53 |
54 | //- (void)parseElementFromProjectFile:(NSString*)filePath complete:(dispatch_block_t)completeBlock
55 | //{
56 | // XCProject *project = [XCProject projectWithFilePath:filePath];
57 | // [_parseQueue addOperationWithBlock:^{
58 | // [self parseProject:project];
59 | // [[NSOperationQueue mainQueue] addOperationWithBlock:^{
60 | // completeBlock();
61 | // }];
62 | // }];
63 | //}
64 |
65 | - (void)parseHeaderFile:(NSString*)filePath
66 | {
67 | [self processHeaderPath:filePath];
68 | }
69 |
70 | //- (void)parseProject:(XCProject *)project
71 | //{
72 | // NSDate *start = [NSDate date];
73 | // NSMutableSet *missingFiles = [NSMutableSet set];
74 | // for (XCSourceFile *header in project.headerFiles) {
75 | // if (![self processHeaderPath:[header fullPath]]) {
76 | // NSString *file = [[header pathRelativeToProjectRoot] lastPathComponent];
77 | // if (file) {
78 | // [missingFiles addObject:file];
79 | // }
80 | // }
81 | // }
82 | //
83 | // NSString *projectDir = [[project filePath] stringByDeletingLastPathComponent];
84 | // NSArray *missingHeaderFullPaths = [self fullPathsForFiles:missingFiles inDirectory:projectDir];
85 | //
86 | // for (NSString *headerMissingFullpath in missingHeaderFullPaths) {
87 | // [self processHeaderPath:headerMissingFullpath];
88 | // }
89 | //
90 | // NSDate *methodFinish = [NSDate date];
91 | // NSTimeInterval executionTime = [methodFinish timeIntervalSinceDate:start];
92 | //
93 | // NSLog(@"project %@ - parse time: %f", [[project filePath] lastPathComponent], executionTime);
94 | //}
95 |
96 | - (BOOL)processHeaderPath:(NSString *)headerPath {
97 | @autoreleasepool {
98 | NSError *error = nil;
99 | NSString *content = [NSString stringWithContentsOfFile:headerPath encoding:NSUTF8StringEncoding error:&error];
100 | if (error) {
101 | return NO;
102 | }
103 |
104 | NSArray *processors = @[[FSInterfaceProcessor new], [FSProtocolProcessor new]];
105 |
106 | for (FSElementProcessor *processor in processors) {
107 | NSArray *elements = [processor createElements:content];
108 |
109 | for (FSElementCache* ele in elements) {
110 | ele.filePath = headerPath;
111 | [_elementMap setObject:ele forKey:ele.elementName];
112 | }
113 | }
114 |
115 | return YES;
116 | }
117 | }
118 |
119 | - (NSArray *)fullPathsForFiles:(NSSet *)fileNames inDirectory:(NSString *)directoryPath {
120 | NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:directoryPath];
121 |
122 | NSMutableArray *fullPaths = [NSMutableArray array];
123 |
124 | NSString *filePath = nil;
125 | while ( (filePath = [enumerator nextObject] ) != nil ){
126 | if ([fileNames containsObject:[filePath lastPathComponent]]) {
127 | [fullPaths addObject:[directoryPath stringByAppendingPathComponent:filePath]];
128 | }
129 | }
130 |
131 | return fullPaths;
132 | }
133 |
134 |
135 |
136 | @end
137 |
--------------------------------------------------------------------------------
/EasyCode.xcodeproj/xcuserdata/gaofeng.xcuserdatad/xcschemes/EC.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
6 |
9 |
10 |
16 |
22 |
23 |
24 |
30 |
36 |
37 |
38 |
39 |
40 |
45 |
46 |
47 |
48 |
54 |
55 |
56 |
57 |
58 |
59 |
70 |
74 |
75 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/DetailEditorController/DetailWindowController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/EC/ECMappingHelper.m:
--------------------------------------------------------------------------------
1 | //
2 | // ECMappingHelper.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/18.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "ECMappingHelper.h"
10 | #import "ECMappingForObjectiveC.h"
11 | #import "ECMappingForSwift.h"
12 | #import "ESharedUserDefault.h"
13 |
14 | @interface ECMappingHelper ()
15 | @property (nonatomic, strong) NSMutableDictionary* mappingOC;
16 | @property (nonatomic, strong) NSMutableDictionary* mappingSwift;
17 | @end
18 |
19 | @implementation ECMappingHelper
20 |
21 | + (instancetype)sharedInstance
22 | {
23 | static ECMappingHelper* instance = nil;
24 |
25 | static dispatch_once_t onceToken;
26 | dispatch_once(&onceToken, ^{
27 | instance = [ECMappingHelper new];
28 | });
29 |
30 | return instance;
31 | }
32 |
33 | - (instancetype)init
34 | {
35 | self = [super init];
36 | if (self) {
37 |
38 | }
39 | return self;
40 | }
41 |
42 | - (void)checkForDuplicatedKeys:(NSDictionary*)mapping
43 | {
44 | //check for duplicated keys
45 | NSArray* keys = mapping.allKeys;
46 | NSMutableDictionary* dic = @{}.mutableCopy;
47 | for (NSString* key in keys) {
48 | if ([dic objectForKey:keys]) {
49 | NSLog(@"detect duplicated keys!");
50 | }
51 | else
52 | {
53 | dic[key] = key;
54 | }
55 | }
56 | }
57 |
58 | - (BOOL)handleInvocation:(XCSourceEditorCommandInvocation *)invocation {
59 |
60 | //read from NSUserDefault each time
61 | [self clearMapping];
62 |
63 | XCSourceTextRange *selection = invocation.buffer.selections.firstObject;
64 | NSMutableArray* lines = invocation.buffer.lines;
65 | NSInteger index = selection.start.line;
66 | NSInteger column = selection.end.column;
67 |
68 | int matchedCount = 0;
69 |
70 | if (index > lines.count-1) {
71 | return false;
72 | }
73 |
74 | NSString* originalLine = lines[index];
75 |
76 | int matchLength = 8;//max match length for shortcut
77 | while (matchLength >= 1) {
78 |
79 | if (column-matchLength >= 0)
80 | {
81 | NSRange targetRange = NSMakeRange(column-matchLength, matchLength);
82 | NSString* lastNStr = [originalLine substringWithRange:targetRange];
83 |
84 | BOOL isOC = true;
85 | if ([invocation.buffer.contentUTI isEqualToString:@"public.swift-source"]) {
86 | isOC = false;
87 | }
88 | NSString* matchedVal = [self getMatchedCode:lastNStr isOC:isOC];
89 |
90 | if (matchedVal.length > 0) {
91 |
92 | int numberOfSpaceIndent = (int)[originalLine rangeOfString:lastNStr].location;
93 | NSString* indentStr = @"";
94 | while (numberOfSpaceIndent>0) {
95 | indentStr = [indentStr stringByAppendingString:@" "];
96 | numberOfSpaceIndent --;
97 | }
98 |
99 | NSArray* linesToInsert = [self convertToLines:matchedVal];
100 |
101 | //insert 1st line
102 | lines[index] = [originalLine stringByReplacingOccurrencesOfString:lastNStr
103 | withString:linesToInsert[0]
104 | options:NSBackwardsSearch
105 | range:targetRange];
106 |
107 | //insert the rest
108 | for (int i = 1; i < linesToInsert.count; i ++) {
109 | NSString* lineToInsert = linesToInsert[i];
110 | //indent
111 | lineToInsert = [NSString stringWithFormat:@"%@%@", indentStr, lineToInsert];
112 | [lines insertObject:lineToInsert atIndex:index+i];
113 | }
114 |
115 | matchedCount = matchLength;
116 |
117 | break;
118 | }
119 | }
120 |
121 | matchLength --;
122 |
123 | }
124 |
125 |
126 | //adjust selection
127 | if (matchedCount > 0) {
128 | selection.start = XCSourceTextPositionMake(selection.start.line, selection.start.column-matchedCount);
129 | selection.end = selection.start;
130 | }
131 | return true;
132 | }
133 |
134 |
135 | - (NSString*)getMatchedCode:(NSString*)abbr isOC:(BOOL)isOC
136 | {
137 | //need to detect swift or oc
138 | NSDictionary* mappingDic = nil;
139 |
140 | if (isOC) {
141 | mappingDic = self.mappingOC;
142 | }
143 | else
144 | {
145 | mappingDic = self.mappingSwift;
146 | }
147 |
148 | if ([mappingDic objectForKey:abbr] != nil) {
149 | return [mappingDic objectForKey:abbr];
150 | }
151 |
152 | return nil;
153 | }
154 |
155 |
156 | - (NSArray*)convertToLines:(NSString*)codeStr
157 | {
158 | NSMutableArray* lines = @[].mutableCopy;
159 |
160 | NSArray* arr = [codeStr componentsSeparatedByString:@"\n"];
161 |
162 | for (NSString* line in arr) {
163 | [lines addObject:line];
164 | }
165 |
166 | return lines;
167 | }
168 |
169 | - (NSMutableDictionary*)mappingOC
170 | {
171 | if (_mappingOC == nil) {
172 | _mappingOC = [_UD readMappingForOC].mutableCopy;
173 | }
174 | return _mappingOC;
175 | }
176 |
177 | - (NSMutableDictionary*)mappingSwift
178 | {
179 | if (_mappingSwift == nil) {
180 | _mappingSwift = [_UD readMappingForSwift].mutableCopy;
181 | }
182 | return _mappingSwift;
183 | }
184 |
185 | - (void)clearMapping
186 | {
187 | self.mappingOC = nil;
188 | self.mappingSwift = nil;
189 |
190 | [_UD clearMapping];
191 | }
192 |
193 | @end
194 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/EditorWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // EditorWindowController.m
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/20.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #import "EditorWindowController.h"
10 | #import "ESharedUserDefault.h"
11 | #import "EShortcutEntry.h"
12 | #import "DetailWindowController.h"
13 |
14 | @interface EditorWindowController ()
15 | @property (nonatomic, strong) NSMutableDictionary* mappingDic;
16 | @property (nonatomic, strong) NSMutableArray* mappingList;
17 | @property (nonatomic, assign) EditorType editorType;
18 |
19 | @property (nonatomic, strong) NSImage* imgEdit;
20 | @property (nonatomic, strong) NSImage* imgAdd;
21 | @property (nonatomic, strong) NSImage* imgRemove;
22 |
23 | @property (nonatomic, strong) DetailWindowController* detailEditor;
24 |
25 | @end
26 |
27 | @implementation EditorWindowController
28 |
29 | - (void)initEditorWindow:(EditorType)editorType {
30 | self.editorType = editorType;
31 |
32 | self.imgEdit = [NSImage imageNamed:@"edit"];
33 | self.imgAdd = [NSImage imageNamed:@"add"];
34 | self.imgRemove = [NSImage imageNamed:@"remove"];
35 |
36 | self.mappingList = @[].mutableCopy;
37 |
38 | if (_editorType == EditorTypeOC) {
39 | self.mappingDic = [_UD readMappingForOC].mutableCopy;
40 | self.window.title = @"Objective-C";
41 | }
42 | else if(_editorType == EditorTypeSwift)
43 | {
44 | self.mappingDic = [_UD readMappingForSwift].mutableCopy;
45 | self.window.title = @"Swift";
46 | }
47 |
48 | NSArray* keys = self.mappingDic.allKeys;
49 | keys = [keys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
50 | NSString* str1 = obj1;
51 | NSString* str2 = obj2;
52 | return [str1 compare:str2];
53 | }];
54 | for (NSString* key in keys) {
55 | EShortcutEntry* entry = [EShortcutEntry new];
56 | entry.key = key;
57 | entry.code = _mappingDic[key];
58 | [_mappingList addObject:entry];
59 | }
60 | [self sortMappingList];
61 | }
62 |
63 | - (void)windowDidLoad {
64 | [super windowDidLoad];
65 |
66 | [_tableView setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleNone];
67 | dispatch_async(dispatch_get_main_queue(), ^{
68 | [_tableView reloadData];
69 | });
70 |
71 | self.window.delegate = self;
72 | }
73 |
74 | - (void)tableViewSelectionDidChange:(NSNotification *)aNotification {
75 | NSInteger selectedRow = [_tableView selectedRow];
76 | NSTableRowView *myRowView = [_tableView rowViewAtRow:selectedRow makeIfNecessary:NO];
77 | [myRowView setEmphasized:NO];
78 | }
79 |
80 | - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
81 |
82 | // Get a new ViewCell
83 | NSTableCellView *cellView = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self];
84 | EShortcutEntry* entry = _mappingList[row];
85 |
86 | if( [tableColumn.identifier isEqualToString:@"cShortcut"] )
87 | {
88 | cellView.textField.stringValue = entry.key;
89 | return cellView;
90 | }
91 | if( [tableColumn.identifier isEqualToString:@"cCode"] )
92 | {
93 | cellView.textField.stringValue = entry.code;
94 | cellView.textField.textColor = [NSColor colorWithWhite:0.5 alpha:1];
95 | return cellView;
96 | }
97 | if( [tableColumn.identifier isEqualToString:@"cEditCode"] )
98 | {
99 | NSButton* btn = (NSButton*)cellView;
100 | btn.image = _imgEdit;
101 | [btn setTarget:self];
102 | [btn setAction:@selector(onEditCodeClick:)];
103 | return cellView;
104 | }
105 | if( [tableColumn.identifier isEqualToString:@"cAdd"] )
106 | {
107 | NSButton* btn = (NSButton*)cellView;
108 | btn.image = _imgAdd;
109 | [btn setTarget:self];
110 | [btn setAction:@selector(onAddEntryClick:)];
111 | return cellView;
112 | }
113 | if( [tableColumn.identifier isEqualToString:@"cRemove"] )
114 | {
115 | NSButton* btn = (NSButton*)cellView;
116 | btn.image = _imgRemove;
117 | [btn setTarget:self];
118 | [btn setAction:@selector(onRemoveEntryClick:)];
119 | return cellView;
120 | }
121 |
122 | return cellView;
123 | }
124 |
125 |
126 | - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView {
127 | return [self.mappingList count];
128 | }
129 |
130 | - (void)onEditCodeClick:(id)sender
131 | {
132 | NSButton* btn = sender;
133 | NSInteger row = [_tableView rowForView:btn];
134 | EShortcutEntry* entry = _mappingList[row];
135 | if (entry) {
136 | [self.detailEditor initWithMappingEntry:entry];
137 | self.detailEditor.editMode = DetailEditorModeUpdate;
138 | [self.detailEditor showWindow:self];
139 | }
140 | }
141 |
142 | - (void)onAddEntryClick:(id)sender
143 | {
144 | EShortcutEntry* entry = [EShortcutEntry new];
145 | [self.detailEditor initWithMappingEntry:entry];
146 | self.detailEditor.editMode = DetailEditorModeInsert;
147 | [self.detailEditor showWindow:self];
148 | }
149 |
150 | - (void)onRemoveEntryClick:(id)sender
151 | {
152 | NSButton* btn = sender;
153 | NSInteger row = [_tableView rowForView:btn];
154 | EShortcutEntry* entry = _mappingList[row];
155 | if (entry) {
156 | [_mappingList removeObject:entry];
157 | [self sortMappingList];
158 | [_tableView reloadData];
159 |
160 | [self saveMapping];
161 | }
162 | }
163 |
164 | - (DetailWindowController*)detailEditor
165 | {
166 | if (_detailEditor == nil) {
167 | self.detailEditor = [[DetailWindowController alloc] initWithWindowNibName:@"DetailWindowController"];
168 | _detailEditor.delegate = self;
169 | }
170 | return _detailEditor;
171 | }
172 |
173 | #pragma mark - DetailWindowEditorDelegate
174 | - (void)onEntryInserted:(EShortcutEntry*)entry {
175 | if (entry.key.length > 0 && entry.code.length > 0) {
176 | [_mappingList addObject:entry];
177 | [self sortMappingList];
178 | [_tableView reloadData];
179 |
180 | [self saveMapping];
181 | }
182 | }
183 |
184 | - (void)onEntryUpdated:(EShortcutEntry*)entry {
185 | [self sortMappingList];
186 | [_tableView reloadData];
187 |
188 | [self saveMapping];
189 | }
190 |
191 | - (void)windowWillClose:(NSNotification *)notification
192 | {
193 | [self saveMapping];
194 | }
195 |
196 | #pragma mark - Other
197 | - (void)saveMapping
198 | {
199 | NSMutableDictionary* newMapping = @{}.mutableCopy;
200 | for (EShortcutEntry* entry in _mappingList) {
201 | [newMapping setObject:entry.code forKey:entry.key];
202 | }
203 |
204 | if (_editorType == EditorTypeOC) {
205 | [_UD saveMappingForOC:newMapping];
206 | }
207 | else if(_editorType == EditorTypeSwift)
208 | {
209 | [_UD saveMappingForSwift:newMapping];
210 | }
211 | }
212 |
213 | - (void)sortMappingList
214 | {
215 | if (_mappingList.count == 0) {
216 | EShortcutEntry* testEntry = [EShortcutEntry new];
217 | testEntry.key = @"key";
218 | testEntry.code = @"code";
219 | [_mappingList addObject:testEntry];
220 | }
221 |
222 | [_mappingList sortUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
223 | EShortcutEntry* entry1 = obj1;
224 | EShortcutEntry* entry2 = obj2;
225 | return [entry1.key compare:entry2.key];
226 | }];
227 | }
228 |
229 | @end
230 |
--------------------------------------------------------------------------------
/EC/OCMapping.h:
--------------------------------------------------------------------------------
1 | //
2 | // OCMapping.h
3 | // EasyCode
4 | //
5 | // Created by gao feng on 2016/10/15.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #ifndef OCMapping_h
10 | #define OCMapping_h
11 |
12 | #pragma mark- UIViewController
13 |
14 | #define KeyOC_UIViewController_VDL @"vdl"
15 | #define KeyOC_UIViewController_VDL_Value @"\
16 | - (void)viewDidLoad\n\
17 | {\n\
18 | [super viewDidLoad];\n\
19 | \n\
20 | <#code#>\n\
21 | }"
22 |
23 | #define KeyOC_UIViewController_VWA @"vwa"
24 | #define KeyOC_UIViewController_VWA_Value @"\
25 | - (void)viewWillAppear:(BOOL)animated\n\
26 | {\n\
27 | [super viewWillAppear:animated];\n\
28 | \n\
29 | <#code#>\n\
30 | }"
31 |
32 | #define KeyOC_UIViewController_VDA @"vda"
33 | #define KeyOC_UIViewController_VDA_Value @"\
34 | - (void)viewDidAppear:(BOOL)animated\n\
35 | {\n\
36 | [super viewDidAppear:animated];\n\
37 | \n\
38 | <#code#>\n\
39 | }"
40 |
41 | #define KeyOC_UIViewController_VWD @"vwd"
42 | #define KeyOC_UIViewController_VWD_Value @"\
43 | - (void)viewWillDisappear:(BOOL)animated\n\
44 | {\n\
45 | [super viewWillDisappear:animated];\n\
46 | \n\
47 | <#code#>\n\
48 | }"
49 |
50 | #define KeyOC_UIViewController_VDD @"vdd"
51 | #define KeyOC_UIViewController_VDD_Value @"\
52 | - (void)viewDidDisappear:(BOOL)animated\n\
53 | {\n\
54 | [super viewDidDisappear:animated];\n\
55 | \n\
56 | <#code#>\n\
57 | }"
58 |
59 | #define KeyOC_UIViewController_DRM @"drm"
60 | #define KeyOC_UIViewController_DRM_Value @"\
61 | - (void)didReceiveMemoryWarning\n\
62 | {\n\
63 | <#code#>\n\
64 | }"
65 |
66 | #define KeyOC_UIViewController_SIO @"sio"
67 | #define KeyOC_UIViewController_SIO_Value @"\
68 | - (UIInterfaceOrientationMask)supportedInterfaceOrientations\n\
69 | {\n\
70 | <#code#>\n\
71 | }"
72 |
73 | #define KeyOC_UIViewController_PIO @"pio"
74 | #define KeyOC_UIViewController_PIO_Value @"\
75 | - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation\n\
76 | {\n\
77 | <#code#>\n\
78 | }"
79 |
80 |
81 | #pragma mark- UIView
82 |
83 | #define KeyOC_UIView_HTW @"htw"
84 | #define KeyOC_UIView_HTW_Value @"\
85 | - (nullable UIView *)hitTest:(CGPoint)point withEvent:(nullable UIEvent *)event\n\
86 | {\n\
87 | <#code#>\n\
88 | }"
89 |
90 | #define KeyOC_UIView_PIE @"pie"
91 | #define KeyOC_UIView_PIE_Value @"\
92 | - (BOOL)pointInside:(CGPoint)point withEvent:(nullable UIEvent *)event\n\
93 | {\n\
94 | <#code#>\n\
95 | }"
96 |
97 | #define KeyOC_UIView_CPT @"cpt"
98 | #define KeyOC_UIView_CPT_Value @"\
99 | - (CGPoint)convertPoint:(CGPoint)point toView:(nullable UIView *)view\n\
100 | {\n\
101 | <#code#>\n\
102 | }"
103 |
104 | #define KeyOC_UIView_CPF @"cpf"
105 | #define KeyOC_UIView_CPF_Value @"\
106 | - (CGPoint)convertPoint:(CGPoint)point fromView:(nullable UIView *)view\n\
107 | {\n\
108 | <#code#>\n\
109 | }"
110 |
111 | #define KeyOC_UIView_CRP @"crp"
112 | #define KeyOC_UIView_CRP_Value @"\
113 | - (CGRect)convertRect:(CGRect)rect toView:(nullable UIView *)view\n\
114 | {\n\
115 | <#code#>\n\
116 | }"
117 |
118 | #define KeyOC_UIView_CRF @"crf"
119 | #define KeyOC_UIView_CRF_Value @"\
120 | - (CGRect)convertRect:(CGRect)rect fromView:(nullable UIView *)view\n\
121 | {\n\
122 | <#code#>\n\
123 | }"
124 |
125 | #define KeyOC_UIView_DR @"dr"
126 | #define KeyOC_UIView_DR_Value @"\
127 | - (void)drawRect:(CGRect)rect\n\
128 | {\n\
129 | <#code#>\n\
130 | }"
131 |
132 | #pragma mark- UIAppication
133 | #define KeyOC_UIApplication_DRU @"dru"
134 | #define KeyOC_UIApplication_DRU_Value @"\
135 | - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings\n\
136 | {\n\
137 | <#code#>\n\
138 | }"
139 |
140 | #define KeyOC_UIApplication_DRF @"drf"
141 | #define KeyOC_UIApplication_DRF_Value @"\
142 | - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken\n\
143 | {\n\
144 | <#code#>\n\
145 | }"
146 |
147 | #define KeyOC_UIApplication_DRT @"drt"
148 | #define KeyOC_UIApplication_DRT_Value @"\
149 | - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error\n\
150 | {\n\
151 | <#code#>\n\
152 | }"
153 |
154 | #define KeyOC_UIApplication_DRR @"drr"
155 | #define KeyOC_UIApplication_DRR_Value @"\
156 | - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo\n\
157 | {\n\
158 | <#code#>\n\
159 | }"
160 |
161 | #define KeyOC_UIApplication_DRL @"drl"
162 | #define KeyOC_UIApplication_DRL_Value @"\
163 | - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification\n\
164 | {\n\
165 | <#code#>\n\
166 | }"
167 |
168 | #pragma mark- GCD
169 | #define KeyOC_GCD_DAFM @"dafm"
170 | #define KeyOC_GCD_DAFM_Value @"\
171 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(<#delayInSeconds#> * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{\n\
172 | <#code to be executed after a specified delay#>\n\
173 | });"
174 |
175 | #define KeyOC_GCD_DASM @"dasm"
176 | #define KeyOC_GCD_DASM_Value @"\
177 | dispatch_async(dispatch_get_main_queue(), ^{\n\
178 | <#code#>\n\
179 | });"
180 |
181 | #define KeyOC_GCD_DAFG @"dafg"
182 | #define KeyOC_GCD_DAFG_Value @"\
183 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(<#delayInSeconds#> * NSEC_PER_SEC)), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\n\
184 | <#code to be executed after a specified delay#>\n\
185 | });"
186 |
187 | #define KeyOC_GCD_DASG @"dasg"
188 | #define KeyOC_GCD_DASG_Value @"\
189 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\n\
190 | <#code#>\n\
191 | });"
192 |
193 |
194 | #pragma mark- MISC
195 | #define KeyOC_MISC_DEL @"del"
196 | #define KeyOC_MISC_DEL_Value @"\
197 | ([UIApplication sharedApplication].delegate)"
198 |
199 | #define KeyOC_MISC_V @"v"
200 | #define KeyOC_MISC_V_Value @"\
201 | - (void)<#method#>"
202 |
203 | #define KeyOC_MISC_C @"c"
204 | #define KeyOC_MISC_C_Value @"\
205 | [UIColor colorWith<#color#>]"
206 |
207 | #define KeyOC_MISC_P @"p"
208 | #define KeyOC_MISC_P_Value @"\
209 | @property (nonatomic, strong) <#type#> <#name#>"
210 |
211 | #define KeyOC_MISC_W @"w"
212 | #define KeyOC_MISC_W_Value @"\
213 | __weak __typeof(self) wself = self;"
214 |
215 | #define KeyOC_MISC_N @"n"
216 | #define KeyOC_MISC_N_Value @"\
217 | [[NSNotificationCenter defaultCenter] <#method#>];"
218 |
219 | #define KeyOC_MISC_U @"u"
220 | #define KeyOC_MISC_U_Value @"\
221 | [[NSUserDefaults standardUserDefaults] <#method#>];"
222 |
223 | #define KeyOC_MISC_F @"f"
224 | #define KeyOC_MISC_F_Value @"\
225 | [[NSFileManager defaultManager] <#method#>];"
226 |
227 | #define KeyOC_MISC_M @"m"
228 | #define KeyOC_MISC_M_Value @"\
229 | #pragma mark - <#text#>"
230 |
231 | #define KeyOC_MISC_URL @"url"
232 | #define KeyOC_MISC_URL_Value @"\
233 | [NSURL URLWithString:<#(nonnull NSString *)#>]"
234 |
235 | #define KeyOC_MISC_IMG @"img"
236 | #define KeyOC_MISC_IMG_Value @"\
237 | [UIImage imageNamed:<#(nonnull NSString *)#>];"
238 |
239 | #define KeyOC_MISC_BUN @"bun"
240 | #define KeyOC_MISC_BUN_Value @"\
241 | [[NSBundle mainBundle] pathForResource:<#(nullable NSString *)#> ofType:<#(nullable NSString *)#>];"
242 |
243 |
244 |
245 | #pragma mark- Template
246 | #define KeyOC_Template_Button @"btn"
247 | #define KeyOC_Template_Button_Value @"\
248 | UIButton *btn = [UIButton new];\n\
249 | [btn setBackgroundColor:<#(UIColor * _Nullable)#>];\n\
250 | [btn setTitle:<#(nullable NSString *)#> forState:UIControlStateNormal];\n\
251 | [btn addTarget:<#(nullable id)#> action:<#(nonnull SEL)#> forControlEvents:UIControlEventTouchUpInside];\n\
252 | [<#self#> addSubview:btn];\n\
253 | <#self.btn#> = btn;"
254 |
255 | #define KeyOC_Template_Label @"lb"
256 | #define KeyOC_Template_Label_Value @"\
257 | UILabel *lb = [UILabel new];\n\
258 | lb.text = <#text#>;\n\
259 | lb.textColor = <#(UIColor * _Nullable)#>;\n\
260 | lb.font = [UIFont systemFontOfSize:<#(CGFloat)#>];\n\
261 | lb.backgroundColor = [UIColor clearColor];\n\
262 | [<#self#> addSubview:lb];\n\
263 | <#self.lb#> = lb;"
264 |
265 | #define KeyOC_Template_ImageView @"iv"
266 | #define KeyOC_Template_ImageView_Value @"\
267 | UIImageView* imgV = [UIImageView new];\n\
268 | imgV.backgroundColor = [UIColor clearColor];\n\
269 | imgV.image = [UIImage imageNamed:<#(nonnull NSString *)#>];\n\
270 | [<#self#> addSubview:imgV];\n\
271 | <#self.imgV#> = imgV;"
272 |
273 |
274 |
275 |
276 |
277 | #endif /* OCMapping_h */
278 |
--------------------------------------------------------------------------------
/EC/ECFileParser/Processors/FSElementProcessor.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSElementProcessor.m
3 | // FastStub
4 | //
5 | // Created by gao feng on 16/5/16.
6 | // Copyright © 2016年 music4kid. All rights reserved.
7 | //
8 |
9 | #define MethodPattern @"(\\-)\\s*\\([\\w>?\\s]+(\\s*\\*)?\\)\
10 | \\w+(:\\([\\w\\s]+(\\s*\\*)?\\)\\w+\\s? *)?\
11 | ( *\\w+:\\([\\w\\s]+(\\s*\\*)?\\)\\w+\\s? *)*"
12 |
13 | #import "FSElementProcessor.h"
14 | #import "NSString+PDRegex.h"
15 | #import "FSElementProperty.h"
16 |
17 | @implementation FSElementProcessor
18 |
19 | - (NSString *)pattern {
20 | return nil;
21 | }
22 |
23 | - (FSElementCacheType)getElementType
24 | {
25 | return FSElementCacheInterface;
26 | }
27 |
28 | - (NSArray *)createElements:(NSString *)content {
29 | NSMutableArray *array = [NSMutableArray array];
30 | [self processContent:content resultBlock:^(NSTextCheckingResult *match, NSMatchingFlags flags, BOOL *stop) {
31 | FSElementCache* element = [self createClassElement:match from:content];
32 | if (element) {
33 | [array addObject:element];
34 | }
35 | }];
36 |
37 | return array;
38 | }
39 |
40 | - (void)processContent:(NSString *)content resultBlock:(processorResultBlock)resultBlock {
41 | [self processContent:content withPatternStr:[self pattern] resultBlock:resultBlock];
42 | }
43 |
44 | - (void)processContent:(NSString *)content withPatternStr:(NSString*)pattern resultBlock:(processorResultBlock)resultBlock {
45 | NSError *error = nil;
46 | NSString *classRegExp = pattern;
47 | NSRegularExpression *regex = [NSRegularExpression
48 | regularExpressionWithPattern:classRegExp
49 | options:NSRegularExpressionCaseInsensitive|NSRegularExpressionDotMatchesLineSeparators|NSRegularExpressionAnchorsMatchLines
50 | error:&error];
51 |
52 | if (error) {
53 | NSLog(@"processing header path error: %@", error);
54 | return;
55 | }
56 |
57 | [regex enumerateMatchesInString:content options:0 range:NSMakeRange(0, [content length]) usingBlock:^(NSTextCheckingResult *match, NSMatchingFlags flags, BOOL *stop){
58 | resultBlock(match, flags, stop);
59 | }];
60 | }
61 |
62 |
63 | - (FSElementCache *)createClassElement:(NSTextCheckingResult *)match from:(NSString *)content {
64 | NSRange matchRange = [match rangeAtIndex:2];
65 | NSString *matchString = [content substringWithRange:matchRange];
66 | NSString *matchTrim = [matchString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
67 | if ([matchTrim rangeOfString:@"("].location == NSNotFound)
68 | {
69 | int rangeIndex = 2;
70 | FSElementCache *element = [FSElementCache new];
71 | element.elementType = [self getElementType];
72 |
73 | //element begin range
74 | NSRange eRange = [match rangeAtIndex:1];
75 | eRange.length = 0;
76 | element.elementBeginRange = eRange;
77 |
78 | //parse class name
79 | NSRange matchRange = [match rangeAtIndex:rangeIndex];
80 | NSString *matchString = [content substringWithRange:matchRange];
81 | NSString *matchTrim = [matchString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
82 |
83 | element.elementName = matchTrim;
84 | rangeIndex++;
85 |
86 |
87 | //parse super class
88 | matchRange = [match rangeAtIndex:rangeIndex];
89 | if (matchRange.location != NSNotFound && element.elementType != FSElementCacheImp
90 | && element.elementType != FSElementCacheExtension
91 | && element.elementType != FSElementCacheCategory)
92 | {
93 | matchString = [content substringWithRange:matchRange];
94 | matchTrim = [matchString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
95 | if (matchTrim.length > 0) {
96 | [element.superClasses addObject:matchTrim];
97 | rangeIndex++;
98 | }
99 | }
100 |
101 |
102 | //parse protocols
103 | matchRange = [match rangeAtIndex:rangeIndex];
104 | if (matchRange.location != NSNotFound && element.elementType != FSElementCacheCategory)
105 | {
106 | matchString = [content substringWithRange:matchRange];
107 |
108 | NSString* newContent = [matchString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
109 | if ([newContent hasPrefix:@"()"]) {
110 | newContent = [newContent stringByReplacingCharactersInRange:NSMakeRange(0, 2) withString:@""];
111 | newContent = [newContent stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
112 | }
113 |
114 | if ([newContent hasPrefix:@"<"]) //possible protocols
115 | {
116 | [self processContent:newContent withPatternStr:@"(.*?)>" resultBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {
117 | NSRange protocolRange = [result rangeAtIndex:1];
118 | NSString *protocolString = [newContent substringWithRange:protocolRange];
119 |
120 | NSArray* protocols = [protocolString componentsSeparatedByString:@","];
121 | for (NSString* pstr in protocols) {
122 | NSString* protocolName = [pstr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
123 | [element.protocols addObject:protocolName];
124 | }
125 | }];
126 | }
127 | }
128 |
129 |
130 | //parse method list
131 | NSRange matchInterfaceRange = [match rangeAtIndex:rangeIndex];
132 | if (matchInterfaceRange.location != NSNotFound) {
133 | NSString* matchInterfaceString = [content substringWithRange:matchInterfaceRange];
134 | element.methodList = [self buildMethodList:matchInterfaceString].mutableCopy;
135 | element.contentRange = matchInterfaceRange;
136 |
137 | NSRange beginRange = [matchInterfaceString rangeOfString:@"\n"];
138 | beginRange.location = matchInterfaceRange.location + beginRange.location + 1;
139 | beginRange.length = 0;
140 | element.contentBeginRange = beginRange;
141 |
142 |
143 | //parse selector list
144 | if (element.elementType == FSElementCacheImp) {
145 | element.selectorList = [self buildSelectorList:matchInterfaceString].mutableCopy;
146 | }
147 | }
148 |
149 |
150 | //parse property list
151 | if (element.elementType == FSElementCacheInterface) {
152 | NSRange matchInterfaceRange = [match rangeAtIndex:rangeIndex];
153 | if (matchInterfaceRange.location != NSNotFound) {
154 | NSString* matchInterfaceString = [content substringWithRange:matchInterfaceRange];
155 | element.propertyList = [self buildPropertyList:matchInterfaceString].mutableCopy;
156 | }
157 | }
158 |
159 |
160 | return element;
161 | }
162 |
163 | return nil;
164 | }
165 |
166 | - (NSMutableSet*)buildSelectorList:(NSString*)content
167 | {
168 | return nil;
169 | }
170 |
171 | - (NSMutableSet*)buildMethodList:(NSString*)content
172 | {
173 | __block NSMutableSet* methods = [NSMutableSet new];
174 |
175 | //parse based on file type, better accuracy
176 | NSArray* matchedMethods = nil;
177 |
178 | FSElementCacheType etype = [self getElementType];
179 | NSString* regex = nil;
180 | if(etype == FSElementCacheInterface
181 | || etype == FSElementCacheExtension
182 | || etype == FSElementCacheProtocol
183 | || etype == FSElementCacheCategory)
184 | {
185 | regex = @"(?:^|\\r|\\n|\\r\\n)\\s*([-+])(.*?);";
186 | }
187 | else if(etype == FSElementCacheImp) {
188 | regex = @"(?:^|\\r|\\n|\\r\\n)\\s*([-+])(.*?)\\{";
189 | }
190 |
191 | matchedMethods = [content vv_stringsByExtractingGroupsUsingRegexPattern:regex caseInsensitive:false treatAsOneLine:true];
192 | for (int i = 0; i < matchedMethods.count; i+=2) {
193 | NSString* fullMethod = [NSString stringWithFormat:@"%@%@", matchedMethods[i], matchedMethods[i+1]];
194 | [methods addObject:fullMethod];
195 | }
196 |
197 | return methods;
198 | }
199 |
200 | - (NSMutableSet*)buildPropertyList:(NSString*)content
201 | {
202 | __block NSMutableSet* properties = [NSMutableSet new];
203 |
204 | //parse based on file type, better accuracy
205 | NSArray* matchedProperties = nil;
206 |
207 | NSString* regex = @"(?:^|\\r|\\n|\\r\\n)\\s*(?:@property)\\s*(?:\\\([^\\(^\\).]*\\\))?(.*?);";
208 |
209 | matchedProperties = [content vv_stringsByExtractingGroupsUsingRegexPattern:regex caseInsensitive:false treatAsOneLine:true];
210 | for (int i = 0; i < matchedProperties.count; i++) {
211 | NSString* propertyStr = [NSString stringWithFormat:@"%@", matchedProperties[i]];
212 | NSString* propertyStrTrim = [propertyStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
213 |
214 | FSElementProperty* p = [FSElementProperty new];
215 | if ([propertyStr rangeOfString:@"*"].location != NSNotFound) {
216 | propertyStrTrim = [propertyStrTrim stringByReplacingOccurrencesOfString:@"*" withString:@" "];
217 | NSString* re = @"^(.*)\\s+(?=(\\S*+)$)";
218 | NSArray* matches = [propertyStrTrim vv_stringsByExtractingGroupsUsingRegexPattern:re caseInsensitive:false treatAsOneLine:true];
219 | if (matches.count == 2) {
220 | NSString* typeStr = [matches[0] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
221 | p.propertyType = [NSString stringWithFormat:@"%@ *", typeStr];
222 | p.propertyName = [NSString stringWithFormat:@"%@", matches[1]];
223 | p.propertyName = [p.propertyName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
224 | }
225 | }
226 | else {
227 | NSString* re = @"^(.*)\\s+(?=(\\S*+)$)";
228 | NSArray* matches = [propertyStrTrim vv_stringsByExtractingGroupsUsingRegexPattern:re caseInsensitive:false treatAsOneLine:true];
229 | if (matches.count == 2) {
230 | NSString* typeStr = [matches[0] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
231 | p.propertyType = typeStr;
232 | p.propertyName = [NSString stringWithFormat:@"%@", matches[1]];
233 | p.propertyName = [p.propertyName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
234 | }
235 | }
236 |
237 | if (p.propertyType.length >0 && p.propertyName.length > 0) {
238 | [properties addObject:p];
239 | }
240 | }
241 |
242 | return properties;
243 | }
244 |
245 | @end
246 |
--------------------------------------------------------------------------------
/EasyCode/MappingEditor/EditorWindowController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
--------------------------------------------------------------------------------
/EasyCode.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 670F2ED51DB2284400A1739F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 670F2ED41DB2284400A1739F /* AppDelegate.m */; };
11 | 670F2ED81DB2284400A1739F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 670F2ED71DB2284400A1739F /* main.m */; };
12 | 670F2EDA1DB2284400A1739F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 670F2ED91DB2284400A1739F /* Assets.xcassets */; };
13 | 670F2EDD1DB2284400A1739F /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 670F2EDB1DB2284400A1739F /* MainMenu.xib */; };
14 | 670F2EEB1DB228DD00A1739F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 670F2EEA1DB228DD00A1739F /* Cocoa.framework */; };
15 | 670F2EF11DB228DD00A1739F /* SourceEditorExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 670F2EF01DB228DD00A1739F /* SourceEditorExtension.m */; };
16 | 670F2EF41DB228DD00A1739F /* SourceEditorCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 670F2EF31DB228DD00A1739F /* SourceEditorCommand.m */; };
17 | 670F2EF81DB228DD00A1739F /* EC.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 670F2EE81DB228DC00A1739F /* EC.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
18 | 6710398E1DB61E140040D421 /* Artboard-1024.png in Resources */ = {isa = PBXBuildFile; fileRef = 6710398D1DB61E140040D421 /* Artboard-1024.png */; };
19 | 671039901DB61E330040D421 /* Artboard-512.png in Resources */ = {isa = PBXBuildFile; fileRef = 6710398F1DB61E330040D421 /* Artboard-512.png */; };
20 | 671039951DB65D010040D421 /* Artboard-32.png in Resources */ = {isa = PBXBuildFile; fileRef = 671039911DB65D010040D421 /* Artboard-32.png */; };
21 | 671039961DB65D010040D421 /* Artboard-64.png in Resources */ = {isa = PBXBuildFile; fileRef = 671039921DB65D010040D421 /* Artboard-64.png */; };
22 | 671039971DB65D010040D421 /* Artboard-128.png in Resources */ = {isa = PBXBuildFile; fileRef = 671039931DB65D010040D421 /* Artboard-128.png */; };
23 | 671039981DB65D010040D421 /* Artboard-256.png in Resources */ = {isa = PBXBuildFile; fileRef = 671039941DB65D010040D421 /* Artboard-256.png */; };
24 | 6710399A1DB65D380040D421 /* Artboard-16.png in Resources */ = {isa = PBXBuildFile; fileRef = 671039991DB65D380040D421 /* Artboard-16.png */; };
25 | 6729B1BA1DB8CFA300885A9A /* ESharedUserDefault.h in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE4D1DB87340000408E7 /* ESharedUserDefault.h */; };
26 | 6729B1BB1DB8CFA300885A9A /* ESharedUserDefault.m in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE4E1DB87340000408E7 /* ESharedUserDefault.m */; };
27 | 67302B0D1DB23ACA0030C360 /* EasyCodeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 67302B0C1DB23ACA0030C360 /* EasyCodeManager.m */; };
28 | 67302B101DB23C010030C360 /* ECMappingForObjectiveC.m in Sources */ = {isa = PBXBuildFile; fileRef = 67302B0F1DB23C010030C360 /* ECMappingForObjectiveC.m */; };
29 | 6741CE4F1DB87340000408E7 /* ESharedUserDefault.m in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE4E1DB87340000408E7 /* ESharedUserDefault.m */; };
30 | 6741CE521DB87BC2000408E7 /* ECMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE511DB87BC2000408E7 /* ECMapping.m */; };
31 | 6741CE561DB87CE8000408E7 /* ECMapping.h in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE501DB87BC2000408E7 /* ECMapping.h */; };
32 | 6741CE571DB87CE8000408E7 /* ECMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE511DB87BC2000408E7 /* ECMapping.m */; };
33 | 6741CE581DB87CE8000408E7 /* ECMappingForSwift.h in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF68C1DB5B45400697135 /* ECMappingForSwift.h */; };
34 | 6741CE591DB87CE8000408E7 /* ECMappingForSwift.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF68D1DB5B45400697135 /* ECMappingForSwift.m */; };
35 | 6741CE5A1DB87CE8000408E7 /* SwiftMapping.h in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF68B1DB5B44000697135 /* SwiftMapping.h */; };
36 | 6741CE5B1DB87CE8000408E7 /* ECMappingForObjectiveC.h in Sources */ = {isa = PBXBuildFile; fileRef = 67302B0E1DB23C010030C360 /* ECMappingForObjectiveC.h */; };
37 | 6741CE5C1DB87CE8000408E7 /* ECMappingForObjectiveC.m in Sources */ = {isa = PBXBuildFile; fileRef = 67302B0F1DB23C010030C360 /* ECMappingForObjectiveC.m */; };
38 | 6741CE5D1DB87CE8000408E7 /* OCMapping.h in Sources */ = {isa = PBXBuildFile; fileRef = 6751C6251DB23D5500004735 /* OCMapping.h */; };
39 | 6741CE681DB884DD000408E7 /* EditorWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE661DB884DD000408E7 /* EditorWindowController.m */; };
40 | 6741CE691DB884DD000408E7 /* EditorWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6741CE671DB884DD000408E7 /* EditorWindowController.xib */; };
41 | 6741CE6C1DB89894000408E7 /* EShortcutEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE6B1DB89894000408E7 /* EShortcutEntry.m */; };
42 | 6741CE711DB8A04A000408E7 /* edit.png in Resources */ = {isa = PBXBuildFile; fileRef = 6741CE6E1DB8A04A000408E7 /* edit.png */; };
43 | 6741CE721DB8A04A000408E7 /* remove.png in Resources */ = {isa = PBXBuildFile; fileRef = 6741CE6F1DB8A04A000408E7 /* remove.png */; };
44 | 6741CE731DB8A04A000408E7 /* add.png in Resources */ = {isa = PBXBuildFile; fileRef = 6741CE701DB8A04A000408E7 /* add.png */; };
45 | 6741CE761DB8A713000408E7 /* EVerticalScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE751DB8A713000408E7 /* EVerticalScrollView.m */; };
46 | 6741CE791DB8B4DF000408E7 /* EEditorTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE781DB8B4DF000408E7 /* EEditorTableView.m */; };
47 | 6741CE7E1DB8BA19000408E7 /* DetailWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6741CE7C1DB8BA19000408E7 /* DetailWindowController.m */; };
48 | 6741CE7F1DB8BA19000408E7 /* DetailWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6741CE7D1DB8BA19000408E7 /* DetailWindowController.xib */; };
49 | 67AFF68E1DB5B45400697135 /* ECMappingForSwift.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF68D1DB5B45400697135 /* ECMappingForSwift.m */; };
50 | 67AFF6931DB5B71200697135 /* ECMappingHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6921DB5B71200697135 /* ECMappingHelper.m */; };
51 | 67AFF6A01DB5C8A100697135 /* ECGenerateHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF69F1DB5C8A100697135 /* ECGenerateHelper.m */; };
52 | 67AFF6E11DB5CBE000697135 /* FSElementPool.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6D01DB5CBE000697135 /* FSElementPool.m */; };
53 | 67AFF6E21DB5CBE000697135 /* FSElementCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6D31DB5CBE000697135 /* FSElementCache.m */; };
54 | 67AFF6E31DB5CBE000697135 /* FSCategoryProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6D61DB5CBE000697135 /* FSCategoryProcessor.m */; };
55 | 67AFF6E41DB5CBE000697135 /* FSElementProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6D81DB5CBE000697135 /* FSElementProcessor.m */; };
56 | 67AFF6E51DB5CBE000697135 /* FSExtensionProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6DA1DB5CBE000697135 /* FSExtensionProcessor.m */; };
57 | 67AFF6E61DB5CBE000697135 /* FSImpProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6DC1DB5CBE000697135 /* FSImpProcessor.m */; };
58 | 67AFF6E71DB5CBE000697135 /* FSInterfaceProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6DE1DB5CBE000697135 /* FSInterfaceProcessor.m */; };
59 | 67AFF6E81DB5CBE000697135 /* FSProtocolProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6E01DB5CBE000697135 /* FSProtocolProcessor.m */; };
60 | 67AFF6EB1DB5CBF500697135 /* ECFileParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6E91DB5CBF500697135 /* ECFileParser.m */; };
61 | 67AFF6F01DB5CC2E00697135 /* NSString+PDRegex.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6EF1DB5CC2E00697135 /* NSString+PDRegex.m */; };
62 | 67AFF6F31DB5CC5B00697135 /* FSElementProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 67AFF6F21DB5CC5B00697135 /* FSElementProperty.m */; };
63 | 67F73F9F1DCC8A70000780C3 /* mainbg.png in Resources */ = {isa = PBXBuildFile; fileRef = 67F73F9D1DCC8A70000780C3 /* mainbg.png */; };
64 | 67F73FA21DCC8ADF000780C3 /* mainbg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 67F73FA11DCC8ADF000780C3 /* mainbg@2x.png */; };
65 | 67F73FA51DCC8BF7000780C3 /* btnbg.png in Resources */ = {isa = PBXBuildFile; fileRef = 67F73FA31DCC8BF7000780C3 /* btnbg.png */; };
66 | 67F73FA61DCC8BF7000780C3 /* btnbg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 67F73FA41DCC8BF7000780C3 /* btnbg@2x.png */; };
67 | 67F73FA91DCC8E31000780C3 /* btnbg2.png in Resources */ = {isa = PBXBuildFile; fileRef = 67F73FA71DCC8E31000780C3 /* btnbg2.png */; };
68 | 67F73FAA1DCC8E31000780C3 /* btnbg2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 67F73FA81DCC8E31000780C3 /* btnbg2@2x.png */; };
69 | 67F73FAD1DCC9278000780C3 /* btnguide.png in Resources */ = {isa = PBXBuildFile; fileRef = 67F73FAB1DCC9278000780C3 /* btnguide.png */; };
70 | 67F73FAE1DCC9278000780C3 /* btnguide@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 67F73FAC1DCC9278000780C3 /* btnguide@2x.png */; };
71 | 67F73FB11DCC9625000780C3 /* CustomButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 67F73FB01DCC9625000780C3 /* CustomButton.m */; };
72 | /* End PBXBuildFile section */
73 |
74 | /* Begin PBXContainerItemProxy section */
75 | 670F2EF61DB228DD00A1739F /* PBXContainerItemProxy */ = {
76 | isa = PBXContainerItemProxy;
77 | containerPortal = 670F2EC81DB2284400A1739F /* Project object */;
78 | proxyType = 1;
79 | remoteGlobalIDString = 670F2EE71DB228DC00A1739F;
80 | remoteInfo = EC;
81 | };
82 | /* End PBXContainerItemProxy section */
83 |
84 | /* Begin PBXCopyFilesBuildPhase section */
85 | 670F2EFC1DB228DD00A1739F /* Embed App Extensions */ = {
86 | isa = PBXCopyFilesBuildPhase;
87 | buildActionMask = 2147483647;
88 | dstPath = "";
89 | dstSubfolderSpec = 13;
90 | files = (
91 | 670F2EF81DB228DD00A1739F /* EC.appex in Embed App Extensions */,
92 | );
93 | name = "Embed App Extensions";
94 | runOnlyForDeploymentPostprocessing = 0;
95 | };
96 | /* End PBXCopyFilesBuildPhase section */
97 |
98 | /* Begin PBXFileReference section */
99 | 670F2ED01DB2284400A1739F /* EasyCode.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EasyCode.app; sourceTree = BUILT_PRODUCTS_DIR; };
100 | 670F2ED31DB2284400A1739F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
101 | 670F2ED41DB2284400A1739F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
102 | 670F2ED71DB2284400A1739F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
103 | 670F2ED91DB2284400A1739F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
104 | 670F2EDC1DB2284400A1739F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
105 | 670F2EDE1DB2284400A1739F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
106 | 670F2EE81DB228DC00A1739F /* EC.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = EC.appex; sourceTree = BUILT_PRODUCTS_DIR; };
107 | 670F2EEA1DB228DD00A1739F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
108 | 670F2EEE1DB228DD00A1739F /* EC.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = EC.entitlements; sourceTree = ""; };
109 | 670F2EEF1DB228DD00A1739F /* SourceEditorExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SourceEditorExtension.h; sourceTree = ""; };
110 | 670F2EF01DB228DD00A1739F /* SourceEditorExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SourceEditorExtension.m; sourceTree = ""; };
111 | 670F2EF21DB228DD00A1739F /* SourceEditorCommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SourceEditorCommand.h; sourceTree = ""; };
112 | 670F2EF31DB228DD00A1739F /* SourceEditorCommand.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SourceEditorCommand.m; sourceTree = ""; };
113 | 670F2EF51DB228DD00A1739F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
114 | 6710398D1DB61E140040D421 /* Artboard-1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Artboard-1024.png"; sourceTree = ""; };
115 | 6710398F1DB61E330040D421 /* Artboard-512.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Artboard-512.png"; sourceTree = ""; };
116 | 671039911DB65D010040D421 /* Artboard-32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Artboard-32.png"; sourceTree = ""; };
117 | 671039921DB65D010040D421 /* Artboard-64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Artboard-64.png"; sourceTree = ""; };
118 | 671039931DB65D010040D421 /* Artboard-128.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Artboard-128.png"; sourceTree = ""; };
119 | 671039941DB65D010040D421 /* Artboard-256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Artboard-256.png"; sourceTree = ""; };
120 | 671039991DB65D380040D421 /* Artboard-16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Artboard-16.png"; sourceTree = ""; };
121 | 67302B0B1DB23ACA0030C360 /* EasyCodeManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EasyCodeManager.h; sourceTree = ""; };
122 | 67302B0C1DB23ACA0030C360 /* EasyCodeManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EasyCodeManager.m; sourceTree = ""; };
123 | 67302B0E1DB23C010030C360 /* ECMappingForObjectiveC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ECMappingForObjectiveC.h; sourceTree = ""; };
124 | 67302B0F1DB23C010030C360 /* ECMappingForObjectiveC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ECMappingForObjectiveC.m; sourceTree = ""; };
125 | 6741CE4D1DB87340000408E7 /* ESharedUserDefault.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESharedUserDefault.h; sourceTree = ""; };
126 | 6741CE4E1DB87340000408E7 /* ESharedUserDefault.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESharedUserDefault.m; sourceTree = ""; };
127 | 6741CE501DB87BC2000408E7 /* ECMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECMapping.h; path = ../../EC/ECMapping.h; sourceTree = ""; };
128 | 6741CE511DB87BC2000408E7 /* ECMapping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ECMapping.m; path = ../../EC/ECMapping.m; sourceTree = ""; };
129 | 6741CE651DB884DD000408E7 /* EditorWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorWindowController.h; sourceTree = ""; };
130 | 6741CE661DB884DD000408E7 /* EditorWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditorWindowController.m; sourceTree = ""; };
131 | 6741CE671DB884DD000408E7 /* EditorWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = EditorWindowController.xib; sourceTree = ""; };
132 | 6741CE6A1DB89894000408E7 /* EShortcutEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EShortcutEntry.h; sourceTree = ""; };
133 | 6741CE6B1DB89894000408E7 /* EShortcutEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EShortcutEntry.m; sourceTree = ""; };
134 | 6741CE6E1DB8A04A000408E7 /* edit.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = edit.png; sourceTree = ""; };
135 | 6741CE6F1DB8A04A000408E7 /* remove.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = remove.png; sourceTree = ""; };
136 | 6741CE701DB8A04A000408E7 /* add.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = add.png; sourceTree = ""; };
137 | 6741CE741DB8A713000408E7 /* EVerticalScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EVerticalScrollView.h; sourceTree = ""; };
138 | 6741CE751DB8A713000408E7 /* EVerticalScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EVerticalScrollView.m; sourceTree = ""; };
139 | 6741CE771DB8B4DF000408E7 /* EEditorTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EEditorTableView.h; sourceTree = ""; };
140 | 6741CE781DB8B4DF000408E7 /* EEditorTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EEditorTableView.m; sourceTree = ""; };
141 | 6741CE7B1DB8BA19000408E7 /* DetailWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailWindowController.h; sourceTree = ""; };
142 | 6741CE7C1DB8BA19000408E7 /* DetailWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailWindowController.m; sourceTree = ""; };
143 | 6741CE7D1DB8BA19000408E7 /* DetailWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DetailWindowController.xib; sourceTree = ""; };
144 | 6751C6251DB23D5500004735 /* OCMapping.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCMapping.h; sourceTree = ""; };
145 | 676E320D1DB70B2000C9DC9B /* EasyCode.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = EasyCode.entitlements; sourceTree = ""; };
146 | 67AFF68B1DB5B44000697135 /* SwiftMapping.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftMapping.h; sourceTree = ""; };
147 | 67AFF68C1DB5B45400697135 /* ECMappingForSwift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ECMappingForSwift.h; sourceTree = ""; };
148 | 67AFF68D1DB5B45400697135 /* ECMappingForSwift.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ECMappingForSwift.m; sourceTree = ""; };
149 | 67AFF6911DB5B71200697135 /* ECMappingHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ECMappingHelper.h; sourceTree = ""; };
150 | 67AFF6921DB5B71200697135 /* ECMappingHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ECMappingHelper.m; sourceTree = ""; };
151 | 67AFF69E1DB5C8A100697135 /* ECGenerateHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ECGenerateHelper.h; sourceTree = ""; };
152 | 67AFF69F1DB5C8A100697135 /* ECGenerateHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ECGenerateHelper.m; sourceTree = ""; };
153 | 67AFF6CF1DB5CBE000697135 /* FSElementPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSElementPool.h; sourceTree = ""; };
154 | 67AFF6D01DB5CBE000697135 /* FSElementPool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSElementPool.m; sourceTree = ""; };
155 | 67AFF6D21DB5CBE000697135 /* FSElementCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSElementCache.h; sourceTree = ""; };
156 | 67AFF6D31DB5CBE000697135 /* FSElementCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSElementCache.m; sourceTree = ""; };
157 | 67AFF6D51DB5CBE000697135 /* FSCategoryProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCategoryProcessor.h; sourceTree = ""; };
158 | 67AFF6D61DB5CBE000697135 /* FSCategoryProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCategoryProcessor.m; sourceTree = ""; };
159 | 67AFF6D71DB5CBE000697135 /* FSElementProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSElementProcessor.h; sourceTree = ""; };
160 | 67AFF6D81DB5CBE000697135 /* FSElementProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSElementProcessor.m; sourceTree = ""; };
161 | 67AFF6D91DB5CBE000697135 /* FSExtensionProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSExtensionProcessor.h; sourceTree = ""; };
162 | 67AFF6DA1DB5CBE000697135 /* FSExtensionProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSExtensionProcessor.m; sourceTree = ""; };
163 | 67AFF6DB1DB5CBE000697135 /* FSImpProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSImpProcessor.h; sourceTree = ""; };
164 | 67AFF6DC1DB5CBE000697135 /* FSImpProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSImpProcessor.m; sourceTree = ""; };
165 | 67AFF6DD1DB5CBE000697135 /* FSInterfaceProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSInterfaceProcessor.h; sourceTree = ""; };
166 | 67AFF6DE1DB5CBE000697135 /* FSInterfaceProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSInterfaceProcessor.m; sourceTree = ""; };
167 | 67AFF6DF1DB5CBE000697135 /* FSProtocolProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSProtocolProcessor.h; sourceTree = ""; };
168 | 67AFF6E01DB5CBE000697135 /* FSProtocolProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSProtocolProcessor.m; sourceTree = ""; };
169 | 67AFF6E91DB5CBF500697135 /* ECFileParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ECFileParser.m; sourceTree = ""; };
170 | 67AFF6EA1DB5CBF500697135 /* ECFileParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ECFileParser.h; sourceTree = ""; };
171 | 67AFF6EE1DB5CC2E00697135 /* NSString+PDRegex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+PDRegex.h"; sourceTree = ""; };
172 | 67AFF6EF1DB5CC2E00697135 /* NSString+PDRegex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+PDRegex.m"; sourceTree = ""; };
173 | 67AFF6F11DB5CC5B00697135 /* FSElementProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSElementProperty.h; sourceTree = ""; };
174 | 67AFF6F21DB5CC5B00697135 /* FSElementProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSElementProperty.m; sourceTree = ""; };
175 | 67F73F9D1DCC8A70000780C3 /* mainbg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mainbg.png; sourceTree = ""; };
176 | 67F73FA11DCC8ADF000780C3 /* mainbg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mainbg@2x.png"; sourceTree = ""; };
177 | 67F73FA31DCC8BF7000780C3 /* btnbg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btnbg.png; sourceTree = ""; };
178 | 67F73FA41DCC8BF7000780C3 /* btnbg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btnbg@2x.png"; sourceTree = ""; };
179 | 67F73FA71DCC8E31000780C3 /* btnbg2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btnbg2.png; sourceTree = ""; };
180 | 67F73FA81DCC8E31000780C3 /* btnbg2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btnbg2@2x.png"; sourceTree = ""; };
181 | 67F73FAB1DCC9278000780C3 /* btnguide.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btnguide.png; sourceTree = ""; };
182 | 67F73FAC1DCC9278000780C3 /* btnguide@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btnguide@2x.png"; sourceTree = ""; };
183 | 67F73FAF1DCC9625000780C3 /* CustomButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomButton.h; sourceTree = ""; };
184 | 67F73FB01DCC9625000780C3 /* CustomButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomButton.m; sourceTree = ""; };
185 | /* End PBXFileReference section */
186 |
187 | /* Begin PBXFrameworksBuildPhase section */
188 | 670F2ECD1DB2284400A1739F /* Frameworks */ = {
189 | isa = PBXFrameworksBuildPhase;
190 | buildActionMask = 2147483647;
191 | files = (
192 | );
193 | runOnlyForDeploymentPostprocessing = 0;
194 | };
195 | 670F2EE51DB228DC00A1739F /* Frameworks */ = {
196 | isa = PBXFrameworksBuildPhase;
197 | buildActionMask = 2147483647;
198 | files = (
199 | 670F2EEB1DB228DD00A1739F /* Cocoa.framework in Frameworks */,
200 | );
201 | runOnlyForDeploymentPostprocessing = 0;
202 | };
203 | /* End PBXFrameworksBuildPhase section */
204 |
205 | /* Begin PBXGroup section */
206 | 670F2EC71DB2284400A1739F = {
207 | isa = PBXGroup;
208 | children = (
209 | 670F2ED21DB2284400A1739F /* EasyCode */,
210 | 670F2EEC1DB228DD00A1739F /* EC */,
211 | 670F2EE91DB228DD00A1739F /* Frameworks */,
212 | 670F2ED11DB2284400A1739F /* Products */,
213 | );
214 | sourceTree = "";
215 | };
216 | 670F2ED11DB2284400A1739F /* Products */ = {
217 | isa = PBXGroup;
218 | children = (
219 | 670F2ED01DB2284400A1739F /* EasyCode.app */,
220 | 670F2EE81DB228DC00A1739F /* EC.appex */,
221 | );
222 | name = Products;
223 | sourceTree = "";
224 | };
225 | 670F2ED21DB2284400A1739F /* EasyCode */ = {
226 | isa = PBXGroup;
227 | children = (
228 | 6741CE5E1DB87FEC000408E7 /* MappingEditor */,
229 | 6741CE4C1DB8732D000408E7 /* SharedLogic */,
230 | 676E320D1DB70B2000C9DC9B /* EasyCode.entitlements */,
231 | 670F2ED31DB2284400A1739F /* AppDelegate.h */,
232 | 670F2ED41DB2284400A1739F /* AppDelegate.m */,
233 | 6741CE6D1DB89DFE000408E7 /* Resource */,
234 | 670F2ED91DB2284400A1739F /* Assets.xcassets */,
235 | 670F2EDB1DB2284400A1739F /* MainMenu.xib */,
236 | 670F2EDE1DB2284400A1739F /* Info.plist */,
237 | 670F2ED61DB2284400A1739F /* Supporting Files */,
238 | );
239 | path = EasyCode;
240 | sourceTree = "";
241 | };
242 | 670F2ED61DB2284400A1739F /* Supporting Files */ = {
243 | isa = PBXGroup;
244 | children = (
245 | 670F2ED71DB2284400A1739F /* main.m */,
246 | );
247 | name = "Supporting Files";
248 | sourceTree = "";
249 | };
250 | 670F2EE91DB228DD00A1739F /* Frameworks */ = {
251 | isa = PBXGroup;
252 | children = (
253 | 670F2EEA1DB228DD00A1739F /* Cocoa.framework */,
254 | );
255 | name = Frameworks;
256 | sourceTree = "";
257 | };
258 | 670F2EEC1DB228DD00A1739F /* EC */ = {
259 | isa = PBXGroup;
260 | children = (
261 | 670F2EEF1DB228DD00A1739F /* SourceEditorExtension.h */,
262 | 670F2EF01DB228DD00A1739F /* SourceEditorExtension.m */,
263 | 670F2EF21DB228DD00A1739F /* SourceEditorCommand.h */,
264 | 670F2EF31DB228DD00A1739F /* SourceEditorCommand.m */,
265 | 67302B0B1DB23ACA0030C360 /* EasyCodeManager.h */,
266 | 67302B0C1DB23ACA0030C360 /* EasyCodeManager.m */,
267 | 67AFF6941DB5BACE00697135 /* Features */,
268 | 670F2EF51DB228DD00A1739F /* Info.plist */,
269 | 67AFF6EC1DB5CC2E00697135 /* 3rdParty */,
270 | 670F2EED1DB228DD00A1739F /* Supporting Files */,
271 | );
272 | path = EC;
273 | sourceTree = "";
274 | };
275 | 670F2EED1DB228DD00A1739F /* Supporting Files */ = {
276 | isa = PBXGroup;
277 | children = (
278 | 6710398C1DB61E140040D421 /* Resources */,
279 | 670F2EEE1DB228DD00A1739F /* EC.entitlements */,
280 | );
281 | name = "Supporting Files";
282 | sourceTree = "";
283 | };
284 | 6710398C1DB61E140040D421 /* Resources */ = {
285 | isa = PBXGroup;
286 | children = (
287 | 671039991DB65D380040D421 /* Artboard-16.png */,
288 | 671039911DB65D010040D421 /* Artboard-32.png */,
289 | 671039921DB65D010040D421 /* Artboard-64.png */,
290 | 671039931DB65D010040D421 /* Artboard-128.png */,
291 | 671039941DB65D010040D421 /* Artboard-256.png */,
292 | 6710398F1DB61E330040D421 /* Artboard-512.png */,
293 | 6710398D1DB61E140040D421 /* Artboard-1024.png */,
294 | );
295 | path = Resources;
296 | sourceTree = "";
297 | };
298 | 6741CE4C1DB8732D000408E7 /* SharedLogic */ = {
299 | isa = PBXGroup;
300 | children = (
301 | 6741CE4D1DB87340000408E7 /* ESharedUserDefault.h */,
302 | 6741CE4E1DB87340000408E7 /* ESharedUserDefault.m */,
303 | 6741CE501DB87BC2000408E7 /* ECMapping.h */,
304 | 6741CE511DB87BC2000408E7 /* ECMapping.m */,
305 | 67AFF6901DB5B46000697135 /* Swift */,
306 | 67AFF68F1DB5B45A00697135 /* ObjectiveC */,
307 | );
308 | path = SharedLogic;
309 | sourceTree = "";
310 | };
311 | 6741CE5E1DB87FEC000408E7 /* MappingEditor */ = {
312 | isa = PBXGroup;
313 | children = (
314 | 6741CE7A1DB8B987000408E7 /* DetailEditorController */,
315 | 6741CE651DB884DD000408E7 /* EditorWindowController.h */,
316 | 6741CE661DB884DD000408E7 /* EditorWindowController.m */,
317 | 6741CE671DB884DD000408E7 /* EditorWindowController.xib */,
318 | 6741CE6A1DB89894000408E7 /* EShortcutEntry.h */,
319 | 6741CE6B1DB89894000408E7 /* EShortcutEntry.m */,
320 | 6741CE741DB8A713000408E7 /* EVerticalScrollView.h */,
321 | 6741CE751DB8A713000408E7 /* EVerticalScrollView.m */,
322 | 6741CE771DB8B4DF000408E7 /* EEditorTableView.h */,
323 | 6741CE781DB8B4DF000408E7 /* EEditorTableView.m */,
324 | 67F73FAF1DCC9625000780C3 /* CustomButton.h */,
325 | 67F73FB01DCC9625000780C3 /* CustomButton.m */,
326 | );
327 | path = MappingEditor;
328 | sourceTree = "";
329 | };
330 | 6741CE6D1DB89DFE000408E7 /* Resource */ = {
331 | isa = PBXGroup;
332 | children = (
333 | 67F73FAB1DCC9278000780C3 /* btnguide.png */,
334 | 67F73FAC1DCC9278000780C3 /* btnguide@2x.png */,
335 | 67F73FA71DCC8E31000780C3 /* btnbg2.png */,
336 | 67F73FA81DCC8E31000780C3 /* btnbg2@2x.png */,
337 | 67F73FA31DCC8BF7000780C3 /* btnbg.png */,
338 | 67F73FA41DCC8BF7000780C3 /* btnbg@2x.png */,
339 | 67F73FA11DCC8ADF000780C3 /* mainbg@2x.png */,
340 | 67F73F9D1DCC8A70000780C3 /* mainbg.png */,
341 | 6741CE6E1DB8A04A000408E7 /* edit.png */,
342 | 6741CE6F1DB8A04A000408E7 /* remove.png */,
343 | 6741CE701DB8A04A000408E7 /* add.png */,
344 | );
345 | path = Resource;
346 | sourceTree = "";
347 | };
348 | 6741CE7A1DB8B987000408E7 /* DetailEditorController */ = {
349 | isa = PBXGroup;
350 | children = (
351 | 6741CE7B1DB8BA19000408E7 /* DetailWindowController.h */,
352 | 6741CE7C1DB8BA19000408E7 /* DetailWindowController.m */,
353 | 6741CE7D1DB8BA19000408E7 /* DetailWindowController.xib */,
354 | );
355 | path = DetailEditorController;
356 | sourceTree = "";
357 | };
358 | 67AFF68F1DB5B45A00697135 /* ObjectiveC */ = {
359 | isa = PBXGroup;
360 | children = (
361 | 67302B0E1DB23C010030C360 /* ECMappingForObjectiveC.h */,
362 | 67302B0F1DB23C010030C360 /* ECMappingForObjectiveC.m */,
363 | 6751C6251DB23D5500004735 /* OCMapping.h */,
364 | );
365 | name = ObjectiveC;
366 | path = ../../EC;
367 | sourceTree = "";
368 | };
369 | 67AFF6901DB5B46000697135 /* Swift */ = {
370 | isa = PBXGroup;
371 | children = (
372 | 67AFF68C1DB5B45400697135 /* ECMappingForSwift.h */,
373 | 67AFF68D1DB5B45400697135 /* ECMappingForSwift.m */,
374 | 67AFF68B1DB5B44000697135 /* SwiftMapping.h */,
375 | );
376 | name = Swift;
377 | path = ../../EC;
378 | sourceTree = "";
379 | };
380 | 67AFF6941DB5BACE00697135 /* Features */ = {
381 | isa = PBXGroup;
382 | children = (
383 | 67AFF6CE1DB5CBE000697135 /* ECFileParser */,
384 | 67AFF69E1DB5C8A100697135 /* ECGenerateHelper.h */,
385 | 67AFF69F1DB5C8A100697135 /* ECGenerateHelper.m */,
386 | 67AFF6911DB5B71200697135 /* ECMappingHelper.h */,
387 | 67AFF6921DB5B71200697135 /* ECMappingHelper.m */,
388 | );
389 | name = Features;
390 | sourceTree = "";
391 | };
392 | 67AFF6CE1DB5CBE000697135 /* ECFileParser */ = {
393 | isa = PBXGroup;
394 | children = (
395 | 67AFF6EA1DB5CBF500697135 /* ECFileParser.h */,
396 | 67AFF6E91DB5CBF500697135 /* ECFileParser.m */,
397 | 67AFF6CF1DB5CBE000697135 /* FSElementPool.h */,
398 | 67AFF6D01DB5CBE000697135 /* FSElementPool.m */,
399 | 67AFF6D11DB5CBE000697135 /* Models */,
400 | 67AFF6D41DB5CBE000697135 /* Processors */,
401 | );
402 | path = ECFileParser;
403 | sourceTree = "";
404 | };
405 | 67AFF6D11DB5CBE000697135 /* Models */ = {
406 | isa = PBXGroup;
407 | children = (
408 | 67AFF6F11DB5CC5B00697135 /* FSElementProperty.h */,
409 | 67AFF6F21DB5CC5B00697135 /* FSElementProperty.m */,
410 | 67AFF6D21DB5CBE000697135 /* FSElementCache.h */,
411 | 67AFF6D31DB5CBE000697135 /* FSElementCache.m */,
412 | );
413 | path = Models;
414 | sourceTree = "";
415 | };
416 | 67AFF6D41DB5CBE000697135 /* Processors */ = {
417 | isa = PBXGroup;
418 | children = (
419 | 67AFF6D51DB5CBE000697135 /* FSCategoryProcessor.h */,
420 | 67AFF6D61DB5CBE000697135 /* FSCategoryProcessor.m */,
421 | 67AFF6D71DB5CBE000697135 /* FSElementProcessor.h */,
422 | 67AFF6D81DB5CBE000697135 /* FSElementProcessor.m */,
423 | 67AFF6D91DB5CBE000697135 /* FSExtensionProcessor.h */,
424 | 67AFF6DA1DB5CBE000697135 /* FSExtensionProcessor.m */,
425 | 67AFF6DB1DB5CBE000697135 /* FSImpProcessor.h */,
426 | 67AFF6DC1DB5CBE000697135 /* FSImpProcessor.m */,
427 | 67AFF6DD1DB5CBE000697135 /* FSInterfaceProcessor.h */,
428 | 67AFF6DE1DB5CBE000697135 /* FSInterfaceProcessor.m */,
429 | 67AFF6DF1DB5CBE000697135 /* FSProtocolProcessor.h */,
430 | 67AFF6E01DB5CBE000697135 /* FSProtocolProcessor.m */,
431 | );
432 | path = Processors;
433 | sourceTree = "";
434 | };
435 | 67AFF6EC1DB5CC2E00697135 /* 3rdParty */ = {
436 | isa = PBXGroup;
437 | children = (
438 | 67AFF6ED1DB5CC2E00697135 /* NSString+PDRegex */,
439 | );
440 | path = 3rdParty;
441 | sourceTree = "";
442 | };
443 | 67AFF6ED1DB5CC2E00697135 /* NSString+PDRegex */ = {
444 | isa = PBXGroup;
445 | children = (
446 | 67AFF6EE1DB5CC2E00697135 /* NSString+PDRegex.h */,
447 | 67AFF6EF1DB5CC2E00697135 /* NSString+PDRegex.m */,
448 | );
449 | path = "NSString+PDRegex";
450 | sourceTree = "";
451 | };
452 | /* End PBXGroup section */
453 |
454 | /* Begin PBXNativeTarget section */
455 | 670F2ECF1DB2284400A1739F /* EasyCode */ = {
456 | isa = PBXNativeTarget;
457 | buildConfigurationList = 670F2EE11DB2284400A1739F /* Build configuration list for PBXNativeTarget "EasyCode" */;
458 | buildPhases = (
459 | 670F2ECC1DB2284400A1739F /* Sources */,
460 | 670F2ECD1DB2284400A1739F /* Frameworks */,
461 | 670F2ECE1DB2284400A1739F /* Resources */,
462 | 670F2EFC1DB228DD00A1739F /* Embed App Extensions */,
463 | );
464 | buildRules = (
465 | );
466 | dependencies = (
467 | 670F2EF71DB228DD00A1739F /* PBXTargetDependency */,
468 | );
469 | name = EasyCode;
470 | productName = EasyCode;
471 | productReference = 670F2ED01DB2284400A1739F /* EasyCode.app */;
472 | productType = "com.apple.product-type.application";
473 | };
474 | 670F2EE71DB228DC00A1739F /* EC */ = {
475 | isa = PBXNativeTarget;
476 | buildConfigurationList = 670F2EF91DB228DD00A1739F /* Build configuration list for PBXNativeTarget "EC" */;
477 | buildPhases = (
478 | 670F2EE41DB228DC00A1739F /* Sources */,
479 | 670F2EE51DB228DC00A1739F /* Frameworks */,
480 | 670F2EE61DB228DC00A1739F /* Resources */,
481 | );
482 | buildRules = (
483 | );
484 | dependencies = (
485 | );
486 | name = EC;
487 | productName = EC;
488 | productReference = 670F2EE81DB228DC00A1739F /* EC.appex */;
489 | productType = "com.apple.product-type.xcode-extension";
490 | };
491 | /* End PBXNativeTarget section */
492 |
493 | /* Begin PBXProject section */
494 | 670F2EC81DB2284400A1739F /* Project object */ = {
495 | isa = PBXProject;
496 | attributes = {
497 | LastUpgradeCheck = 0800;
498 | ORGANIZATIONNAME = music4kid;
499 | TargetAttributes = {
500 | 670F2ECF1DB2284400A1739F = {
501 | CreatedOnToolsVersion = 8.0;
502 | DevelopmentTeam = 2WQE6AU5PD;
503 | ProvisioningStyle = Automatic;
504 | SystemCapabilities = {
505 | com.apple.ApplicationGroups.Mac = {
506 | enabled = 1;
507 | };
508 | com.apple.Sandbox = {
509 | enabled = 1;
510 | };
511 | };
512 | };
513 | 670F2EE71DB228DC00A1739F = {
514 | CreatedOnToolsVersion = 8.0;
515 | DevelopmentTeam = 2WQE6AU5PD;
516 | ProvisioningStyle = Automatic;
517 | SystemCapabilities = {
518 | com.apple.ApplicationGroups.Mac = {
519 | enabled = 1;
520 | };
521 | };
522 | };
523 | };
524 | };
525 | buildConfigurationList = 670F2ECB1DB2284400A1739F /* Build configuration list for PBXProject "EasyCode" */;
526 | compatibilityVersion = "Xcode 3.2";
527 | developmentRegion = English;
528 | hasScannedForEncodings = 0;
529 | knownRegions = (
530 | en,
531 | Base,
532 | );
533 | mainGroup = 670F2EC71DB2284400A1739F;
534 | productRefGroup = 670F2ED11DB2284400A1739F /* Products */;
535 | projectDirPath = "";
536 | projectRoot = "";
537 | targets = (
538 | 670F2ECF1DB2284400A1739F /* EasyCode */,
539 | 670F2EE71DB228DC00A1739F /* EC */,
540 | );
541 | };
542 | /* End PBXProject section */
543 |
544 | /* Begin PBXResourcesBuildPhase section */
545 | 670F2ECE1DB2284400A1739F /* Resources */ = {
546 | isa = PBXResourcesBuildPhase;
547 | buildActionMask = 2147483647;
548 | files = (
549 | 670F2EDA1DB2284400A1739F /* Assets.xcassets in Resources */,
550 | 6741CE711DB8A04A000408E7 /* edit.png in Resources */,
551 | 6741CE7F1DB8BA19000408E7 /* DetailWindowController.xib in Resources */,
552 | 67F73F9F1DCC8A70000780C3 /* mainbg.png in Resources */,
553 | 67F73FA91DCC8E31000780C3 /* btnbg2.png in Resources */,
554 | 670F2EDD1DB2284400A1739F /* MainMenu.xib in Resources */,
555 | 67F73FAE1DCC9278000780C3 /* btnguide@2x.png in Resources */,
556 | 67F73FA21DCC8ADF000780C3 /* mainbg@2x.png in Resources */,
557 | 67F73FAD1DCC9278000780C3 /* btnguide.png in Resources */,
558 | 6741CE731DB8A04A000408E7 /* add.png in Resources */,
559 | 67F73FA51DCC8BF7000780C3 /* btnbg.png in Resources */,
560 | 67F73FAA1DCC8E31000780C3 /* btnbg2@2x.png in Resources */,
561 | 6741CE691DB884DD000408E7 /* EditorWindowController.xib in Resources */,
562 | 6741CE721DB8A04A000408E7 /* remove.png in Resources */,
563 | 67F73FA61DCC8BF7000780C3 /* btnbg@2x.png in Resources */,
564 | );
565 | runOnlyForDeploymentPostprocessing = 0;
566 | };
567 | 670F2EE61DB228DC00A1739F /* Resources */ = {
568 | isa = PBXResourcesBuildPhase;
569 | buildActionMask = 2147483647;
570 | files = (
571 | 6710399A1DB65D380040D421 /* Artboard-16.png in Resources */,
572 | 671039961DB65D010040D421 /* Artboard-64.png in Resources */,
573 | 6710398E1DB61E140040D421 /* Artboard-1024.png in Resources */,
574 | 671039901DB61E330040D421 /* Artboard-512.png in Resources */,
575 | 671039951DB65D010040D421 /* Artboard-32.png in Resources */,
576 | 671039981DB65D010040D421 /* Artboard-256.png in Resources */,
577 | 671039971DB65D010040D421 /* Artboard-128.png in Resources */,
578 | );
579 | runOnlyForDeploymentPostprocessing = 0;
580 | };
581 | /* End PBXResourcesBuildPhase section */
582 |
583 | /* Begin PBXSourcesBuildPhase section */
584 | 670F2ECC1DB2284400A1739F /* Sources */ = {
585 | isa = PBXSourcesBuildPhase;
586 | buildActionMask = 2147483647;
587 | files = (
588 | 6741CE561DB87CE8000408E7 /* ECMapping.h in Sources */,
589 | 6741CE571DB87CE8000408E7 /* ECMapping.m in Sources */,
590 | 6741CE7E1DB8BA19000408E7 /* DetailWindowController.m in Sources */,
591 | 6741CE681DB884DD000408E7 /* EditorWindowController.m in Sources */,
592 | 6741CE761DB8A713000408E7 /* EVerticalScrollView.m in Sources */,
593 | 6741CE581DB87CE8000408E7 /* ECMappingForSwift.h in Sources */,
594 | 6741CE591DB87CE8000408E7 /* ECMappingForSwift.m in Sources */,
595 | 6741CE5A1DB87CE8000408E7 /* SwiftMapping.h in Sources */,
596 | 6741CE6C1DB89894000408E7 /* EShortcutEntry.m in Sources */,
597 | 6741CE5B1DB87CE8000408E7 /* ECMappingForObjectiveC.h in Sources */,
598 | 6741CE791DB8B4DF000408E7 /* EEditorTableView.m in Sources */,
599 | 6741CE5C1DB87CE8000408E7 /* ECMappingForObjectiveC.m in Sources */,
600 | 6741CE5D1DB87CE8000408E7 /* OCMapping.h in Sources */,
601 | 67F73FB11DCC9625000780C3 /* CustomButton.m in Sources */,
602 | 670F2ED81DB2284400A1739F /* main.m in Sources */,
603 | 6741CE4F1DB87340000408E7 /* ESharedUserDefault.m in Sources */,
604 | 670F2ED51DB2284400A1739F /* AppDelegate.m in Sources */,
605 | );
606 | runOnlyForDeploymentPostprocessing = 0;
607 | };
608 | 670F2EE41DB228DC00A1739F /* Sources */ = {
609 | isa = PBXSourcesBuildPhase;
610 | buildActionMask = 2147483647;
611 | files = (
612 | 6729B1BA1DB8CFA300885A9A /* ESharedUserDefault.h in Sources */,
613 | 6729B1BB1DB8CFA300885A9A /* ESharedUserDefault.m in Sources */,
614 | 67AFF6A01DB5C8A100697135 /* ECGenerateHelper.m in Sources */,
615 | 67AFF6931DB5B71200697135 /* ECMappingHelper.m in Sources */,
616 | 67302B101DB23C010030C360 /* ECMappingForObjectiveC.m in Sources */,
617 | 67AFF6F01DB5CC2E00697135 /* NSString+PDRegex.m in Sources */,
618 | 67AFF6E51DB5CBE000697135 /* FSExtensionProcessor.m in Sources */,
619 | 67AFF68E1DB5B45400697135 /* ECMappingForSwift.m in Sources */,
620 | 670F2EF11DB228DD00A1739F /* SourceEditorExtension.m in Sources */,
621 | 67AFF6E31DB5CBE000697135 /* FSCategoryProcessor.m in Sources */,
622 | 67AFF6F31DB5CC5B00697135 /* FSElementProperty.m in Sources */,
623 | 67302B0D1DB23ACA0030C360 /* EasyCodeManager.m in Sources */,
624 | 6741CE521DB87BC2000408E7 /* ECMapping.m in Sources */,
625 | 670F2EF41DB228DD00A1739F /* SourceEditorCommand.m in Sources */,
626 | 67AFF6E41DB5CBE000697135 /* FSElementProcessor.m in Sources */,
627 | 67AFF6E11DB5CBE000697135 /* FSElementPool.m in Sources */,
628 | 67AFF6E71DB5CBE000697135 /* FSInterfaceProcessor.m in Sources */,
629 | 67AFF6E81DB5CBE000697135 /* FSProtocolProcessor.m in Sources */,
630 | 67AFF6E21DB5CBE000697135 /* FSElementCache.m in Sources */,
631 | 67AFF6EB1DB5CBF500697135 /* ECFileParser.m in Sources */,
632 | 67AFF6E61DB5CBE000697135 /* FSImpProcessor.m in Sources */,
633 | );
634 | runOnlyForDeploymentPostprocessing = 0;
635 | };
636 | /* End PBXSourcesBuildPhase section */
637 |
638 | /* Begin PBXTargetDependency section */
639 | 670F2EF71DB228DD00A1739F /* PBXTargetDependency */ = {
640 | isa = PBXTargetDependency;
641 | target = 670F2EE71DB228DC00A1739F /* EC */;
642 | targetProxy = 670F2EF61DB228DD00A1739F /* PBXContainerItemProxy */;
643 | };
644 | /* End PBXTargetDependency section */
645 |
646 | /* Begin PBXVariantGroup section */
647 | 670F2EDB1DB2284400A1739F /* MainMenu.xib */ = {
648 | isa = PBXVariantGroup;
649 | children = (
650 | 670F2EDC1DB2284400A1739F /* Base */,
651 | );
652 | name = MainMenu.xib;
653 | sourceTree = "";
654 | };
655 | /* End PBXVariantGroup section */
656 |
657 | /* Begin XCBuildConfiguration section */
658 | 670F2EDF1DB2284400A1739F /* Debug */ = {
659 | isa = XCBuildConfiguration;
660 | buildSettings = {
661 | ALWAYS_SEARCH_USER_PATHS = NO;
662 | CLANG_ANALYZER_NONNULL = YES;
663 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
664 | CLANG_CXX_LIBRARY = "libc++";
665 | CLANG_ENABLE_MODULES = YES;
666 | CLANG_ENABLE_OBJC_ARC = YES;
667 | CLANG_WARN_BOOL_CONVERSION = YES;
668 | CLANG_WARN_CONSTANT_CONVERSION = YES;
669 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
670 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
671 | CLANG_WARN_EMPTY_BODY = YES;
672 | CLANG_WARN_ENUM_CONVERSION = YES;
673 | CLANG_WARN_INFINITE_RECURSION = YES;
674 | CLANG_WARN_INT_CONVERSION = YES;
675 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
676 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
677 | CLANG_WARN_UNREACHABLE_CODE = YES;
678 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
679 | CODE_SIGN_IDENTITY = "-";
680 | COPY_PHASE_STRIP = NO;
681 | DEBUG_INFORMATION_FORMAT = dwarf;
682 | ENABLE_STRICT_OBJC_MSGSEND = YES;
683 | ENABLE_TESTABILITY = YES;
684 | GCC_C_LANGUAGE_STANDARD = gnu99;
685 | GCC_DYNAMIC_NO_PIC = NO;
686 | GCC_NO_COMMON_BLOCKS = YES;
687 | GCC_OPTIMIZATION_LEVEL = 0;
688 | GCC_PREPROCESSOR_DEFINITIONS = (
689 | "DEBUG=1",
690 | "$(inherited)",
691 | );
692 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
693 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
694 | GCC_WARN_UNDECLARED_SELECTOR = YES;
695 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
696 | GCC_WARN_UNUSED_FUNCTION = YES;
697 | GCC_WARN_UNUSED_VARIABLE = YES;
698 | MACOSX_DEPLOYMENT_TARGET = 10.12;
699 | MTL_ENABLE_DEBUG_INFO = YES;
700 | ONLY_ACTIVE_ARCH = YES;
701 | SDKROOT = macosx;
702 | };
703 | name = Debug;
704 | };
705 | 670F2EE01DB2284400A1739F /* Release */ = {
706 | isa = XCBuildConfiguration;
707 | buildSettings = {
708 | ALWAYS_SEARCH_USER_PATHS = NO;
709 | CLANG_ANALYZER_NONNULL = YES;
710 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
711 | CLANG_CXX_LIBRARY = "libc++";
712 | CLANG_ENABLE_MODULES = YES;
713 | CLANG_ENABLE_OBJC_ARC = YES;
714 | CLANG_WARN_BOOL_CONVERSION = YES;
715 | CLANG_WARN_CONSTANT_CONVERSION = YES;
716 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
717 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
718 | CLANG_WARN_EMPTY_BODY = YES;
719 | CLANG_WARN_ENUM_CONVERSION = YES;
720 | CLANG_WARN_INFINITE_RECURSION = YES;
721 | CLANG_WARN_INT_CONVERSION = YES;
722 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
723 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
724 | CLANG_WARN_UNREACHABLE_CODE = YES;
725 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
726 | CODE_SIGN_IDENTITY = "-";
727 | COPY_PHASE_STRIP = NO;
728 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
729 | ENABLE_NS_ASSERTIONS = NO;
730 | ENABLE_STRICT_OBJC_MSGSEND = YES;
731 | GCC_C_LANGUAGE_STANDARD = gnu99;
732 | GCC_NO_COMMON_BLOCKS = YES;
733 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
734 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
735 | GCC_WARN_UNDECLARED_SELECTOR = YES;
736 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
737 | GCC_WARN_UNUSED_FUNCTION = YES;
738 | GCC_WARN_UNUSED_VARIABLE = YES;
739 | MACOSX_DEPLOYMENT_TARGET = 10.12;
740 | MTL_ENABLE_DEBUG_INFO = NO;
741 | SDKROOT = macosx;
742 | };
743 | name = Release;
744 | };
745 | 670F2EE21DB2284400A1739F /* Debug */ = {
746 | isa = XCBuildConfiguration;
747 | buildSettings = {
748 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
749 | CODE_SIGN_ENTITLEMENTS = EasyCode/EasyCode.entitlements;
750 | CODE_SIGN_IDENTITY = "Mac Developer";
751 | COMBINE_HIDPI_IMAGES = YES;
752 | DEVELOPMENT_TEAM = 2WQE6AU5PD;
753 | INFOPLIST_FILE = EasyCode/Info.plist;
754 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
755 | MACOSX_DEPLOYMENT_TARGET = 10.11;
756 | PRODUCT_BUNDLE_IDENTIFIER = com.music4kid.ec;
757 | PRODUCT_NAME = "$(TARGET_NAME)";
758 | };
759 | name = Debug;
760 | };
761 | 670F2EE31DB2284400A1739F /* Release */ = {
762 | isa = XCBuildConfiguration;
763 | buildSettings = {
764 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
765 | CODE_SIGN_ENTITLEMENTS = EasyCode/EasyCode.entitlements;
766 | CODE_SIGN_IDENTITY = "Mac Developer";
767 | COMBINE_HIDPI_IMAGES = YES;
768 | DEVELOPMENT_TEAM = 2WQE6AU5PD;
769 | INFOPLIST_FILE = EasyCode/Info.plist;
770 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
771 | MACOSX_DEPLOYMENT_TARGET = 10.11;
772 | PRODUCT_BUNDLE_IDENTIFIER = com.music4kid.ec;
773 | PRODUCT_NAME = "$(TARGET_NAME)";
774 | };
775 | name = Release;
776 | };
777 | 670F2EFA1DB228DD00A1739F /* Debug */ = {
778 | isa = XCBuildConfiguration;
779 | buildSettings = {
780 | CODE_SIGN_ENTITLEMENTS = EC/EC.entitlements;
781 | CODE_SIGN_IDENTITY = "Mac Developer";
782 | COMBINE_HIDPI_IMAGES = YES;
783 | DEVELOPMENT_TEAM = 2WQE6AU5PD;
784 | INFOPLIST_FILE = EC/Info.plist;
785 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
786 | MACOSX_DEPLOYMENT_TARGET = 10.11;
787 | PRODUCT_BUNDLE_IDENTIFIER = com.music4kid.ec.ec;
788 | PRODUCT_NAME = EC;
789 | SKIP_INSTALL = YES;
790 | };
791 | name = Debug;
792 | };
793 | 670F2EFB1DB228DD00A1739F /* Release */ = {
794 | isa = XCBuildConfiguration;
795 | buildSettings = {
796 | CODE_SIGN_ENTITLEMENTS = EC/EC.entitlements;
797 | CODE_SIGN_IDENTITY = "Mac Developer";
798 | COMBINE_HIDPI_IMAGES = YES;
799 | DEVELOPMENT_TEAM = 2WQE6AU5PD;
800 | INFOPLIST_FILE = EC/Info.plist;
801 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
802 | MACOSX_DEPLOYMENT_TARGET = 10.11;
803 | PRODUCT_BUNDLE_IDENTIFIER = com.music4kid.ec.ec;
804 | PRODUCT_NAME = EC;
805 | SKIP_INSTALL = YES;
806 | };
807 | name = Release;
808 | };
809 | /* End XCBuildConfiguration section */
810 |
811 | /* Begin XCConfigurationList section */
812 | 670F2ECB1DB2284400A1739F /* Build configuration list for PBXProject "EasyCode" */ = {
813 | isa = XCConfigurationList;
814 | buildConfigurations = (
815 | 670F2EDF1DB2284400A1739F /* Debug */,
816 | 670F2EE01DB2284400A1739F /* Release */,
817 | );
818 | defaultConfigurationIsVisible = 0;
819 | defaultConfigurationName = Release;
820 | };
821 | 670F2EE11DB2284400A1739F /* Build configuration list for PBXNativeTarget "EasyCode" */ = {
822 | isa = XCConfigurationList;
823 | buildConfigurations = (
824 | 670F2EE21DB2284400A1739F /* Debug */,
825 | 670F2EE31DB2284400A1739F /* Release */,
826 | );
827 | defaultConfigurationIsVisible = 0;
828 | defaultConfigurationName = Release;
829 | };
830 | 670F2EF91DB228DD00A1739F /* Build configuration list for PBXNativeTarget "EC" */ = {
831 | isa = XCConfigurationList;
832 | buildConfigurations = (
833 | 670F2EFA1DB228DD00A1739F /* Debug */,
834 | 670F2EFB1DB228DD00A1739F /* Release */,
835 | );
836 | defaultConfigurationIsVisible = 0;
837 | defaultConfigurationName = Release;
838 | };
839 | /* End XCConfigurationList section */
840 | };
841 | rootObject = 670F2EC81DB2284400A1739F /* Project object */;
842 | }
843 |
--------------------------------------------------------------------------------