├── images
└── demo.gif
├── StrimmerWrapper.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcshareddata
│ └── xcschemes
│ │ ├── StrimmerWrapper.xcscheme
│ │ └── Strimmer.xcscheme
└── project.pbxproj
├── Strimmer
├── Strimmer.entitlements
├── SourceEditorExtension.swift
├── Info.plist
└── SourceEditorCommand.swift
├── StrimmerWrapper
├── AppDelegate.swift
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
└── Base.lproj
│ └── MainMenu.xib
├── LICENSE
├── .gitignore
└── README.md
/images/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squarefrog/strimmer/HEAD/images/demo.gif
--------------------------------------------------------------------------------
/StrimmerWrapper.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Strimmer/Strimmer.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/StrimmerWrapper/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // StrimmerWrapper
4 | //
5 | // Created by Paul Williamson on 20/06/2016.
6 | // Copyright © 2016 squarefrog. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | @NSApplicationMain
12 | class AppDelegate: NSObject, NSApplicationDelegate {
13 |
14 | @IBOutlet weak var window: NSWindow!
15 |
16 |
17 | func applicationDidFinishLaunching(_ aNotification: Notification) {
18 | // Insert code here to initialize your application
19 | }
20 |
21 | func applicationWillTerminate(_ aNotification: Notification) {
22 | // Insert code here to tear down your application
23 | }
24 |
25 |
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/Strimmer/SourceEditorExtension.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorExtension.swift
3 | // Strimmer
4 | //
5 | // Created by Paul Williamson on 20/06/2016.
6 | // Copyright © 2016 squarefrog. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import XcodeKit
11 |
12 | class SourceEditorExtension: NSObject, XCSourceEditorExtension {
13 |
14 | /*
15 | func extensionDidFinishLaunching() {
16 | // If your extension needs to do any work at launch, implement this optional method.
17 | }
18 | */
19 |
20 | /*
21 | var commandDefinitions: [[XCSourceEditorCommandDefinitionKey: AnyObject]] {
22 | // If your extension needs to return a collection of command definitions that differs from those in its Info.plist, implement this optional property getter.
23 | return []
24 | }
25 | */
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Paul Williamson
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 |
--------------------------------------------------------------------------------
/StrimmerWrapper/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/StrimmerWrapper/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
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2016 squarefrog. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/.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 | ## Playgrounds
31 | timeline.xctimeline
32 | playground.xcworkspace
33 |
34 | # Swift Package Manager
35 | #
36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
37 | # Packages/
38 | .build/
39 |
40 | # CocoaPods
41 | #
42 | # We recommend against adding the Pods directory to your .gitignore. However
43 | # you should judge for yourself, the pros and cons are mentioned at:
44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
45 | #
46 | # Pods/
47 |
48 | # Carthage
49 | #
50 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
51 | # Carthage/Checkouts
52 |
53 | Carthage/Build
54 |
55 | # fastlane
56 | #
57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
58 | # screenshots whenever they are needed.
59 | # For more information about the recommended setup visit:
60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
61 |
62 | fastlane/report.xml
63 | fastlane/Preview.html
64 | fastlane/screenshots
65 | fastlane/test_output
66 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Strimmer
2 |
3 | Strimmer is an Xcode 8 Source Code Extension that quickly strips all trailing whitespace from the current file.
4 |
5 | 
6 |
7 | ## Why?
8 |
9 | There are options in` Xcode Preferences > Text Editing > Editing` to `Automatically trim trailing whitespace`, `Including whitespace-only lines`. However this only works when your cursor moves past the line containing whitespace. This has the unfortunate side effect of meaning code copy and pasted in introduces whitespace lines. If you are smart you probably run [SwiftLint](https://github.com/realm/SwiftLint), which flags the trailing whitespace. It can also probably automatically fix it.
10 |
11 | However, I wanted to make an Xcode extension. So here we are...
12 |
13 | ## How to use:
14 |
15 | Until we can ship extensions, you will have to build this on your own.
16 |
17 | 1. Download Xcode 8 beta.
18 | 2. Open Xcode 8 beta, and install required dependencies.
19 | 3. If you are using El Capitan, open Terminal and run `sudo /usr/libexec/xpccachectl`, then restart your Mac.
20 | 4. Open the `StrimmerWrapper.xcodeproj` file in Xcode 8.
21 | 5. Choose the `Strimmer` scheme, and build and run.
22 | 6. Choose Xcode 8 as the target.
23 | 7. In the new Xcode 8 instance, with the grey Xcode icon, click `Editor > Strimmer > Strip All Whitespace from File`.
24 |
25 | ### That didn't work...
26 |
27 | The first Xcode 8 beta (8S128d) seems super buggy. Sometimes the Editor menu shows `Strimmer` but it doesn't have a fly out menu. If this happens, the following steps may help:
28 |
29 | * Clean build, and build folder
30 | * Restart Xcode
31 | * Rename the menu action slightly
32 | * Run the Xcode 8 target, select a line of text, stop the Xcode 8 target, and run again
33 | * Try again under a full moon
34 | * Shout loudly at Xcode
35 | * Sob uncontrollably
36 |
37 |
--------------------------------------------------------------------------------
/Strimmer/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Strimmer
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
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSExtension
28 |
29 | NSExtensionAttributes
30 |
31 | XCSourceEditorCommandDefinitions
32 |
33 |
34 | XCSourceEditorCommandClassName
35 | $(PRODUCT_MODULE_NAME).SourceEditorCommand
36 | XCSourceEditorCommandIdentifier
37 | uk.co.squarefrog.StrimmerWrapper.Strimmer.SourceEditorCommand
38 | XCSourceEditorCommandName
39 | Strip All Trailing Whitespace in File
40 |
41 |
42 | XCSourceEditorExtensionPrincipalClass
43 | $(PRODUCT_MODULE_NAME).SourceEditorExtension
44 |
45 | NSExtensionPointIdentifier
46 | com.apple.dt.Xcode.extension.source-editor
47 |
48 | NSHumanReadableCopyright
49 | Copyright © 2016 squarefrog. All rights reserved.
50 |
51 |
52 |
--------------------------------------------------------------------------------
/Strimmer/SourceEditorCommand.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorCommand.swift
3 | // Strimmer
4 | //
5 | // Created by Paul Williamson on 20/06/2016.
6 | // Copyright © 2016 squarefrog. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import XcodeKit
11 |
12 | class SourceEditorCommand: NSObject, XCSourceEditorCommand {
13 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void ) {
14 |
15 | // Keep an array of changed line indices.
16 | var changedLineIndexes = [Int]()
17 |
18 | // Loop through each line in the buffer, searching for trailing whitespace and replace only
19 | // the trailing whitespace.
20 | for lineIndex in 0 ..< invocation.buffer.lines.count {
21 | let originalLine = invocation.buffer.lines[lineIndex] as! String
22 | let newLine = originalLine.replacingOccurrences(of: "[ \t]+$",
23 | with: "",
24 | options: [])
25 |
26 | // Only update lines that have changed.
27 | if originalLine != newLine {
28 | changedLineIndexes.append(lineIndex)
29 | invocation.buffer.lines[lineIndex] = newLine
30 | }
31 | }
32 |
33 | // Select all lines that were replaced.
34 | let updatedSelections: [XCSourceTextRange] = changedLineIndexes.map { lineIndex in
35 | let lineSelection = XCSourceTextRange()
36 | lineSelection.start = XCSourceTextPosition(line: lineIndex, column: 0)
37 | lineSelection.end = XCSourceTextPosition(line: lineIndex + 1, column: 0)
38 | return lineSelection
39 | }
40 |
41 | // Set selections then return with no error.
42 | invocation.buffer.selections.setArray(updatedSelections)
43 | completionHandler(nil)
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/StrimmerWrapper.xcodeproj/xcshareddata/xcschemes/StrimmerWrapper.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 |
--------------------------------------------------------------------------------
/StrimmerWrapper.xcodeproj/xcshareddata/xcschemes/Strimmer.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 |
72 |
78 |
79 |
80 |
81 |
82 |
83 |
90 |
92 |
98 |
99 |
100 |
101 |
103 |
104 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/StrimmerWrapper.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0E15AF301D17E61300AAC3EB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E15AF2F1D17E61300AAC3EB /* AppDelegate.swift */; };
11 | 0E15AF321D17E61300AAC3EB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0E15AF311D17E61300AAC3EB /* Assets.xcassets */; };
12 | 0E15AF351D17E61300AAC3EB /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0E15AF331D17E61300AAC3EB /* MainMenu.xib */; };
13 | 0E15AF431D17E62100AAC3EB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E15AF421D17E62100AAC3EB /* Cocoa.framework */; };
14 | 0E15AF481D17E62100AAC3EB /* SourceEditorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E15AF471D17E62100AAC3EB /* SourceEditorExtension.swift */; };
15 | 0E15AF4A1D17E62100AAC3EB /* SourceEditorCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E15AF491D17E62100AAC3EB /* SourceEditorCommand.swift */; };
16 | 0E15AF4E1D17E62100AAC3EB /* Strimmer.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0E15AF401D17E62000AAC3EB /* Strimmer.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 0E15AF4C1D17E62100AAC3EB /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 0E15AF241D17E61300AAC3EB /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 0E15AF3F1D17E62000AAC3EB;
25 | remoteInfo = Strimmer;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXCopyFilesBuildPhase section */
30 | 0E15AF521D17E62100AAC3EB /* Embed App Extensions */ = {
31 | isa = PBXCopyFilesBuildPhase;
32 | buildActionMask = 2147483647;
33 | dstPath = "";
34 | dstSubfolderSpec = 13;
35 | files = (
36 | 0E15AF4E1D17E62100AAC3EB /* Strimmer.appex in Embed App Extensions */,
37 | );
38 | name = "Embed App Extensions";
39 | runOnlyForDeploymentPostprocessing = 0;
40 | };
41 | /* End PBXCopyFilesBuildPhase section */
42 |
43 | /* Begin PBXFileReference section */
44 | 0E15AF2C1D17E61300AAC3EB /* StrimmerWrapper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StrimmerWrapper.app; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 0E15AF2F1D17E61300AAC3EB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
46 | 0E15AF311D17E61300AAC3EB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
47 | 0E15AF341D17E61300AAC3EB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
48 | 0E15AF361D17E61300AAC3EB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
49 | 0E15AF401D17E62000AAC3EB /* Strimmer.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Strimmer.appex; sourceTree = BUILT_PRODUCTS_DIR; };
50 | 0E15AF421D17E62100AAC3EB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
51 | 0E15AF461D17E62100AAC3EB /* Strimmer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Strimmer.entitlements; sourceTree = ""; };
52 | 0E15AF471D17E62100AAC3EB /* SourceEditorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorExtension.swift; sourceTree = ""; };
53 | 0E15AF491D17E62100AAC3EB /* SourceEditorCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorCommand.swift; sourceTree = ""; };
54 | 0E15AF4B1D17E62100AAC3EB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
55 | /* End PBXFileReference section */
56 |
57 | /* Begin PBXFrameworksBuildPhase section */
58 | 0E15AF291D17E61300AAC3EB /* Frameworks */ = {
59 | isa = PBXFrameworksBuildPhase;
60 | buildActionMask = 2147483647;
61 | files = (
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | 0E15AF3D1D17E62000AAC3EB /* Frameworks */ = {
66 | isa = PBXFrameworksBuildPhase;
67 | buildActionMask = 2147483647;
68 | files = (
69 | 0E15AF431D17E62100AAC3EB /* Cocoa.framework in Frameworks */,
70 | );
71 | runOnlyForDeploymentPostprocessing = 0;
72 | };
73 | /* End PBXFrameworksBuildPhase section */
74 |
75 | /* Begin PBXGroup section */
76 | 0E15AF231D17E61300AAC3EB = {
77 | isa = PBXGroup;
78 | children = (
79 | 0E15AF2E1D17E61300AAC3EB /* StrimmerWrapper */,
80 | 0E15AF441D17E62100AAC3EB /* Strimmer */,
81 | 0E15AF411D17E62100AAC3EB /* Frameworks */,
82 | 0E15AF2D1D17E61300AAC3EB /* Products */,
83 | );
84 | sourceTree = "";
85 | };
86 | 0E15AF2D1D17E61300AAC3EB /* Products */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 0E15AF2C1D17E61300AAC3EB /* StrimmerWrapper.app */,
90 | 0E15AF401D17E62000AAC3EB /* Strimmer.appex */,
91 | );
92 | name = Products;
93 | sourceTree = "";
94 | };
95 | 0E15AF2E1D17E61300AAC3EB /* StrimmerWrapper */ = {
96 | isa = PBXGroup;
97 | children = (
98 | 0E15AF2F1D17E61300AAC3EB /* AppDelegate.swift */,
99 | 0E15AF311D17E61300AAC3EB /* Assets.xcassets */,
100 | 0E15AF331D17E61300AAC3EB /* MainMenu.xib */,
101 | 0E15AF361D17E61300AAC3EB /* Info.plist */,
102 | );
103 | path = StrimmerWrapper;
104 | sourceTree = "";
105 | };
106 | 0E15AF411D17E62100AAC3EB /* Frameworks */ = {
107 | isa = PBXGroup;
108 | children = (
109 | 0E15AF421D17E62100AAC3EB /* Cocoa.framework */,
110 | );
111 | name = Frameworks;
112 | sourceTree = "";
113 | };
114 | 0E15AF441D17E62100AAC3EB /* Strimmer */ = {
115 | isa = PBXGroup;
116 | children = (
117 | 0E15AF471D17E62100AAC3EB /* SourceEditorExtension.swift */,
118 | 0E15AF491D17E62100AAC3EB /* SourceEditorCommand.swift */,
119 | 0E15AF4B1D17E62100AAC3EB /* Info.plist */,
120 | 0E15AF451D17E62100AAC3EB /* Supporting Files */,
121 | );
122 | path = Strimmer;
123 | sourceTree = "";
124 | };
125 | 0E15AF451D17E62100AAC3EB /* Supporting Files */ = {
126 | isa = PBXGroup;
127 | children = (
128 | 0E15AF461D17E62100AAC3EB /* Strimmer.entitlements */,
129 | );
130 | name = "Supporting Files";
131 | sourceTree = "";
132 | };
133 | /* End PBXGroup section */
134 |
135 | /* Begin PBXNativeTarget section */
136 | 0E15AF2B1D17E61300AAC3EB /* StrimmerWrapper */ = {
137 | isa = PBXNativeTarget;
138 | buildConfigurationList = 0E15AF391D17E61300AAC3EB /* Build configuration list for PBXNativeTarget "StrimmerWrapper" */;
139 | buildPhases = (
140 | 0E15AF281D17E61300AAC3EB /* Sources */,
141 | 0E15AF291D17E61300AAC3EB /* Frameworks */,
142 | 0E15AF2A1D17E61300AAC3EB /* Resources */,
143 | 0E15AF521D17E62100AAC3EB /* Embed App Extensions */,
144 | );
145 | buildRules = (
146 | );
147 | dependencies = (
148 | 0E15AF4D1D17E62100AAC3EB /* PBXTargetDependency */,
149 | );
150 | name = StrimmerWrapper;
151 | productName = StrimmerWrapper;
152 | productReference = 0E15AF2C1D17E61300AAC3EB /* StrimmerWrapper.app */;
153 | productType = "com.apple.product-type.application";
154 | };
155 | 0E15AF3F1D17E62000AAC3EB /* Strimmer */ = {
156 | isa = PBXNativeTarget;
157 | buildConfigurationList = 0E15AF4F1D17E62100AAC3EB /* Build configuration list for PBXNativeTarget "Strimmer" */;
158 | buildPhases = (
159 | 0E15AF3C1D17E62000AAC3EB /* Sources */,
160 | 0E15AF3D1D17E62000AAC3EB /* Frameworks */,
161 | 0E15AF3E1D17E62000AAC3EB /* Resources */,
162 | );
163 | buildRules = (
164 | );
165 | dependencies = (
166 | );
167 | name = Strimmer;
168 | productName = Strimmer;
169 | productReference = 0E15AF401D17E62000AAC3EB /* Strimmer.appex */;
170 | productType = "com.apple.product-type.xcode-extension";
171 | };
172 | /* End PBXNativeTarget section */
173 |
174 | /* Begin PBXProject section */
175 | 0E15AF241D17E61300AAC3EB /* Project object */ = {
176 | isa = PBXProject;
177 | attributes = {
178 | LastSwiftUpdateCheck = 0800;
179 | LastUpgradeCheck = 0800;
180 | ORGANIZATIONNAME = squarefrog;
181 | TargetAttributes = {
182 | 0E15AF2B1D17E61300AAC3EB = {
183 | CreatedOnToolsVersion = 8.0;
184 | DevelopmentTeam = 86EBQCF3JT;
185 | DevelopmentTeamName = "Paul Williamson (Personal Team)";
186 | ProvisioningStyle = Automatic;
187 | };
188 | 0E15AF3F1D17E62000AAC3EB = {
189 | CreatedOnToolsVersion = 8.0;
190 | DevelopmentTeam = 86EBQCF3JT;
191 | DevelopmentTeamName = "Paul Williamson (Personal Team)";
192 | ProvisioningStyle = Automatic;
193 | };
194 | };
195 | };
196 | buildConfigurationList = 0E15AF271D17E61300AAC3EB /* Build configuration list for PBXProject "StrimmerWrapper" */;
197 | compatibilityVersion = "Xcode 3.2";
198 | developmentRegion = English;
199 | hasScannedForEncodings = 0;
200 | knownRegions = (
201 | en,
202 | Base,
203 | );
204 | mainGroup = 0E15AF231D17E61300AAC3EB;
205 | productRefGroup = 0E15AF2D1D17E61300AAC3EB /* Products */;
206 | projectDirPath = "";
207 | projectRoot = "";
208 | targets = (
209 | 0E15AF2B1D17E61300AAC3EB /* StrimmerWrapper */,
210 | 0E15AF3F1D17E62000AAC3EB /* Strimmer */,
211 | );
212 | };
213 | /* End PBXProject section */
214 |
215 | /* Begin PBXResourcesBuildPhase section */
216 | 0E15AF2A1D17E61300AAC3EB /* Resources */ = {
217 | isa = PBXResourcesBuildPhase;
218 | buildActionMask = 2147483647;
219 | files = (
220 | 0E15AF321D17E61300AAC3EB /* Assets.xcassets in Resources */,
221 | 0E15AF351D17E61300AAC3EB /* MainMenu.xib in Resources */,
222 | );
223 | runOnlyForDeploymentPostprocessing = 0;
224 | };
225 | 0E15AF3E1D17E62000AAC3EB /* Resources */ = {
226 | isa = PBXResourcesBuildPhase;
227 | buildActionMask = 2147483647;
228 | files = (
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXResourcesBuildPhase section */
233 |
234 | /* Begin PBXSourcesBuildPhase section */
235 | 0E15AF281D17E61300AAC3EB /* Sources */ = {
236 | isa = PBXSourcesBuildPhase;
237 | buildActionMask = 2147483647;
238 | files = (
239 | 0E15AF301D17E61300AAC3EB /* AppDelegate.swift in Sources */,
240 | );
241 | runOnlyForDeploymentPostprocessing = 0;
242 | };
243 | 0E15AF3C1D17E62000AAC3EB /* Sources */ = {
244 | isa = PBXSourcesBuildPhase;
245 | buildActionMask = 2147483647;
246 | files = (
247 | 0E15AF481D17E62100AAC3EB /* SourceEditorExtension.swift in Sources */,
248 | 0E15AF4A1D17E62100AAC3EB /* SourceEditorCommand.swift in Sources */,
249 | );
250 | runOnlyForDeploymentPostprocessing = 0;
251 | };
252 | /* End PBXSourcesBuildPhase section */
253 |
254 | /* Begin PBXTargetDependency section */
255 | 0E15AF4D1D17E62100AAC3EB /* PBXTargetDependency */ = {
256 | isa = PBXTargetDependency;
257 | target = 0E15AF3F1D17E62000AAC3EB /* Strimmer */;
258 | targetProxy = 0E15AF4C1D17E62100AAC3EB /* PBXContainerItemProxy */;
259 | };
260 | /* End PBXTargetDependency section */
261 |
262 | /* Begin PBXVariantGroup section */
263 | 0E15AF331D17E61300AAC3EB /* MainMenu.xib */ = {
264 | isa = PBXVariantGroup;
265 | children = (
266 | 0E15AF341D17E61300AAC3EB /* Base */,
267 | );
268 | name = MainMenu.xib;
269 | sourceTree = "";
270 | };
271 | /* End PBXVariantGroup section */
272 |
273 | /* Begin XCBuildConfiguration section */
274 | 0E15AF371D17E61300AAC3EB /* Debug */ = {
275 | isa = XCBuildConfiguration;
276 | buildSettings = {
277 | ALWAYS_SEARCH_USER_PATHS = NO;
278 | CLANG_ANALYZER_NONNULL = YES;
279 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
280 | CLANG_CXX_LIBRARY = "libc++";
281 | CLANG_ENABLE_MODULES = YES;
282 | CLANG_ENABLE_OBJC_ARC = YES;
283 | CLANG_WARN_BOOL_CONVERSION = YES;
284 | CLANG_WARN_CONSTANT_CONVERSION = YES;
285 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
286 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
287 | CLANG_WARN_EMPTY_BODY = YES;
288 | CLANG_WARN_ENUM_CONVERSION = YES;
289 | CLANG_WARN_INT_CONVERSION = YES;
290 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
291 | CLANG_WARN_UNREACHABLE_CODE = YES;
292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
293 | CODE_SIGN_IDENTITY = "-";
294 | COPY_PHASE_STRIP = NO;
295 | DEBUG_INFORMATION_FORMAT = dwarf;
296 | ENABLE_STRICT_OBJC_MSGSEND = YES;
297 | ENABLE_TESTABILITY = YES;
298 | GCC_C_LANGUAGE_STANDARD = gnu99;
299 | GCC_DYNAMIC_NO_PIC = NO;
300 | GCC_NO_COMMON_BLOCKS = YES;
301 | GCC_OPTIMIZATION_LEVEL = 0;
302 | GCC_PREPROCESSOR_DEFINITIONS = (
303 | "DEBUG=1",
304 | "$(inherited)",
305 | );
306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
308 | GCC_WARN_UNDECLARED_SELECTOR = YES;
309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
310 | GCC_WARN_UNUSED_FUNCTION = YES;
311 | GCC_WARN_UNUSED_VARIABLE = YES;
312 | MACOSX_DEPLOYMENT_TARGET = 10.11;
313 | MTL_ENABLE_DEBUG_INFO = YES;
314 | ONLY_ACTIVE_ARCH = YES;
315 | SDKROOT = macosx;
316 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
317 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
318 | };
319 | name = Debug;
320 | };
321 | 0E15AF381D17E61300AAC3EB /* Release */ = {
322 | isa = XCBuildConfiguration;
323 | buildSettings = {
324 | ALWAYS_SEARCH_USER_PATHS = NO;
325 | CLANG_ANALYZER_NONNULL = YES;
326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
327 | CLANG_CXX_LIBRARY = "libc++";
328 | CLANG_ENABLE_MODULES = YES;
329 | CLANG_ENABLE_OBJC_ARC = YES;
330 | CLANG_WARN_BOOL_CONVERSION = YES;
331 | CLANG_WARN_CONSTANT_CONVERSION = YES;
332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
333 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
334 | CLANG_WARN_EMPTY_BODY = YES;
335 | CLANG_WARN_ENUM_CONVERSION = YES;
336 | CLANG_WARN_INT_CONVERSION = YES;
337 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
338 | CLANG_WARN_UNREACHABLE_CODE = YES;
339 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
340 | CODE_SIGN_IDENTITY = "-";
341 | COPY_PHASE_STRIP = NO;
342 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
343 | ENABLE_NS_ASSERTIONS = NO;
344 | ENABLE_STRICT_OBJC_MSGSEND = YES;
345 | GCC_C_LANGUAGE_STANDARD = gnu99;
346 | GCC_NO_COMMON_BLOCKS = YES;
347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
349 | GCC_WARN_UNDECLARED_SELECTOR = YES;
350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
351 | GCC_WARN_UNUSED_FUNCTION = YES;
352 | GCC_WARN_UNUSED_VARIABLE = YES;
353 | MACOSX_DEPLOYMENT_TARGET = 10.11;
354 | MTL_ENABLE_DEBUG_INFO = NO;
355 | SDKROOT = macosx;
356 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
357 | };
358 | name = Release;
359 | };
360 | 0E15AF3A1D17E61300AAC3EB /* Debug */ = {
361 | isa = XCBuildConfiguration;
362 | buildSettings = {
363 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
364 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
365 | COMBINE_HIDPI_IMAGES = YES;
366 | INFOPLIST_FILE = StrimmerWrapper/Info.plist;
367 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
368 | PRODUCT_BUNDLE_IDENTIFIER = uk.co.squarefrog.StrimmerWrapper;
369 | PRODUCT_NAME = "$(TARGET_NAME)";
370 | SWIFT_VERSION = 3.0;
371 | };
372 | name = Debug;
373 | };
374 | 0E15AF3B1D17E61300AAC3EB /* Release */ = {
375 | isa = XCBuildConfiguration;
376 | buildSettings = {
377 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
378 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
379 | COMBINE_HIDPI_IMAGES = YES;
380 | INFOPLIST_FILE = StrimmerWrapper/Info.plist;
381 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
382 | PRODUCT_BUNDLE_IDENTIFIER = uk.co.squarefrog.StrimmerWrapper;
383 | PRODUCT_NAME = "$(TARGET_NAME)";
384 | SWIFT_VERSION = 3.0;
385 | };
386 | name = Release;
387 | };
388 | 0E15AF501D17E62100AAC3EB /* Debug */ = {
389 | isa = XCBuildConfiguration;
390 | buildSettings = {
391 | CODE_SIGN_ENTITLEMENTS = Strimmer/Strimmer.entitlements;
392 | COMBINE_HIDPI_IMAGES = YES;
393 | INFOPLIST_FILE = Strimmer/Info.plist;
394 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
395 | MACOSX_DEPLOYMENT_TARGET = 10.11;
396 | PRODUCT_BUNDLE_IDENTIFIER = uk.co.squarefrog.StrimmerWrapper.Strimmer;
397 | PRODUCT_NAME = "$(TARGET_NAME)";
398 | SKIP_INSTALL = YES;
399 | SWIFT_VERSION = 3.0;
400 | };
401 | name = Debug;
402 | };
403 | 0E15AF511D17E62100AAC3EB /* Release */ = {
404 | isa = XCBuildConfiguration;
405 | buildSettings = {
406 | CODE_SIGN_ENTITLEMENTS = Strimmer/Strimmer.entitlements;
407 | COMBINE_HIDPI_IMAGES = YES;
408 | INFOPLIST_FILE = Strimmer/Info.plist;
409 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
410 | MACOSX_DEPLOYMENT_TARGET = 10.11;
411 | PRODUCT_BUNDLE_IDENTIFIER = uk.co.squarefrog.StrimmerWrapper.Strimmer;
412 | PRODUCT_NAME = "$(TARGET_NAME)";
413 | SKIP_INSTALL = YES;
414 | SWIFT_VERSION = 3.0;
415 | };
416 | name = Release;
417 | };
418 | /* End XCBuildConfiguration section */
419 |
420 | /* Begin XCConfigurationList section */
421 | 0E15AF271D17E61300AAC3EB /* Build configuration list for PBXProject "StrimmerWrapper" */ = {
422 | isa = XCConfigurationList;
423 | buildConfigurations = (
424 | 0E15AF371D17E61300AAC3EB /* Debug */,
425 | 0E15AF381D17E61300AAC3EB /* Release */,
426 | );
427 | defaultConfigurationIsVisible = 0;
428 | defaultConfigurationName = Release;
429 | };
430 | 0E15AF391D17E61300AAC3EB /* Build configuration list for PBXNativeTarget "StrimmerWrapper" */ = {
431 | isa = XCConfigurationList;
432 | buildConfigurations = (
433 | 0E15AF3A1D17E61300AAC3EB /* Debug */,
434 | 0E15AF3B1D17E61300AAC3EB /* Release */,
435 | );
436 | defaultConfigurationIsVisible = 0;
437 | };
438 | 0E15AF4F1D17E62100AAC3EB /* Build configuration list for PBXNativeTarget "Strimmer" */ = {
439 | isa = XCConfigurationList;
440 | buildConfigurations = (
441 | 0E15AF501D17E62100AAC3EB /* Debug */,
442 | 0E15AF511D17E62100AAC3EB /* Release */,
443 | );
444 | defaultConfigurationIsVisible = 0;
445 | };
446 | /* End XCConfigurationList section */
447 | };
448 | rootObject = 0E15AF241D17E61300AAC3EB /* Project object */;
449 | }
450 |
--------------------------------------------------------------------------------
/StrimmerWrapper/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
--------------------------------------------------------------------------------