From 64a15db791ab60a2387aee7dbc72b746384f9923 Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Fri, 31 Oct 2014 18:39:55 -0700 Subject: [PATCH 01/17] NEW: Environment variable to disable CommonJS environement building This patch allows user to disable the commonJS build phase by setting the system environement variable IGNORE_ENV_COMMONJS. For instance `export IGNORE_ENV_COMMONJS=1` --- Objective-J/CommonJS/lib/objective-j/jake/bundletask.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Objective-J/CommonJS/lib/objective-j/jake/bundletask.js b/Objective-J/CommonJS/lib/objective-j/jake/bundletask.js index a31c5d781..e71b9129f 100644 --- a/Objective-J/CommonJS/lib/objective-j/jake/bundletask.js +++ b/Objective-J/CommonJS/lib/objective-j/jake/bundletask.js @@ -35,7 +35,12 @@ function BundleTask(aName, anApplication) { Task.apply(this, arguments); - this.setEnvironments([environment.Browser, environment.CommonJS]); + var ignoreCommonJS = system.env["CAPP_IGNORE_COMMONJS_ENV"]; + + if (ignoreCommonJS && ignoreCommonJS.toLowerCase() == "no" || ignoreCommonJS == "1") + this.setEnvironments([environment.Browser]); + else + this.setEnvironments([environment.Browser, environment.CommonJS]); this._author = null; this._email = null; From 5bd07716eba18f5d9cb397c099dbd64a35bbd8d2 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 14:49:25 -0800 Subject: [PATCH 02/17] New: new options for the command objj This pull requests adds the following feature for the command objj: - Option -h or --help to get the help of the command - Option -I or --objj-include-paths to specify the frameworks to be used - Possibility to pass several files to the command, for example objj AppController.j Test.j --- Objective-J/CommonJS/lib/objective-j.js | 38 +++++++++++++++++++------ 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index cf5504a3f..ff89d8766 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -79,27 +79,47 @@ exports.run = function(args) // copy the args since we're going to modify them var argv = args.slice(1); - if (argv[0] === "--version") + if (argv[0] === "--version" || argv[0] === "-v") { print(exports.fullVersionString()); return; } - while (argv.length && argv[0].indexOf('-I') === 0) - OBJJ_INCLUDE_PATHS.unshift.apply(OBJJ_INCLUDE_PATHS, argv.shift().substr(2).split(':')); + if (argv[0] === "--help" || argv[0] === "-h") + { + print("Usage (objj): " + args[0] + " [options] [--] files..."); + print(" -v, --version print the current version of objj"); + print(" -I, --objj-include-paths specify the framework to be used") + print(" -h, --help print this help"); + return; + } + + while (argv.length && argv[0] == "-I" || argv[0] == "--objj-include-paths") + { + argv.shift(); + OBJJ_INCLUDE_PATHS.unshift.apply(OBJJ_INCLUDE_PATHS, argv.shift().split(":")); + } } if (argv && argv.length > 0) { - var arg0 = argv.shift(); - var mainFilePath = FILE.canonical(arg0); + while (argv.length > 0) + { + var arg0 = argv.shift(); + var mainFilePath = FILE.canonical(arg0); - exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print); + exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print); - if (typeof main === "function") - main([arg0].concat(argv)); + if (typeof main === "function") + main([arg0].concat(argv)); - require("browser/timeout").serviceTimeouts(); + require("browser/timeout").serviceTimeouts(); + + ObjectiveJ.Executable.resetCachedFileExecutableSearchers(); + ObjectiveJ.StaticResource.resetRootResources(); + ObjectiveJ.FileExecutable.resetFileExecutables(); + objj_resetRegisterClasses(); + } } else { From f21dcb8265d78683f984aa70014e1fb91a191ae7 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 15:25:47 -0800 Subject: [PATCH 03/17] New: Added option --parser/-p to the command objj Previously it wasn't possible to specify a custom parser for the command objj. This is needed for xCodeCapp --- Objective-J/CommonJS/lib/objective-j.js | 8 +++++++- Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index ff89d8766..47d838406 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -90,10 +90,16 @@ exports.run = function(args) print("Usage (objj): " + args[0] + " [options] [--] files..."); print(" -v, --version print the current version of objj"); print(" -I, --objj-include-paths specify the framework to be used") - print(" -h, --help print this help"); + print(" -p, --parser specify to use a specific parser") return; } + if (argv[0] === "-p" || argv[0] === "--parser") + { + argv.shift(); + optionalParserUsed = true; + } + while (argv.length && argv[0] == "-I" || argv[0] == "--objj-include-paths") { argv.shift(); diff --git a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m index 81e9b7cf6..0a987b2e3 100644 --- a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m +++ b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m @@ -71,6 +71,7 @@ { launchPath = self.xcc.executablePaths[@"objj"]; arguments = @[ + @"--parser", self.xcc.parserPath, self.projectPath, self.sourcePath From f74888419c4bb29d4acb7715e11b796df4b17500 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 15:33:37 -0800 Subject: [PATCH 04/17] Fixed: part of the code missing after the previous commit refs #f21dcb8265d78683f984aa70014e1fb91a191ae7 --- Objective-J/CommonJS/lib/objective-j.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index 47d838406..c123e81c0 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -121,6 +121,12 @@ exports.run = function(args) require("browser/timeout").serviceTimeouts(); + if (optionalParserUsed) + { + // Here we have no idea what the parser does...this is used for xCodeCapp + break; + } + ObjectiveJ.Executable.resetCachedFileExecutableSearchers(); ObjectiveJ.StaticResource.resetRootResources(); ObjectiveJ.FileExecutable.resetFileExecutables(); From 5678fe3b83fbb4e27f231b14ca59584b22127127 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 18:12:47 -0800 Subject: [PATCH 05/17] Fixed: change option -p in objj by bash concept -- --- Objective-J/CommonJS/lib/objective-j.js | 23 +++++++++---------- .../XcodeCapp/ProcessSourceOperation.m | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index c123e81c0..4b74070c2 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -89,17 +89,11 @@ exports.run = function(args) { print("Usage (objj): " + args[0] + " [options] [--] files..."); print(" -v, --version print the current version of objj"); - print(" -I, --objj-include-paths specify the framework to be used") - print(" -p, --parser specify to use a specific parser") + print(" -I, --objj-include-paths include a specific framework paths") + print(" -h, --help print this help"); return; } - if (argv[0] === "-p" || argv[0] === "--parser") - { - argv.shift(); - optionalParserUsed = true; - } - while (argv.length && argv[0] == "-I" || argv[0] == "--objj-include-paths") { argv.shift(); @@ -109,6 +103,8 @@ exports.run = function(args) if (argv && argv.length > 0) { + var endCommand = false; + while (argv.length > 0) { var arg0 = argv.shift(); @@ -116,16 +112,19 @@ exports.run = function(args) exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print); + if (argv[0] == "--") + { + endCommand = true; + argv.shift(); + } + if (typeof main === "function") main([arg0].concat(argv)); require("browser/timeout").serviceTimeouts(); - if (optionalParserUsed) - { - // Here we have no idea what the parser does...this is used for xCodeCapp + if (endCommand) break; - } ObjectiveJ.Executable.resetCachedFileExecutableSearchers(); ObjectiveJ.StaticResource.resetRootResources(); diff --git a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m index 0a987b2e3..8d95e03a8 100644 --- a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m +++ b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m @@ -71,8 +71,8 @@ { launchPath = self.xcc.executablePaths[@"objj"]; arguments = @[ - @"--parser", self.xcc.parserPath, + @"--", self.projectPath, self.sourcePath ]; From 4d77e7dd6b74f010b650db3c7db74dc7a7c88f91 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 19:54:35 -0800 Subject: [PATCH 06/17] Fixed: fixed issue with press, capp and nib2cib with the new command objj --- Objective-J/CommonJS/lib/objective-j.js | 3 +++ Objective-J/CommonJS/objj-executable | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index 4b74070c2..883e34e7f 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -119,7 +119,10 @@ exports.run = function(args) } if (typeof main === "function") + { main([arg0].concat(argv)); + endCommand = true; + } require("browser/timeout").serviceTimeouts(); diff --git a/Objective-J/CommonJS/objj-executable b/Objective-J/CommonJS/objj-executable index 919302c11..9f2f05a02 100755 --- a/Objective-J/CommonJS/objj-executable +++ b/Objective-J/CommonJS/objj-executable @@ -3,5 +3,5 @@ var execPath = require("file").path(module.path); var mainPath = execPath.dirname().dirname().join("lib", execPath.basename(), "main.j"); -var args = ["objj", String(mainPath)].concat(system.args.slice(1)); +var args = ["objj", String(mainPath), "--"].concat(system.args.slice(1)); require("objective-j").run(args); From 7abcc42a42962b6bfbcb75be4372709ad133fc7e Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 19:55:02 -0800 Subject: [PATCH 07/17] Test: updated test ToolTest.j. Added tests for capp_lint and objj --- Tests/Tools/ToolsTest.j | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tests/Tools/ToolsTest.j b/Tests/Tools/ToolsTest.j index b3e16e59e..0b4605664 100644 --- a/Tests/Tools/ToolsTest.j +++ b/Tests/Tools/ToolsTest.j @@ -29,6 +29,18 @@ function cleanup() { status = OS.system(["flatten", "-f", "ToolsTestApp", "FlattenTestApp"].map(OS.enquote).join(" ") + " > /dev/null"); [self assert:0 equals:status message:"flatten failed"]; + + status = OS.system(["objj", "ToolsTestApp/AppController.j"]); + [self assert:0 equals:status message:"objj failed"]; + + status = OS.system(["objj", "ToolsTestApp/AppController.j", "ToolsTestApp/AppController.j"]); + [self assert:0 equals:status message:"objj failed with several files"]; + + status = OS.system(["objj", "-I", "ToolsTestApp/Frameworks", "ToolsTestApp/AppController.j"]); + [self assert:0 equals:status message:"objj failed with options -I"]; + + status = OS.system(["capp_lint", "ToolsTestApp/AppController.j"]); + [self assert:0 equals:status message:"capp lint failed"]; } - (void)tearDown From 2bf012100a04eb67714486a1dcffd67d1c51f519 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 21:02:15 -0800 Subject: [PATCH 08/17] Test: removed test for capp_lint --- Tests/Manual/MultipleValueBindings/AppController.j | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Tests/Manual/MultipleValueBindings/AppController.j b/Tests/Manual/MultipleValueBindings/AppController.j index bbc814a2f..a39a346b4 100644 --- a/Tests/Manual/MultipleValueBindings/AppController.j +++ b/Tests/Manual/MultipleValueBindings/AppController.j @@ -6,8 +6,8 @@ * Copyright 2013, Cappuccino Foundation. All rights reserved. */ -@import -@import +@import +@import @import "Transformers.j" @@ -28,12 +28,13 @@ - (id)init { - if (self = [super init]) + if (self = super init]) { foo = nil; [self setNow]; [self setAllowColorChange:NO]; [self setCanEditPeople:YES]; + people = [ [CPDictionary dictionaryWithObjectsAndKeys:@"tom", @"firstname", @"jones", @"lastname", 27, @"age", 0, @"numberOfChildren"], [CPDictionary dictionaryWithObjectsAndKeys:@"dick", @"firstname", @"clark", @"lastname", 31, @"age", 4, @"numberOfChildren"], From 735b0f8593d5ef398bee8c664ab7778f722bad13 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 21:22:01 -0800 Subject: [PATCH 09/17] Revert "Test: removed test for capp_lint" This reverts commit 2bf012100a04eb67714486a1dcffd67d1c51f519. --- Tests/Manual/MultipleValueBindings/AppController.j | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Tests/Manual/MultipleValueBindings/AppController.j b/Tests/Manual/MultipleValueBindings/AppController.j index a39a346b4..bbc814a2f 100644 --- a/Tests/Manual/MultipleValueBindings/AppController.j +++ b/Tests/Manual/MultipleValueBindings/AppController.j @@ -6,8 +6,8 @@ * Copyright 2013, Cappuccino Foundation. All rights reserved. */ -@import -@import +@import +@import @import "Transformers.j" @@ -28,13 +28,12 @@ - (id)init { - if (self = super init]) + if (self = [super init]) { foo = nil; [self setNow]; [self setAllowColorChange:NO]; [self setCanEditPeople:YES]; - people = [ [CPDictionary dictionaryWithObjectsAndKeys:@"tom", @"firstname", @"jones", @"lastname", 27, @"age", 0, @"numberOfChildren"], [CPDictionary dictionaryWithObjectsAndKeys:@"dick", @"firstname", @"clark", @"lastname", 31, @"age", 4, @"numberOfChildren"], From 58f2d7117a825e2e56c6b3393ea1a9d2a41a56d9 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 3 Nov 2014 21:22:31 -0800 Subject: [PATCH 10/17] Test: removed test for capp_lint --- Tests/Tools/ToolsTest.j | 3 --- 1 file changed, 3 deletions(-) diff --git a/Tests/Tools/ToolsTest.j b/Tests/Tools/ToolsTest.j index 0b4605664..b588f25c7 100644 --- a/Tests/Tools/ToolsTest.j +++ b/Tests/Tools/ToolsTest.j @@ -38,9 +38,6 @@ function cleanup() { status = OS.system(["objj", "-I", "ToolsTestApp/Frameworks", "ToolsTestApp/AppController.j"]); [self assert:0 equals:status message:"objj failed with options -I"]; - - status = OS.system(["capp_lint", "ToolsTestApp/AppController.j"]); - [self assert:0 equals:status message:"capp lint failed"]; } - (void)tearDown From ad82b0064a240232d8e9834e1703776de6edd286 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Tue, 4 Nov 2014 13:23:54 -0800 Subject: [PATCH 11/17] Fixed: added options -m for objj. This option allows you to make objj on several files --- Objective-J/CommonJS/lib/objective-j.js | 27 ++++++++++++------- Objective-J/CommonJS/objj-executable | 2 +- Tests/Tools/ToolsTest.j | 2 +- .../XcodeCapp/ProcessSourceOperation.m | 19 +++++++------ 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index 883e34e7f..1bce5a864 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -68,6 +68,8 @@ with (window) // runs the objj repl or file provided in args exports.run = function(args) { + var multipleFiles = false; + if (args) { // we expect args to be in the format: @@ -91,13 +93,24 @@ exports.run = function(args) print(" -v, --version print the current version of objj"); print(" -I, --objj-include-paths include a specific framework paths") print(" -h, --help print this help"); + print(" -m, --multifiles launch objj on several files") return; } - while (argv.length && argv[0] == "-I" || argv[0] == "--objj-include-paths") + while (argv.length && argv[0].indexOf('-') === 0) { - argv.shift(); - OBJJ_INCLUDE_PATHS.unshift.apply(OBJJ_INCLUDE_PATHS, argv.shift().split(":")); + switch (argv[0]) + { + case "-I": + argv.shift(); + OBJJ_INCLUDE_PATHS.unshift.apply(OBJJ_INCLUDE_PATHS, argv.shift().split(":")); + break; + + case "-m": + argv.shift(); + multipleFiles = true; + break + } } } @@ -112,12 +125,6 @@ exports.run = function(args) exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print); - if (argv[0] == "--") - { - endCommand = true; - argv.shift(); - } - if (typeof main === "function") { main([arg0].concat(argv)); @@ -126,7 +133,7 @@ exports.run = function(args) require("browser/timeout").serviceTimeouts(); - if (endCommand) + if (!multipleFiles || endCommand) break; ObjectiveJ.Executable.resetCachedFileExecutableSearchers(); diff --git a/Objective-J/CommonJS/objj-executable b/Objective-J/CommonJS/objj-executable index 9f2f05a02..919302c11 100755 --- a/Objective-J/CommonJS/objj-executable +++ b/Objective-J/CommonJS/objj-executable @@ -3,5 +3,5 @@ var execPath = require("file").path(module.path); var mainPath = execPath.dirname().dirname().join("lib", execPath.basename(), "main.j"); -var args = ["objj", String(mainPath), "--"].concat(system.args.slice(1)); +var args = ["objj", String(mainPath)].concat(system.args.slice(1)); require("objective-j").run(args); diff --git a/Tests/Tools/ToolsTest.j b/Tests/Tools/ToolsTest.j index b588f25c7..000a05aa8 100644 --- a/Tests/Tools/ToolsTest.j +++ b/Tests/Tools/ToolsTest.j @@ -33,7 +33,7 @@ function cleanup() { status = OS.system(["objj", "ToolsTestApp/AppController.j"]); [self assert:0 equals:status message:"objj failed"]; - status = OS.system(["objj", "ToolsTestApp/AppController.j", "ToolsTestApp/AppController.j"]); + status = OS.system(["objj", "-m", "ToolsTestApp/AppController.j", "ToolsTestApp/AppController.j"]); [self assert:0 equals:status message:"objj failed with several files"]; status = OS.system(["objj", "-I", "ToolsTestApp/Frameworks", "ToolsTestApp/AppController.j"]); diff --git a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m index 8d95e03a8..7872f8887 100644 --- a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m +++ b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m @@ -44,7 +44,7 @@ return; NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - + NSDictionary *info = @{ @"projectId":self.projectId, @"path":self.sourcePath }; [center postNotificationName:XCCConversionDidStartNotification object:self userInfo:info]; @@ -72,7 +72,6 @@ launchPath = self.xcc.executablePaths[@"objj"]; arguments = @[ self.xcc.parserPath, - @"--", self.projectPath, self.sourcePath ]; @@ -85,21 +84,21 @@ return; [self.xcc performSelectorOnMainThread:@selector(computeIgnoredPaths) withObject:nil waitUntilDone:NO]; - + notificationTitle = @"Parsed .xcodecapp-ignore"; notificationMessage = @"Ignored paths updated"; } // Run the task and get the response if needed NSInteger status = 0; - + if (arguments) { if (self.isCancelled) return; DDLogVerbose(@"Running processing task: %@", launchPath); - + NSDictionary *taskResult = [self.xcc runTaskWithLaunchPath:launchPath arguments:arguments returnType:kTaskReturnTypeAny]; @@ -121,7 +120,7 @@ notificationTitle = @"Error converting xib"; NSString *message = [NSString stringWithFormat:@"%@\n%@", self.sourcePath.lastPathComponent, response]; - + NSDictionary *info = @{ @"projectId":self.projectId, @@ -132,7 +131,7 @@ if (self.isCancelled) return; - + [center postNotificationName:XCCConversionDidGenerateErrorNotification object:self userInfo:info]; } else @@ -153,14 +152,14 @@ [self postErrorNotificationForPath:self.sourcePath line:0 message:response status:status]; } } - + if ([self.xcc shouldShowErrorNotification]) [self notifyUserWithTitle:notificationTitle message:notificationMessage]; } else if (!self.xcc.isLoadingProject) { BOOL showFinalNotification = YES; - + if ([self.xcc shouldProcessWithCappLint]) { showFinalNotification = [self.xcc checkCappLintForPath:[NSArray arrayWithObject:self.sourcePath]]; @@ -168,7 +167,7 @@ if (!showFinalNotification) [self.xcc showCappLintErrors]; } - + if (showFinalNotification) [self notifyUserWithTitle:notificationTitle message:notificationMessage]; } From f486c02b5e99c2929e957e6e8548399a375e6f7e Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Wed, 5 Nov 2014 10:55:19 -0800 Subject: [PATCH 12/17] FIXED: Some APIs in CPComboBox were broken Previously, when setting font, alignement, intercellSpacing or itemHeight, CPComboBox was assuming the listDelegate was already created. This patch stores the values in CPComboBox if the listDelegate is not ready, and apply them once it is. --- AppKit/CPComboBox.j | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/AppKit/CPComboBox.j b/AppKit/CPComboBox.j index 6b783b426..293d13ad2 100644 --- a/AppKit/CPComboBox.j +++ b/AppKit/CPComboBox.j @@ -71,6 +71,8 @@ var CPComboBoxTextSubview = @"text", BOOL _forceSelection; BOOL _hasVerticalScroller; CPString _selectedStringValue; + CGSize _intercellSpacing; + float _itemHeight; BOOL _popUpButtonCausedResign; } @@ -140,7 +142,9 @@ var CPComboBoxTextSubview = @"text", return; _hasVerticalScroller = flag; - [[_listDelegate scrollView] setHasVerticalScroller:flag]; + + if (_listDelegate) + [[_listDelegate scrollView] setHasVerticalScroller:_hasVerticalScroller]; } - (CGSize)intercellSpacing @@ -150,7 +154,13 @@ var CPComboBoxTextSubview = @"text", - (void)setIntercellSpacing:(CGSize)aSize { - [[_listDelegate tableView] setIntercellSpacing:aSize]; + if (_intercellSpacing && CGSizeEqualToSize(aSize, _intercellSpacing)) + return; + + _intercellSpacing = aSize; + + if (_listDelegate) + [[_listDelegate tableView] setIntercellSpacing:_intercellSpacing]; } - (BOOL)isButtonBordered @@ -173,10 +183,18 @@ var CPComboBoxTextSubview = @"text", - (void)setItemHeight:(float)itemHeight { - [[_listDelegate tableView] setRowHeight:itemHeight]; + if (itemHeight === _itemHeight) + return; - // FIXME: This shouldn't be necessary, but CPTableView does not tile after setRowHeight - [[_listDelegate tableView] reloadData]; + _itemHeight = itemHeight; + + if (_listDelegate) + { + [[_listDelegate tableView] setRowHeight:_itemHeight]; + + // FIXME: This shouldn't be necessary, but CPTableView does not tile after setRowHeight + [[_listDelegate tableView] reloadData]; + } } - (int)numberOfVisibleItems @@ -493,8 +511,16 @@ var CPComboBoxTextSubview = @"text", - (void)popUpList { if (!_listDelegate) + { [self setListDelegate:[[_CPPopUpList alloc] initWithDataSource:self]]; + [_listDelegate setFont:[self font]]; + [_listDelegate setAlignment:[self alignment]]; + [[_listDelegate scrollView] setHasVerticalScroller:_hasVerticalScroller]; + [[_listDelegate tableView] setIntercellSpacing:_intercellSpacing]; + [[_listDelegate tableView] setRowHeight:_itemHeight]; + } + [self _selectMatchingItem]; // Note the offset here is 1 less than the focus ring width because the outer edge @@ -842,13 +868,17 @@ var CPComboBoxTextSubview = @"text", - (void)setFont:(CPFont)aFont { [super setFont:aFont]; - [_listDelegate setFont:aFont]; + + if (_listDelegate) + [_listDelegate setFont:aFont]; } - (void)setAlignment:(CPTextAlignment)alignment { [super setAlignment:alignment]; - [_listDelegate setAlignment:alignment]; + + if (_listDelegate) + [_listDelegate setAlignment:alignment]; } #pragma mark Pop Up Button Layout From d629f4b501b604687658dd11647c174c1350f467 Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Wed, 5 Nov 2014 11:11:03 -0800 Subject: [PATCH 13/17] STYLE: Make previous patch cleaner --- AppKit/CPComboBox.j | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/AppKit/CPComboBox.j b/AppKit/CPComboBox.j index 293d13ad2..b8a4481b8 100644 --- a/AppKit/CPComboBox.j +++ b/AppKit/CPComboBox.j @@ -469,6 +469,9 @@ var CPComboBoxTextSubview = @"text", // Apply our text style to the list [_listDelegate setFont:[self font]]; [_listDelegate setAlignment:[self alignment]]; + [[_listDelegate scrollView] setHasVerticalScroller:_hasVerticalScroller]; + [[_listDelegate tableView] setIntercellSpacing:_intercellSpacing]; + [[_listDelegate tableView] setRowHeight:_itemHeight]; } - (int)indexOfItemWithObjectValue:(id)anObject @@ -511,16 +514,8 @@ var CPComboBoxTextSubview = @"text", - (void)popUpList { if (!_listDelegate) - { [self setListDelegate:[[_CPPopUpList alloc] initWithDataSource:self]]; - [_listDelegate setFont:[self font]]; - [_listDelegate setAlignment:[self alignment]]; - [[_listDelegate scrollView] setHasVerticalScroller:_hasVerticalScroller]; - [[_listDelegate tableView] setIntercellSpacing:_intercellSpacing]; - [[_listDelegate tableView] setRowHeight:_itemHeight]; - } - [self _selectMatchingItem]; // Note the offset here is 1 less than the focus ring width because the outer edge From 97a65059e595b07a65819c44974690ca516e9bc6 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Wed, 5 Nov 2014 11:12:17 -0800 Subject: [PATCH 14/17] Fixed: when using the option -m, objj doesn't process every files in a error is raised, now it does --- Objective-J/CommonJS/lib/objective-j.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Objective-J/CommonJS/lib/objective-j.js b/Objective-J/CommonJS/lib/objective-j.js index 1bce5a864..9dbf5ebd9 100644 --- a/Objective-J/CommonJS/lib/objective-j.js +++ b/Objective-J/CommonJS/lib/objective-j.js @@ -123,7 +123,23 @@ exports.run = function(args) var arg0 = argv.shift(); var mainFilePath = FILE.canonical(arg0); - exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print); + if (multipleFiles) + { + // This is needed to process every files passed in args + // Otherwise it would stop when an error is raised or we would like to objj the other given files + try + { + exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print); + } + catch(e) + { + print("\n" + e); + } + } + else + { + exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print); + } if (typeof main === "function") { From 459374db1cf426d82ba22919382645d201bd9c0f Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Wed, 5 Nov 2014 11:35:14 -0800 Subject: [PATCH 15/17] FIXED: Open the popup list as a child window in CPComboBox --- AppKit/_CPPopUpList.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/_CPPopUpList.j b/AppKit/_CPPopUpList.j index f69f68f0a..2604f3652 100644 --- a/AppKit/_CPPopUpList.j +++ b/AppKit/_CPPopUpList.j @@ -229,7 +229,7 @@ var ListColumnIdentifier = @"1"; [self listWillPopUp]; - [_panel orderFront:nil]; + [[aView window] addChildWindow:_panel ordered:CPWindowAbove]; } #pragma mark Setting Display Attributes From b827b7ffce7b1e3ffe44e4409926703d5ec1daa7 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Wed, 5 Nov 2014 12:57:03 -0800 Subject: [PATCH 16/17] New: xCodeCapp 3.2, command objj on each processing files or on the entire project This pull requests adds a nice feature to xCodeCapp, now each time a fill is processing, xCodeCapp will launch the command objj to check the compilation issues. If it finds something, it will show them up on the classic error panel. This basically show import warnings, warnings you don't catch with your browser but only during the build of the application. Objj is only launched if no errors was found after the first parsing (the parser which translate a file to objective-c). This feature can be disabled on the preferences panel. The menu has a new menu item "Check Compilation Issues". This action will launch objj on each files of the project and shows warnings and errors found. The command objj will take automatically the OBJJ_INCLUDE_PATH in the index.html or index-debug.html. This options can be disabled in the preferences panel as well. This PR only works with the PR #2248 --- Tools/XcodeCapp/XcodeCapp/AppController.m | 32 +- Tools/XcodeCapp/XcodeCapp/Info.plist | 4 +- .../XcodeCapp/ProcessSourceOperation.m | 25 +- Tools/XcodeCapp/XcodeCapp/UserDefaults.h | 3 + Tools/XcodeCapp/XcodeCapp/UserDefaults.m | 4 +- Tools/XcodeCapp/XcodeCapp/XcodeCapp.h | 7 +- Tools/XcodeCapp/XcodeCapp/XcodeCapp.m | 269 +++++- .../XcodeCapp/XcodeCapp/en.lproj/MainMenu.xib | 779 +++++++++++++++--- 8 files changed, 977 insertions(+), 146 deletions(-) diff --git a/Tools/XcodeCapp/XcodeCapp/AppController.m b/Tools/XcodeCapp/XcodeCapp/AppController.m index 86aa8c3d7..e72307bd3 100644 --- a/Tools/XcodeCapp/XcodeCapp/AppController.m +++ b/Tools/XcodeCapp/XcodeCapp/AppController.m @@ -138,21 +138,23 @@ AppController *SharedAppControllerInstance = nil; - (void)registerDefaultPreferences { NSDictionary *appDefaults = @{ - kDefaultLastEventId: [NSNumber numberWithUnsignedLongLong:kFSEventStreamEventIdSinceNow], - kDefaultFirstLaunch: @YES, - kDefaultFirstLaunchVersion: @2.0, - kDefaultXCCAPIMode: [NSNumber numberWithInt:kXCCAPIModeAuto], - kDefaultXCCReactToInodeMod: @YES, - kDefaultXCCReopenLastProject: @YES, - kDefaultXCCAutoOpenErrorsPanelOnErrors: @YES, - kDefaultXCCAutoOpenErrorsPanelOnCappLint: @YES, - kDefaultXCCAutoShowNotificationOnErrors: @YES, - kDefaultXCCAutoShowNotificationOnCappLint: @YES, - kDefaultXCCProjectHistory: [NSArray new], - kDefaultMaxRecentProjects: @20, - kDefaultLogLevel: [NSNumber numberWithInt:LOG_LEVEL_WARN], - kDefaultAutoOpenXcodeProject: @YES, - kDefaultUseSymlinkWhenCreatingProject: @YES + kDefaultLastEventId: [NSNumber numberWithUnsignedLongLong:kFSEventStreamEventIdSinceNow], + kDefaultFirstLaunch: @YES, + kDefaultFirstLaunchVersion: @2.0, + kDefaultXCCAPIMode: [NSNumber numberWithInt:kXCCAPIModeAuto], + kDefaultXCCReactToInodeMod: @YES, + kDefaultXCCReopenLastProject: @YES, + kDefaultXCCAutoOpenErrorsPanelOnErrors: @YES, + kDefaultXCCAutoOpenErrorsPanelOnCappLint: @YES, + kDefaultXCCAutoShowNotificationOnErrors: @YES, + kDefaultXCCAutoShowNotificationOnCappLint: @YES, + kDefaultXCCProjectHistory: [NSArray new], + kDefaultMaxRecentProjects: @20, + kDefaultLogLevel: [NSNumber numberWithInt:LOG_LEVEL_WARN], + kDefaultAutoOpenXcodeProject: @YES, + kDefaultUseSymlinkWhenCreatingProject: @YES, + kDefaultXCCUseDebugFrameworkWithObjj: @YES, + kDefaultXCCShouldProcessObjj: @YES }; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; diff --git a/Tools/XcodeCapp/XcodeCapp/Info.plist b/Tools/XcodeCapp/XcodeCapp/Info.plist index 7f59ef93d..ddb9c5a21 100644 --- a/Tools/XcodeCapp/XcodeCapp/Info.plist +++ b/Tools/XcodeCapp/XcodeCapp/Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.1 + 3.2 CFBundleSignature ???? CFBundleVersion - 3.1 + 3.2 LSApplicationCategoryType public.app-category.developer-tools LSUIElement diff --git a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m index 81e9b7cf6..51786d82a 100644 --- a/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m +++ b/Tools/XcodeCapp/XcodeCapp/ProcessSourceOperation.m @@ -45,7 +45,7 @@ NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - NSDictionary *info = @{ @"projectId":self.projectId, @"path":self.sourcePath }; + NSDictionary *info = @{ @"projectId":self.projectId, @"path":self.sourcePath}; [center postNotificationName:XCCConversionDidStartNotification object:self userInfo:info]; DDLogVerbose(@"Conversion started: %@", self.sourcePath); @@ -74,7 +74,7 @@ self.xcc.parserPath, self.projectPath, self.sourcePath - ]; + ]; notificationTitle = @"Objective-J source processed"; } @@ -141,7 +141,7 @@ @try { NSArray *errors = [response propertyList]; - + for (NSDictionary *error in errors) { [self postErrorNotificationForPath:error[@"path"] line:[error[@"line"] intValue] message:error[@"message"] status:status]; @@ -158,14 +158,23 @@ } else if (!self.xcc.isLoadingProject) { - BOOL showFinalNotification = YES; + BOOL showFinalNotification = NO; + + // At this point, we should only detect warnings + if ([self.xcc shouldProcessWithObjjWarnings]) + { + showFinalNotification = [self.xcc checkObjjWarningsForPath:[NSArray arrayWithObject:self.sourcePath]]; + [self.xcc showObjjWarnings]; + } + else + { + showFinalNotification = YES; + } if ([self.xcc shouldProcessWithCappLint]) { - showFinalNotification = [self.xcc checkCappLintForPath:[NSArray arrayWithObject:self.sourcePath]]; - - if (!showFinalNotification) - [self.xcc showCappLintErrors]; + showFinalNotification = [self.xcc checkCappLintForPath:[NSArray arrayWithObject:self.sourcePath]] && showFinalNotification; + [self.xcc showCappLintWarnings]; } if (showFinalNotification) diff --git a/Tools/XcodeCapp/XcodeCapp/UserDefaults.h b/Tools/XcodeCapp/XcodeCapp/UserDefaults.h index a89476cd0..903fd7b6c 100644 --- a/Tools/XcodeCapp/XcodeCapp/UserDefaults.h +++ b/Tools/XcodeCapp/XcodeCapp/UserDefaults.h @@ -19,8 +19,11 @@ extern NSString * const kDefaultXCCReactToInodeMod; extern NSString * const kDefaultXCCReopenLastProject; extern NSString * const kDefaultXCCAutoOpenErrorsPanelOnErrors; extern NSString * const kDefaultXCCAutoOpenErrorsPanelOnCappLint; +extern NSString * const kDefaultXCCAutoOpenErrorsPanelOnObjjWarnings; extern NSString * const kDefaultXCCAutoShowNotificationOnErrors; extern NSString * const kDefaultXCCAutoShowNotificationOnCappLint; +extern NSString * const kDefaultXCCUseDebugFrameworkWithObjj; +extern NSString * const kDefaultXCCShouldProcessObjj; extern NSString * const kDefaultXCCProjectHistory; extern NSString * const kDefaultLastOpenedPath; extern NSString * const kDefaultPathModificationDates; diff --git a/Tools/XcodeCapp/XcodeCapp/UserDefaults.m b/Tools/XcodeCapp/XcodeCapp/UserDefaults.m index aee5793ae..18e976581 100644 --- a/Tools/XcodeCapp/XcodeCapp/UserDefaults.m +++ b/Tools/XcodeCapp/XcodeCapp/UserDefaults.m @@ -19,6 +19,8 @@ NSString * const kDefaultXCCAutoOpenErrorsPanelOnErrors = @"XCCAutoOpenErrorsPan NSString * const kDefaultXCCAutoOpenErrorsPanelOnCappLint = @"XCCAutoOpenErrorsPanelOnCappLint"; NSString * const kDefaultXCCAutoShowNotificationOnErrors = @"XCCAutoOpenShowNotificationErrors"; NSString * const kDefaultXCCAutoShowNotificationOnCappLint = @"XCCAutoShowNotificationOnCappLint"; +NSString * const kDefaultXCCUseDebugFrameworkWithObjj = @"XCCUseDebugFrameworkWithObjj"; +NSString * const kDefaultXCCShouldProcessObjj = @"XCCShouldProcessObjj"; NSString * const kDefaultXCCProjectHistory = @"XCCProjectHistory"; NSString * const kDefaultLastOpenedPath = @"LastOpenedPath"; NSString * const kDefaultPathModificationDates = @"pathModificationDates"; @@ -26,4 +28,4 @@ NSString * const kDefaultMaxRecentProjects = @"maxRecentProjects"; NSString * const kDefaultLogLevel = @"logLevel"; NSString * const kDefaultAutoOpenXcodeProject = @"autoOpenXcodeProject"; NSString * const kDefaultUseSymlinkWhenCreatingProject = @"useSymlinkWhenCreatingProject"; -NSString * const kDefaultUpdateCappuccinoWithLastVersionOfMasterBranch = @"updateCappuccinoWithLastVersionOfMasterBranch"; +NSString * const kDefaultUpdateCappuccinoWithLastVersionOfMasterBranch = @"updateCappuccinoWithLastVersionOfMasterBranch"; \ No newline at end of file diff --git a/Tools/XcodeCapp/XcodeCapp/XcodeCapp.h b/Tools/XcodeCapp/XcodeCapp/XcodeCapp.h index 09f9ae64f..ef7b756c5 100644 --- a/Tools/XcodeCapp/XcodeCapp/XcodeCapp.h +++ b/Tools/XcodeCapp/XcodeCapp/XcodeCapp.h @@ -156,9 +156,14 @@ extern NSString * const XCCCappLintDidEndNotification; - (NSDictionary*)createProject:(NSString*)aPath; +- (void)showCappLintWarnings; +- (void)showObjjWarnings; + - (BOOL)shouldProcessWithCappLint; - (BOOL)checkCappLintForPath:(NSArray*)paths; -- (void)showCappLintErrors; + +- (BOOL)shouldProcessWithObjjWarnings; +- (BOOL)checkObjjWarningsForPath:(NSArray*)paths; - (void)updateCappuccino; diff --git a/Tools/XcodeCapp/XcodeCapp/XcodeCapp.m b/Tools/XcodeCapp/XcodeCapp/XcodeCapp.m index 36ebc6c63..52f3920f6 100644 --- a/Tools/XcodeCapp/XcodeCapp/XcodeCapp.m +++ b/Tools/XcodeCapp/XcodeCapp/XcodeCapp.m @@ -76,6 +76,8 @@ static NSArray *XCCDefaultIgnoredPathPredicates = nil; NSString * const XCCCappLintDidStartNotification = @"XCCCappLintDidStartNotification"; NSString * const XCCCappLintDidEndNotification = @"XCCCappLintDidEndNotification"; +NSString * const XCCObjjDidStartNotification = @"XCCObjjDidStartNotification"; +NSString * const XCCObjjDidEndNotification = @"XCCObjjDidEndNotification"; @interface XcodeCapp () @@ -1694,6 +1696,13 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, || [defaults boolForKey:kDefaultXCCAutoShowNotificationOnCappLint]; } +- (BOOL)shouldProcessWithObjjWarnings +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + return ([defaults boolForKey:kDefaultXCCAutoOpenErrorsPanelOnErrors] || [defaults boolForKey:kDefaultXCCAutoShowNotificationOnErrors]) && [defaults boolForKey:kDefaultXCCShouldProcessObjj]; +} + - (void)showErrors { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; @@ -1704,41 +1713,96 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, } } -- (void)showCappLintErrors +- (void)showCappLintWarnings { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - if ([defaults boolForKey:kDefaultXCCAutoOpenErrorsPanelOnCappLint] && self.errorList.count) + NSUInteger numberError = [self.errorList count]; + NSDictionary *firstError; + NSUInteger i = 0; + + for (i = 0; i < numberError; i++) + { + NSDictionary *dict = [self.errorList objectAtIndex:i]; + + if ([[dict valueForKey:@"type"] isEqualToString: @"capp_lint"]) + { + firstError = dict; + break; + } + } + + if ([defaults boolForKey:kDefaultXCCAutoOpenErrorsPanelOnCappLint] && firstError) [self openErrorsPanel:self]; - if ([defaults boolForKey:kDefaultXCCAutoShowNotificationOnCappLint]) + if ([defaults boolForKey:kDefaultXCCAutoShowNotificationOnCappLint] && firstError) { - NSUInteger numberError = [self.errorList count]; + NSDictionary *error = [self.errorList objectAtIndex:0]; + NSString *filename = [error objectForKey:@"path"]; + + NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInteger:self.projectId] , @"projectId", + @"Code Style Issues", @"title", + filename.lastPathComponent , @"message", + nil]; + + [self wantUserNotificationWithInfo:dict]; + } +} + +- (void)showObjjWarnings +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSUInteger numberError = [self.errorList count]; + NSDictionary *firstError; + NSUInteger i = 0; + + for (i = 0; i < numberError; i++) + { + NSDictionary *dict = [self.errorList objectAtIndex:i]; - if (numberError) + if ([[dict valueForKey:@"type"] isEqualToString: @"objj"]) { - NSDictionary *error = [self.errorList objectAtIndex:0]; - NSString *filename = [error objectForKey:@"path"]; - - NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInteger:self.projectId] , @"projectId", - @"Code Style Issues", @"title", - filename.lastPathComponent , @"message", - nil]; - - [self wantUserNotificationWithInfo:dict]; + firstError = dict; + break; } } + + if ([defaults boolForKey:kDefaultXCCAutoOpenErrorsPanelOnErrors] && firstError) + [self openErrorsPanel:self]; + + if ([defaults boolForKey:kDefaultXCCAutoShowNotificationOnErrors] && firstError) + { + NSDictionary *error = [self.errorList objectAtIndex:0]; + NSString *filename = [error objectForKey:@"path"]; + + NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInteger:self.projectId] , @"projectId", + @"Compiling Issues", @"title", + filename.lastPathComponent , @"message", + nil]; + + [self wantUserNotificationWithInfo:dict]; + } } - (void)pruneProcessingErrorsForProjectPath:(NSString *)path +{ + [self pruneProcessingErrorsForProjectPath:path type:nil]; +} + +- (void)pruneProcessingErrorsForProjectPath:(NSString *)path type:(NSString*)type { // Remove all errors for the path being processed NSIndexSet *matchingErrors = [self.errorList indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { - return [[obj valueForKey:@"path"] isEqualToString:path]; + if (type) + return ([[obj valueForKey:@"path"] isEqualToString:path] || [[obj valueForKey:@"realPath"] isEqualToString:path]) && [[obj valueForKey:@"type"] isEqualToString:type]; + else + return [[obj valueForKey:@"path"] isEqualToString:path] || [[obj valueForKey:@"realPath"] isEqualToString:path]; }]; - + [self.errorListController removeObjectsAtArrangedObjectIndexes:matchingErrors]; } @@ -1758,6 +1822,170 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, return index != NSNotFound; } +#pragma mark - objjj check + +- (NSString*)_getObjjIncludePaths +{ + NSRegularExpression *regulareExpressionFramework = [NSRegularExpression regularExpressionWithPattern:@"OBJJ_INCLUDE_PATHS ?= ?\\[\"(.*)\"\\," options:0 error:nil]; + + NSString *indexPath; + + if ([[NSUserDefaults standardUserDefaults] boolForKey:kDefaultXCCUseDebugFrameworkWithObjj]) + indexPath = [NSString stringWithFormat:@"%@/index-debug.html", self.projectPath]; + else + indexPath = [NSString stringWithFormat:@"%@/index.html", self.projectPath]; + + NSDictionary *taskResult = [self runTaskWithLaunchPath:@"/bin/cat" arguments:[NSMutableArray arrayWithObject:indexPath] returnType:kTaskReturnTypeAny]; + + NSString *response = taskResult[@"response"]; + + NSArray *matches = [regulareExpressionFramework matchesInString:response options:0 range:NSMakeRange(0, [response length])]; + + for (NSTextCheckingResult *match in matches) + return [response substringWithRange:[match rangeAtIndex:1]]; + + return @"Frameworks/"; +} + +- (BOOL)checkObjjWarningsForPath:(NSArray*)paths +{ + DDLogVerbose(@"Checking path %@ with objj", paths); + + NSUInteger numberOfFiles = [paths count]; + + if (!numberOfFiles) + return YES; + + [[NSNotificationCenter defaultCenter] postNotificationName:XCCBatchDidStartNotification object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:XCCObjjDidStartNotification object:self]; + + NSMutableArray *arguments = [NSMutableArray arrayWithObjects:@"-I", [self _getObjjIncludePaths], @"-m", nil]; + [arguments addObjectsFromArray:paths]; + + NSDictionary *taskResult = [self runTaskWithLaunchPath:self.executablePaths[@"objj"] + arguments:arguments + returnType:kTaskReturnTypeStdOut]; + + NSInteger status = [taskResult[@"status"] intValue]; + NSString *response = taskResult[@"response"]; + + if (status == 0 && [response length] == 0) + { + [[NSNotificationCenter defaultCenter] postNotificationName:XCCObjjDidEndNotification object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:XCCBatchDidEndNotification object:self]; + return YES; + } + + NSMutableArray *errors = [NSMutableArray arrayWithArray:[response componentsSeparatedByString:@"\n\n"]]; + + NSInteger numberOfErrors = [errors count]; + NSInteger i = 0; + NSMutableArray *dicts = [NSMutableArray array]; + + // When checking of the entire project, we have to be ready to find errors + NSRegularExpression *regulareExpressionFramework = [NSRegularExpression regularExpressionWithPattern:@"([\\S\\s]*)(WARNING|ERROR) line ([0-9]*) in file\\:(.*)\\: ([\\S\\s]*)" options:0 error:nil]; + + NSString *filePath; + + if ([paths count] == 1) + filePath = [paths firstObject]; + + for (i = 0; i < numberOfErrors; i++) + { + NSMutableString *error = (NSMutableString*)[errors objectAtIndex:i]; + NSString *line; + NSString *path; + NSString *messageError; + + // We have an extra new line for the first error + if (i == 0) + error = (NSMutableString*)[error substringFromIndex:1]; + + NSArray *matches = [regulareExpressionFramework matchesInString:error options:0 range:NSMakeRange(0, [error length])]; + NSInteger j = 0; + + if (![matches count]) + { + DDLogVerbose(@"Error %@ has been ignored by xCodeCapp, the error doesn't respect any pattern", error); + continue; + } + + for (NSTextCheckingResult *match in matches) + { + for (j = 0; j < [match numberOfRanges]; j++) + { + switch (j) { + case 1: + messageError = [error substringWithRange:[match rangeAtIndex:j]]; + break; + + case 3: + line = [error substringWithRange:[match rangeAtIndex:j]]; + break; + + case 4: + path = [error substringWithRange:[match rangeAtIndex:j]]; + break; + + case 5: + messageError = [NSString stringWithFormat:@"Compiling issue at line %@ of file %@:\n%@ \n%@", line, path.lastPathComponent, [error substringWithRange:[match rangeAtIndex:j]], messageError]; + break; + + default: + break; + } + } + } + + // Make sure to delete all the compilations issue form the tableView + [self pruneProcessingErrorsForProjectPath:path type:@"objj"]; + + // Path and realPath are needed, we can get error on ViewController2.j while checking ViewController.j. + // When recompiling ViewController.j, realPath is used to know which errors have to be erased form the table + NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInt:[line intValue]], @"line", + messageError , @"message", + (filePath ? filePath:path), @"path", + @"objj", @"type", + path , @"realPath", + nil]; + + // Compiler can show several times the same errors + if (![dicts containsObject:dict] && ![self.errorList containsObject:dict]) + [dicts addObject:dict]; + + } + + [self performSelectorOnMainThread:@selector(objjCompilerDidGenerateError:) withObject:dicts waitUntilDone:YES]; + + self.isProcessing = NO; + [[NSNotificationCenter defaultCenter] postNotificationName:XCCObjjDidEndNotification object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:XCCBatchDidEndNotification object:self]; + + return NO; +} + +- (IBAction)checkProjectWithObjj:(id)sender +{ + [self clearErrors:self]; + + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:self selector:@selector(objjDidEndNotification:) name:XCCObjjDidEndNotification object:nil]; + + [self performSelectorInBackground:@selector(checkObjjWarningsForPath:) withObject:self.xCodeCappTargetedFiles]; +} + +- (void)objjDidEndNotification:(NSNotification*)aNotification +{ + [self showObjjWarnings]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:XCCObjjDidEndNotification object:nil]; +} + +- (void)objjCompilerDidGenerateError:(NSArray*)errors +{ + [self.errorListController addObjects:errors]; +} + #pragma mark - capp_lint @@ -1773,7 +2001,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, - (void)cappLintDidEndNotification:(NSNotification*)aNotification { - [self showCappLintErrors]; + [self showCappLintWarnings]; [[NSNotificationCenter defaultCenter] removeObserver:self name:XCCCappLintDidEndNotification object:nil]; } @@ -1840,18 +2068,19 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, NSInteger positionOfSecondColon = [errorWithoutPath rangeOfString:@":"].location; line = [errorWithoutPath substringToIndex:positionOfSecondColon]; - NSString *messageError = [NSString stringWithFormat:@"Code style issue: %@ \n%@", path.lastPathComponent, errorWithoutPath]; + NSString *messageError = [NSString stringWithFormat:@"Code style issue at line %@ of file %@:\n%@", line, path.lastPathComponent, errorWithoutPath]; NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:[line intValue]], @"line", messageError , @"message", path, @"path", + @"capp_lint", @"type", nil]; [dicts addObject:dict]; } - [self performSelectorOnMainThread:@selector(cappLintConversionDidGenerateError:) withObject:dicts waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(cappLintConversionDidGenerateError:) withObject:dicts waitUntilDone:YES]; self.isProcessing = NO; [[NSNotificationCenter defaultCenter] postNotificationName:XCCBatchDidEndNotification object:self]; diff --git a/Tools/XcodeCapp/XcodeCapp/en.lproj/MainMenu.xib b/Tools/XcodeCapp/XcodeCapp/en.lproj/MainMenu.xib index 3efdd46af..239798b27 100644 --- a/Tools/XcodeCapp/XcodeCapp/en.lproj/MainMenu.xib +++ b/Tools/XcodeCapp/XcodeCapp/en.lproj/MainMenu.xib @@ -2,13 +2,13 @@ 1060 - 13C1021 - 5056 - 1265.19 - 697.40 + 14A389 + 6250 + 1343.14 + 755.00 - 5056 - 5056 + 6250 + 6250 NSArrayController @@ -108,6 +108,14 @@ + + Check Compilation Issues + + 2147483647 + + + + Check Project Code Style @@ -235,7 +243,7 @@ - + 256 @@ -243,8 +251,6 @@ 268 {{164, 20}, {203, 143}} - - YES 68157504 @@ -254,7 +260,7 @@ YUBhcGFyYWppdGEuY29tCiAgICAKICAgIEFsZXhhbmRyZSBXaWxoZWxtCiAgICBhbGV4YW5kcmUud2ls aGVsbWZyQGdtYWlsLmNvbQoKT3JpZ2luYWwgQ29jb2EgdmVyc2lvbiBkZXZlbG9wZWQgYnk6CiAgICBB bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ - .LucidaGrandeUI + YES 11 3100 @@ -281,7 +287,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 266 {{164, 171}, {221, 74}} - YES @@ -329,7 +334,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ {{17, 108}, {128, 128}} - YES @@ -349,11 +353,9 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ {402, 247} - - - {{0, 0}, {1440, 878}} + {{0, 0}, {1440, 877}} {10000000000000, 10000000000000} NO @@ -368,7 +370,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ {315, 77} - + 256 @@ -384,7 +386,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 256 {550, 201} - YES NO @@ -461,20 +462,21 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ {{1, 1}, {550, 201}} - 4 + YES -2147483392 {{1, 273}, {512, 16}} - NO + _doScroller: + 1 _doScroller: @@ -484,16 +486,16 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ -2147483392 {{535, 1}, {16, 45}} - NO + _doScroller: + _doScroller: {{-1, 35}, {552, 203}} - 133682 @@ -509,7 +511,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 289 {{352, 8}, {85, 19}} - {250, 750} YES @@ -518,7 +519,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 134217728 Clear - .LucidaGrandeUI + YES 12 787 @@ -538,7 +539,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 292 {{20, 8}, {85, 19}} - {250, 750} YES @@ -563,8 +563,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 289 {{445, 8}, {85, 19}} - - {250, 750} YES @@ -585,11 +583,9 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ {550, 237} - - - {{1440, -180}, {1920, 1058}} + {{1440, -180}, {1920, 1057}} {315, 99} {10000000000000, 10000000000000} errorPanel @@ -598,7 +594,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 3 2 - {{1964, 505}, {369, 415}} + {{1964, 505}, {369, 473}} 1618478080 Preferences NSWindow @@ -629,7 +625,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 0 Load the most recent project on launch - .LucidaGrandeUI + YES 13 1044 @@ -732,7 +728,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ -2076180416 2048 - .LucidaGrandeUI + YES 13 1301 @@ -804,7 +800,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ - {{17, 245}, {332, 155}} + {{17, 303}, {332, 155}} @@ -813,15 +809,13 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 67108864 134217728 Projects - - LucidaGrande - 11 - 16 - + - - 3 - MCAwLjgAA + + 6 + System + labelColor + @@ -841,7 +835,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 268 - {{146, 12}, {171, 18}} + {{149, 12}, {171, 18}} @@ -866,7 +860,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 268 - {{16, 39}, {126, 17}} + {{16, 40}, {126, 17}} @@ -886,7 +880,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 268 - {{146, 38}, {171, 18}} + {{149, 37}, {171, 18}} @@ -908,14 +902,64 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ NO + + + 268 + {{16, 93}, {192, 18}} + + + + YES + + -2080374784 + 0 + Look for compilation issues + + + 1211912448 + 2 + + + + + 400 + 75 + + NO + + + + 268 + {{16, 67}, {301, 18}} + + + + YES + + -2080374784 + 0 + Use include path from the index-debug file + + + 1211912448 + 2 + + + + + 400 + 75 + + NO + - {{1, 1}, {330, 66}} + {{1, 1}, {330, 124}} - + - {{17, 159}, {332, 82}} + {{17, 159}, {332, 140}} @@ -924,12 +968,9 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 67108864 134217728 File processing - + - - 3 - MCAwLjgAA - + 1 @@ -1035,10 +1076,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ Code style - - 3 - MCAwLjgwMDAwMDAxMTkAA - + 1 @@ -1095,12 +1133,9 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 67108864 134217728 Update - + - - 3 - MCAwLjgAA - + 1 @@ -1109,12 +1144,12 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ NO - {369, 415} + {369, 473} - {{1440, -180}, {1920, 1058}} + {{1440, -180}, {1920, 1057}} {10000000000000, 10000000000000} xcc-prefs YES @@ -1155,7 +1190,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ - {{0, 0}, {1440, 878}} + {{0, 0}, {1440, 877}} {10000000000000, 10000000000000} YES @@ -1186,7 +1221,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ - + 256 @@ -1194,6 +1229,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 268 {{18, 22}, {251, 17}} + _NS:397 {251, 750} @@ -1216,6 +1252,8 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 268 {{269, 13}, {74, 32}} + + _NS:9 YES @@ -1239,6 +1277,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 268 {{20, 45}, {317, 20}} + _NS:9 {250, 250} @@ -1247,10 +1286,12 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ {357, 84} + + _NS:21 - {{0, 0}, {1440, 878}} + {{0, 0}, {1440, 877}} {10000000000000, 10000000000000} updatingCappuccinoPanel YES @@ -1258,7 +1299,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ NO - + delegate @@ -1507,6 +1548,22 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 30N-ga-LBo + + + save: + + + + kBr-PF-Ng7 + + + + save: + + + + HyN-S0-KXD + openXcodeProject: @@ -1531,14 +1588,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 774 - - - checkProjectWithCappLint: - - - - cNV-We-Why - clearErrors: @@ -1619,6 +1668,22 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ HJ3-bt-3EP + + + checkProjectWithCappLint: + + + + bwf-Gu-ART + + + + checkProjectWithObjj: + + + + oPW-bl-Ydt + values.XCCReopenLastProject @@ -2021,6 +2086,22 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ uwx-aq-p86 + + + enabled: projectPath.length + + + + + + enabled: projectPath.length + enabled + projectPath.length + 2 + + + a7g-oH-Wxj + value: values.XCCAutoOpenShowNotificationErrors @@ -2061,6 +2142,46 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ aof-Pn-nzf + + + value: values.kDefaultXCCUseDebugFrameworkWithObjj + + + + + + value: values.kDefaultXCCUseDebugFrameworkWithObjj + value + values.kDefaultXCCUseDebugFrameworkWithObjj + + NSValidatesImmediately + + + 2 + + + 8Eb-cw-Tsj + + + + value: values.XCCShouldProcessObjj + + + + + + value: values.XCCShouldProcessObjj + value + values.XCCShouldProcessObjj + + NSValidatesImmediately + + + 2 + + + 4tf-7Y-tid + @@ -2115,6 +2236,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ + @@ -2466,9 +2588,11 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ 848 - + + + @@ -2699,6 +2823,37 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ + + wDc-Ir-hmE + + + + + + + + beY-m1-Aia + + + + + wGK-ie-cgv + + + + + + + + fJB-o4-AhU + + + + + SNH-t4-Ay7 + + + @@ -2744,6 +2899,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ + {-243.5, 329.5} com.apple.InterfaceBuilder.CocoaPlugin @@ -2757,6 +2913,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2909,6 +3066,7 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2958,12 +3116,18 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTip @@ -2986,6 +3150,30 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + When an error or warning occurs, automatically open the Errors & Warnings panel + + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + ToolTip + + ToolTip + + When an error or warning occurs, automatically open the Errors & Warnings panel + + + + com.apple.InterfaceBuilder.CocoaPlugin + + @@ -3002,9 +3190,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ id id id - id - id - id @@ -3023,18 +3208,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ openHelp: id - - openPreferences: - id - - - showInFinder: - id - - - updateCappuccino: - id - NSPanel @@ -3092,7 +3265,53 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ IBProjectSource - ./Classes/AppController.h + ../XcodeCapp/AppController.h + + + + AppController + + id + id + id + id + id + id + id + + + + createProject: + id + + + loadProject: + id + + + openAbout: + id + + + openHelp: + id + + + openPreferences: + id + + + showInFinder: + id + + + updateCappuccino: + id + + + + IBProjectSource + ../XcodeCapp/AppController.m @@ -3168,7 +3387,373 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ IBProjectSource - ./Classes/XcodeCapp.h + ../XcodeCapp/XcodeCapp.h + + + + XcodeCapp + + id + id + id + id + id + id + id + + + + checkProjectWithCappLint: + id + + + checkProjectWithObjj: + id + + + clearErrors: + id + + + openErrorInEditor: + id + + + openErrorsPanel: + id + + + openXcodeProject: + id + + + synchronizeProject: + id + + + + IBProjectSource + ../XcodeCapp/XcodeCapp.m + + + + + + NSActionCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSActionCell.h + + + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSArrayController + NSObjectController + + IBFrameworkSource + AppKit.framework/Headers/NSArrayController.h + + + + NSBox + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSBox.h + + + + NSButton + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSButton.h + + + + NSButtonCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSButtonCell.h + + + + NSCell + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSCell.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSController + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSController.h + + + + NSFontManager + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSImageCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSImageCell.h + + + + NSImageView + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSImageView.h + + + + NSManagedObjectContext + NSObject + + IBFrameworkSource + CoreData.framework/Headers/NSManagedObjectContext.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMenuItemCell + NSButtonCell + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItemCell.h + + + + NSObjectController + NSController + + IBFrameworkSource + AppKit.framework/Headers/NSObjectController.h + + + + NSPanel + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSPanel.h + + + + NSPopUpButton + NSButton + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButton.h + + + + NSPopUpButtonCell + NSMenuItemCell + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButtonCell.h + + + + NSProgressIndicator + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSProgressIndicator.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSScrollView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSScrollView.h + + + + NSScroller + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSScroller.h + + + + NSTableColumn + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableColumn.h + + + + NSTableView + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSTextField + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSTextField.h + + + + NSTextFieldCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSTextFieldCell.h + + + + NSUserDefaultsController + NSController + + IBFrameworkSource + AppKit.framework/Headers/NSUserDefaultsController.h + + + + NSView + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + PDFView + NSView + + id + id + id + id + id + id + id + id + id + id + + + + goBack: + id + + + goForward: + id + + + goToFirstPage: + id + + + goToLastPage: + id + + + goToNextPage: + id + + + goToPreviousPage: + id + + + selectAll: + id + + + takeBackgroundColorFrom: + id + + + zoomIn: + id + + + zoomOut: + id + + + + IBFrameworkSource + Quartz.framework/Frameworks/PDFKit.framework/Headers/PDFView.h @@ -3180,10 +3765,6 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ com.apple.InterfaceBuilder.CocoaPlugin.macosx - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 @@ -3191,8 +3772,8 @@ bnRvaW5lIE1lcmNhZGFsCiAgICBhbnRvaW5lLm1lcmNhZGFsQGdtYWlsLmNvbQ YES 3 - {11, 11} - {10, 3} + {12, 12} + {10, 2} {15, 15} {128, 128} From 02bbe0e6f570f687782a52b301c83cdaf6c765d7 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Wed, 5 Nov 2014 13:07:25 -0800 Subject: [PATCH 17/17] Fixed: removed unused constant --- Tools/XcodeCapp/XcodeCapp/UserDefaults.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Tools/XcodeCapp/XcodeCapp/UserDefaults.h b/Tools/XcodeCapp/XcodeCapp/UserDefaults.h index 903fd7b6c..2843e57c7 100644 --- a/Tools/XcodeCapp/XcodeCapp/UserDefaults.h +++ b/Tools/XcodeCapp/XcodeCapp/UserDefaults.h @@ -19,7 +19,6 @@ extern NSString * const kDefaultXCCReactToInodeMod; extern NSString * const kDefaultXCCReopenLastProject; extern NSString * const kDefaultXCCAutoOpenErrorsPanelOnErrors; extern NSString * const kDefaultXCCAutoOpenErrorsPanelOnCappLint; -extern NSString * const kDefaultXCCAutoOpenErrorsPanelOnObjjWarnings; extern NSString * const kDefaultXCCAutoShowNotificationOnErrors; extern NSString * const kDefaultXCCAutoShowNotificationOnCappLint; extern NSString * const kDefaultXCCUseDebugFrameworkWithObjj;