mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-27 05:57:04 +00:00
New: XcodeCapp 3 tweaks...
- Renamed XcodeSupport to .XcodeSupport. - Added "Reset Project" to menu, it closes the project in Xcode if necessary, removes .XcodeSupport and .xcodeproj, then reloads. - Added separate preferences for showing errors panel on warnings/errors. You may not want to see the panel if there are category warnings. - New status icons (again). - If an error occurs, the status icon turns red when all processing is done. - Reworked notifications. Objective-J parsing is notified when done. Xib conversion notifies at beginning and end, because it typically takes a few seconds. Individual file notifications are suppressed if a project is being loaded.
This commit is contained in:
@@ -41,8 +41,7 @@ function raise(pos, message)
|
||||
throw syntaxError;
|
||||
}
|
||||
|
||||
var hasWarnings = false,
|
||||
errors = [],
|
||||
var errors = [],
|
||||
xcc = ObjectiveJ.acorn.walk.make(
|
||||
{
|
||||
ClassDeclarationStatement: function(node, st, c)
|
||||
@@ -54,7 +53,7 @@ var hasWarnings = false,
|
||||
@"path": node.loc.source,
|
||||
@"line": node.loc.start.line
|
||||
}];
|
||||
hasWarnings = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -159,7 +158,8 @@ function main(args)
|
||||
tokens = ObjectiveJ.acorn.parse(source, { locations:true, sourceFile:sourceFile }),
|
||||
classesInformation = [],
|
||||
ObjectiveCSource = "",
|
||||
ObjectiveCHeader = "";
|
||||
ObjectiveCHeader = "",
|
||||
hasErrors = NO;
|
||||
|
||||
compile(tokens, classesInformation, xcc);
|
||||
|
||||
@@ -218,6 +218,8 @@ function main(args)
|
||||
@"path": sourceFile,
|
||||
@"line": e.line
|
||||
}];
|
||||
|
||||
hasErrors = YES;
|
||||
}
|
||||
|
||||
if ([errors count])
|
||||
@@ -225,7 +227,9 @@ function main(args)
|
||||
var plist = [CPPropertyListSerialization dataFromPropertyList:errors format:CPPropertyListXMLFormat_v1_0];
|
||||
|
||||
print([plist rawString]);
|
||||
OS.exit(1);
|
||||
|
||||
// If there were category warnings, hasErrors is NO, so return a warning status
|
||||
OS.exit(hasErrors ? 1 : 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import re
|
||||
import sys
|
||||
from mod_pbxproj import XcodeProject
|
||||
|
||||
XCODE_SUPPORT_FOLDER = "XcodeSupport"
|
||||
XCODE_SUPPORT_FOLDER = ".XcodeSupport"
|
||||
SLASH_REPLACEMENT = u"∕" # DIVISION SLASH Unicode U+2215
|
||||
STRING_RE = re.compile(ur"^\s*<string>(.*)</string>\s*$", re.MULTILINE)
|
||||
FRAMEWORKS_RE = re.compile(ur"^(.+/Frameworks/(?:Debug|Source)/([^/]+))/.+$")
|
||||
|
||||
Reference in New Issue
Block a user