Skip to content

Commit d808bf9

Browse files
author
tecknut
committed
Merge remote-tracking branch 'upstream/master'
2 parents b2b3d9b + 0cd033e commit d808bf9

63 files changed

Lines changed: 1234 additions & 156 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2015 Wei Wang <onevcat@gmail.com>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you want to use other text beside of `///` to trigger the document insertion,
2323

2424
## Xcode version?
2525

26-
This plug-in is supported in Xcode 5, 6 and 7 (current beta). From Xcode 5, Apple added a UUID-verification to all plugins to ensure the stability when Xcode gets updated. The value of `DVTPlugInCompatibilityUUIDs` in project plist should contains current UUID of Xcode version, or the plugin does not work. And from Xcode 6.3, you will be prompt to "Load third party bundle" if you are using a plugin. You should always select "Load bundles" to enable this plugin.
26+
This plug-in is supported in Xcode 5, 6 and 7. From Xcode 5, Apple added a UUID-verification to all plugins to ensure the stability when Xcode gets updated. The value of `DVTPlugInCompatibilityUUIDs` in project plist should contains current UUID of Xcode version, or the plugin does not work. And from Xcode 6.3, you will be prompt to "Load third party bundle" if you are using a plugin. You should always select "Load bundles" to enable this plugin.
2727

2828
All plugins will be disabled once you update your Xcode, since the supported UUIDs in the plugins do not contain the one. You should try to clean your plugins folder (`~/Library/Application Support/Developer/Shared/Xcode/Plug-ins` by default) and clone/build the latest version from master branch. If you happened to skip the bundle loading, you can use this to reset the prompt:
2929

@@ -37,7 +37,9 @@ The default deployment target is 10.8. If you want to use it in a earlier OS ver
3737

3838
## Swift Support
3939

40-
Yes, this plugin supports documentation for Swift now. Check [this post](http://nshipster.com/swift-documentation/) from @mattt to see how to write the documentation for swift. By using `VVDocumenter-Xcode`, you can just type `///` to make the magic happen.
40+
Yes, this plugin supports documentation for Swift 2 now. Check [this post](http://ericasadun.com/2015/06/14/swift-header-documentation-in-xcode-7/) to see how to write the documentation for swift. By using `VVDocumenter-Xcode`, you can just type `///` to make the magic happen.
41+
42+
The documentation format changed from Swift 1.x to 2. If you are using Swift 1.x, you could build from branch [Xcode6](https://github.com/onevcat/VVDocumenter-Xcode/tree/Xcode6) to get the support for the earlier format.
4143

4244
## Limitations and Future
4345

@@ -52,23 +54,4 @@ If you have modified these two shortcuts in your Xcode, the newset version of th
5254

5355
## License
5456

55-
VVDocumenter is published under MIT License
56-
57-
Copyright (c) 2014 Wei Wang (@onevcat)
58-
59-
Permission is hereby granted, free of charge, to any person obtaining a copy of
60-
this software and associated documentation files (the "Software"), to deal in
61-
the Software without restriction, including without limitation the rights to use,
62-
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
63-
Software, and to permit persons to whom the Software is furnished to do so,
64-
subject to the following conditions:
65-
66-
The above copyright notice and this permission notice shall be included in all
67-
copies or substantial portions of the Software.
68-
69-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
70-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
71-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
72-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
73-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
74-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
57+
VVDocumenter is published under MIT License. See the LICENSE file for more.

VVDocumenter-Xcode.xcodeproj/project.pbxproj

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@
428428
D1C462D517999C2000EB7B23 /* Sources */,
429429
D1C462D617999C2000EB7B23 /* Frameworks */,
430430
D1C462D717999C2000EB7B23 /* Resources */,
431-
D1C462D817999C2000EB7B23 /* ShellScript */,
432431
);
433432
buildRules = (
434433
);
@@ -446,7 +445,7 @@
446445
isa = PBXProject;
447446
attributes = {
448447
LastTestingUpgradeCheck = 0510;
449-
LastUpgradeCheck = 0500;
448+
LastUpgradeCheck = 0700;
450449
ORGANIZATIONNAME = "OneV's Den";
451450
};
452451
buildConfigurationList = D14380EE179551B900C829CE /* Build configuration list for PBXProject "VVDocumenter-Xcode" */;
@@ -488,22 +487,6 @@
488487
};
489488
/* End PBXResourcesBuildPhase section */
490489

491-
/* Begin PBXShellScriptBuildPhase section */
492-
D1C462D817999C2000EB7B23 /* ShellScript */ = {
493-
isa = PBXShellScriptBuildPhase;
494-
buildActionMask = 2147483647;
495-
files = (
496-
);
497-
inputPaths = (
498-
);
499-
outputPaths = (
500-
);
501-
runOnlyForDeploymentPostprocessing = 0;
502-
shellPath = /bin/sh;
503-
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
504-
};
505-
/* End PBXShellScriptBuildPhase section */
506-
507490
/* Begin PBXSourcesBuildPhase section */
508491
D14380EF179551B900C829CE /* Sources */ = {
509492
isa = PBXSourcesBuildPhase;
@@ -607,6 +590,7 @@
607590
CLANG_WARN_INT_CONVERSION = YES;
608591
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
609592
COPY_PHASE_STRIP = NO;
593+
ENABLE_TESTABILITY = YES;
610594
GCC_C_LANGUAGE_STANDARD = gnu99;
611595
GCC_DYNAMIC_NO_PIC = NO;
612596
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -663,6 +647,7 @@
663647
GCC_PREFIX_HEADER = "VVDocumenter-Xcode/VVDocumenter-Xcode-Prefix.pch";
664648
INFOPLIST_FILE = "VVDocumenter-Xcode/VVDocumenter-Xcode-Info.plist";
665649
INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins";
650+
PRODUCT_BUNDLE_IDENTIFIER = "com.onevcat.${PRODUCT_NAME:rfc1034identifier}";
666651
PRODUCT_NAME = "$(TARGET_NAME)";
667652
WRAPPER_EXTENSION = xcplugin;
668653
};
@@ -682,6 +667,7 @@
682667
INFOPLIST_FILE = "VVDocumenter-Xcode/VVDocumenter-Xcode-Info.plist";
683668
INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins";
684669
ONLY_ACTIVE_ARCH = YES;
670+
PRODUCT_BUNDLE_IDENTIFIER = "com.onevcat.${PRODUCT_NAME:rfc1034identifier}";
685671
PRODUCT_NAME = "$(TARGET_NAME)";
686672
WRAPPER_EXTENSION = xcplugin;
687673
};
@@ -710,6 +696,7 @@
710696
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
711697
);
712698
INFOPLIST_FILE = "VVDocumenterTests/VVDocumenterTests-Info.plist";
699+
PRODUCT_BUNDLE_IDENTIFIER = "com.onevcat.${PRODUCT_NAME:rfc1034identifier}";
713700
PRODUCT_NAME = "$(TARGET_NAME)";
714701
};
715702
name = Debug;
@@ -733,6 +720,7 @@
733720
);
734721
INFOPLIST_FILE = "VVDocumenterTests/VVDocumenterTests-Info.plist";
735722
ONLY_ACTIVE_ARCH = NO;
723+
PRODUCT_BUNDLE_IDENTIFIER = "com.onevcat.${PRODUCT_NAME:rfc1034identifier}";
736724
PRODUCT_NAME = "$(TARGET_NAME)";
737725
};
738726
name = Release;

