mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
New: standard key binding for pasteAsPlainText:
This commit is contained in:
@@ -30,6 +30,7 @@ CPStandardKeyBindings = {
|
||||
@"@.": @"cancelOperation:",
|
||||
|
||||
@"@a": @"selectAll:",
|
||||
@"@~$v": @"pasteAsPlainText:",
|
||||
@"^a": @"moveToBeginningOfParagraph:",
|
||||
@"^$a": @"moveToBeginningOfParagraphAndModifySelection:",
|
||||
@"^b": @"moveBackward:",
|
||||
|
||||
@@ -289,6 +289,10 @@
|
||||
[editMenu addItemWithTitle:@"Cut" action:@selector(cut:) keyEquivalent:@"x"];
|
||||
[editMenu addItemWithTitle:@"Copy" action:@selector(copy:) keyEquivalent:@"c"];
|
||||
[editMenu addItemWithTitle:@"Paste" action:@selector(paste:) keyEquivalent:@"v"];
|
||||
|
||||
var pasteAsPlainItem = [editMenu addItemWithTitle:@"Paste as Plain Text" action:@selector(pasteAsPlainText:) keyEquivalent:@"v"];
|
||||
[pasteAsPlainItem setKeyEquivalentModifierMask:CPCommandKeyMask | CPAlternateKeyMask | CPShiftKeyMask];
|
||||
|
||||
[editMenu addItemWithTitle:@"Delete" action:@selector(delete:) keyEquivalent:@""];
|
||||
[editMenu addItemWithTitle:@"Select All" action:@selector(selectAll:) keyEquivalent:@"a"];
|
||||
[editMenu addItemWithTitle:@"Undo" action:@selector(undo:) keyEquivalent:@"z"];
|
||||
|
||||
Vendored
+1
-1
@@ -233,7 +233,7 @@ ObjectiveJFlattener.prototype.serializeFunctions = function() {
|
||||
var functionString = executable._function.toString().replace(", require, exports, module, system, print, window", ""); // HACK
|
||||
|
||||
var relative = this.rootPath.relative(path).toString();
|
||||
this.functionsBuffer.push("ObjectiveJ.StaticResource._cacheFunction(new CFURL("+JSON.stringify(relative)+", baseURL),\n"+functionString+");");
|
||||
this.functionsBuffer.push("ObjectiveJ.FileExecutable._cacheFunction(new CFURL("+JSON.stringify(relative)+", baseURL),\n"+functionString+");");
|
||||
}
|
||||
|
||||
var bundle = this.context.global.CFBundle.bundleContainingURL(path);
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
+16
-6
@@ -4,14 +4,11 @@
|
||||
|
||||
var fs = require("fs"),
|
||||
acorn = require("objj-parser"),
|
||||
walk = require("objj-parser/util/walk"),
|
||||
walk = require("acorn-walk"),
|
||||
stream = ObjectiveJ.term;
|
||||
|
||||
debugger;
|
||||
|
||||
function main(args)
|
||||
{
|
||||
debugger;
|
||||
args.shift();
|
||||
|
||||
if (args.length < 1)
|
||||
@@ -40,6 +37,8 @@ function raise(pos, message)
|
||||
throw syntaxError;
|
||||
}
|
||||
|
||||
function ignore(_node, _st, _c) {}
|
||||
|
||||
var errors = [],
|
||||
xcc = walk.make(
|
||||
{
|
||||
@@ -115,7 +114,18 @@ var errors = [],
|
||||
else
|
||||
raise(node.loc.start, "Action methods must have exactly one parameter");
|
||||
}
|
||||
}
|
||||
},
|
||||
TypeDefStatement: ignore,
|
||||
ClassStatement: ignore,
|
||||
MessageSendExpression: ignore,
|
||||
GlobalStatement: ignore,
|
||||
ProtocolDeclarationStatement: ignore,
|
||||
ArrayLiteral: ignore,
|
||||
Reference: ignore,
|
||||
DictionaryLiteral: ignore,
|
||||
Dereference: ignore,
|
||||
ImportStatement: ignore,
|
||||
SelectorLiteralExpression: ignore
|
||||
}
|
||||
);
|
||||
|
||||
@@ -154,7 +164,7 @@ function parser(args)
|
||||
outputHeaderURL = new CFURL([outputDirectory stringByAppendingPathComponent:baseFilenameWithNoExtension + ".h"]),
|
||||
outputImplementationURL = new CFURL([outputDirectory stringByAppendingPathComponent:baseFilenameWithNoExtension + ".m"]),
|
||||
source = fs.readFileSync(sourcePath, { encoding: "utf8" }),
|
||||
tokens = acorn.parse(source, { locations:true, sourceFile:sourcePath }),
|
||||
tokens = acorn.parse(source, { locations:true, sourceFile:sourcePath, ecmaVersion: 2022 }),
|
||||
classesInformation = [],
|
||||
ObjectiveCSource = "",
|
||||
ObjectiveCHeader = "",
|
||||
|
||||
Reference in New Issue
Block a user