├── .gitignore
├── DuplicateLine
├── DuplicateLine.entitlements
├── Info.plist
├── SourceEditorCommand.swift
└── SourceEditorExtension.swift
├── LICENSE
├── README.md
├── Xcode8Extensions.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ └── contents.xcworkspacedata
├── Xcode8Extensions
├── AppDelegate.swift
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Base.lproj
│ └── MainMenu.xib
└── Info.plist
├── _config.yml
└── cover.gif
/.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 |
--------------------------------------------------------------------------------
/DuplicateLine/DuplicateLine.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/DuplicateLine/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | DuplicateLine
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 | castus.Xcode8Extensions.DuplicateLine.SourceEditorCommand
38 | XCSourceEditorCommandName
39 | Duplicate selected line(s)
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 Krzysztof Romanowski. All rights reserved.
50 |
51 |
52 |
--------------------------------------------------------------------------------
/DuplicateLine/SourceEditorCommand.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorCommand.swift
3 | // DuplicateLine
4 | //
5 | // Created by Krzysztof Romanowski on 18.06.2016.
6 | // Copyright © 2016 Krzysztof Romanowski. All rights reserved.
7 | //
8 |
9 | import XcodeKit
10 |
11 | class SourceEditorCommand: NSObject, XCSourceEditorCommand {
12 |
13 | public func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Swift.Void) {
14 | let buffer = invocation.buffer
15 |
16 | guard let selection = buffer.selections.firstObject as? XCSourceTextRange else {
17 | completionHandler(NSError(domain: "DuplicateLine", code: -1, userInfo: [NSLocalizedDescriptionKey: "No selection"]))
18 | return
19 | }
20 |
21 | let selectedRange = getSelection(forSelectedText: selection)
22 | let selectedLines = getSelectedLines(buffer: buffer, range: selectedRange)
23 |
24 | insert(lines: selectedLines, at: selection.start.line, for: buffer)
25 |
26 | completionHandler(nil)
27 | }
28 |
29 | fileprivate func getSelection(forSelectedText selectedText: XCSourceTextRange) -> CountableClosedRange {
30 | var selectedRange = selectedText.start.line...selectedText.end.line
31 |
32 | // For triple-click Xcode selects one additional line, we don't want to duplicate it
33 | let selectedRangeLength = selectedRange.distance(from: selectedRange.startIndex, to: selectedRange.endIndex)
34 | if selectedRangeLength > 1 && selectedText.end.column == 0 {
35 | selectedRange = selectedText.start.line...(selectedText.end.line - 1)
36 | }
37 |
38 | return selectedRange
39 | }
40 |
41 | fileprivate func getSelectedLines(buffer: XCSourceTextBuffer, range: CountableClosedRange) -> Array {
42 | var array = [Any]()
43 |
44 | for (i, index) in range.enumerated() {
45 | array.insert(buffer.lines[index], at: i)
46 | }
47 |
48 | return array
49 | }
50 |
51 | fileprivate func insert(lines: Array, at index: Int, for buffer: XCSourceTextBuffer) {
52 | for (i, line) in lines.enumerated() {
53 | buffer.lines.insert(line, at: index + i)
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/DuplicateLine/SourceEditorExtension.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorExtension.swift
3 | // DuplicateLine
4 | //
5 | // Created by Krzysztof Romanowski on 18.06.2016.
6 | // Copyright © 2016 Krzysztof Romanowski. All rights reserved.
7 | //
8 |
9 | import XcodeKit
10 |
11 | class SourceEditorExtension: NSObject, XCSourceEditorExtension {
12 |
13 | func extensionDidFinishLaunching() {
14 | print("DuplicateLine Extension started")
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Krzysztof Romanowski
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Duplicate Line
2 | Xcode's source editor extension to duplicate selected line or lines.
3 |
4 | 
5 |
6 |
7 | ## Usage:
8 |
9 | 1. Install Xcode 8
10 | 2. Run Xcode 8 and install additional system components
11 | 3. Open terminal.app and execute `sudo /usr/libexec/xpccachectl` if you use macOS 10.11
12 | 4. Reboot your mac
13 | 5. Open this project in Xcode 8 and run the extension
14 | 1. Wait for `DuplicateLine Extension started` message appears in console
15 | 2. If it isn't appear, you must run the extension once again
16 | 7. Select your code
17 | 8. Choose menu `Editor > DuplicateLine`
18 |
19 | *Notice*:Currently the Source Editor Extension feature in Xcode 8 Beta is very unstable. You may find that the command is sometimes not showing up, or not available (grayed out).
20 |
21 | # Xcode 7 version
22 | Available here https://github.com/castus/xcode-duplicate-line
23 |
24 |
25 | # License
26 | MIT License. See the LICENSE file for more information.
27 |
--------------------------------------------------------------------------------
/Xcode8Extensions.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 20DC86171D15B03A0035AD64 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20DC86161D15B03A0035AD64 /* AppDelegate.swift */; };
11 | 20DC86191D15B03B0035AD64 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 20DC86181D15B03B0035AD64 /* Assets.xcassets */; };
12 | 20DC861C1D15B03B0035AD64 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 20DC861A1D15B03B0035AD64 /* MainMenu.xib */; };
13 | 20DC862A1D15B0480035AD64 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20DC86291D15B0480035AD64 /* Cocoa.framework */; };
14 | 20DC862F1D15B0480035AD64 /* SourceEditorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20DC862E1D15B0480035AD64 /* SourceEditorExtension.swift */; };
15 | 20DC86311D15B0480035AD64 /* SourceEditorCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20DC86301D15B0480035AD64 /* SourceEditorCommand.swift */; };
16 | 20DC86351D15B0480035AD64 /* DuplicateLine.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 20DC86271D15B0480035AD64 /* DuplicateLine.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 20DC86331D15B0480035AD64 /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 20DC860B1D15B03A0035AD64 /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 20DC86261D15B0480035AD64;
25 | remoteInfo = DuplicateLine;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXCopyFilesBuildPhase section */
30 | 20DC86391D15B0480035AD64 /* Embed App Extensions */ = {
31 | isa = PBXCopyFilesBuildPhase;
32 | buildActionMask = 2147483647;
33 | dstPath = "";
34 | dstSubfolderSpec = 13;
35 | files = (
36 | 20DC86351D15B0480035AD64 /* DuplicateLine.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 | 20DC86131D15B03A0035AD64 /* Xcode8Extensions.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Xcode8Extensions.app; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 20DC86161D15B03A0035AD64 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
46 | 20DC86181D15B03B0035AD64 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
47 | 20DC861B1D15B03B0035AD64 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
48 | 20DC861D1D15B03B0035AD64 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
49 | 20DC86271D15B0480035AD64 /* DuplicateLine.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = DuplicateLine.appex; sourceTree = BUILT_PRODUCTS_DIR; };
50 | 20DC86291D15B0480035AD64 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
51 | 20DC862D1D15B0480035AD64 /* DuplicateLine.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = DuplicateLine.entitlements; sourceTree = ""; };
52 | 20DC862E1D15B0480035AD64 /* SourceEditorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorExtension.swift; sourceTree = ""; };
53 | 20DC86301D15B0480035AD64 /* SourceEditorCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorCommand.swift; sourceTree = ""; };
54 | 20DC86321D15B0480035AD64 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
55 | /* End PBXFileReference section */
56 |
57 | /* Begin PBXFrameworksBuildPhase section */
58 | 20DC86101D15B03A0035AD64 /* Frameworks */ = {
59 | isa = PBXFrameworksBuildPhase;
60 | buildActionMask = 2147483647;
61 | files = (
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | 20DC86241D15B0480035AD64 /* Frameworks */ = {
66 | isa = PBXFrameworksBuildPhase;
67 | buildActionMask = 2147483647;
68 | files = (
69 | 20DC862A1D15B0480035AD64 /* Cocoa.framework in Frameworks */,
70 | );
71 | runOnlyForDeploymentPostprocessing = 0;
72 | };
73 | /* End PBXFrameworksBuildPhase section */
74 |
75 | /* Begin PBXGroup section */
76 | 20DC860A1D15B03A0035AD64 = {
77 | isa = PBXGroup;
78 | children = (
79 | 20DC86151D15B03A0035AD64 /* Xcode8Extensions */,
80 | 20DC862B1D15B0480035AD64 /* DuplicateLine */,
81 | 20DC86281D15B0480035AD64 /* Frameworks */,
82 | 20DC86141D15B03A0035AD64 /* Products */,
83 | );
84 | sourceTree = "";
85 | };
86 | 20DC86141D15B03A0035AD64 /* Products */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 20DC86131D15B03A0035AD64 /* Xcode8Extensions.app */,
90 | 20DC86271D15B0480035AD64 /* DuplicateLine.appex */,
91 | );
92 | name = Products;
93 | sourceTree = "";
94 | };
95 | 20DC86151D15B03A0035AD64 /* Xcode8Extensions */ = {
96 | isa = PBXGroup;
97 | children = (
98 | 20DC86161D15B03A0035AD64 /* AppDelegate.swift */,
99 | 20DC86181D15B03B0035AD64 /* Assets.xcassets */,
100 | 20DC861A1D15B03B0035AD64 /* MainMenu.xib */,
101 | 20DC861D1D15B03B0035AD64 /* Info.plist */,
102 | );
103 | path = Xcode8Extensions;
104 | sourceTree = "";
105 | };
106 | 20DC86281D15B0480035AD64 /* Frameworks */ = {
107 | isa = PBXGroup;
108 | children = (
109 | 20DC86291D15B0480035AD64 /* Cocoa.framework */,
110 | );
111 | name = Frameworks;
112 | sourceTree = "";
113 | };
114 | 20DC862B1D15B0480035AD64 /* DuplicateLine */ = {
115 | isa = PBXGroup;
116 | children = (
117 | 20DC862E1D15B0480035AD64 /* SourceEditorExtension.swift */,
118 | 20DC86301D15B0480035AD64 /* SourceEditorCommand.swift */,
119 | 20DC86321D15B0480035AD64 /* Info.plist */,
120 | 20DC862C1D15B0480035AD64 /* Supporting Files */,
121 | );
122 | path = DuplicateLine;
123 | sourceTree = "";
124 | };
125 | 20DC862C1D15B0480035AD64 /* Supporting Files */ = {
126 | isa = PBXGroup;
127 | children = (
128 | 20DC862D1D15B0480035AD64 /* DuplicateLine.entitlements */,
129 | );
130 | name = "Supporting Files";
131 | sourceTree = "";
132 | };
133 | /* End PBXGroup section */
134 |
135 | /* Begin PBXNativeTarget section */
136 | 20DC86121D15B03A0035AD64 /* Xcode8Extensions */ = {
137 | isa = PBXNativeTarget;
138 | buildConfigurationList = 20DC86201D15B03B0035AD64 /* Build configuration list for PBXNativeTarget "Xcode8Extensions" */;
139 | buildPhases = (
140 | 20DC860F1D15B03A0035AD64 /* Sources */,
141 | 20DC86101D15B03A0035AD64 /* Frameworks */,
142 | 20DC86111D15B03A0035AD64 /* Resources */,
143 | 20DC86391D15B0480035AD64 /* Embed App Extensions */,
144 | );
145 | buildRules = (
146 | );
147 | dependencies = (
148 | 20DC86341D15B0480035AD64 /* PBXTargetDependency */,
149 | );
150 | name = Xcode8Extensions;
151 | productName = Xcode8Extensions;
152 | productReference = 20DC86131D15B03A0035AD64 /* Xcode8Extensions.app */;
153 | productType = "com.apple.product-type.application";
154 | };
155 | 20DC86261D15B0480035AD64 /* DuplicateLine */ = {
156 | isa = PBXNativeTarget;
157 | buildConfigurationList = 20DC86361D15B0480035AD64 /* Build configuration list for PBXNativeTarget "DuplicateLine" */;
158 | buildPhases = (
159 | 20DC86231D15B0480035AD64 /* Sources */,
160 | 20DC86241D15B0480035AD64 /* Frameworks */,
161 | 20DC86251D15B0480035AD64 /* Resources */,
162 | );
163 | buildRules = (
164 | );
165 | dependencies = (
166 | );
167 | name = DuplicateLine;
168 | productName = DuplicateLine;
169 | productReference = 20DC86271D15B0480035AD64 /* DuplicateLine.appex */;
170 | productType = "com.apple.product-type.xcode-extension";
171 | };
172 | /* End PBXNativeTarget section */
173 |
174 | /* Begin PBXProject section */
175 | 20DC860B1D15B03A0035AD64 /* Project object */ = {
176 | isa = PBXProject;
177 | attributes = {
178 | LastSwiftUpdateCheck = 0800;
179 | LastUpgradeCheck = 0800;
180 | ORGANIZATIONNAME = "Krzysztof Romanowski";
181 | TargetAttributes = {
182 | 20DC86121D15B03A0035AD64 = {
183 | CreatedOnToolsVersion = 8.0;
184 | DevelopmentTeam = VFD5255ZKB;
185 | DevelopmentTeamName = "Krzysztof Romanowski (Personal Team)";
186 | ProvisioningStyle = Automatic;
187 | };
188 | 20DC86261D15B0480035AD64 = {
189 | CreatedOnToolsVersion = 8.0;
190 | DevelopmentTeam = VFD5255ZKB;
191 | DevelopmentTeamName = "Krzysztof Romanowski (Personal Team)";
192 | ProvisioningStyle = Automatic;
193 | };
194 | };
195 | };
196 | buildConfigurationList = 20DC860E1D15B03A0035AD64 /* Build configuration list for PBXProject "Xcode8Extensions" */;
197 | compatibilityVersion = "Xcode 3.2";
198 | developmentRegion = English;
199 | hasScannedForEncodings = 0;
200 | knownRegions = (
201 | en,
202 | Base,
203 | );
204 | mainGroup = 20DC860A1D15B03A0035AD64;
205 | productRefGroup = 20DC86141D15B03A0035AD64 /* Products */;
206 | projectDirPath = "";
207 | projectRoot = "";
208 | targets = (
209 | 20DC86121D15B03A0035AD64 /* Xcode8Extensions */,
210 | 20DC86261D15B0480035AD64 /* DuplicateLine */,
211 | );
212 | };
213 | /* End PBXProject section */
214 |
215 | /* Begin PBXResourcesBuildPhase section */
216 | 20DC86111D15B03A0035AD64 /* Resources */ = {
217 | isa = PBXResourcesBuildPhase;
218 | buildActionMask = 2147483647;
219 | files = (
220 | 20DC86191D15B03B0035AD64 /* Assets.xcassets in Resources */,
221 | 20DC861C1D15B03B0035AD64 /* MainMenu.xib in Resources */,
222 | );
223 | runOnlyForDeploymentPostprocessing = 0;
224 | };
225 | 20DC86251D15B0480035AD64 /* Resources */ = {
226 | isa = PBXResourcesBuildPhase;
227 | buildActionMask = 2147483647;
228 | files = (
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXResourcesBuildPhase section */
233 |
234 | /* Begin PBXSourcesBuildPhase section */
235 | 20DC860F1D15B03A0035AD64 /* Sources */ = {
236 | isa = PBXSourcesBuildPhase;
237 | buildActionMask = 2147483647;
238 | files = (
239 | 20DC86171D15B03A0035AD64 /* AppDelegate.swift in Sources */,
240 | );
241 | runOnlyForDeploymentPostprocessing = 0;
242 | };
243 | 20DC86231D15B0480035AD64 /* Sources */ = {
244 | isa = PBXSourcesBuildPhase;
245 | buildActionMask = 2147483647;
246 | files = (
247 | 20DC862F1D15B0480035AD64 /* SourceEditorExtension.swift in Sources */,
248 | 20DC86311D15B0480035AD64 /* SourceEditorCommand.swift in Sources */,
249 | );
250 | runOnlyForDeploymentPostprocessing = 0;
251 | };
252 | /* End PBXSourcesBuildPhase section */
253 |
254 | /* Begin PBXTargetDependency section */
255 | 20DC86341D15B0480035AD64 /* PBXTargetDependency */ = {
256 | isa = PBXTargetDependency;
257 | target = 20DC86261D15B0480035AD64 /* DuplicateLine */;
258 | targetProxy = 20DC86331D15B0480035AD64 /* PBXContainerItemProxy */;
259 | };
260 | /* End PBXTargetDependency section */
261 |
262 | /* Begin PBXVariantGroup section */
263 | 20DC861A1D15B03B0035AD64 /* MainMenu.xib */ = {
264 | isa = PBXVariantGroup;
265 | children = (
266 | 20DC861B1D15B03B0035AD64 /* Base */,
267 | );
268 | name = MainMenu.xib;
269 | sourceTree = "";
270 | };
271 | /* End PBXVariantGroup section */
272 |
273 | /* Begin XCBuildConfiguration section */
274 | 20DC861E1D15B03B0035AD64 /* 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 | 20DC861F1D15B03B0035AD64 /* 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 | 20DC86211D15B03B0035AD64 /* Debug */ = {
361 | isa = XCBuildConfiguration;
362 | buildSettings = {
363 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
364 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
365 | CODE_SIGN_IDENTITY = "Mac Developer";
366 | COMBINE_HIDPI_IMAGES = YES;
367 | INFOPLIST_FILE = Xcode8Extensions/Info.plist;
368 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
369 | PRODUCT_BUNDLE_IDENTIFIER = castus.Xcode8Extensions;
370 | PRODUCT_NAME = "$(TARGET_NAME)";
371 | SWIFT_VERSION = 3.0;
372 | };
373 | name = Debug;
374 | };
375 | 20DC86221D15B03B0035AD64 /* Release */ = {
376 | isa = XCBuildConfiguration;
377 | buildSettings = {
378 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
379 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
380 | CODE_SIGN_IDENTITY = "Mac Developer";
381 | COMBINE_HIDPI_IMAGES = YES;
382 | INFOPLIST_FILE = Xcode8Extensions/Info.plist;
383 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
384 | PRODUCT_BUNDLE_IDENTIFIER = castus.Xcode8Extensions;
385 | PRODUCT_NAME = "$(TARGET_NAME)";
386 | SWIFT_VERSION = 3.0;
387 | };
388 | name = Release;
389 | };
390 | 20DC86371D15B0480035AD64 /* Debug */ = {
391 | isa = XCBuildConfiguration;
392 | buildSettings = {
393 | CODE_SIGN_ENTITLEMENTS = DuplicateLine/DuplicateLine.entitlements;
394 | CODE_SIGN_IDENTITY = "Mac Developer";
395 | COMBINE_HIDPI_IMAGES = YES;
396 | INFOPLIST_FILE = DuplicateLine/Info.plist;
397 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
398 | MACOSX_DEPLOYMENT_TARGET = 10.11;
399 | PRODUCT_BUNDLE_IDENTIFIER = castus.Xcode8Extensions.DuplicateLine;
400 | PRODUCT_NAME = "$(TARGET_NAME)";
401 | SKIP_INSTALL = YES;
402 | SWIFT_VERSION = 3.0;
403 | };
404 | name = Debug;
405 | };
406 | 20DC86381D15B0480035AD64 /* Release */ = {
407 | isa = XCBuildConfiguration;
408 | buildSettings = {
409 | CODE_SIGN_ENTITLEMENTS = DuplicateLine/DuplicateLine.entitlements;
410 | CODE_SIGN_IDENTITY = "Mac Developer";
411 | COMBINE_HIDPI_IMAGES = YES;
412 | INFOPLIST_FILE = DuplicateLine/Info.plist;
413 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
414 | MACOSX_DEPLOYMENT_TARGET = 10.11;
415 | PRODUCT_BUNDLE_IDENTIFIER = castus.Xcode8Extensions.DuplicateLine;
416 | PRODUCT_NAME = "$(TARGET_NAME)";
417 | SKIP_INSTALL = YES;
418 | SWIFT_VERSION = 3.0;
419 | };
420 | name = Release;
421 | };
422 | /* End XCBuildConfiguration section */
423 |
424 | /* Begin XCConfigurationList section */
425 | 20DC860E1D15B03A0035AD64 /* Build configuration list for PBXProject "Xcode8Extensions" */ = {
426 | isa = XCConfigurationList;
427 | buildConfigurations = (
428 | 20DC861E1D15B03B0035AD64 /* Debug */,
429 | 20DC861F1D15B03B0035AD64 /* Release */,
430 | );
431 | defaultConfigurationIsVisible = 0;
432 | defaultConfigurationName = Release;
433 | };
434 | 20DC86201D15B03B0035AD64 /* Build configuration list for PBXNativeTarget "Xcode8Extensions" */ = {
435 | isa = XCConfigurationList;
436 | buildConfigurations = (
437 | 20DC86211D15B03B0035AD64 /* Debug */,
438 | 20DC86221D15B03B0035AD64 /* Release */,
439 | );
440 | defaultConfigurationIsVisible = 0;
441 | defaultConfigurationName = Release;
442 | };
443 | 20DC86361D15B0480035AD64 /* Build configuration list for PBXNativeTarget "DuplicateLine" */ = {
444 | isa = XCConfigurationList;
445 | buildConfigurations = (
446 | 20DC86371D15B0480035AD64 /* Debug */,
447 | 20DC86381D15B0480035AD64 /* Release */,
448 | );
449 | defaultConfigurationIsVisible = 0;
450 | defaultConfigurationName = Release;
451 | };
452 | /* End XCConfigurationList section */
453 | };
454 | rootObject = 20DC860B1D15B03A0035AD64 /* Project object */;
455 | }
456 |
--------------------------------------------------------------------------------
/Xcode8Extensions.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Xcode8Extensions/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Xcode8Extensions
4 | //
5 | // Created by Krzysztof Romanowski on 18.06.2016.
6 | // Copyright © 2016 Krzysztof Romanowski. 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 | func applicationDidFinishLaunching(_ aNotification: Notification) {
17 | // Insert code here to initialize your application
18 | }
19 |
20 | func applicationWillTerminate(_ aNotification: Notification) {
21 | // Insert code here to tear down your application
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/Xcode8Extensions/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 | }
--------------------------------------------------------------------------------
/Xcode8Extensions/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 |
--------------------------------------------------------------------------------
/Xcode8Extensions/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 Krzysztof Romanowski. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-slate
--------------------------------------------------------------------------------
/cover.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/castus/Xcode8Extensions/c1558562b03dbbdce30317ce87d2b12aba498991/cover.gif
--------------------------------------------------------------------------------