VVDocumenter-Xcode.xcodeproj/xcshareddata/xcschemes/VVDocumenter-Xcode.xcscheme

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0500"
3+
LastUpgradeVersion = "0700"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -37,10 +37,10 @@
3737
</BuildActionEntries>
3838
</BuildAction>
3939
<TestAction
40+
buildConfiguration = "Debug"
4041
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4142
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42-
shouldUseLaunchSchemeArgsEnv = "YES"
43-
buildConfiguration = "Debug">
43+
shouldUseLaunchSchemeArgsEnv = "YES">
4444
<Testables>
4545
<TestableReference
4646
skipped = "NO">
@@ -62,15 +62,18 @@
6262
ReferencedContainer = "container:VVDocumenter-Xcode.xcodeproj">
6363
</BuildableReference>
6464
</MacroExpansion>
65+
<AdditionalOptions>
66+
</AdditionalOptions>
6567
</TestAction>
6668
<LaunchAction
69+
buildConfiguration = "Debug"
6770
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
6871
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
6972
launchStyle = "0"
7073
useCustomWorkingDirectory = "NO"
71-
buildConfiguration = "Debug"
7274
ignoresPersistentStateOnLaunch = "NO"
7375
debugDocumentVersioning = "YES"
76+
debugServiceExtension = "internal"
7477
allowLocationSimulation = "YES">
7578
<MacroExpansion>
7679
<BuildableReference
@@ -85,10 +88,10 @@
8588
</AdditionalOptions>
8689
</LaunchAction>
8790
<ProfileAction
91+
buildConfiguration = "Release"
8892
shouldUseLaunchSchemeArgsEnv = "YES"
8993
savedToolIdentifier = ""
9094
useCustomWorkingDirectory = "NO"
91-
buildConfiguration = "Release"
9295
debugDocumentVersioning = "YES">
9396
<MacroExpansion>
9497
<BuildableReference

