Skip to content

Commit 822847e

Browse files
committed
Merge branch 'refs/heads/for-xcode5'
Signed-off-by: onevcat <onevcat@gmail.com> Conflicts: README.md VVDocumenter-Xcode/Setting/VVDSettingPanelWindowController.m VVDocumenter-Xcode/VVDocumenterManager.m
2 parents c7a4a5c + dad7516 commit 822847e

10 files changed

Lines changed: 44 additions & 26 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If you want to use other text beside of `///` to trigger the document insertion,
1717

1818
## Xcode version?
1919

20-
This plug-in is developed and tested in Mac OSX 10.8.5 Xcode 4.6.3. It should work in all versions of Xcode 4. If you want to use it in Xcode 5 (DP3 or above), maybe you have to make a liittle change in the plist. This is all what I can say now under the NDA.
20+
This plug-in is developed and tested in Mac OSX 10.8.5 Xcode 5. **The master branch dropped the support for Xcode 4 and if you want use it in Xcode 4, please check out the [Xcode4 branch](https://github.com/onevcat/VVDocumenter-Xcode/tree/Xcode4).** In Xcode 5, Apple added an UUID-verification to all plugins to ensure the stability when Xcode gets updated. The value of DVTPlugInCompatibilityUUIDs in project plist should contains current the UUID of Xcode version, or the plugin does not work. I have added a pre-actions script in scheme to set it for you. **Once you update your Xcode, the plugin would be invalid and you should check the newest version and built it again.**
2121

2222
The default deployment target is 10.8. If you want to use it in a earlier OS version, you should change OS X Deployment Target (in project info setting) to your system version.
2323

VVDocumenter-Xcode.xcodeproj/project.pbxproj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
D1C462F417999CEC00EB7B23 /* NSString+VVSyntax.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+VVSyntax.m"; sourceTree = "<group>"; };
100100
D1D66CA617A2AEF000E62F99 /* VVKeyboardEventSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VVKeyboardEventSender.h; sourceTree = "<group>"; };
101101
D1D66CA717A2AEF000E62F99 /* VVKeyboardEventSender.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VVKeyboardEventSender.m; sourceTree = "<group>"; };
102-
D1EBD4A9179AE763003A081D /* DVTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DVTKit.framework; path = "../../../../../Applications/Xcode5-DP3.app/Contents/SharedFrameworks/DVTKit.framework"; sourceTree = "<group>"; };
103102
/* End PBXFileReference section */
104103

105104
/* Begin PBXFrameworksBuildPhase section */
@@ -173,7 +172,6 @@
173172
D14380F5179551B900C829CE /* Frameworks */ = {
174173
isa = PBXGroup;
175174
children = (
176-
D1EBD4A9179AE763003A081D /* DVTKit.framework */,
177175
D14380F6179551B900C829CE /* Cocoa.framework */,
178176
D1C462DB17999C2000EB7B23 /* SenTestingKit.framework */,
179177
D14380F8179551B900C829CE /* Other Frameworks */,
@@ -538,12 +536,12 @@
538536
D1438106179551B900C829CE /* Debug */ = {
539537
isa = XCBuildConfiguration;
540538
buildSettings = {
541-
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
539+
CLANG_ENABLE_OBJC_ARC = YES;
542540
COMBINE_HIDPI_IMAGES = YES;
543541
DEPLOYMENT_LOCATION = YES;
544542
DSTROOT = "${HOME}";
545543
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
546-
GCC_ENABLE_OBJC_GC = supported;
544+
GCC_ENABLE_OBJC_GC = unsupported;
547545
GCC_PRECOMPILE_PREFIX_HEADER = YES;
548546
GCC_PREFIX_HEADER = "VVDocumenter-Xcode/VVDocumenter-Xcode-Prefix.pch";
549547
INFOPLIST_FILE = "VVDocumenter-Xcode/VVDocumenter-Xcode-Info.plist";
@@ -556,12 +554,12 @@
556554
D1438107179551B900C829CE /* Release */ = {
557555
isa = XCBuildConfiguration;
558556
buildSettings = {
559-
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
557+
CLANG_ENABLE_OBJC_ARC = YES;
560558
COMBINE_HIDPI_IMAGES = YES;
561559
DEPLOYMENT_LOCATION = YES;
562560
DSTROOT = "${HOME}";
563561
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
564-
GCC_ENABLE_OBJC_GC = supported;
562+
GCC_ENABLE_OBJC_GC = unsupported;
565563
GCC_PRECOMPILE_PREFIX_HEADER = YES;
566564
GCC_PREFIX_HEADER = "VVDocumenter-Xcode/VVDocumenter-Xcode-Prefix.pch";
567565
INFOPLIST_FILE = "VVDocumenter-Xcode/VVDocumenter-Xcode-Info.plist";
@@ -574,7 +572,7 @@
574572
D1C462E817999C2000EB7B23 /* Debug */ = {
575573
isa = XCBuildConfiguration;
576574
buildSettings = {
577-
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
575+
CLANG_ENABLE_OBJC_ARC = YES;
578576
COMBINE_HIDPI_IMAGES = YES;
579577
FRAMEWORK_SEARCH_PATHS = (
580578
"$(DEVELOPER_DIR)/../SharedFrameworks",
@@ -592,7 +590,7 @@
592590
D1C462E917999C2000EB7B23 /* Release */ = {
593591
isa = XCBuildConfiguration;
594592
buildSettings = {
595-
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
593+
CLANG_ENABLE_OBJC_ARC = YES;
596594
COMBINE_HIDPI_IMAGES = YES;
597595
FRAMEWORK_SEARCH_PATHS = (
598596
"$(DEVELOPER_DIR)/../SharedFrameworks",

VVDocumenter-Xcode.xcodeproj/xcuserdata/onevcat.xcuserdatad/xcschemes/VVDocumenter-Xcode.xcscheme

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
33
LastUpgradeVersion = "0500"
4-
version = "1.3">
4+
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<PreActions>
9+
<ExecutionAction
10+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
11+
<ActionContent
12+
title = "Run Script"
13+
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">
14+
<EnvironmentBuildable>
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "D14380F2179551B900C829CE"
18+
BuildableName = "VVDocumenter-Xcode.xcplugin"
19+
BlueprintName = "VVDocumenter-Xcode"
20+
ReferencedContainer = "container:VVDocumenter-Xcode.xcodeproj">
21+
</BuildableReference>
22+
</EnvironmentBuildable>
23+
</ActionContent>
24+
</ExecutionAction>
25+
</PreActions>
826
<BuildActionEntries>
927
<BuildActionEntry
1028
buildForTesting = "YES"

VVDocumenter-Xcode.xcodeproj/xcuserdata/onevcat.xcuserdatad/xcschemes/VVDocumenterTests.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0460"
3+
LastUpgradeVersion = "0500"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

VVDocumenter-Xcode/Commenter/VVBaseCommenter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@property (nonatomic, copy) NSString *indent;
1414
@property (nonatomic, copy) NSString *code;
15-
@property (nonatomic, retain) NSMutableArray *arguments;
15+
@property (nonatomic, strong) NSMutableArray *arguments;
1616
@property (nonatomic, assign) BOOL hasReturn;
1717

1818
-(id) initWithIndentString:(NSString *)indent codeString:(NSString *)code;

VVDocumenter-Xcode/Commenter/VVBaseCommenter.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ -(void) parseArguments
104104
if (braceGroups.count > 0) {
105105
NSString *argumentGroupString = braceGroups[0];
106106
NSArray *argumentStrings = [argumentGroupString componentsSeparatedByString:@","];
107-
for (NSString *argumentString in argumentStrings) {
107+
for (__strong NSString *argumentString in argumentStrings) {
108108
VVArgument *arg = [[VVArgument alloc] init];
109109
argumentString = [argumentString vv_stringByReplacingRegexPattern:@"\\s+$" withString:@""];
110110
argumentString = [argumentString vv_stringByReplacingRegexPattern:@"\\s+" withString:@" "];

VVDocumenter-Xcode/Setting/VVDSettingPanelWindowController.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
#import "VVDocumenterSetting.h"
1111

1212
@interface VVDSettingPanelWindowController ()<NSTextFieldDelegate>
13-
@property (assign) IBOutlet NSTextField *tfTrigger;
14-
@property (assign) IBOutlet NSButton *btnUseSpaces;
15-
@property (assign) IBOutlet NSTextField *tfSpaceCount;
16-
@property (assign) IBOutlet NSTextField *tfSpaceLabel;
13+
@property (weak) IBOutlet NSTextField *tfTrigger;
14+
@property (weak) IBOutlet NSButton *btnUseSpaces;
15+
@property (weak) IBOutlet NSTextField *tfSpaceCount;
16+
@property (weak) IBOutlet NSTextField *tfSpaceLabel;
1717

18-
@property (assign) IBOutlet NSStepper *stepperCount;
18+
@property (weak) IBOutlet NSStepper *stepperCount;
1919

20-
@property (assign) IBOutlet NSButton *btnPrefixWithStar;
20+
@property (weak) IBOutlet NSButton *btnPrefixWithStar;
2121
@property (assign) IBOutlet NSButton *btnAddSinceToComment;
2222

2323
@end

VVDocumenter-Xcode/VVDocumenter-Xcode-Info.plist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@
2727
<string>37B30044-3B14-46BA-ABAA-F01000C27B63</string>
2828
</array>
2929
<key>NSHumanReadableCopyright</key>
30-
<string>Copyright © 2013年 OneV&apos;s Den. All rights reserved.</string>
30+
<string>Copyright © 2013年 OneV's Den. All rights reserved.</string>
3131
<key>NSPrincipalClass</key>
3232
<string></string>
3333
<key>XC4Compatible</key>
3434
<true/>
35+
<key>XC5Compatible</key>
36+
<true/>
3537
<key>XCGCReady</key>
3638
<true/>
3739
<key>XCPluginHasUI</key>

VVDocumenter-Xcode/VVDocumenterManager.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
#import "VVDocumenterSetting.h"
1616

1717
@interface VVDocumenterManager()
18-
@property (nonatomic, retain) id eventMonitor;
18+
@property (nonatomic, strong) id eventMonitor;
1919
@property (nonatomic, assign) BOOL prefixTyped;
20+
@property (nonatomic, strong) VVDSettingPanelWindowController *settingPanel;
2021
@end
2122

2223
@implementation VVDocumenterManager
@@ -62,13 +63,12 @@ -(void) addSettingMenu
6263

6364
[newMenuItem setTarget:self];
6465
[[editMenuItem submenu] addItem:newMenuItem];
65-
[newMenuItem release];
6666
}
6767
}
6868

6969
-(void) showSettingPanel:(NSNotification *)noti {
70-
VVDSettingPanelWindowController *panelController = [[VVDSettingPanelWindowController alloc] initWithWindowNibName:@"VVDSettingPanelWindowController"];
71-
[panelController showWindow:panelController];
70+
self.settingPanel = [[VVDSettingPanelWindowController alloc] initWithWindowNibName:@"VVDSettingPanelWindowController"];
71+
[self.settingPanel showWindow:self.settingPanel];
7272
}
7373

7474
- (void) textStorageDidChange:(NSNotification *)noti {

VVDocumenterTests/SyntaxTests/SyntaxTests.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
@interface SyntaxTests()
1414

15-
@property (nonatomic, retain) NSArray* inputs;
16-
@property (nonatomic, retain) NSArray* corrects;
15+
@property (nonatomic, strong) NSArray* inputs;
16+
@property (nonatomic, strong) NSArray* corrects;
1717

1818
@end
1919

0 commit comments

Comments
 (0)