Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Xcode Source Editor Extension target
- Loading branch information
1 parent
a9f4521
commit ae6ae8e
Showing
5 changed files
with
269 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.app-sandbox</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>EditorPlusExtension</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>XPC!</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string> | ||
<key>NSExtension</key> | ||
<dict> | ||
<key>NSExtensionAttributes</key> | ||
<dict> | ||
<key>XCSourceEditorCommandDefinitions</key> | ||
<array> | ||
<dict> | ||
<key>XCSourceEditorCommandClassName</key> | ||
<string>$(PRODUCT_MODULE_NAME).SourceEditorCommand</string> | ||
<key>XCSourceEditorCommandIdentifier</key> | ||
<string>me.allblue.XcodeEditorPlus.EditorPlusExtension.SourceEditorCommand</string> | ||
<key>XCSourceEditorCommandName</key> | ||
<string>Source Editor Command</string> | ||
</dict> | ||
</array> | ||
<key>XCSourceEditorExtensionPrincipalClass</key> | ||
<string>$(PRODUCT_MODULE_NAME).SourceEditorExtension</string> | ||
</dict> | ||
<key>NSExtensionPointIdentifier</key> | ||
<string>com.apple.dt.Xcode.extension.source-editor</string> | ||
</dict> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>Copyright © 2016 Victor Wang. All rights reserved.</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// SourceEditorCommand.swift | ||
// EditorPlusExtension | ||
// | ||
// Created by Victor WANG on 02/07/2016. | ||
// Copyright © 2016 Victor Wang. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import XcodeKit | ||
|
||
class SourceEditorCommand: NSObject, XCSourceEditorCommand { | ||
|
||
func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: (NSError?) -> Void ) -> Void { | ||
// Implement your command here, invoking the completion handler when done. Pass it nil on success, and an NSError on failure. | ||
|
||
completionHandler(nil) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// SourceEditorExtension.swift | ||
// EditorPlusExtension | ||
// | ||
// Created by Victor WANG on 02/07/2016. | ||
// Copyright © 2016 Victor Wang. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import XcodeKit | ||
|
||
class SourceEditorExtension: NSObject, XCSourceEditorExtension { | ||
|
||
/* | ||
func extensionDidFinishLaunching() { | ||
// If your extension needs to do any work at launch, implement this optional method. | ||
} | ||
*/ | ||
|
||
/* | ||
var commandDefinitions: [[XCSourceEditorCommandDefinitionKey: AnyObject]] { | ||
// If your extension needs to return a collection of command definitions that differs from those in its Info.plist, implement this optional property getter. | ||
return [] | ||
} | ||
*/ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters