Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Commit

Permalink
Merge pull request #3 from onevcat/master
Browse files Browse the repository at this point in the history
同步到最新
  • Loading branch information
wentaozone committed Mar 12, 2014
2 parents cdec5c7 + 65722b1 commit 442b0a7
Show file tree
Hide file tree
Showing 27 changed files with 771 additions and 176 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,5 @@ xcuserdata
#
# ...none. Everything is now explained.

/VVDocumenter-Xcode.xcodeproj/project.xcworkspace/xcshareddata/
/VVDocumenter-Xcode.xcodeproj/project.xcworkspace/xcshareddata/
.idea
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
language: objective-c
language: objective-c
xcode_project: VVDocumenter-Xcode.xcodeproj
xcode_scheme: VVDocumenter-Xcode
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VVDocumenter-Xcode [![Build Status](https://api.travis-ci.org/onevcat/VVDocumenter-Xcode.png)](https://travis-ci.org/onevcat/VVDocumenter-Xcode)
# VVDocumenter-Xcode [![Build Status](https://api.travis-ci.org/onevcat/VVDocumenter-Xcode.png)](https://travis-ci.org/onevcat/VVDocumenter-Xcode) <a href="https://flattr.com/submit/auto?user_id=onevcat&url=https%3A%2F%2Fgithub.com%2Fonevcat%2FVVDocumenter-Xcode" target="_blank"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a>
---

## What is this?
Expand Down
67 changes: 51 additions & 16 deletions VVDocumenter-Xcode.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
objects = {

/* Begin PBXBuildFile section */
53C67935184501030030C553 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 893D8F7F18262EF500E8A00C /* Carbon.framework */; };
893D8F8018262EF500E8A00C /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 893D8F7F18262EF500E8A00C /* Carbon.framework */; };
D114BEE0179644D00043FA65 /* NSString+PDRegex.m in Sources */ = {isa = PBXBuildFile; fileRef = D114BEDE179644D00043FA65 /* NSString+PDRegex.m */; };
D114BEE3179644FA0043FA65 /* NSTextView+VVTextGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = D114BEE2179644FA0043FA65 /* NSTextView+VVTextGetter.m */; };
D11C542D17999D9000D3DE38 /* VVArgument.m in Sources */ = {isa = PBXBuildFile; fileRef = D11C542B17999D9000D3DE38 /* VVArgument.m */; };
D124614717AC16820095F9D6 /* VVDocumenterSetting.m in Sources */ = {isa = PBXBuildFile; fileRef = D124614317AC16820095F9D6 /* VVDocumenterSetting.m */; };
D124614817AC16820095F9D6 /* VVDSettingPanelWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = D124614517AC16820095F9D6 /* VVDSettingPanelWindowController.m */; };
D124614917AC16820095F9D6 /* VVDSettingPanelWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D124614617AC16820095F9D6 /* VVDSettingPanelWindowController.xib */; };
D14070C418CE8819009B0EED /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D14070C318CE8819009B0EED /* XCTest.framework */; };
D14380F7179551B900C829CE /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D14380F6179551B900C829CE /* Cocoa.framework */; };
D1438101179551B900C829CE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D14380FF179551B900C829CE /* InfoPlist.strings */; };
D16AFCD41796E088006719AA /* VVBaseCommenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D16AFCD31796E088006719AA /* VVBaseCommenter.m */; };
Expand All @@ -29,7 +31,18 @@
D1986F74179A12BD00EA6643 /* CommenterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D1986F73179A12BD00EA6643 /* CommenterTests.m */; };
D1AC3B8F1796DB070063A484 /* VVDocumenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D1AC3B8E1796DB070063A484 /* VVDocumenter.m */; };
D1AE501C179A161A0069411A /* VVArgument.m in Sources */ = {isa = PBXBuildFile; fileRef = D11C542B17999D9000D3DE38 /* VVArgument.m */; };
D1C462DC17999C2000EB7B23 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1C462DB17999C2000EB7B23 /* SenTestingKit.framework */; };
D1B316D6189A2AA700420A6E /* VVMethodTestsCode.plist in Resources */ = {isa = PBXBuildFile; fileRef = D1B316D5189A2AA700420A6E /* VVMethodTestsCode.plist */; };
D1B316DB189A2C3B00420A6E /* VVDSettingPanelWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = D124614517AC16820095F9D6 /* VVDSettingPanelWindowController.m */; };
D1B316DC189A2C3B00420A6E /* VVKeyboardEventSender.m in Sources */ = {isa = PBXBuildFile; fileRef = D1D66CA717A2AEF000E62F99 /* VVKeyboardEventSender.m */; };
D1B316DD189A2C3B00420A6E /* VVDocumenterManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D16917DE17955C8D0036C06B /* VVDocumenterManager.m */; };
D1B316DE189A2C3B00420A6E /* VVDocumenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D1AC3B8E1796DB070063A484 /* VVDocumenter.m */; };
D1B316DF189A2C7800420A6E /* VVPropertyCommenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D16AFCD61796E09E006719AA /* VVPropertyCommenter.m */; };
D1B316E0189A2C7800420A6E /* VVMethodCommenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D16AFCD91796E0AC006719AA /* VVMethodCommenter.m */; };
D1B316E1189A2C7800420A6E /* VVFunctionCommenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D16AFCDC1796E0B9006719AA /* VVFunctionCommenter.m */; };
D1B316E2189A2C7800420A6E /* VVMacroCommenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D16AFCDF1796E0C0006719AA /* VVMacroCommenter.m */; };
D1B316E3189A2C7800420A6E /* VVStructCommenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D16AFCE21796E0C9006719AA /* VVStructCommenter.m */; };
D1B316E4189A2C7800420A6E /* VVEnumCommenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D16AFCE51796E0D0006719AA /* VVEnumCommenter.m */; };
D1B316E5189A2C7800420A6E /* VVVariableCommenter.m in Sources */ = {isa = PBXBuildFile; fileRef = D16AFCE81796E0D6006719AA /* VVVariableCommenter.m */; };
D1C462DD17999C2000EB7B23 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D14380F6179551B900C829CE /* Cocoa.framework */; };
D1C462E317999C2000EB7B23 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D1C462E117999C2000EB7B23 /* InfoPlist.strings */; };
D1C462E617999C2000EB7B23 /* VVDocumenterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D1C462E517999C2000EB7B23 /* VVDocumenterTests.m */; };
Expand All @@ -56,6 +69,7 @@
D124614417AC16820095F9D6 /* VVDSettingPanelWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VVDSettingPanelWindowController.h; path = "VVDocumenter-Xcode/Setting/VVDSettingPanelWindowController.h"; sourceTree = SOURCE_ROOT; };
D124614517AC16820095F9D6 /* VVDSettingPanelWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VVDSettingPanelWindowController.m; path = "VVDocumenter-Xcode/Setting/VVDSettingPanelWindowController.m"; sourceTree = SOURCE_ROOT; };
D124614617AC16820095F9D6 /* VVDSettingPanelWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VVDSettingPanelWindowController.xib; path = "VVDocumenter-Xcode/Setting/VVDSettingPanelWindowController.xib"; sourceTree = SOURCE_ROOT; };
D14070C318CE8819009B0EED /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
D14380F3179551B900C829CE /* VVDocumenter-Xcode.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "VVDocumenter-Xcode.xcplugin"; sourceTree = BUILT_PRODUCTS_DIR; };
D14380F6179551B900C829CE /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
D14380F9179551B900C829CE /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -86,11 +100,10 @@
D1986F73179A12BD00EA6643 /* CommenterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommenterTests.m; sourceTree = "<group>"; };
D1AC3B8D1796DB070063A484 /* VVDocumenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VVDocumenter.h; sourceTree = "<group>"; };
D1AC3B8E1796DB070063A484 /* VVDocumenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VVDocumenter.m; sourceTree = "<group>"; };
D1C462DA17999C2000EB7B23 /* VVDocumenterTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VVDocumenterTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
D1C462DB17999C2000EB7B23 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
D1B316D5189A2AA700420A6E /* VVMethodTestsCode.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = VVMethodTestsCode.plist; sourceTree = "<group>"; };
D1C462DA17999C2000EB7B23 /* VVDocumenterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VVDocumenterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
D1C462E017999C2000EB7B23 /* VVDocumenterTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "VVDocumenterTests-Info.plist"; sourceTree = "<group>"; };
D1C462E217999C2000EB7B23 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
D1C462E417999C2000EB7B23 /* VVDocumenterTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VVDocumenterTests.h; sourceTree = "<group>"; };
D1C462E517999C2000EB7B23 /* VVDocumenterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VVDocumenterTests.m; sourceTree = "<group>"; };
D1C462E717999C2000EB7B23 /* VVDocumenterTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VVDocumenterTests-Prefix.pch"; sourceTree = "<group>"; };
D1C462EB17999C9A00EB7B23 /* VVTestHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VVTestHelper.h; sourceTree = "<group>"; };
Expand All @@ -117,7 +130,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D1C462DC17999C2000EB7B23 /* SenTestingKit.framework in Frameworks */,
D14070C418CE8819009B0EED /* XCTest.framework in Frameworks */,
53C67935184501030030C553 /* Carbon.framework in Frameworks */,
D1C462DD17999C2000EB7B23 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -167,17 +181,17 @@
isa = PBXGroup;
children = (
D14380F3179551B900C829CE /* VVDocumenter-Xcode.xcplugin */,
D1C462DA17999C2000EB7B23 /* VVDocumenterTests.octest */,
D1C462DA17999C2000EB7B23 /* VVDocumenterTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
D14380F5179551B900C829CE /* Frameworks */ = {
isa = PBXGroup;
children = (
D14070C318CE8819009B0EED /* XCTest.framework */,
893D8F7F18262EF500E8A00C /* Carbon.framework */,
D14380F6179551B900C829CE /* Cocoa.framework */,
D1C462DB17999C2000EB7B23 /* SenTestingKit.framework */,
D14380F8179551B900C829CE /* Other Frameworks */,
);
name = Frameworks;
Expand Down Expand Up @@ -267,14 +281,22 @@
path = CommenterTests;
sourceTree = "<group>";
};
D1B316D2189A2A5900420A6E /* DocumenterTests */ = {
isa = PBXGroup;
children = (
D1B316D5189A2AA700420A6E /* VVMethodTestsCode.plist */,
);
path = DocumenterTests;
sourceTree = "<group>";
};
D1C462DE17999C2000EB7B23 /* VVDocumenterTests */ = {
isa = PBXGroup;
children = (
D1B316D2189A2A5900420A6E /* DocumenterTests */,
D1986F71179A12BD00EA6643 /* CommenterTests */,
D1C462EE17999CA200EB7B23 /* SyntaxTests */,
D1C462EB17999C9A00EB7B23 /* VVTestHelper.h */,
D1C462EC17999C9A00EB7B23 /* VVTestHelper.m */,
D1C462E417999C2000EB7B23 /* VVDocumenterTests.h */,
D1C462E517999C2000EB7B23 /* VVDocumenterTests.m */,
D1C462DF17999C2000EB7B23 /* Supporting Files */,
);
Expand Down Expand Up @@ -353,15 +375,16 @@
);
name = VVDocumenterTests;
productName = VVDocumenterTests;
productReference = D1C462DA17999C2000EB7B23 /* VVDocumenterTests.octest */;
productType = "com.apple.product-type.bundle";
productReference = D1C462DA17999C2000EB7B23 /* VVDocumenterTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
D14380EB179551B900C829CE /* Project object */ = {
isa = PBXProject;
attributes = {
LastTestingUpgradeCheck = 0510;
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = "OneV's Den";
};
Expand Down Expand Up @@ -397,6 +420,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D1B316D6189A2AA700420A6E /* VVMethodTestsCode.plist in Resources */,
D1C462E317999C2000EB7B23 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -448,6 +472,17 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D1B316DF189A2C7800420A6E /* VVPropertyCommenter.m in Sources */,
D1B316E0189A2C7800420A6E /* VVMethodCommenter.m in Sources */,
D1B316E1189A2C7800420A6E /* VVFunctionCommenter.m in Sources */,
D1B316E2189A2C7800420A6E /* VVMacroCommenter.m in Sources */,
D1B316E3189A2C7800420A6E /* VVStructCommenter.m in Sources */,
D1B316E4189A2C7800420A6E /* VVEnumCommenter.m in Sources */,
D1B316E5189A2C7800420A6E /* VVVariableCommenter.m in Sources */,
D1B316DB189A2C3B00420A6E /* VVDSettingPanelWindowController.m in Sources */,
D1B316DC189A2C3B00420A6E /* VVKeyboardEventSender.m in Sources */,
D1B316DD189A2C3B00420A6E /* VVDocumenterManager.m in Sources */,
D1B316DE189A2C3B00420A6E /* VVDocumenter.m in Sources */,
D17B50CA179A34C400B11773 /* VVBaseCommenter.m in Sources */,
D1AE501C179A161A0069411A /* VVArgument.m in Sources */,
D1C462F717999D0600EB7B23 /* NSString+PDRegex.m in Sources */,
Expand Down Expand Up @@ -581,14 +616,14 @@
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_DIR)/../SharedFrameworks",
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
"\"$(SRCROOT)/VVDocumenter-Xcode\"",
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "VVDocumenterTests/VVDocumenterTests-Prefix.pch";
INFOPLIST_FILE = "VVDocumenterTests/VVDocumenterTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
};
name = Debug;
};
Expand All @@ -599,14 +634,14 @@
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_DIR)/../SharedFrameworks",
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
"\"$(SRCROOT)/VVDocumenter-Xcode\"",
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "VVDocumenterTests/VVDocumenterTests-Prefix.pch";
INFOPLIST_FILE = "VVDocumenterTests/VVDocumenterTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
version = "1.7">
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "uuid=`/usr/libexec/PlistBuddy -c &quot;Print :DVTPlugInCompatibilityUUID&quot; ${DEVELOPER_DIR}/../Info.plist`&#10;/usr/libexec/PlistBuddy -c &quot;Set :DVTPlugInCompatibilityUUIDs:0 $uuid&quot; ${PROJECT_DIR}/VVDocumenter-Xcode/VVDocumenter-Xcode-Info.plist">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D14380F2179551B900C829CE"
BuildableName = "VVDocumenter-Xcode.xcplugin"
BlueprintName = "VVDocumenter-Xcode"
ReferencedContainer = "container:VVDocumenter-Xcode.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand Down Expand Up @@ -51,7 +33,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D1C462D917999C2000EB7B23"
BuildableName = "VVDocumenterTests.octest"
BuildableName = "VVDocumenterTests.xctest"
BlueprintName = "VVDocumenterTests"
ReferencedContainer = "container:VVDocumenter-Xcode.xcodeproj">
</BuildableReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D1C462D917999C2000EB7B23"
BuildableName = "VVDocumenterTests.octest"
BuildableName = "VVDocumenterTests.xctest"
BlueprintName = "VVDocumenterTests"
ReferencedContainer = "container:VVDocumenter-Xcode.xcodeproj">
</BuildableReference>
Expand Down
3 changes: 2 additions & 1 deletion VVDocumenter-Xcode/Commenter/VVArgument.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ -(void)setType:(NSString *)type
-(void)setName:(NSString *)name
{
if (name != _name) {
_name = [[[[[[name vv_stringByReplacingRegexPattern:@"^&" withString:@""]
_name = [[[[[[[name vv_stringByReplacingRegexPattern:@"\\(|\\)" withString:@""]
vv_stringByReplacingRegexPattern:@"^&" withString:@""]
vv_stringByReplacingRegexPattern:@"^\\*+" withString:@""]
vv_stringByReplacingRegexPattern:@"\\[.*$" withString:@""]
vv_stringByReplacingRegexPattern:@",$" withString:@""]
Expand Down
3 changes: 2 additions & 1 deletion VVDocumenter-Xcode/Commenter/VVBaseCommenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

-(id) initWithIndentString:(NSString *)indent codeString:(NSString *)code;
-(NSString *) document;
-(void) parseArguments;

-(void) parseArgumentsInputArgs:(NSString *)rawArgsCode;

// Comment methods
-(NSString *) startComment;
Expand Down
Loading

0 comments on commit 442b0a7

Please sign in to comment.