VVDocumenter-Xcode.xcodeproj/xcshareddata/xcschemes/VVDocumenterTests.xcscheme

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0500"
3+
LastUpgradeVersion = "0700"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -23,10 +23,10 @@
2323
</BuildActionEntries>
2424
</BuildAction>
2525
<TestAction
26+
buildConfiguration = "Debug"
2627
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2728
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28-
shouldUseLaunchSchemeArgsEnv = "YES"
29-
buildConfiguration = "Debug">
29+
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
3131
<TestableReference
3232
skipped = "NO">
@@ -39,15 +39,18 @@
3939
</BuildableReference>
4040
</TestableReference>
4141
</Testables>
42+
<AdditionalOptions>
43+
</AdditionalOptions>
4244
</TestAction>
4345
<LaunchAction
46+
buildConfiguration = "Debug"
4447
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4548
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4649
launchStyle = "0"
4750
useCustomWorkingDirectory = "NO"
48-
buildConfiguration = "Debug"
4951
ignoresPersistentStateOnLaunch = "NO"
5052
debugDocumentVersioning = "YES"
53+
debugServiceExtension = "internal"
5154
allowLocationSimulation = "YES">
5255
<MacroExpansion>
5356
<BuildableReference
@@ -62,10 +65,10 @@
6265
</AdditionalOptions>
6366
</LaunchAction>
6467
<ProfileAction
68+
buildConfiguration = "Release"
6569
shouldUseLaunchSchemeArgsEnv = "YES"
6670
savedToolIdentifier = ""
6771
useCustomWorkingDirectory = "NO"
68-
buildConfiguration = "Release"
6972
debugDocumentVersioning = "YES">
7073
</ProfileAction>
7174
<AnalyzeAction

VVDocumenter-Xcode/Commenter/VVArgument.h

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
//
22
// Argument.h
3-
// CommentTest
3+
// VVDocumenter-Xcode
4+
45
//
56
// Created by 王 巍 on 13-7-19.
6-
// Copyright (c) 2013年 OneV's Den. All rights reserved.
77
//
8+
// Copyright (c) 2015 Wei Wang <onevcat@gmail.com>
9+
//
10+
// Permission is hereby granted, free of charge, to any person obtaining a copy
11+
// of this software and associated documentation files (the "Software"), to deal
12+
// in the Software without restriction, including without limitation the rights
13+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
// copies of the Software, and to permit persons to whom the Software is
15+
// furnished to do so, subject to the following conditions:
16+
//
17+
// The above copyright notice and this permission notice shall be included in
18+
// all copies or substantial portions of the Software.
19+
//
20+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26+
// THE SOFTWARE.
827

928
#import <Foundation/Foundation.h>
1029

VVDocumenter-Xcode/Commenter/VVArgument.m

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
//
22
// Argument.m
3-
// CommentTest
3+
// VVDocumenter-Xcode
44
//
55
// Created by 王 巍 on 13-7-19.
6-
// Copyright (c) 2013年 OneV's Den. All rights reserved.
76
//
7+
// Copyright (c) 2015 Wei Wang <onevcat@gmail.com>
8+
//
9+
// Permission is hereby granted, free of charge, to any person obtaining a copy
10+
// of this software and associated documentation files (the "Software"), to deal
11+
// in the Software without restriction, including without limitation the rights
12+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
// copies of the Software, and to permit persons to whom the Software is
14+
// furnished to do so, subject to the following conditions:
15+
//
16+
// The above copyright notice and this permission notice shall be included in
17+
// all copies or substantial portions of the Software.
18+
//
19+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
// THE SOFTWARE.
826

927
#import "VVArgument.h"
1028

VVDocumenter-Xcode/Commenter/VVBaseCommenter.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,26 @@
33
// VVDocumenter-Xcode
44
//
55
// Created by 王 巍 on 13-7-17.
6-
// Copyright (c) 2013年 OneV's Den. All rights reserved.
76
//
7+
// Copyright (c) 2015 Wei Wang <onevcat@gmail.com>
8+
//
9+
// Permission is hereby granted, free of charge, to any person obtaining a copy
10+
// of this software and associated documentation files (the "Software"), to deal
11+
// in the Software without restriction, including without limitation the rights
12+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
// copies of the Software, and to permit persons to whom the Software is
14+
// furnished to do so, subject to the following conditions:
15+
//
16+
// The above copyright notice and this permission notice shall be included in
17+
// all copies or substantial portions of the Software.
18+
//
19+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
// THE SOFTWARE.
826

927
#import <Foundation/Foundation.h>
1028

@@ -14,6 +32,7 @@
1432
@property (nonatomic, copy) NSString *code;
1533
@property (nonatomic, strong) NSMutableArray *arguments;
1634
@property (nonatomic, assign) BOOL hasReturn;
35+
@property (nonatomic, assign) BOOL hasThrows;
1736

1837
-(instancetype) initWithIndentString:(NSString *)indent codeString:(NSString *)code;
1938

0 commit comments

Comments
 (0)