зеркало из https://github.com/mozilla/brackets.git
Respond to review comments. Merge with master.
This commit is contained in:
Коммит
7a067493ef
|
@ -48,7 +48,7 @@ The Brackets native shell currently runs on Mac and Windows. Since it's based on
|
|||
CEF/Chromium, it could be ported to Linux relatively easily, but that work hasn't
|
||||
been done yet. Stay tuned.
|
||||
|
||||
You can download "stable" builds of Brackets from the
|
||||
You can download "stable" builds of Brackets from the Download Packages section of the
|
||||
[downloads page](http://github.com/adobe/brackets/downloads).
|
||||
If you want to pull the repos directly via git, see
|
||||
[How to Use Brackets](http://github.com/adobe/brackets/wiki/How-to-Use-Brackets)
|
||||
|
|
|
@ -50,7 +50,7 @@ define(function CSSAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: Page.loadEventFired
|
||||
function _onLoadEventFired(res) {
|
||||
function _onLoadEventFired(event, res) {
|
||||
// res = {timestamp}
|
||||
_urlToStyle = {};
|
||||
Inspector.CSS.getAllStyleSheets(function onGetAllStyleSheets(res) {
|
||||
|
@ -102,13 +102,13 @@ define(function CSSAgent(require, exports, module) {
|
|||
/** Initialize the agent */
|
||||
function load() {
|
||||
_load = new $.Deferred();
|
||||
Inspector.on("Page.loadEventFired", _onLoadEventFired);
|
||||
$(Inspector.Page).on("loadEventFired.CSSAgent", _onLoadEventFired);
|
||||
return _load.promise();
|
||||
}
|
||||
|
||||
/** Clean up */
|
||||
function unload() {
|
||||
Inspector.off("Page.loadEventFired", _onLoadEventFired);
|
||||
$(Inspector.Page).off(".CSSAgent");
|
||||
}
|
||||
|
||||
// Export public functions
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */
|
||||
/*global define */
|
||||
/*global define, $ */
|
||||
|
||||
/**
|
||||
* ConsoleAgent forwards all console message from the remote console to the
|
||||
|
@ -53,14 +53,14 @@ define(function ConsoleAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: Console.messageAdded
|
||||
function _onMessageAdded(res) {
|
||||
function _onMessageAdded(event, res) {
|
||||
// res = {message}
|
||||
_lastMessage = res.message;
|
||||
_log(_lastMessage);
|
||||
}
|
||||
|
||||
// WebInspector Event: Console.messageRepeatCountUpdated
|
||||
function _onMessageRepeatCountUpdated(res) {
|
||||
function _onMessageRepeatCountUpdated(event, res) {
|
||||
// res = {count}
|
||||
if (_lastMessage) {
|
||||
_log(_lastMessage);
|
||||
|
@ -68,23 +68,22 @@ define(function ConsoleAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: Console.messagesCleared
|
||||
function _onMessagesCleared(res) {
|
||||
function _onMessagesCleared(event, res) {
|
||||
// res = {}
|
||||
}
|
||||
|
||||
/** Initialize the agent */
|
||||
function load() {
|
||||
Inspector.Console.enable();
|
||||
Inspector.on("Console.messageAdded", _onMessageAdded);
|
||||
Inspector.on("Console.messageRepeatCountUpdated", _onMessageRepeatCountUpdated);
|
||||
Inspector.on("Console.messagesCleared", _onMessagesCleared);
|
||||
$(Inspector.Console)
|
||||
.on("messageAdded.ConsoleAgent", _onMessageAdded)
|
||||
.on("messageRepeatCountUpdated.ConsoleAgent", _onMessageRepeatCountUpdated)
|
||||
.on("messagesCleared.ConsoleAgent", _onMessagesCleared);
|
||||
}
|
||||
|
||||
/** Clean up */
|
||||
function unload() {
|
||||
Inspector.off("Console.messageAdded", _onMessageAdded);
|
||||
Inspector.off("Console.messageRepeatCountUpdated", _onMessageRepeatCountUpdated);
|
||||
Inspector.off("Console.messagesCleared", _onMessagesCleared);
|
||||
$(Inspector.Console).off(".ConsoleAgent");
|
||||
}
|
||||
|
||||
// Export public functions
|
||||
|
|
|
@ -32,12 +32,14 @@
|
|||
* the source document (replace [from,to] with text) call
|
||||
* `applyChange(from, to, text)`.
|
||||
*
|
||||
* The DOMAgent triggers `DOMAgent.getDocument` on Inspector once it has loaded
|
||||
* The DOMAgent triggers `getDocument` once it has loaded
|
||||
* the document.
|
||||
*/
|
||||
define(function DOMAgent(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var $exports = $(exports);
|
||||
|
||||
var Inspector = require("LiveDevelopment/Inspector/Inspector");
|
||||
var RemoteAgent = require("LiveDevelopment/Agents/RemoteAgent");
|
||||
var DOMNode = require("LiveDevelopment/Agents/DOMNode");
|
||||
|
@ -186,10 +188,10 @@ define(function DOMAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: Page.loadEventFired
|
||||
function _onLoadEventFired(res) {
|
||||
function _onLoadEventFired(event, res) {
|
||||
// res = {timestamp}
|
||||
Inspector.DOM.getDocument(function onGetDocument(res) {
|
||||
Inspector.trigger("DOMAgent.getDocument", res);
|
||||
$exports.triggerHandler("getDocument", res);
|
||||
// res = {root}
|
||||
_idToNode = {};
|
||||
_pendingRequests = 0;
|
||||
|
@ -198,18 +200,18 @@ define(function DOMAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: Page.frameNavigated
|
||||
function _onFrameNavigated(res) {
|
||||
function _onFrameNavigated(event, res) {
|
||||
// res = {frame}
|
||||
exports.url = _cleanURL(res.frame.url);
|
||||
}
|
||||
|
||||
// WebInspector Event: DOM.documentUpdated
|
||||
function _onDocumentUpdated(res) {
|
||||
function _onDocumentUpdated(event, res) {
|
||||
// res = {}
|
||||
}
|
||||
|
||||
// WebInspector Event: DOM.setChildNodes
|
||||
function _onSetChildNodes(res) {
|
||||
function _onSetChildNodes(event, res) {
|
||||
// res = {parentId, nodes}
|
||||
var node = nodeWithId(res.parentId);
|
||||
node.setChildrenPayload(res.nodes);
|
||||
|
@ -219,7 +221,7 @@ define(function DOMAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: DOM.childNodeCountUpdated
|
||||
function _onChildNodeCountUpdated(res) {
|
||||
function _onChildNodeCountUpdated(event, res) {
|
||||
// res = {nodeId, childNodeCount}
|
||||
if (res.nodeId > 0) {
|
||||
Inspector.DOM.requestChildNodes(res.nodeId);
|
||||
|
@ -227,7 +229,7 @@ define(function DOMAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: DOM.childNodeInserted
|
||||
function _onChildNodeInserted(res) {
|
||||
function _onChildNodeInserted(event, res) {
|
||||
// res = {parentNodeId, previousNodeId, node}
|
||||
if (res.node.nodeId > 0) {
|
||||
var parent = nodeWithId(res.parentNodeId);
|
||||
|
@ -238,7 +240,7 @@ define(function DOMAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: DOM.childNodeRemoved
|
||||
function _onChildNodeRemoved(res) {
|
||||
function _onChildNodeRemoved(event, res) {
|
||||
// res = {parentNodeId, nodeId}
|
||||
if (res.nodeId > 0) {
|
||||
var node = nodeWithId(res.nodeId);
|
||||
|
@ -286,13 +288,15 @@ define(function DOMAgent(require, exports, module) {
|
|||
/** Initialize the agent */
|
||||
function load() {
|
||||
_load = new $.Deferred();
|
||||
Inspector.on("Page.frameNavigated", _onFrameNavigated);
|
||||
Inspector.on("Page.loadEventFired", _onLoadEventFired);
|
||||
Inspector.on("DOM.documentUpdated", _onDocumentUpdated);
|
||||
Inspector.on("DOM.setChildNodes", _onSetChildNodes);
|
||||
Inspector.on("DOM.childNodeCountUpdated", _onChildNodeCountUpdated);
|
||||
Inspector.on("DOM.childNodeInserted", _onChildNodeInserted);
|
||||
Inspector.on("DOM.childNodeRemoved", _onChildNodeRemoved);
|
||||
$(Inspector.Page)
|
||||
.on("frameNavigated.DOMAgent", _onFrameNavigated)
|
||||
.on("loadEventFired.DOMAgent", _onLoadEventFired);
|
||||
$(Inspector.DOM)
|
||||
.on("documentUpdated.DOMAgent", _onDocumentUpdated)
|
||||
.on("setChildNodes.DOMAgent", _onSetChildNodes)
|
||||
.on("childNodeCountUpdated.DOMAgent", _onChildNodeCountUpdated)
|
||||
.on("childNodeInserted.DOMAgent", _onChildNodeInserted)
|
||||
.on("childNodeRemoved.DOMAgent", _onChildNodeRemoved);
|
||||
Inspector.Page.enable();
|
||||
Inspector.Page.reload();
|
||||
return _load.promise();
|
||||
|
@ -300,13 +304,8 @@ define(function DOMAgent(require, exports, module) {
|
|||
|
||||
/** Clean up */
|
||||
function unload() {
|
||||
Inspector.off("Page.frameNavigated", _onFrameNavigated);
|
||||
Inspector.off("Page.loadEventFired", _onLoadEventFired);
|
||||
Inspector.off("DOM.documentUpdated", _onDocumentUpdated);
|
||||
Inspector.off("DOM.setChildNodes", _onSetChildNodes);
|
||||
Inspector.off("DOM.childNodeCountUpdated", _onChildNodeCountUpdated);
|
||||
Inspector.off("DOM.childNodeInserted", _onChildNodeInserted);
|
||||
Inspector.off("DOM.childNodeRemoved", _onChildNodeRemoved);
|
||||
$(Inspector.Page).off(".DOMAgent");
|
||||
$(Inspector.DOM).off(".DOMAgent");
|
||||
}
|
||||
|
||||
// Export private functions
|
||||
|
|
|
@ -75,7 +75,7 @@ define(function EditAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// Remote Event: Go to the given source node
|
||||
function _onRemoteEdit(res) {
|
||||
function _onRemoteEdit(event, res) {
|
||||
// res = {nodeId, name, value}
|
||||
var node = DOMAgent.nodeWithId(res.nodeId);
|
||||
node = node.children[0];
|
||||
|
@ -98,12 +98,12 @@ define(function EditAgent(require, exports, module) {
|
|||
|
||||
/** Initialize the agent */
|
||||
function load() {
|
||||
Inspector.on("RemoteAgent.edit", _onRemoteEdit);
|
||||
$(RemoteAgent).on("edit.EditAgent", _onRemoteEdit);
|
||||
}
|
||||
|
||||
/** Initialize the agent */
|
||||
function unload() {
|
||||
Inspector.off("RemoteAgent.edit", _onRemoteEdit);
|
||||
$(RemoteAgent).off(".EditAgent");
|
||||
}
|
||||
|
||||
// Export public functions
|
||||
|
|
|
@ -112,7 +112,7 @@ define(function GotoAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
/** Gather options where to go to from the given source node */
|
||||
function _onRemoteShowGoto(res) {
|
||||
function _onRemoteShowGoto(event, res) {
|
||||
// res = {nodeId, name, value}
|
||||
var node = DOMAgent.nodeWithId(res.nodeId);
|
||||
|
||||
|
@ -177,7 +177,7 @@ define(function GotoAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
/** Go to the given source node */
|
||||
function _onRemoteGoto(res) {
|
||||
function _onRemoteGoto(event, res) {
|
||||
// res = {nodeId, name, value}
|
||||
var location, url = res.value;
|
||||
var matches = /^(.*):([^:]+)$/.exec(url);
|
||||
|
@ -195,14 +195,14 @@ define(function GotoAgent(require, exports, module) {
|
|||
|
||||
/** Initialize the agent */
|
||||
function load() {
|
||||
Inspector.on("RemoteAgent.showgoto", _onRemoteShowGoto);
|
||||
Inspector.on("RemoteAgent.goto", _onRemoteGoto);
|
||||
$(RemoteAgent)
|
||||
.on("showgoto.GotoAgent", _onRemoteShowGoto)
|
||||
.on("goto.GotoAgent", _onRemoteGoto);
|
||||
}
|
||||
|
||||
/** Initialize the agent */
|
||||
function unload() {
|
||||
Inspector.off("RemoteAgent.showgoto", _onRemoteShowGoto);
|
||||
Inspector.off("RemoteAgent.goto", _onRemoteGoto);
|
||||
$(RemoteAgent).off(".GotoAgent");
|
||||
}
|
||||
|
||||
// Export public functions
|
||||
|
|
|
@ -23,11 +23,13 @@
|
|||
|
||||
|
||||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */
|
||||
/*global define */
|
||||
/*global define, $ */
|
||||
|
||||
/**
|
||||
* HighlightAgent dispatches events for highlight requests from in-browser
|
||||
* highlight requests, and allows highlighting nodes and rules in the browser.
|
||||
*
|
||||
* Trigger "highlight" when a node should be highlighted
|
||||
*/
|
||||
define(function HighlightAgent(require, exports, module) {
|
||||
"use strict";
|
||||
|
@ -39,12 +41,12 @@ define(function HighlightAgent(require, exports, module) {
|
|||
var _highlight; // active highlight
|
||||
|
||||
// Remote Event: Highlight
|
||||
function _onRemoteHighlight(res) {
|
||||
function _onRemoteHighlight(event, res) {
|
||||
var node;
|
||||
if (res.value === "1") {
|
||||
node = DOMAgent.nodeWithId(res.nodeId);
|
||||
}
|
||||
Inspector.trigger("HighlightAgent.highlight", node);
|
||||
$(exports).triggerHandler("highlight", node);
|
||||
}
|
||||
|
||||
/** Hide in-browser highlighting */
|
||||
|
@ -103,12 +105,12 @@ define(function HighlightAgent(require, exports, module) {
|
|||
/** Initialize the agent */
|
||||
function load() {
|
||||
_highlight = {};
|
||||
Inspector.on("RemoteAgent.highlight", _onRemoteHighlight);
|
||||
$(RemoteAgent).on("highlight.HighlightAgent", _onRemoteHighlight);
|
||||
}
|
||||
|
||||
/** Clean up */
|
||||
function unload() {
|
||||
Inspector.off("RemoteAgent.highlight", _onRemoteHighlight);
|
||||
$(RemoteAgent).off(".HighlightAgent");
|
||||
}
|
||||
|
||||
// Export public functions
|
||||
|
|
|
@ -55,7 +55,7 @@ define(function NetworkAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: Network.requestWillBeSent
|
||||
function _onRequestWillBeSent(res) {
|
||||
function _onRequestWillBeSent(event, res) {
|
||||
// res = {requestId, frameId, loaderId, documentURL, request, timestamp, initiator, stackTrace, redirectResponse}
|
||||
var url = _urlWithoutQueryString(res.request.url);
|
||||
_urlRequested[url] = true;
|
||||
|
@ -65,12 +65,12 @@ define(function NetworkAgent(require, exports, module) {
|
|||
function load() {
|
||||
_urlRequested = {};
|
||||
Inspector.Network.enable();
|
||||
Inspector.on("Network.requestWillBeSent", _onRequestWillBeSent);
|
||||
$(Inspector.Network).on("requestWillBeSent.NetworkAgent", _onRequestWillBeSent);
|
||||
}
|
||||
|
||||
/** Unload the agent */
|
||||
function unload() {
|
||||
Inspector.off("Network.requestWillBeSent", _onRequestWillBeSent);
|
||||
$(Inspector.Network).off(".NetworkAgent");
|
||||
}
|
||||
|
||||
// Export public functions
|
||||
|
|
|
@ -28,19 +28,22 @@
|
|||
/**
|
||||
* RemoteAgent defines and provides an interface for custom remote functions
|
||||
* loaded from RemoteFunctions. Remote commands are executed via
|
||||
* `call(name, varargs)`. Remote events are dispatched as events on the
|
||||
* Inspector named "Remote.EVENT".
|
||||
* `call(name, varargs)`.
|
||||
*
|
||||
* Remote events are dispatched as events on this object.
|
||||
*/
|
||||
define(function RemoteAgent(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var $exports = $(exports);
|
||||
|
||||
var Inspector = require("LiveDevelopment/Inspector/Inspector");
|
||||
|
||||
var _load; // deferred load
|
||||
var _objectId; // the object id of the remote object
|
||||
|
||||
// WebInspector Event: Page.loadEventFired
|
||||
function _onLoadEventFired(res) {
|
||||
function _onLoadEventFired(event, res) {
|
||||
// res = {timestamp}
|
||||
var request = new XMLHttpRequest();
|
||||
request.open("GET", "LiveDevelopment/Agents/RemoteFunctions.js");
|
||||
|
@ -56,11 +59,11 @@ define(function RemoteAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// WebInspector Event: DOM.attributeModified
|
||||
function _onAttributeModified(res) {
|
||||
function _onAttributeModified(event, res) {
|
||||
// res = {nodeId, name, value}
|
||||
var matches = /^data-ld-(.*)/.exec(res.name);
|
||||
if (matches) {
|
||||
Inspector.trigger("RemoteAgent." + matches[1], res);
|
||||
$exports.triggerHandler(matches[1], res);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,15 +106,15 @@ define(function RemoteAgent(require, exports, module) {
|
|||
/** Initialize the agent */
|
||||
function load() {
|
||||
_load = new $.Deferred();
|
||||
Inspector.on("Page.loadEventFired", _onLoadEventFired);
|
||||
Inspector.on("DOM.attributeModified", _onAttributeModified);
|
||||
$(Inspector.Page).on("loadEventFired.RemoteAgent", _onLoadEventFired);
|
||||
$(Inspector.DOM).on("attributeModified.RemoteAgent", _onAttributeModified);
|
||||
return _load.promise();
|
||||
}
|
||||
|
||||
/** Clean up */
|
||||
function unload() {
|
||||
Inspector.off("Page.loadEventFired", _onLoadEventFired);
|
||||
Inspector.off("DOM.attributeModified", _onAttributeModified);
|
||||
$(Inspector.Page).off(".RemoteAgent");
|
||||
$(Inspector.DOM).off(".RemoteAgent");
|
||||
}
|
||||
|
||||
// Export public functions
|
||||
|
|
|
@ -66,13 +66,13 @@ define(function ScriptAgent(require, exports, module) {
|
|||
}
|
||||
|
||||
// DOMAgent Event: Document root loaded
|
||||
function _onGetDocument(res) {
|
||||
function _onGetDocument(event, res) {
|
||||
Inspector.DOMDebugger.setDOMBreakpoint(res.root.nodeId, "subtree-modified");
|
||||
_load.resolve();
|
||||
}
|
||||
|
||||
// WebInspector Event: DOM.childNodeInserted
|
||||
function _onChildNodeInserted(res) {
|
||||
function _onChildNodeInserted(event, res) {
|
||||
// res = {parentNodeId, previousNodeId, node}
|
||||
if (_insertTrace) {
|
||||
var node = DOMAgent.nodeWithId(res.node.nodeId);
|
||||
|
@ -83,19 +83,19 @@ define(function ScriptAgent(require, exports, module) {
|
|||
|
||||
// TODO: Strip off query/hash strings from URL (see CSSAgent._canonicalize())
|
||||
// WebInspector Event: Debugger.scriptParsed
|
||||
function _onScriptParsed(res) {
|
||||
function _onScriptParsed(event, res) {
|
||||
// res = {scriptId, url, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL}
|
||||
_idToScript[res.scriptId] = res;
|
||||
_urlToScript[res.url] = res;
|
||||
}
|
||||
|
||||
// WebInspector Event: Debugger.scriptFailedToParse
|
||||
function _onScriptFailedToParse(res) {
|
||||
function _onScriptFailedToParse(event, res) {
|
||||
// res = {url, scriptSource, startLine, errorLine, errorMessage}
|
||||
}
|
||||
|
||||
// WebInspector Event: Debugger.paused
|
||||
function _onPaused(res) {
|
||||
function _onPaused(event, res) {
|
||||
// res = {callFrames, reason, data}
|
||||
switch (res.reason) {
|
||||
|
||||
|
@ -124,21 +124,20 @@ define(function ScriptAgent(require, exports, module) {
|
|||
_load = new $.Deferred();
|
||||
Inspector.Debugger.enable();
|
||||
Inspector.Debugger.setPauseOnExceptions("uncaught");
|
||||
Inspector.on("DOMAgent.getDocument", _onGetDocument);
|
||||
Inspector.on("Debugger.scriptParsed", _onScriptParsed);
|
||||
Inspector.on("Debugger.scriptFailedToParse", _onScriptFailedToParse);
|
||||
Inspector.on("Debugger.paused", _onPaused);
|
||||
Inspector.on("DOM.childNodeInserted", _onChildNodeInserted);
|
||||
$(DOMAgent).on("getDocument.ScriptAgent", _onGetDocument);
|
||||
$(Inspector.Debugger)
|
||||
.on("scriptParsed.ScriptAgent", _onScriptParsed)
|
||||
.on("scriptFailedToParse.ScriptAgent", _onScriptFailedToParse)
|
||||
.on("paused.ScriptAgent", _onPaused);
|
||||
$(Inspector.DOM).on("childNodeInserted.ScriptAgent", _onChildNodeInserted);
|
||||
return _load;
|
||||
}
|
||||
|
||||
/** Clean up */
|
||||
function unload() {
|
||||
Inspector.off("DOMAgent.getDocument", _onGetDocument);
|
||||
Inspector.off("Debugger.scriptParsed", _onScriptParsed);
|
||||
Inspector.off("Debugger.scriptFailedToParse", _onScriptFailedToParse);
|
||||
Inspector.off("Debugger.paused", _onPaused);
|
||||
Inspector.off("DOM.childNodeInserted", _onChildNodeInserted);
|
||||
$(DOMAgent).off(".ScriptAgent");
|
||||
$(Inspector.Debugger).off(".ScriptAgent");
|
||||
$(Inspector.DOM).off(".ScriptAgent");
|
||||
}
|
||||
|
||||
// Export public functions
|
||||
|
|
|
@ -66,7 +66,7 @@ define(function CSSDocumentModule(require, exports, module) {
|
|||
this._highlight = [];
|
||||
this.onHighlight = this.onHighlight.bind(this);
|
||||
this.onCursorActivity = this.onCursorActivity.bind(this);
|
||||
Inspector.on("HighlightAgent.highlight", this.onHighlight);
|
||||
$(HighlightAgent).on("highlight", this.onHighlight);
|
||||
*/
|
||||
|
||||
// Add a ref to the doc since we're listening for change events
|
||||
|
@ -132,7 +132,7 @@ define(function CSSDocumentModule(require, exports, module) {
|
|||
$(this.doc).off("deleted", this.onDeleted);
|
||||
this.doc.releaseRef();
|
||||
/*
|
||||
Inspector.off("HighlightAgent.highlight", this.onHighlight);
|
||||
$(HighlightAgent).off("highlight", this.onHighlight);
|
||||
$(this.editor).off("cursorActivity", this.onCursorActivity);
|
||||
this.onHighlight();
|
||||
*/
|
||||
|
|
|
@ -58,7 +58,7 @@ define(function HTMLDocumentModule(require, exports, module) {
|
|||
this.onHighlight = this.onHighlight.bind(this);
|
||||
this.onChange = this.onChange.bind(this);
|
||||
this.onCursorActivity = this.onCursorActivity.bind(this);
|
||||
Inspector.on("HighlightAgent.highlight", this.onHighlight);
|
||||
$(HighlightAgent).on("highlight", this.onHighlight);
|
||||
$(this.editor).on("change", this.onChange);
|
||||
$(this.editor).on("cursorActivity", this.onCursorActivity);
|
||||
this.onCursorActivity();
|
||||
|
@ -66,7 +66,7 @@ define(function HTMLDocumentModule(require, exports, module) {
|
|||
|
||||
/** Close the document */
|
||||
HTMLDocument.prototype.close = function close() {
|
||||
Inspector.off("HighlightAgent.highlight", this.onHighlight);
|
||||
$(HighlightAgent).off("highlight", this.onHighlight);
|
||||
$(this.editor).off("change", this.onChange);
|
||||
$(this.editor).off("cursorActivity", this.onCursorActivity);
|
||||
this.onHighlight();
|
||||
|
|
|
@ -60,7 +60,7 @@ define(function JSDocumentModule(require, exports, module) {
|
|||
this.onHighlight = this.onHighlight.bind(this);
|
||||
this.onChange = this.onChange.bind(this);
|
||||
this.onCursorActivity = this.onCursorActivity.bind(this);
|
||||
Inspector.on("HighlightAgent.highlight", this.onHighlight);
|
||||
$(HighlightAgent).on("highlight", this.onHighlight);
|
||||
$(this.editor).on("change", this.onChange);
|
||||
$(this.editor).on("cursorActivity", this.onCursorActivity);
|
||||
this.onCursorActivity();
|
||||
|
@ -68,7 +68,7 @@ define(function JSDocumentModule(require, exports, module) {
|
|||
|
||||
/** Close the document */
|
||||
JSDocument.prototype.close = function close() {
|
||||
Inspector.off("HighlightAgent.highlight", this.onHighlight);
|
||||
$(HighlightAgent).off("highlight", this.onHighlight);
|
||||
$(this.editor).off("change", this.onChange);
|
||||
$(this.editor).off("cursorActivity", this.onCursorActivity);
|
||||
this.onHighlight();
|
||||
|
|
|
@ -83,32 +83,14 @@
|
|||
define(function Inspector(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
// jQuery exports object for events
|
||||
var $exports = $(exports);
|
||||
|
||||
var _messageId = 1; // id used for remote method calls, auto-incrementing
|
||||
var _messageCallbacks = {}; // {id -> function} for remote method calls
|
||||
var _handlers = {}; // {name -> function} for attached event handlers
|
||||
var _socket; // remote debugger WebSocket
|
||||
var _connectDeferred; // The deferred connect
|
||||
|
||||
/** Trigger an event handler
|
||||
* @param {function} event handler
|
||||
* @param {Array} arguments array
|
||||
*/
|
||||
function _triggerHandler(handler, args) {
|
||||
handler.apply(undefined, args);
|
||||
}
|
||||
|
||||
/** Trigger an event and all attached event handlers
|
||||
* All passed arguments after the name are passed on as parameters.
|
||||
* @param {string} event name
|
||||
*/
|
||||
function trigger(name, res) {
|
||||
var i, handlers = _handlers[name];
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
for (i in handlers) {
|
||||
window.setTimeout(_triggerHandler.bind(undefined, handlers[i], args));
|
||||
}
|
||||
}
|
||||
|
||||
/** Check a parameter value against the given signature
|
||||
* This only checks for optional parameters, not types
|
||||
* Type checking is complex because of $ref and done on the remote end anyways
|
||||
|
@ -164,17 +146,17 @@ define(function Inspector(require, exports, module) {
|
|||
/** WebSocket did close */
|
||||
function _onDisconnect() {
|
||||
_socket = undefined;
|
||||
trigger("disconnect");
|
||||
$exports.triggerHandler("disconnect");
|
||||
}
|
||||
|
||||
/** WebSocket reported an error */
|
||||
function _onError(error) {
|
||||
trigger("error", error);
|
||||
$exports.triggerHandler("error", [error]);
|
||||
}
|
||||
|
||||
/** WebSocket did open */
|
||||
function _onConnect() {
|
||||
trigger("connect");
|
||||
$exports.triggerHandler("connect");
|
||||
}
|
||||
|
||||
/** Received message from the WebSocket
|
||||
|
@ -186,15 +168,18 @@ define(function Inspector(require, exports, module) {
|
|||
*/
|
||||
function _onMessage(message) {
|
||||
var response = JSON.parse(message.data);
|
||||
trigger("message", response);
|
||||
$exports.triggerHandler("message", [response]);
|
||||
if (response.error) {
|
||||
trigger("error", response.error);
|
||||
$exports.triggerHandler("error", [response.error]);
|
||||
} else if (response.result) {
|
||||
if (_messageCallbacks[response.id]) {
|
||||
_messageCallbacks[response.id](response.result);
|
||||
}
|
||||
} else {
|
||||
trigger(response.method, response.params);
|
||||
var domainAndMethod = response.method.split(".");
|
||||
var domain = domainAndMethod[0];
|
||||
var method = domainAndMethod[1];
|
||||
$(exports[domain]).triggerHandler(method, response.params);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,10 +216,7 @@ define(function Inspector(require, exports, module) {
|
|||
* @param {function} handler function
|
||||
*/
|
||||
function on(name, handler) {
|
||||
if (!_handlers[name]) {
|
||||
_handlers[name] = [];
|
||||
}
|
||||
_handlers[name].push(handler);
|
||||
$exports.on(name, handler);
|
||||
}
|
||||
|
||||
/** Remove the given or all event handler(s) for the given event or remove all event handlers
|
||||
|
@ -242,18 +224,7 @@ define(function Inspector(require, exports, module) {
|
|||
* @param {function} optional handler function
|
||||
*/
|
||||
function off(name, handler) {
|
||||
if (!name) {
|
||||
_handlers = {};
|
||||
} else if (!handler) {
|
||||
delete _handlers[name];
|
||||
} else {
|
||||
var i, handlers = _handlers[name];
|
||||
for (i in handlers) {
|
||||
if (handlers[i] === handler) {
|
||||
handlers.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
$exports.off(name, handler);
|
||||
}
|
||||
|
||||
/** Disconnect from the remote debugger WebSocket */
|
||||
|
@ -344,7 +315,6 @@ define(function Inspector(require, exports, module) {
|
|||
}
|
||||
|
||||
// Export public functions
|
||||
exports.trigger = trigger;
|
||||
exports.getAvailableSockets = getAvailableSockets;
|
||||
exports.on = on;
|
||||
exports.off = off;
|
||||
|
|
|
@ -28,20 +28,6 @@
|
|||
{ "name": "object", "$ref": "Runtime.RemoteObject" },
|
||||
{ "name": "hints", "type": "object" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "didCreateWorker",
|
||||
"parameters": [
|
||||
{ "name": "id", "type": "integer" },
|
||||
{ "name": "url", "type": "string" },
|
||||
{ "name": "isShared", "type": "boolean" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "didDestroyWorker",
|
||||
"parameters": [
|
||||
{ "name": "id", "type": "integer" }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -87,6 +73,15 @@
|
|||
{ "name": "nodeCount", "type": "array", "items": { "$ref": "NodeCount" }},
|
||||
{ "name": "listenerCount", "type": "array", "items": { "$ref": "ListenerCount" }}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "MemoryBlock",
|
||||
"type": "object",
|
||||
"properties": [
|
||||
{ "name": "size", "type": "number", "optional": true, "description": "Size of the block in bytes if available" },
|
||||
{ "name": "name", "type": "string", "description": "Unique name used to identify the component that allocated this block" },
|
||||
{ "name": "children", "type": "array", "optional": true, "items": { "$ref": "MemoryBlock" }}
|
||||
]
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
|
@ -96,6 +91,12 @@
|
|||
{ "name": "domGroups", "type": "array", "items": { "$ref": "DOMGroup" }},
|
||||
{ "name": "strings", "$ref": "StringStatistics" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getProcessMemoryDistribution",
|
||||
"returns": [
|
||||
{ "name": "distribution", "$ref": "MemoryBlock", "description": "An object describing all memory allocated by the process"}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -177,7 +178,7 @@
|
|||
{ "name": "value", "type": "string", "description": "Cookie value." },
|
||||
{ "name": "domain", "type": "string", "description": "Cookie domain." },
|
||||
{ "name": "path", "type": "string", "description": "Cookie path." },
|
||||
{ "name": "expires", "type": "integer", "description": "Cookie expires." },
|
||||
{ "name": "expires", "type": "number", "description": "Cookie expires." },
|
||||
{ "name": "size", "type": "integer", "description": "Cookie size." },
|
||||
{ "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." },
|
||||
{ "name": "secure", "type": "boolean", "description": "True if cookie is secure." },
|
||||
|
@ -310,11 +311,21 @@
|
|||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "setScreenSizeOverride",
|
||||
"description": "Overrides the values of window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results",
|
||||
"name": "canOverrideDeviceMetrics",
|
||||
"description": "Checks whether <code>setDeviceMetricsOverride</code> can be invoked.",
|
||||
"returns": [
|
||||
{ "name": "result", "type": "boolean", "description": "If true, <code>setDeviceMetricsOverride</code> can safely be invoked on the agent." }
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "setDeviceMetricsOverride",
|
||||
"description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results) and the font scale factor.",
|
||||
"parameters": [
|
||||
{ "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
|
||||
{ "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." }
|
||||
{ "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." },
|
||||
{ "name": "fontScaleFactor", "type": "number", "description": "Overriding font scale factor value (must be positive). 1 disables the override." },
|
||||
{ "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." }
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
|
@ -325,6 +336,74 @@
|
|||
{ "name": "result", "type": "boolean", "description": "True for showing paint rectangles" }
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "getScriptExecutionStatus",
|
||||
"description": "Determines if scripts can be executed in the page.",
|
||||
"returns": [
|
||||
{ "name": "result", "type": "string", "enum": ["allowed", "disabled", "forbidden"], "description": "Script execution status: \"allowed\" if scripts can be executed, \"disabled\" if script execution has been disabled through page settings, \"forbidden\" if script execution for the given page is not possible for other reasons." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "setScriptExecutionDisabled",
|
||||
"description": "Switches script execution in the page.",
|
||||
"parameters": [
|
||||
{ "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "setGeolocationOverride",
|
||||
"description": "Overrides the Geolocation Position or Error.",
|
||||
"parameters": [
|
||||
{ "name": "latitude", "type": "number", "optional": true, "description": "Mock longitude"},
|
||||
{ "name": "longitude", "type": "number", "optional": true, "description": "Mock latitude"},
|
||||
{ "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "clearGeolocationOverride",
|
||||
"description": "Clears the overriden Geolocation Position and Error.",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "canOverrideGeolocation",
|
||||
"description": "Checks if Geolocation can be overridden.",
|
||||
"returns": [
|
||||
{ "name": "result", "type": "boolean", "description": "True if browser can ovrride Geolocation." }
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "setDeviceOrientationOverride",
|
||||
"description": "Overrides the Device Orientation.",
|
||||
"parameters": [
|
||||
{ "name": "alpha", "type": "number", "description": "Mock alpha"},
|
||||
{ "name": "beta", "type": "number", "description": "Mock beta"},
|
||||
{ "name": "gamma", "type": "number", "description": "Mock gamma"}
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "clearDeviceOrientationOverride",
|
||||
"description": "Clears the overridden Device Orientation.",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "canOverrideDeviceOrientation",
|
||||
"description": "Check the backend if Web Inspector can override the device orientation.",
|
||||
"returns": [
|
||||
{ "name": "result", "type": "boolean", "description": "If true, <code>setDeviceOrientationOverride</code> can safely be invoked on the agent." }
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "setTouchEmulationEnabled",
|
||||
"parameters": [
|
||||
{ "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }
|
||||
],
|
||||
"description": "Toggles mouse event-based touch event emulation.",
|
||||
"hidden": true
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
|
@ -377,7 +456,30 @@
|
|||
{ "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." },
|
||||
{ "name": "value", "type": "any", "optional": true, "description": "Remote object value (in case of primitive values or JSON values if it was requested)." },
|
||||
{ "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
|
||||
{ "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." }
|
||||
{ "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
|
||||
{ "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containsing abbreviated property values.", "hidden": true }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ObjectPreview",
|
||||
"type": "object",
|
||||
"hidden": true,
|
||||
"description": "Object containing abbreviated remote object value.",
|
||||
"properties": [
|
||||
{ "name": "lossless", "type": "boolean", "description": "Determines whether preview is lossless (contains all information of the original object)." },
|
||||
{ "name": "overflow", "type": "boolean", "description": "True iff some of the properties of the original did not fit." },
|
||||
{ "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "PropertyPreview",
|
||||
"type": "object",
|
||||
"hidden": true,
|
||||
"properties": [
|
||||
{ "name": "name", "type": "string", "description": "Property name." },
|
||||
{ "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type." },
|
||||
{ "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." },
|
||||
{ "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -403,7 +505,26 @@
|
|||
{ "name": "value", "type": "any", "optional": true, "description": "Primitive value." },
|
||||
{ "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ExecutionContextId",
|
||||
"type": "integer",
|
||||
"description": "Id of an execution context.",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"id": "ExecutionContextDescription",
|
||||
"type": "object",
|
||||
"description": "Description of an isolated world.",
|
||||
"properties": [
|
||||
{ "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." },
|
||||
{ "name": "isPageContext", "type": "boolean", "description": "True if this is a context where inpspected web page scripts run. False if it is a content script isolated context." },
|
||||
{ "name": "name", "type": "string", "description": "Human readable name describing given context." },
|
||||
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the owning frame." }
|
||||
],
|
||||
"hidden": true
|
||||
}
|
||||
|
||||
],
|
||||
"commands": [
|
||||
{
|
||||
|
@ -412,8 +533,8 @@
|
|||
{ "name": "expression", "type": "string", "description": "Expression to evaluate." },
|
||||
{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
|
||||
{ "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true },
|
||||
{ "name": "doNotPauseOnExceptions", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions. Overrides setPauseOnException state.", "hidden": true },
|
||||
{ "name": "frameId", "$ref": "Network.FrameId", "optional": true, "description": "Specifies in which frame to perform evaluation.", "hidden": true },
|
||||
{ "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
|
||||
{ "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.", "hidden": true },
|
||||
{ "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }
|
||||
],
|
||||
"returns": [
|
||||
|
@ -428,6 +549,7 @@
|
|||
{ "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." },
|
||||
{ "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." },
|
||||
{ "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." },
|
||||
{ "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
|
||||
{ "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }
|
||||
],
|
||||
"returns": [
|
||||
|
@ -465,6 +587,24 @@
|
|||
"name": "run",
|
||||
"hidden": true,
|
||||
"description": "Tells inspected instance(worker or page) that it can run in case it was started paused."
|
||||
},
|
||||
{
|
||||
"name": "setReportExecutionContextCreation",
|
||||
"parameters": [
|
||||
{ "name": "enabled", "type": "boolean", "description": "Reporting enabled state." }
|
||||
],
|
||||
"hidden": true,
|
||||
"description": "Enables reporting about creation of isolated contexts by means of <code>isolatedContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing isolated context."
|
||||
}
|
||||
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "isolatedContextCreated",
|
||||
"parameters": [
|
||||
{ "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created isolated contex." }
|
||||
],
|
||||
"description": "Issued when new isolated context is created."
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -665,6 +805,17 @@
|
|||
{ "name": "challengeResponse", "type": "string", "description": "Challenge response." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "WebSocketFrame",
|
||||
"type": "object",
|
||||
"description": "WebSocket frame data.",
|
||||
"hidden": true,
|
||||
"properties": [
|
||||
{ "name": "opcode", "type": "number", "description": "WebSocket frame opcode." },
|
||||
{ "name": "mask", "type": "boolean", "description": "WebSocke frame mask." },
|
||||
{ "name": "payloadData", "type": "string", "description": "WebSocke frame payload data." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CachedResource",
|
||||
"type": "object",
|
||||
|
@ -764,7 +915,6 @@
|
|||
{ "name": "request", "$ref": "Request", "description": "Request data." },
|
||||
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
|
||||
{ "name": "initiator", "$ref": "Initiator", "description": "Request initiator." },
|
||||
{ "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "JavaScript stack trace upon issuing this request." },
|
||||
{ "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." }
|
||||
]
|
||||
},
|
||||
|
@ -865,6 +1015,36 @@
|
|||
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "webSocketFrameReceived",
|
||||
"description": "Fired when WebSocket frame is received.",
|
||||
"parameters": [
|
||||
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
|
||||
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
|
||||
{ "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "webSocketFrameError",
|
||||
"description": "Fired when WebSocket frame error occurs.",
|
||||
"parameters": [
|
||||
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
|
||||
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
|
||||
{ "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." }
|
||||
],
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "webSocketFrameSent",
|
||||
"description": "Fired when WebSocket frame is sent.",
|
||||
"parameters": [
|
||||
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
|
||||
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
|
||||
{ "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
|
||||
],
|
||||
"hidden": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -872,13 +1052,19 @@
|
|||
"domain": "Database",
|
||||
"hidden": true,
|
||||
"types": [
|
||||
{
|
||||
"id": "DatabaseId",
|
||||
"type": "string",
|
||||
"description": "Unique identifier of Database object.",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"id": "Database",
|
||||
"type": "object",
|
||||
"description": "Database object.",
|
||||
"hidden": true,
|
||||
"properties": [
|
||||
{ "name": "id", "type": "string", "description": "Database ID." },
|
||||
{ "name": "id", "$ref": "DatabaseId", "description": "Database ID." },
|
||||
{ "name": "domain", "type": "string", "description": "Database domain." },
|
||||
{ "name": "name", "type": "string", "description": "Database name." },
|
||||
{ "name": "version", "type": "string", "description": "Database version." }
|
||||
|
@ -902,7 +1088,7 @@
|
|||
{
|
||||
"name": "getDatabaseTableNames",
|
||||
"parameters": [
|
||||
{ "name": "databaseId", "type": "integer" }
|
||||
{ "name": "databaseId", "$ref": "DatabaseId" }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "tableNames", "type": "array", "items": { "type": "string" } }
|
||||
|
@ -911,7 +1097,7 @@
|
|||
{
|
||||
"name": "executeSQL",
|
||||
"parameters": [
|
||||
{ "name": "databaseId", "type": "integer" },
|
||||
{ "name": "databaseId", "$ref": "DatabaseId" },
|
||||
{ "name": "query", "type": "string" }
|
||||
],
|
||||
"returns": [
|
||||
|
@ -973,7 +1159,8 @@
|
|||
"description": "Object store.",
|
||||
"properties": [
|
||||
{ "name": "name", "type": "string", "description": "Object store name." },
|
||||
{ "name": "keyPath", "type": "string", "description": "Object store key path." },
|
||||
{ "name": "keyPath", "$ref": "KeyPath", "description": "Object store key path." },
|
||||
{ "name": "autoIncrement", "type": "boolean", "description": "If true, object store has auto increment flag set." },
|
||||
{ "name": "indexes", "type": "array", "items": { "$ref": "ObjectStoreIndex" }, "description": "Indexes in this object store." }
|
||||
]
|
||||
},
|
||||
|
@ -983,7 +1170,7 @@
|
|||
"description": "Object store index.",
|
||||
"properties": [
|
||||
{ "name": "name", "type": "string", "description": "Index name." },
|
||||
{ "name": "keyPath", "type": "string", "description": "Index key path." },
|
||||
{ "name": "keyPath", "$ref": "KeyPath", "description": "Index key path." },
|
||||
{ "name": "unique", "type": "boolean", "description": "If true, index is unique." },
|
||||
{ "name": "multiEntry", "type": "boolean", "description": "If true, index allows multiple entries for a key." }
|
||||
]
|
||||
|
@ -1014,12 +1201,22 @@
|
|||
{
|
||||
"id": "DataEntry",
|
||||
"type": "object",
|
||||
"description": "Key.",
|
||||
"description": "Data entry.",
|
||||
"properties": [
|
||||
{ "name": "key", "$ref": "Key", "description": "Key." },
|
||||
{ "name": "primaryKey", "$ref": "Key", "description": "Primary key." },
|
||||
{ "name": "value", "$ref": "Runtime.RemoteObject", "description": "Value." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "KeyPath",
|
||||
"type": "object",
|
||||
"description": "Key path.",
|
||||
"properties": [
|
||||
{ "name": "type", "type": "string", "enum": ["null", "string", "array"], "description": "Key path type." },
|
||||
{ "name": "string", "type": "string", "optional": true, "description": "String value." },
|
||||
{ "name": "array", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Array value." }
|
||||
]
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
|
@ -1100,16 +1297,29 @@
|
|||
"domain": "DOMStorage",
|
||||
"hidden": true,
|
||||
"types": [
|
||||
{
|
||||
"id": "StorageId",
|
||||
"type": "string",
|
||||
"description": "Unique identifier of DOM storage entry.",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"id": "Entry",
|
||||
"type": "object",
|
||||
"description": "DOM Storage entry.",
|
||||
"hidden": true,
|
||||
"properties": [
|
||||
{ "name": "host", "type": "string", "description": "Domain name." },
|
||||
{ "name": "origin", "type": "string", "description": "Document origin." },
|
||||
{ "name": "isLocalStorage", "type": "boolean", "description": "True for local storage." },
|
||||
{ "name": "id", "type": "number", "description": "Entry id for further reference." }
|
||||
{ "name": "id", "$ref": "StorageId", "description": "Entry id for further reference." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "Item",
|
||||
"type": "array",
|
||||
"description": "DOM Storage item.",
|
||||
"hidden": true,
|
||||
"items": { "type": "string" }
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
|
@ -1124,16 +1334,16 @@
|
|||
{
|
||||
"name": "getDOMStorageEntries",
|
||||
"parameters": [
|
||||
{ "name": "storageId", "type": "integer" }
|
||||
{ "name": "storageId", "$ref": "StorageId" }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "entries", "type": "array", "items": { "$ref": "Entry"} }
|
||||
{ "name": "entries", "type": "array", "items": { "$ref": "Item" } }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "setDOMStorageItem",
|
||||
"parameters": [
|
||||
{ "name": "storageId", "type": "integer" },
|
||||
{ "name": "storageId", "$ref": "StorageId" },
|
||||
{ "name": "key", "type": "string" },
|
||||
{ "name": "value", "type": "string" }
|
||||
],
|
||||
|
@ -1144,7 +1354,7 @@
|
|||
{
|
||||
"name": "removeDOMStorageItem",
|
||||
"parameters": [
|
||||
{ "name": "storageId", "type": "integer" },
|
||||
{ "name": "storageId", "$ref": "StorageId" },
|
||||
{ "name": "key", "type": "string" }
|
||||
],
|
||||
"returns": [
|
||||
|
@ -1160,9 +1370,9 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "updateDOMStorage",
|
||||
"name": "domStorageUpdated",
|
||||
"parameters": [
|
||||
{ "name": "storageId", "type": "integer" }
|
||||
{ "name": "storageId", "$ref": "StorageId" }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -1257,6 +1467,35 @@
|
|||
{
|
||||
"domain": "FileSystem",
|
||||
"hidden": true,
|
||||
"types": [
|
||||
{
|
||||
"id": "RequestId",
|
||||
"type": "integer",
|
||||
"description": "Request Identifier to glue a request and its completion event."
|
||||
},
|
||||
{
|
||||
"id": "Entry",
|
||||
"type": "object",
|
||||
"properties": [
|
||||
{ "name": "url", "type": "string", "description": "filesystem: URL for the entry." },
|
||||
{ "name": "name", "type": "string", "description": "The name of the file or directory." },
|
||||
{ "name": "isDirectory", "type": "boolean", "description": "True if the entry is a directory." },
|
||||
{ "name": "mimeType", "type": "string", "optional": true, "description": "MIME type of the entry, available for a file only." },
|
||||
{ "name": "resourceType", "$ref": "Page.ResourceType", "optional": true, "description": "ResourceType of the entry, available for a file only." },
|
||||
{ "name": "isTextFile", "type": "boolean", "optional": true, "description": "True if the entry is a text file." }
|
||||
],
|
||||
"description": "Represents a browser side file or directory."
|
||||
},
|
||||
{
|
||||
"id": "Metadata",
|
||||
"type": "object",
|
||||
"properties": [
|
||||
{ "name": "modificationTime", "type": "number", "description": "Modification time." },
|
||||
{ "name": "size", "type": "number", "description": "File size. This field is always zero for directories." }
|
||||
],
|
||||
"description": "Represents metadata of a file or entry."
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
{
|
||||
"name": "enable",
|
||||
|
@ -1264,10 +1503,92 @@
|
|||
},
|
||||
{
|
||||
"name": "disable",
|
||||
"description": "Disables events from backend.."
|
||||
"description": "Disables events from backend."
|
||||
},
|
||||
{
|
||||
"name": "requestFileSystemRoot",
|
||||
"parameters": [
|
||||
{ "name": "origin", "type": "string", "description": "Security origin of requesting FileSystem. One of frames in current page needs to have this security origin." },
|
||||
{ "name": "type", "type": "string", "enum": ["temporary", "persistent"], "description": "FileSystem type of requesting FileSystem." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier. Corresponding fileSystemRootReceived event should have same requestId with this." }
|
||||
],
|
||||
"description": "Returns root directory of the FileSystem as fileSystemRootReceived event, if exists."
|
||||
},
|
||||
{
|
||||
"name": "requestDirectoryContent",
|
||||
"parameters": [
|
||||
{ "name": "url", "type": "string", "description": "URL of the directory that the frontend is requesting to read from." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier. Corresponding directoryContentReceived event should have same requestId with this." }
|
||||
],
|
||||
"description": "Returns content of the directory as directoryContentReceived event."
|
||||
},
|
||||
{
|
||||
"name": "requestMetadata",
|
||||
"parameters": [
|
||||
{ "name": "url", "type": "string", "description": "URL of the entry that the frontend is requesting to get metadata from." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier. Corresponding metadataReceived event should have same requestId with this." }
|
||||
],
|
||||
"description": "Returns metadata of the entry as metadataReceived event."
|
||||
},
|
||||
{
|
||||
"name": "requestFileContent",
|
||||
"parameters": [
|
||||
{ "name": "url", "type": "string", "description": "URL of the file that the frontend is requesting to read from." },
|
||||
{ "name": "readAsText", "type": "boolean", "description": "True if the content should be read as text, otherwise the result will be returned as base64 encoded text." },
|
||||
{ "name": "start", "type": "integer", "optional": true, "description": "Specifies the start of range to read." },
|
||||
{ "name": "end", "type": "integer", "optional": true, "description": "Specifies the end of range to read exclusively." },
|
||||
{ "name": "charset", "type": "string", "optional": true, "description": "Overrides charset of the content when content is served as text." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier. Corresponding fileContentReceived event should have same requestId with this." }
|
||||
],
|
||||
"description": "Returns content of the file as fileContentReceived event. Result should be sliced into [start, end)."
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "fileSystemRootReceived",
|
||||
"parameters": [
|
||||
{ "name": "requestId", "type": "integer", "description": "Request Identifier that was returned by corresponding requestFileSystemRoot command." },
|
||||
{ "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." },
|
||||
{ "name": "root", "$ref": "FileSystem.Entry", "optional": true, "description": "Contains root of the requested FileSystem if the command completed successfully." }
|
||||
],
|
||||
"description": "Completion event of requestFileSystemRoot command."
|
||||
},
|
||||
{
|
||||
"name": "directoryContentReceived",
|
||||
"parameters": [
|
||||
{ "name": "requestId", "type": "integer", "description": "Request Identifier that was returned by corresponding requestDirectoryContent command." },
|
||||
{ "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." },
|
||||
{ "name": "entries", "type": "array", "items": { "$ref": "FileSystem.Entry" }, "optional": true, "description": "Contains all entries on directory if the command completed successfully." }
|
||||
],
|
||||
"description": "Completion event of requestDirectoryContent command."
|
||||
},
|
||||
{
|
||||
"name": "metadataReceived",
|
||||
"parameters": [
|
||||
{ "name": "requestId", "type": "integer", "description": "Request Identifier that was returned in response to the corresponding requestMetadata command." },
|
||||
{ "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." },
|
||||
{ "name": "metadata", "$ref": "FileSystem.Metadata", "optional": true, "description": "Contains metadata of the entry if the command completed successfully." }
|
||||
],
|
||||
"description": "Completion event of requestMetadata command."
|
||||
},
|
||||
{
|
||||
"name": "fileContentReceived",
|
||||
"parameters": [
|
||||
{ "name": "requestId", "type": "integer", "description": "Request Identifier that was returned in response to the corresponding requestFileContent command." },
|
||||
{ "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." },
|
||||
{ "name": "content", "type": "string", "optional": true, "description": "Content of the file." },
|
||||
{ "name": "charset", "type": "string", "optional": true, "description": "Charset of the content if it is served as text." }
|
||||
],
|
||||
"description": "Completion event of requestFileContent command."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1589,14 +1910,6 @@
|
|||
],
|
||||
"description": "Moves node into the new container, places it before the given anchor."
|
||||
},
|
||||
{
|
||||
"name": "setTouchEmulationEnabled",
|
||||
"parameters": [
|
||||
{ "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }
|
||||
],
|
||||
"description": "Toggles mouse event-based touch event emulation.",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "undo",
|
||||
"description": "Undoes the last performed action.",
|
||||
|
@ -1722,6 +2035,12 @@
|
|||
],
|
||||
"description": "This object identifies a CSS style in a unique way."
|
||||
},
|
||||
{
|
||||
"id": "StyleSheetOrigin",
|
||||
"type": "string",
|
||||
"enum": ["user", "user-agent", "inspector", "regular"],
|
||||
"description": "Stylesheet type: \"user\" for user stylesheets, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via inspector\" rules), \"regular\" for regular stylesheets."
|
||||
},
|
||||
{
|
||||
"id": "CSSRuleId",
|
||||
"type": "object",
|
||||
|
@ -1763,7 +2082,9 @@
|
|||
"type": "object",
|
||||
"properties": [
|
||||
{ "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The stylesheet identifier."},
|
||||
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Owner frame identifier."},
|
||||
{ "name": "sourceURL", "type": "string", "description": "Stylesheet resource URL."},
|
||||
{ "name": "origin", "$ref": "StyleSheetOrigin", "description": "Stylesheet origin."},
|
||||
{ "name": "title", "type": "string", "description": "Stylesheet title."},
|
||||
{ "name": "disabled", "type": "boolean", "description": "Denotes whether the stylesheet is disabled."}
|
||||
],
|
||||
|
@ -1787,7 +2108,7 @@
|
|||
{ "name": "selectorText", "type": "string", "description": "Rule selector."},
|
||||
{ "name": "sourceURL", "type": "string", "optional": true, "description": "Parent stylesheet resource URL (for regular rules)."},
|
||||
{ "name": "sourceLine", "type": "integer", "description": "Line ordinal of the rule selector start character in the resource."},
|
||||
{ "name": "origin", "type": "string", "enum": ["user", "user-agent", "inspector", "regular"], "description": "The parent stylesheet type: \"user\" for user stylesheets, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding new rules created with <code>addRule()</code>), \"regular\" for regular stylesheets."},
|
||||
{ "name": "origin", "$ref": "StyleSheetOrigin", "description": "Parent stylesheet's origin."},
|
||||
{ "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." },
|
||||
{ "name": "selectorRange", "$ref": "SourceRange", "optional": true, "description": "The rule selector range in the underlying resource (if available)." },
|
||||
{ "name": "media", "type": "array", "items": { "$ref": "CSSMedia" }, "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards." }
|
||||
|
@ -1807,6 +2128,14 @@
|
|||
"id": "ShorthandEntry",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"id": "CSSPropertyInfo",
|
||||
"type": "object",
|
||||
"properties": [
|
||||
{ "name": "name", "type": "string", "description": "Property name." },
|
||||
{ "name": "longhands", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Longhand property names." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CSSComputedStyleProperty",
|
||||
"type": "object",
|
||||
|
@ -1840,7 +2169,6 @@
|
|||
{ "name": "text", "type": "string", "optional": true, "description": "The full property text as specified in the style." },
|
||||
{ "name": "parsedOk", "type": "boolean", "optional": true, "description": "Whether the property is understood by the browser (implies <code>true</code> if absent)." },
|
||||
{ "name": "status", "type": "string", "enum": ["active", "inactive", "disabled", "style"], "optional": true, "description": "The property status: \"active\" (implied if absent) if the property is effective in the style, \"inactive\" if the property is overridden by a same-named property in this style later on, \"disabled\" if the property is disabled by the user, \"style\" if the property is reported by the browser rather than by the CSS source parser." },
|
||||
{ "name": "shorthandName", "type": "string", "optional": true, "description": "The related shorthand property name (absent if this property is not a longhand)." },
|
||||
{ "name": "range", "$ref": "SourceRange", "optional": true, "description": "The entire property range in the enclosing style declaration (if available)." }
|
||||
],
|
||||
"description": "CSS style effective visual dimensions and source offsets."
|
||||
|
@ -1876,6 +2204,29 @@
|
|||
{ "name": "totalTime", "type": "number", "description": "Total processing time for all selectors in the profile (in milliseconds.)" },
|
||||
{ "name": "data", "type": "array", "items": { "$ref": "SelectorProfileEntry" }, "description": "CSS selector profile entries." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "Region",
|
||||
"type": "object",
|
||||
"properties": [
|
||||
{ "name": "regionOverset", "type": "string", "enum": ["overset", "fit", "empty"], "description": "The \"overset\" attribute of a Named Flow." },
|
||||
{ "name": "nodeId", "$ref": "DOM.NodeId", "description": "The corresponding DOM node id." }
|
||||
],
|
||||
"description": "This object represents a region that flows from a Named Flow.",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"id": "NamedFlow",
|
||||
"type": "object",
|
||||
"properties": [
|
||||
{ "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
|
||||
{ "name": "name", "type": "string", "description": "Named Flow identifier." },
|
||||
{ "name": "overset", "type": "boolean", "description": "The \"overset\" attribute of a Named Flow." },
|
||||
{ "name": "content", "type": "array", "items": { "$ref": "DOM.NodeId" }, "description": "An array of nodes that flow into the Named Flow." },
|
||||
{ "name": "regions", "type": "array", "items": { "$ref": "Region" }, "description": "An array of regions associated with the Named Flow." }
|
||||
],
|
||||
"description": "This object represents a Named Flow.",
|
||||
"hidden": true
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
|
@ -1891,7 +2242,6 @@
|
|||
"name": "getMatchedStylesForNode",
|
||||
"parameters": [
|
||||
{ "name": "nodeId", "$ref": "DOM.NodeId" },
|
||||
{ "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "optional": true, "description": "Element pseudo classes to force when computing applicable style rules." },
|
||||
{ "name": "includePseudo", "type": "boolean", "optional": true, "description": "Whether to include pseudo styles (default: true)." },
|
||||
{ "name": "includeInherited", "type": "boolean", "optional": true, "description": "Whether to include inherited styles (default: true)." }
|
||||
],
|
||||
|
@ -1916,8 +2266,7 @@
|
|||
{
|
||||
"name": "getComputedStyleForNode",
|
||||
"parameters": [
|
||||
{ "name": "nodeId", "$ref": "DOM.NodeId" },
|
||||
{ "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "optional": true, "description": "Element pseudo classes to force when computing applicable style rules." }
|
||||
{ "name": "nodeId", "$ref": "DOM.NodeId" }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "computedStyle", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" }, "description": "Computed style for the specified DOM node." }
|
||||
|
@ -2009,10 +2358,18 @@
|
|||
{
|
||||
"name": "getSupportedCSSProperties",
|
||||
"returns": [
|
||||
{ "name": "cssProperties", "type": "array", "items": { "type": "string" }, "description": "Supported property names." }
|
||||
{ "name": "cssProperties", "type": "array", "items": { "$ref": "CSSPropertyInfo" }, "description": "Supported property metainfo." }
|
||||
],
|
||||
"description": "Returns all supported CSS property names."
|
||||
},
|
||||
{
|
||||
"name": "forcePseudoState",
|
||||
"parameters": [
|
||||
{ "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to force the pseudo state." },
|
||||
{ "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "description": "Element pseudo classes to force when computing the element's style." }
|
||||
],
|
||||
"description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser."
|
||||
},
|
||||
{
|
||||
"name": "startSelectorProfiler"
|
||||
},
|
||||
|
@ -2021,6 +2378,29 @@
|
|||
"returns": [
|
||||
{ "name": "profile", "$ref": "SelectorProfile" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getNamedFlowCollection",
|
||||
"parameters": [
|
||||
{ "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id for which to get the Named Flow Collection." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "namedFlows", "type": "array", "items": { "$ref": "NamedFlow" }, "description": "An array containing the Named Flows in the document." }
|
||||
],
|
||||
"description": "Returns the Named Flows from the document.",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "getFlowByName",
|
||||
"parameters": [
|
||||
{ "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
|
||||
{ "name": "name", "type": "string", "description": "Named Flow identifier." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "namedFlow", "$ref": "NamedFlow", "description": "A Named Flow." }
|
||||
],
|
||||
"description": "Returns the Named Flow identified by the given name",
|
||||
"hidden": true
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
|
@ -2034,6 +2414,24 @@
|
|||
{ "name": "styleSheetId", "$ref": "StyleSheetId" }
|
||||
],
|
||||
"description": "Fired whenever a stylesheet is changed as a result of the client operation."
|
||||
},
|
||||
{
|
||||
"name": "namedFlowCreated",
|
||||
"parameters": [
|
||||
{ "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
|
||||
{ "name": "namedFlow", "type": "string", "description": "Identifier of the new Named Flow." }
|
||||
],
|
||||
"description": "Fires when a Named Flow is created.",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "namedFlowRemoved",
|
||||
"parameters": [
|
||||
{ "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
|
||||
{ "name": "namedFlow", "type": "string", "description": "Identifier of the removed Named Flow." }
|
||||
],
|
||||
"description": "Fires when a Named Flow is removed: has no associated content nodes and regions.",
|
||||
"hidden": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -2071,6 +2469,14 @@
|
|||
],
|
||||
"hidden": true,
|
||||
"description": "Starts calculating various DOM statistics and sending them as part of timeline events."
|
||||
},
|
||||
{
|
||||
"name": "supportsFrameInstrumentation",
|
||||
"returns": [
|
||||
{ "name": "result", "type": "boolean", "description": "True if timeline supports frame instrumentation." }
|
||||
],
|
||||
"hidden": true,
|
||||
"description": "Tells whether timeline agent supports frame instrumentation."
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
|
@ -2120,7 +2526,8 @@
|
|||
{ "name": "location", "$ref": "Location", "description": "Location of the function." },
|
||||
{ "name": "name", "type": "string", "optional": true, "description": "Name of the function. Not present for anonymous functions." },
|
||||
{ "name": "displayName", "type": "string", "optional": true, "description": "Display name of the function(specified in 'displayName' property on the function object)." },
|
||||
{ "name": "inferredName", "type": "string", "optional": true, "description": "Name of the function inferred from its initial assignment." }
|
||||
{ "name": "inferredName", "type": "string", "optional": true, "description": "Name of the function inferred from its initial assignment." },
|
||||
{ "name": "scopeChain", "type": "array", "optional": true, "items": { "$ref": "Scope" }, "description": "Scope chain for this closure." }
|
||||
],
|
||||
"description": "Information about the function."
|
||||
},
|
||||
|
@ -2156,12 +2563,12 @@
|
|||
"description": "Tells whether enabling debugger causes scripts recompilation."
|
||||
},
|
||||
{
|
||||
"name": "supportsNativeBreakpoints",
|
||||
"name": "supportsSeparateScriptCompilationAndExecution",
|
||||
"returns": [
|
||||
{ "name": "result", "type": "boolean", "description": "True if debugger supports native breakpoints." }
|
||||
{ "name": "result", "type": "boolean", "description": "True if debugger supports separate script compilation and execution." }
|
||||
],
|
||||
"hidden": true,
|
||||
"description": "Tells whether debugger supports native breakpoints."
|
||||
"description": "Tells whether debugger supports separate script compilation and execution."
|
||||
},
|
||||
{
|
||||
"name": "enable",
|
||||
|
@ -2189,7 +2596,7 @@
|
|||
],
|
||||
"returns": [
|
||||
{ "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
|
||||
{ "name": "locations", "optional": true, "type": "array", "items": { "$ref": "Location"}, "description": "List of the locations this breakpoint resolved into upon addition." }
|
||||
{ "name": "locations", "type": "array", "items": { "$ref": "Location"}, "description": "List of the locations this breakpoint resolved into upon addition." }
|
||||
],
|
||||
"description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads."
|
||||
},
|
||||
|
@ -2272,6 +2679,18 @@
|
|||
],
|
||||
"description": "Edits JavaScript source live."
|
||||
},
|
||||
{
|
||||
"name": "restartFrame",
|
||||
"parameters": [
|
||||
{ "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame"}, "description": "New stack trace." },
|
||||
{ "name": "result", "type": "object", "description": "VM-specific description.", "hidden": true }
|
||||
],
|
||||
"hidden": true,
|
||||
"description": "Restarts particular call frame from the beginning."
|
||||
},
|
||||
{
|
||||
"name": "getScriptSource",
|
||||
"parameters": [
|
||||
|
@ -2307,6 +2726,7 @@
|
|||
{ "name": "expression", "type": "string", "description": "Expression to evaluate." },
|
||||
{ "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." },
|
||||
{ "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "hidden": true },
|
||||
{ "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true },
|
||||
{ "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }
|
||||
],
|
||||
"returns": [
|
||||
|
@ -2314,6 +2734,42 @@
|
|||
{ "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }
|
||||
],
|
||||
"description": "Evaluates expression on a given call frame."
|
||||
},
|
||||
{
|
||||
"name": "compileScript",
|
||||
"hidden": true,
|
||||
"parameters": [
|
||||
{ "name": "expression", "type": "string", "description": "Expression to compile." },
|
||||
{ "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },
|
||||
{ "name": "syntaxErrorMessage", "type": "string", "optional": true, "description": "Syntax error message if compilation failed." }
|
||||
],
|
||||
"description": "Compiles expression."
|
||||
},
|
||||
{
|
||||
"name": "runScript",
|
||||
"hidden": true,
|
||||
"parameters": [
|
||||
{ "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },
|
||||
{ "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },
|
||||
{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
|
||||
{ "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "result", "$ref": "Runtime.RemoteObject", "description": "Run result." },
|
||||
{ "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the script run." }
|
||||
],
|
||||
"description": "Runs script with given id in a given context."
|
||||
},
|
||||
{
|
||||
"name": "setOverlayMessage",
|
||||
"parameters": [
|
||||
{ "name": "message", "type": "string", "optional": true, "description": "Overlay message to display when paused in debugger." }
|
||||
],
|
||||
"hidden": true,
|
||||
"description": "Sets overlay message."
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
|
@ -2447,15 +2903,30 @@
|
|||
"domain": "Profiler",
|
||||
"hidden": true,
|
||||
"types": [
|
||||
{
|
||||
"id": "Profile",
|
||||
"type": "object",
|
||||
"description": "Profile."
|
||||
},
|
||||
{
|
||||
"id": "ProfileHeader",
|
||||
"type": "object",
|
||||
"description": "Profile header."
|
||||
"description": "Profile header.",
|
||||
"properties": [
|
||||
{ "name": "typeId", "type": "string", "enum": ["CPU", "CSS", "HEAP"], "description": "Profile type name." },
|
||||
{ "name": "title", "type": "string", "description": "Profile title." },
|
||||
{ "name": "uid", "type": "integer", "description": "Unique identifier of the profile." },
|
||||
{ "name": "maxJSObjectId", "type": "integer", "optional": true, "description": "Last seen JS object Id." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "Profile",
|
||||
"type": "object",
|
||||
"description": "Profile.",
|
||||
"properties": [
|
||||
{ "name": "head", "type": "object", "optional": true },
|
||||
{ "name": "bottomUpHead", "type": "object", "optional": true }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "HeapSnapshotObjectId",
|
||||
"type": "string",
|
||||
"description": "Heap snashot object id."
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
|
@ -2524,12 +2995,21 @@
|
|||
{
|
||||
"name": "getObjectByHeapObjectId",
|
||||
"parameters": [
|
||||
{ "name": "objectId", "type": "integer" },
|
||||
{ "name": "objectId", "$ref": "HeapSnapshotObjectId" },
|
||||
{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getHeapObjectId",
|
||||
"parameters": [
|
||||
{ "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }
|
||||
],
|
||||
"returns": [
|
||||
{ "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
|
@ -2576,10 +3056,10 @@
|
|||
"types": [],
|
||||
"commands": [
|
||||
{
|
||||
"name": "setWorkerInspectionEnabled",
|
||||
"parameters": [
|
||||
{ "name": "value", "type": "boolean" }
|
||||
]
|
||||
"name": "enable"
|
||||
},
|
||||
{
|
||||
"name": "disable"
|
||||
},
|
||||
{
|
||||
"name": "sendMessageToWorker",
|
||||
|
@ -2633,5 +3113,21 @@
|
|||
"name": "disconnectedFromWorker"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"domain": "WebGL",
|
||||
"hidden": true,
|
||||
"types": [],
|
||||
"commands": [
|
||||
{
|
||||
"name": "enable",
|
||||
"description": "Enables WebGL inspection."
|
||||
},
|
||||
{
|
||||
"name": "disable",
|
||||
"description": "Disables WebGL inspection."
|
||||
}
|
||||
],
|
||||
"events": []
|
||||
}]
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -53,6 +53,13 @@
|
|||
define(function LiveDevelopment(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
// Status Codes
|
||||
var STATUS_ERROR = exports.STATUS_ERROR = -1;
|
||||
var STATUS_INACTIVE = exports.STATUS_INACTIVE = 0;
|
||||
var STATUS_CONNECTING = exports.STATUS_CONNECTING = 1;
|
||||
var STATUS_LOADING_AGENTS = exports.STATUS_LOADING_AGENTS = 2;
|
||||
var STATUS_ACTIVE = exports.STATUS_ACTIVE = 3;
|
||||
|
||||
var DocumentManager = require("document/DocumentManager");
|
||||
var EditorManager = require("editor/EditorManager");
|
||||
var NativeApp = require("utils/NativeApp");
|
||||
|
@ -282,7 +289,7 @@ define(function LiveDevelopment(require, exports, module) {
|
|||
}
|
||||
|
||||
/** Triggered by Inspector.error */
|
||||
function _onError(error) {
|
||||
function _onError(event, error) {
|
||||
var message = error.message;
|
||||
|
||||
// Additional information, like exactly which parameter could not be processed.
|
||||
|
@ -302,25 +309,27 @@ define(function LiveDevelopment(require, exports, module) {
|
|||
var editor = EditorManager.getCurrentFullEditor();
|
||||
_openDocument(doc, editor);
|
||||
}
|
||||
_setStatus(3);
|
||||
_setStatus(STATUS_ACTIVE);
|
||||
}
|
||||
|
||||
/** Triggered by Inspector.connect */
|
||||
function _onConnect() {
|
||||
function _onConnect(event) {
|
||||
var promises = loadAgents();
|
||||
_setStatus(2);
|
||||
_setStatus(STATUS_LOADING_AGENTS);
|
||||
$.when.apply(undefined, promises).then(_onLoad, _onError);
|
||||
}
|
||||
|
||||
/** Triggered by Inspector.disconnect */
|
||||
function _onDisconnect() {
|
||||
function _onDisconnect(event) {
|
||||
unloadAgents();
|
||||
_closeDocument();
|
||||
_setStatus(0);
|
||||
_setStatus(STATUS_INACTIVE);
|
||||
}
|
||||
|
||||
/** Open the Connection and go live */
|
||||
function open() {
|
||||
var result = new $.Deferred(),
|
||||
promise = result.promise();
|
||||
var doc = _getCurrentDocument();
|
||||
var browserStarted = false;
|
||||
var retryCount = 0;
|
||||
|
@ -331,6 +340,7 @@ define(function LiveDevelopment(require, exports, module) {
|
|||
Strings.LIVE_DEVELOPMENT_ERROR_TITLE,
|
||||
Strings.LIVE_DEV_NEED_HTML_MESSAGE
|
||||
);
|
||||
result.reject("WRONG_DOC");
|
||||
}
|
||||
|
||||
if (!doc || !doc.root) {
|
||||
|
@ -342,16 +352,17 @@ define(function LiveDevelopment(require, exports, module) {
|
|||
// file types.
|
||||
if (!doc.extension || doc.extension.indexOf("htm") !== 0) {
|
||||
showWrongDocError();
|
||||
return;
|
||||
return promise;
|
||||
}
|
||||
|
||||
_setStatus(1);
|
||||
Inspector.connectToURL(doc.root.url).fail(function onConnectFail(err) {
|
||||
_setStatus(STATUS_CONNECTING);
|
||||
Inspector.connectToURL(doc.root.url).then(result.resolve, function onConnectFail(err) {
|
||||
if (err === "CANCEL") {
|
||||
result.reject(err);
|
||||
return;
|
||||
}
|
||||
if (retryCount > 6) {
|
||||
_setStatus(-1);
|
||||
_setStatus(STATUS_ERROR);
|
||||
Dialogs.showModalDialog(
|
||||
Dialogs.DIALOG_ID_LIVE_DEVELOPMENT,
|
||||
Strings.LIVE_DEVELOPMENT_ERROR_TITLE,
|
||||
|
@ -359,24 +370,29 @@ define(function LiveDevelopment(require, exports, module) {
|
|||
).done(function (id) {
|
||||
if (id === Dialogs.DIALOG_BTN_OK) {
|
||||
// User has chosen to reload Chrome, quit the running instance
|
||||
_setStatus(0);
|
||||
_setStatus(STATUS_INACTIVE);
|
||||
NativeApp.closeLiveBrowser()
|
||||
.done(function () {
|
||||
browserStarted = false;
|
||||
window.setTimeout(open);
|
||||
window.setTimeout(function () {
|
||||
open().then(result.resolve, result.reject);
|
||||
});
|
||||
})
|
||||
.fail(function (err) {
|
||||
// Report error?
|
||||
_setStatus(-1);
|
||||
_setStatus(STATUS_ERROR);
|
||||
browserStarted = false;
|
||||
result.reject("CLOSE_LIVE_BROWSER");
|
||||
});
|
||||
} else {
|
||||
result.reject("CANCEL");
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
retryCount++;
|
||||
|
||||
if (!browserStarted && exports.status !== -1) {
|
||||
if (!browserStarted && exports.status !== STATUS_ERROR) {
|
||||
// If err === FileError.ERR_NOT_FOUND, it means a remote debugger connection
|
||||
// is available, but the requested URL is not loaded in the browser. In that
|
||||
// case we want to launch the live browser (to open the url in a new tab)
|
||||
|
@ -393,7 +409,7 @@ define(function LiveDevelopment(require, exports, module) {
|
|||
.fail(function (err) {
|
||||
var message;
|
||||
|
||||
_setStatus(-1);
|
||||
_setStatus(STATUS_ERROR);
|
||||
if (err === FileError.NOT_FOUND_ERR) {
|
||||
message = Strings.ERROR_CANT_FIND_CHROME;
|
||||
} else {
|
||||
|
@ -405,16 +421,20 @@ define(function LiveDevelopment(require, exports, module) {
|
|||
Strings.ERROR_LAUNCHING_BROWSER_TITLE,
|
||||
message
|
||||
);
|
||||
|
||||
result.reject("OPEN_LIVE_BROWSER");
|
||||
});
|
||||
}
|
||||
|
||||
if (exports.status !== -1) {
|
||||
if (exports.status !== STATUS_ERROR) {
|
||||
window.setTimeout(function retryConnect() {
|
||||
Inspector.connectToURL(doc.root.url).fail(onConnectFail);
|
||||
Inspector.connectToURL(doc.root.url).then(result.resolve, onConnectFail);
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
/** Close the Connection */
|
||||
|
@ -423,7 +443,7 @@ define(function LiveDevelopment(require, exports, module) {
|
|||
Inspector.Runtime.evaluate("window.close()");
|
||||
}
|
||||
Inspector.disconnect();
|
||||
_setStatus(0);
|
||||
_setStatus(STATUS_INACTIVE);
|
||||
}
|
||||
|
||||
/** Triggered by a document change from the DocumentManager */
|
||||
|
@ -481,10 +501,9 @@ define(function LiveDevelopment(require, exports, module) {
|
|||
/** Initialize the LiveDevelopment Session */
|
||||
function init(theConfig) {
|
||||
exports.config = theConfig;
|
||||
Inspector.on("connect", _onConnect);
|
||||
Inspector.on("disconnect", _onDisconnect);
|
||||
Inspector.on("error", _onError);
|
||||
Inspector.on("load", _onLoad);
|
||||
$(Inspector).on("connect", _onConnect)
|
||||
.on("disconnect", _onDisconnect)
|
||||
.on("error", _onError);
|
||||
$(DocumentManager).on("currentDocumentChange", _onDocumentChange);
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ define(function main(require, exports, module) {
|
|||
|
||||
/** Toggles LiveDevelopment and synchronizes the state of UI elements that reports LiveDevelopment status */
|
||||
function _handleGoLiveCommand() {
|
||||
if (LiveDevelopment.status > 0) {
|
||||
if (LiveDevelopment.status >= LiveDevelopment.STATUS_CONNECTING) {
|
||||
LiveDevelopment.close();
|
||||
// TODO Ty: when checkmark support lands, remove checkmark
|
||||
} else {
|
||||
|
|
|
@ -30,8 +30,8 @@ require.config({
|
|||
"text" : "thirdparty/text",
|
||||
"i18n" : "thirdparty/i18n"
|
||||
},
|
||||
// store the locale in localStorage until CEF sets the correct navigator.language
|
||||
locale: window.localStorage.getItem("locale")
|
||||
// Use custom brackets property until CEF sets the correct navigator.language
|
||||
locale: window.localStorage.getItem("locale") || brackets.app.language
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -89,7 +89,7 @@ define(function (require, exports, module) {
|
|||
exports.DEBUG_SHOW_PERF_DATA = "debug.showPerfData";
|
||||
exports.DEBUG_NEW_BRACKETS_WINDOW = "debug.newBracketsWindow";
|
||||
exports.DEBUG_SWITCH_LANGUAGE = "debug.switchLanguage";
|
||||
exports.CHECK_FOR_UPDATE = "checkForUpdate";
|
||||
exports.CHECK_FOR_UPDATE = "app.checkForUpdate";
|
||||
|
||||
// Command that does nothing. Can be used for place holder menuItems
|
||||
|
||||
|
|
|
@ -139,13 +139,17 @@ define(function (require, exports, module) {
|
|||
NativeFileSystem.requestNativeFileSystem(stringsPath, function (dirEntry) {
|
||||
dirEntry.createReader().readEntries(function (entries) {
|
||||
|
||||
var $activeLanguage;
|
||||
var $submit;
|
||||
var $activeLanguage,
|
||||
$submit,
|
||||
locale;
|
||||
|
||||
function setLanguage(event) {
|
||||
if ($activeLanguage) {
|
||||
$activeLanguage.css("font-weight", "normal");
|
||||
}
|
||||
$activeLanguage = $(event.currentTarget);
|
||||
locale = $activeLanguage.data("locale");
|
||||
|
||||
$activeLanguage.css("font-weight", "bold");
|
||||
$submit.attr("disabled", false);
|
||||
}
|
||||
|
@ -168,23 +172,6 @@ define(function (require, exports, module) {
|
|||
.on("click", "li", setLanguage)
|
||||
.appendTo($p);
|
||||
|
||||
// add english
|
||||
var $li = $("<li>")
|
||||
.text("en-EN")
|
||||
.data("locale", "en-EN")
|
||||
.appendTo($ul);
|
||||
|
||||
// inspect all children of dirEntry
|
||||
entries.forEach(function (entry) {
|
||||
if (entry.isDirectory && entry.name.match(/^[a-z]{2}-[A-Z]{2}$/)) {
|
||||
var language = entry.name;
|
||||
var $li = $("<li>")
|
||||
.text(entry.name)
|
||||
.data("locale", language)
|
||||
.appendTo($ul);
|
||||
}
|
||||
});
|
||||
|
||||
var $footer = $("<div class='modal-footer' />")
|
||||
.appendTo($modal);
|
||||
|
||||
|
@ -201,8 +188,12 @@ define(function (require, exports, module) {
|
|||
if (!$activeLanguage) {
|
||||
return;
|
||||
}
|
||||
var locale = $activeLanguage.data("locale");
|
||||
if (locale) {
|
||||
window.localStorage.setItem("locale", locale);
|
||||
} else {
|
||||
window.localStorage.removeItem("locale");
|
||||
}
|
||||
|
||||
CommandManager.execute(Commands.DEBUG_REFRESH_WINDOW);
|
||||
})
|
||||
.attr("disabled", "disabled")
|
||||
|
@ -217,6 +208,29 @@ define(function (require, exports, module) {
|
|||
.on("hidden", function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
// add system default
|
||||
var $li = $("<li>")
|
||||
.text("system default")
|
||||
.data("locale", null)
|
||||
.appendTo($ul);
|
||||
|
||||
// add english
|
||||
$li = $("<li>")
|
||||
.text("en")
|
||||
.data("locale", "en")
|
||||
.appendTo($ul);
|
||||
|
||||
// inspect all children of dirEntry
|
||||
entries.forEach(function (entry) {
|
||||
if (entry.isDirectory && entry.name.match(/^[a-z]{2}(-[A-Z]{2})?$/)) {
|
||||
var language = entry.name;
|
||||
var $li = $("<li>")
|
||||
.text(entry.name)
|
||||
.data("locale", language)
|
||||
.appendTo($ul);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ define(function (require, exports, module) {
|
|||
|
||||
// Create the new node. The createNewItem function does all the heavy work
|
||||
// of validating file name, creating the new file and selecting.
|
||||
var deferred = _getUntitledFileSuggestion(baseDir, "Untitled", ".js");
|
||||
var deferred = _getUntitledFileSuggestion(baseDir, Strings.Untitled, ".js");
|
||||
var createWithSuggestedName = function (suggestedName) {
|
||||
ProjectManager.createNewItem(baseDir, suggestedName, false)
|
||||
.pipe(deferred.resolve, deferred.reject, deferred.notify)
|
||||
|
|
|
@ -176,8 +176,9 @@ define(function (require, exports, module) {
|
|||
var keyCode = event.keyCode;
|
||||
|
||||
// Up arrow, down arrow and enter key are always handled here
|
||||
if (keyCode === 38 || keyCode === 40 || keyCode === 13 ||
|
||||
(keyCode >= 33 && keyCode <= 36)) {
|
||||
if (event.type !== "keypress" &&
|
||||
(keyCode === 38 || keyCode === 40 || keyCode === 13 ||
|
||||
keyCode === 33 || keyCode === 34)) {
|
||||
|
||||
if (event.type === "keydown") {
|
||||
if (keyCode === 38) {
|
||||
|
@ -192,12 +193,6 @@ define(function (require, exports, module) {
|
|||
} else if (keyCode === 34) {
|
||||
// Page Down
|
||||
this.setSelectedIndex(this.selectedIndex + this.getItemsPerPage());
|
||||
} else if (keyCode === 35) {
|
||||
// End
|
||||
this.setSelectedIndex(this.options.maxResults);
|
||||
} else if (keyCode === 36) {
|
||||
// Home
|
||||
this.setSelectedIndex(0);
|
||||
} else {
|
||||
// Enter/return key
|
||||
// Trigger a click handler to commmit the selected item
|
||||
|
|
|
@ -108,32 +108,7 @@ define(function (require, exports, module) {
|
|||
function _createEditorForDocument(doc, makeMasterEditor, container, range, additionalKeys) {
|
||||
var mode = EditorUtils.getModeFromFileExtension(doc.file.fullPath);
|
||||
|
||||
var extraKeys = {
|
||||
"Ctrl-F" : function () {
|
||||
// No-op, handled in FindReplace.js
|
||||
},
|
||||
"Cmd-F" : function () {
|
||||
// No-op, handled in FindReplace.js
|
||||
},
|
||||
"Ctrl-H": function () {
|
||||
// No-op, handled in FindReplace.js
|
||||
},
|
||||
"Cmd-Alt-F": function () {
|
||||
// No-op, handled in FindReplace.js
|
||||
},
|
||||
"Shift-Ctrl-F": function () {
|
||||
// No-op, handled in FindInFiles.js
|
||||
},
|
||||
"Shift-Cmd-F" : function () {
|
||||
// No-op, handled in FindInFiles.js
|
||||
}
|
||||
};
|
||||
|
||||
if (additionalKeys) {
|
||||
mergeExtraKeys(null, extraKeys, additionalKeys);
|
||||
}
|
||||
|
||||
return new Editor(doc, makeMasterEditor, mode, container, extraKeys, range);
|
||||
return new Editor(doc, makeMasterEditor, mode, container, additionalKeys, range);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,6 +29,16 @@ define(function (require, exports, module) {
|
|||
|
||||
var Async = require("utils/Async");
|
||||
|
||||
/*
|
||||
* Generally NativeFileSystem mimics the File API working draft
|
||||
* http://www.w3.org/TR/file-system-api/. The w3 entry point
|
||||
* requestFileSystem is replaced with our own requestNativeFileSystem.
|
||||
*
|
||||
* The current implementation is incomplete and noteably does not
|
||||
* support the Blob data type and synchronous APIs. DirectoryEntry
|
||||
* and FileEntry read/write capabilities are mostly implemented, but
|
||||
* delete is not. File writing is limited to UTF-8 text.
|
||||
*/
|
||||
var NativeFileSystem = {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,164 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
|
||||
/*global define */
|
||||
|
||||
define(function (require, exports, module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
// Project error strings
|
||||
exports.ERROR_LOADING_PROJECT = "Fehler beim Laden des Projekts";
|
||||
exports.OPEN_DIALOG_ERROR = "Fehler beim Erstellen des Öffnen Dialogs. (Fehler {0})";
|
||||
exports.REQUEST_NATIVE_FILE_SYSTEM_ERROR = "Fehler beim Lesen des Verzeichnisses <span class='dialog-filename'>{0}</span>. (Fehler {1})";
|
||||
exports.READ_DIRECTORY_ENTRIES_ERROR = "Fehler beim Lesen der Verzeichnisinhalte von <span class='dialog-filename'>{0}</span>. (Fehler {1})";
|
||||
|
||||
// File open/save error string
|
||||
exports.ERROR_OPENING_FILE_TITLE = "Fehler beim Öffnen der Datei";
|
||||
exports.ERROR_OPENING_FILE = "Beim Öffnen der Datei <span class='dialog-filename'>{0}</span> ist ein Fehler aufgetreten: {1}";
|
||||
exports.ERROR_RELOADING_FILE_TITLE = "Fehler beim Laden der Änderungen";
|
||||
exports.ERROR_RELOADING_FILE = "Beim Laden der Änderungen der Datei <span class='dialog-filename'>{0}</span> ist ein Fehler aufgetreten: {1}";
|
||||
exports.ERROR_SAVING_FILE_TITLE = "Fehler beim Speichern der Datei";
|
||||
exports.ERROR_SAVING_FILE = "Beim Speichern der Datei <span class='dialog-filename'>{0}</span> ist ein Fehler aufgetreten: {1}";
|
||||
exports.INVALID_FILENAME_TITLE = "Ungültiger Dateiname";
|
||||
exports.INVALID_FILENAME_MESSAGE = "Dateinamen dürfen folgenden Zeichen nicht enthalten: /?*:;{}<>\\|";
|
||||
exports.FILE_ALREADY_EXISTS = "Die Datei <span class='dialog-filename'>{0}</span> existiert bereits.";
|
||||
exports.ERROR_CREATING_FILE_TITLE = "Fehler beim Erstellen der Datei";
|
||||
exports.ERROR_CREATING_FILE = "Beim Erstellen der Datei <span class='dialog-filename'>{0}</span> ist ein Fehler aufgetreten: {1}";
|
||||
|
||||
// Application error strings
|
||||
exports.ERROR_BRACKETS_IN_BROWSER_TITLE = "Ups! Brackets läuft derzeit leider nocht nicht im Browser.";
|
||||
exports.ERROR_BRACKETS_IN_BROWSER = "Brackets wurde in HTML programmiert aber derzeite läuft es nur als Desktop Anwendung um damit lokale Dateien zu bearbeiten. Bitte benutzen Sie die Anwendung von <b>github.com/adobe/brackets-app</b>.";
|
||||
|
||||
// FileIndexManager error string
|
||||
exports.ERROR_MAX_FILES_TITLE = "Fehler beim Indizieren der Dateien";
|
||||
exports.ERROR_MAX_FILES = "Die maximal mögliche Anzahl inidizierbarer Datein wurde überschritten. Funktionen die auf dem Index beruhen werden möglicherweise nicht korrekt funktionieren.";
|
||||
|
||||
// CSSManager error strings
|
||||
exports.ERROR_PARSE_TITLE = "Fehler beim interpretieren der CSS Datei(en):";
|
||||
|
||||
// Live Development error strings
|
||||
exports.ERROR_LAUNCHING_BROWSER_TITLE = "Fehler beim Starten des Webbrowsers";
|
||||
exports.ERROR_CANT_FIND_CHROME = "Google Chrome konnte nicht gefunden werden. Bitte laden Sie den Browser unter <b>google.de/chrome</b>.";
|
||||
exports.ERROR_LAUNCHING_BROWSER = "Beim Starten des Webbrowsers ist ein Fehler aufgetreten: (Fehler {0})";
|
||||
|
||||
exports.LIVE_DEVELOPMENT_ERROR_TITLE = "Fehler bei der Live Entwicklung";
|
||||
exports.LIVE_DEVELOPMENT_ERROR_MESSAGE = "Beim Aufbauen einer Live Verbindung zu Chrome ist ein Fehler aufgetreten. "
|
||||
+ "Für die Live Entwicklung muss das Remote Debugger Protokoll von Chrome aktiviert sein."
|
||||
+ "<br /><br />Soll Chrome neu gestartet werden um das Remote Debugger Protokoll zu aktivieren?";
|
||||
exports.LIVE_DEV_NEED_HTML_MESSAGE = "Öffnen Sie erst eine HTML Datei und aktivieren Sie dann die Live Verbindung.";
|
||||
|
||||
exports.LIVE_DEV_STATUS_TIP_NOT_CONNECTED = "Live Entwicklung";
|
||||
exports.LIVE_DEV_STATUS_TIP_PROGRESS1 = "Live Entwicklung: Verbinden...";
|
||||
exports.LIVE_DEV_STATUS_TIP_PROGRESS2 = "Live Entwicklung: Initialisieren...";
|
||||
exports.LIVE_DEV_STATUS_TIP_CONNECTED = "Trennen der Live Verbindung";
|
||||
|
||||
exports.SAVE_CLOSE_TITLE = "Ungespeicherte Änderungen";
|
||||
exports.SAVE_CLOSE_MESSAGE = "Wollen Sie die Änderungen in dem Dokument <span class='dialog-filename'>{0}</span> speichern?";
|
||||
exports.SAVE_CLOSE_MULTI_MESSAGE = "Wollen Sie die Änderungen in den folgenden Dateien speichern?";
|
||||
exports.EXT_MODIFIED_TITLE = "Externe Änderungen";
|
||||
exports.EXT_MODIFIED_MESSAGE = "<span class='dialog-filename'>{0}</span> wurde extern geändert und hat ungespeicherte Änderungen in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Welche Version wollen Sie erhalten?";
|
||||
exports.EXT_DELETED_MESSAGE = "<span class='dialog-filename'>{0}</span> wurde extern gelöscht und hat ungespeicherte Änderungen in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Wollen Sie die Änderungen erhalten?";
|
||||
|
||||
exports.OPEN_FILE = "Datei Öffnen";
|
||||
|
||||
// Switch language
|
||||
exports.LANGUAGE_TITLE = "Sprache Wechseln";
|
||||
exports.LANGUAGE_MESSAGE = "Bitte wählen Sie die gewünschte Sprache aus der folgenden Liste aus:";
|
||||
exports.LANGUAGE_SUBMIT = "Brackets neu starten";
|
||||
exports.LANGUAGE_CANCEL = "Abbrechen";
|
||||
|
||||
|
||||
/**
|
||||
* Command Name Constants
|
||||
*/
|
||||
|
||||
// File menu commands
|
||||
exports.FILE_MENU = "Datei";
|
||||
exports.CMD_FILE_NEW = "Neu";
|
||||
exports.CMD_FILE_OPEN = "Öffnen\u2026";
|
||||
exports.CMD_ADD_TO_WORKING_SET = "Zum Projekt hinzufügen";
|
||||
exports.CMD_OPEN_FOLDER = "Ordner öffnen\u2026";
|
||||
exports.CMD_FILE_CLOSE = "Schließen";
|
||||
exports.CMD_FILE_CLOSE_ALL = "Alles schlieen";
|
||||
exports.CMD_FILE_SAVE = "Speichern";
|
||||
exports.CMD_LIVE_FILE_PREVIEW = "Live Entwicklung";
|
||||
exports.CMD_QUIT = "Beenden";
|
||||
|
||||
// Edit menu commands
|
||||
exports.EDIT_MENU = "Bearbeiten";
|
||||
exports.CMD_SELECT_ALL = "Alles auswählen";
|
||||
exports.CMD_FIND = "Suchen";
|
||||
exports.CMD_FIND_IN_FILES = "Im Projekt suchen";
|
||||
exports.CMD_FIND_NEXT = "Weitersuchen (vorwärts)";
|
||||
exports.CMD_FIND_PREVIOUS = "Weitersuchen (rückwärts)";
|
||||
exports.CMD_REPLACE = "Ersetzen";
|
||||
exports.CMD_INDENT = "Einrücken";
|
||||
exports.CMD_UNINDENT = "Ausrücken";
|
||||
exports.CMD_DUPLICATE = "Duplizieren";
|
||||
exports.CMD_COMMENT = "Zeilen (aus-)kommentieren";
|
||||
exports.CMD_LINE_UP = "Zeilen nach oben verschieben";
|
||||
exports.CMD_LINE_DOWN = "Zeilen nach unten verschieben";
|
||||
|
||||
// View menu commands
|
||||
exports.VIEW_MENU = "Ansicht";
|
||||
exports.CMD_HIDE_SIDEBAR = "Seitenleiste verbergen";
|
||||
exports.CMD_SHOW_SIDEBAR = "Seitenleiste zeigen";
|
||||
exports.CMD_INCREASE_FONT_SIZE = "Schriftart vergrößern";
|
||||
exports.CMD_DECREASE_FONT_SIZE = "Schriftart verkleinern";
|
||||
exports.CMD_RESTORE_FONT_SIZE = "Schriftart zurücksetzen";
|
||||
|
||||
// Navigate menu Commands
|
||||
exports.NAVIGATE_MENU = "Navigation";
|
||||
exports.CMD_QUICK_OPEN = "Schnell Öffnen";
|
||||
exports.CMD_GOTO_LINE = "Gehe zu Zeile";
|
||||
exports.CMD_GOTO_DEFINITION = "Gehe zu Definition";
|
||||
exports.CMD_TOGGLE_QUICK_EDIT = "Schnell Bearbeiten";
|
||||
exports.CMD_QUICK_EDIT_PREV_MATCH = "Voriger Treffer";
|
||||
exports.CMD_QUICK_EDIT_NEXT_MATCH = "Nächster Treffer";
|
||||
exports.CMD_NEXT_DOC = "Nächstes Dokument";
|
||||
exports.CMD_PREV_DOC = "Voriges Dokument";
|
||||
|
||||
// Debug menu commands
|
||||
exports.DEBUG_MENU = "Debug";
|
||||
exports.CMD_REFRESH_WINDOW = "Brackets neu laden";
|
||||
exports.CMD_SHOW_DEV_TOOLS = "Entwicklungswerkzeuge zeigen";
|
||||
exports.CMD_RUN_UNIT_TESTS = "Tests durchführen";
|
||||
exports.CMD_JSLINT = "JSLint aktivieren";
|
||||
exports.CMD_SHOW_PERF_DATA = "Performance Analyse";
|
||||
exports.CMD_NEW_BRACKETS_WINDOW = "Neues Brackets Fenster";
|
||||
exports.CMD_USE_TAB_CHARS = "Mit Tabs einrücken";
|
||||
exports.CMD_SWITCH_LANGUAGE = "Sprache wechseln";
|
||||
|
||||
// Help menu commands
|
||||
exports.CMD_ABOUT = "Über";
|
||||
|
||||
// Special commands invoked by the native shell
|
||||
exports.CMD_CLOSE_WINDOW = "Fenster schließen";
|
||||
|
||||
});
|
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
|
||||
/*global define */
|
||||
|
||||
define({
|
||||
// Project error strings
|
||||
"ERROR_LOADING_PROJECT" : "Fehler beim Laden des Projekts",
|
||||
"OPEN_DIALOG_ERROR" : "Fehler beim Erstellen des Öffnen Dialogs. (Fehler {0})",
|
||||
"REQUEST_NATIVE_FILE_SYSTEM_ERROR" : "Fehler beim Lesen des Verzeichnisses <span class='dialog-filename'>{0}</span>. (Fehler {1})",
|
||||
"READ_DIRECTORY_ENTRIES_ERROR" : "Fehler beim Lesen der Verzeichnisinhalte von <span class='dialog-filename'>{0}</span>. (Fehler {1})",
|
||||
|
||||
// File open/save error string
|
||||
"ERROR_OPENING_FILE_TITLE" : "Fehler beim Öffnen der Datei",
|
||||
"ERROR_OPENING_FILE" : "Beim Öffnen der Datei <span class='dialog-filename'>{0}</span> ist ein Fehler aufgetreten: {1}",
|
||||
"ERROR_RELOADING_FILE_TITLE" : "Fehler beim Laden der Änderungen",
|
||||
"ERROR_RELOADING_FILE" : "Beim Laden der Änderungen der Datei <span class='dialog-filename'>{0}</span> ist ein Fehler aufgetreten: {1}",
|
||||
"ERROR_SAVING_FILE_TITLE" : "Fehler beim Speichern der Datei",
|
||||
"ERROR_SAVING_FILE" : "Beim Speichern der Datei <span class='dialog-filename'>{0}</span> ist ein Fehler aufgetreten: {1}",
|
||||
"INVALID_FILENAME_TITLE" : "Ungültiger Dateiname",
|
||||
"INVALID_FILENAME_MESSAGE" : "Dateinamen dürfen folgenden Zeichen nicht enthalten: /?*:;{}<>\\|",
|
||||
"FILE_ALREADY_EXISTS" : "Die Datei <span class='dialog-filename'>{0}</span> existiert bereits.",
|
||||
"ERROR_CREATING_FILE_TITLE" : "Fehler beim Erstellen der Datei",
|
||||
"ERROR_CREATING_FILE" : "Beim Erstellen der Datei <span class='dialog-filename'>{0}</span> ist ein Fehler aufgetreten: {1}",
|
||||
|
||||
// Application error strings
|
||||
"ERROR_BRACKETS_IN_BROWSER_TITLE" : "Ups! Brackets läuft derzeit leider nocht nicht im Browser.",
|
||||
"ERROR_BRACKETS_IN_BROWSER" : "Brackets wurde in HTML programmiert aber derzeite läuft es nur als Desktop Anwendung um damit lokale Dateien zu bearbeiten. Bitte benutzen Sie die Anwendung von <b>github.com/adobe/brackets-app</b>.",
|
||||
|
||||
// FileIndexManager error string
|
||||
"ERROR_MAX_FILES_TITLE" : "Fehler beim Indizieren der Dateien",
|
||||
"ERROR_MAX_FILES" : "Die maximal mögliche Anzahl inidizierbarer Datein wurde überschritten. Funktionen die auf dem Index beruhen werden möglicherweise nicht korrekt funktionieren.",
|
||||
|
||||
// CSSManager error strings
|
||||
"ERROR_PARSE_TITLE" : "Fehler beim interpretieren der CSS Datei(en):",
|
||||
|
||||
// Live Development error strings
|
||||
"ERROR_LAUNCHING_BROWSER_TITLE" : "Fehler beim Starten des Webbrowsers",
|
||||
"ERROR_CANT_FIND_CHROME" : "Google Chrome konnte nicht gefunden werden. Bitte laden Sie den Browser unter <b>google.de/chrome</b>.",
|
||||
"ERROR_LAUNCHING_BROWSER" : "Beim Starten des Webbrowsers ist ein Fehler aufgetreten: (Fehler {0})",
|
||||
|
||||
"LIVE_DEVELOPMENT_ERROR_TITLE" : "Fehler bei der Live Entwicklung",
|
||||
"LIVE_DEVELOPMENT_ERROR_MESSAGE" : "Beim Aufbauen einer Live Verbindung zu Chrome ist ein Fehler aufgetreten. "
|
||||
+ "Für die Live Entwicklung muss das Remote Debugger Protokoll von Chrome aktiviert sein."
|
||||
+ "<br /><br />Soll Chrome neu gestartet werden um das Remote Debugger Protokoll zu aktivieren?",
|
||||
"LIVE_DEV_NEED_HTML_MESSAGE" : "Öffnen Sie erst eine HTML Datei und aktivieren Sie dann die Live Verbindung.",
|
||||
|
||||
"LIVE_DEV_STATUS_TIP_NOT_CONNECTED" : "Live Entwicklung",
|
||||
"LIVE_DEV_STATUS_TIP_PROGRESS1" : "Live Entwicklung: Verbinden...",
|
||||
"LIVE_DEV_STATUS_TIP_PROGRESS2" : "Live Entwicklung: Initialisieren...",
|
||||
"LIVE_DEV_STATUS_TIP_CONNECTED" : "Trennen der Live Verbindung",
|
||||
|
||||
"SAVE_CLOSE_TITLE" : "Ungespeicherte Änderungen",
|
||||
"SAVE_CLOSE_MESSAGE" : "Wollen Sie die Änderungen in dem Dokument <span class='dialog-filename'>{0}</span> speichern?",
|
||||
"SAVE_CLOSE_MULTI_MESSAGE" : "Wollen Sie die Änderungen in den folgenden Dateien speichern?",
|
||||
"EXT_MODIFIED_TITLE" : "Externe Änderungen",
|
||||
"EXT_MODIFIED_MESSAGE" : "<span class='dialog-filename'>{0}</span> wurde extern geändert und hat ungespeicherte Änderungen in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Welche Version wollen Sie erhalten?",
|
||||
"EXT_DELETED_MESSAGE" : "<span class='dialog-filename'>{0}</span> wurde extern gelöscht und hat ungespeicherte Änderungen in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Wollen Sie die Änderungen erhalten?",
|
||||
|
||||
"OPEN_FILE" : "Datei Öffnen",
|
||||
|
||||
// Switch language
|
||||
"LANGUAGE_TITLE" : "Sprache Wechseln",
|
||||
"LANGUAGE_MESSAGE" : "Bitte wählen Sie die gewünschte Sprache aus der folgenden Liste aus:",
|
||||
"LANGUAGE_SUBMIT" : "Brackets neu starten",
|
||||
"LANGUAGE_CANCEL" : "Abbrechen",
|
||||
|
||||
|
||||
/**
|
||||
* Command Name Constants
|
||||
*/
|
||||
|
||||
// File menu commands
|
||||
"FILE_MENU" : "Datei",
|
||||
"CMD_FILE_NEW" : "Neu",
|
||||
"CMD_FILE_OPEN" : "Öffnen\u2026",
|
||||
"CMD_ADD_TO_WORKING_SET" : "Zum Projekt hinzufügen",
|
||||
"CMD_OPEN_FOLDER" : "Ordner öffnen\u2026",
|
||||
"CMD_FILE_CLOSE" : "Schließen",
|
||||
"CMD_FILE_CLOSE_ALL" : "Alles schlieen",
|
||||
"CMD_FILE_SAVE" : "Speichern",
|
||||
"CMD_LIVE_FILE_PREVIEW" : "Live Entwicklung",
|
||||
"CMD_QUIT" : "Beenden",
|
||||
|
||||
// Edit menu commands
|
||||
"EDIT_MENU" : "Bearbeiten",
|
||||
"CMD_SELECT_ALL" : "Alles auswählen",
|
||||
"CMD_FIND" : "Suchen",
|
||||
"CMD_FIND_IN_FILES" : "Im Projekt suchen",
|
||||
"CMD_FIND_NEXT" : "Weitersuchen (vorwärts)",
|
||||
"CMD_FIND_PREVIOUS" : "Weitersuchen (rückwärts)",
|
||||
"CMD_REPLACE" : "Ersetzen",
|
||||
"CMD_INDENT" : "Einrücken",
|
||||
"CMD_UNINDENT" : "Ausrücken",
|
||||
"CMD_DUPLICATE" : "Duplizieren",
|
||||
"CMD_COMMENT" : "Zeilen (aus-)kommentieren",
|
||||
"CMD_LINE_UP" : "Zeilen nach oben verschieben",
|
||||
"CMD_LINE_DOWN" : "Zeilen nach unten verschieben",
|
||||
|
||||
// View menu commands
|
||||
"VIEW_MENU" : "Ansicht",
|
||||
"CMD_HIDE_SIDEBAR" : "Seitenleiste verbergen",
|
||||
"CMD_SHOW_SIDEBAR" : "Seitenleiste zeigen",
|
||||
"CMD_INCREASE_FONT_SIZE" : "Schriftart vergrößern",
|
||||
"CMD_DECREASE_FONT_SIZE" : "Schriftart verkleinern",
|
||||
"CMD_RESTORE_FONT_SIZE" : "Schriftart zurücksetzen",
|
||||
|
||||
// Navigate menu Commands
|
||||
"NAVIGATE_MENU" : "Navigation",
|
||||
"CMD_QUICK_OPEN" : "Schnell Öffnen",
|
||||
"CMD_GOTO_LINE" : "Gehe zu Zeile",
|
||||
"CMD_GOTO_DEFINITION" : "Gehe zu Definition",
|
||||
"CMD_TOGGLE_QUICK_EDIT" : "Schnell Bearbeiten",
|
||||
"CMD_QUICK_EDIT_PREV_MATCH" : "Voriger Treffer",
|
||||
"CMD_QUICK_EDIT_NEXT_MATCH" : "Nächster Treffer",
|
||||
"CMD_NEXT_DOC" : "Nächstes Dokument",
|
||||
"CMD_PREV_DOC" : "Voriges Dokument",
|
||||
|
||||
// Debug menu commands
|
||||
"DEBUG_MENU" : "Debug",
|
||||
"CMD_REFRESH_WINDOW" : "Brackets neu laden",
|
||||
"CMD_SHOW_DEV_TOOLS" : "Entwicklungswerkzeuge zeigen",
|
||||
"CMD_RUN_UNIT_TESTS" : "Tests durchführen",
|
||||
"CMD_JSLINT" : "JSLint aktivieren",
|
||||
"CMD_SHOW_PERF_DATA" : "Performance Analyse",
|
||||
"CMD_NEW_BRACKETS_WINDOW" : "Neues Brackets Fenster",
|
||||
"CMD_USE_TAB_CHARS" : "Mit Tabs einrücken",
|
||||
"CMD_SWITCH_LANGUAGE" : "Sprache wechseln",
|
||||
|
||||
// Help menu commands
|
||||
"CMD_ABOUT" : "Über",
|
||||
|
||||
// Special commands invoked by the native shell
|
||||
"CMD_CLOSE_WINDOW" : "Fenster schließen"
|
||||
|
||||
});
|
|
@ -0,0 +1,206 @@
|
|||
/*
|
||||
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
|
||||
/*global define */
|
||||
|
||||
define({
|
||||
/**
|
||||
* Errors
|
||||
*/
|
||||
|
||||
// General file io error strings
|
||||
"GENERIC_ERROR" : "(error {0})",
|
||||
"NOT_FOUND_ERR" : "The file could not be found.",
|
||||
"NOT_READABLE_ERR" : "The file could not be read.",
|
||||
"NO_MODIFICATION_ALLOWED_ERR" : "The target directory cannot be modified.",
|
||||
"NO_MODIFICATION_ALLOWED_ERR_FILE" : "The permissions do not allow you to make modifications.",
|
||||
|
||||
// Project error strings
|
||||
"ERROR_LOADING_PROJECT" : "Error loading project",
|
||||
"OPEN_DIALOG_ERROR" : "An error occurred when showing the open file dialog. (error {0})",
|
||||
"REQUEST_NATIVE_FILE_SYSTEM_ERROR" : "An error occurred when trying to load the directory <span class='dialog-filename'>{0}</span>. (error {1})",
|
||||
"READ_DIRECTORY_ENTRIES_ERROR" : "An error occurred when reading the contents of the directory <span class='dialog-filename'>{0}</span>. (error {1})",
|
||||
|
||||
// File open/save error string
|
||||
"ERROR_OPENING_FILE_TITLE" : "Error opening file",
|
||||
"ERROR_OPENING_FILE" : "An error occurred when trying to open the file <span class='dialog-filename'>{0}</span>. {1}",
|
||||
"ERROR_RELOADING_FILE_TITLE" : "Error reloading changes from disk",
|
||||
"ERROR_RELOADING_FILE" : "An error occurred when trying to reload the file <span class='dialog-filename'>{0}</span>. {1}",
|
||||
"ERROR_SAVING_FILE_TITLE" : "Error saving file",
|
||||
"ERROR_SAVING_FILE" : "An error occurred when trying to save the file <span class='dialog-filename'>{0}</span>. {1}",
|
||||
"INVALID_FILENAME_TITLE" : "Invalid file name",
|
||||
"INVALID_FILENAME_MESSAGE" : "Filenames cannot contain the following characters: /?*:;{}<>\\|",
|
||||
"FILE_ALREADY_EXISTS" : "The file <span class='dialog-filename'>{0}</span> already exists.",
|
||||
"ERROR_CREATING_FILE_TITLE" : "Error creating file",
|
||||
"ERROR_CREATING_FILE" : "An error occurred when trying to create the file <span class='dialog-filename'>{0}</span>. {1}",
|
||||
|
||||
// Application error strings
|
||||
"ERROR_BRACKETS_IN_BROWSER_TITLE" : "Oops! Brackets doesn't run in browsers yet.",
|
||||
"ERROR_BRACKETS_IN_BROWSER" : "Brackets is built in HTML, but right now it runs as a desktop app so you can use it to edit local files. Please use the application shell in the <b>github.com/adobe/brackets-app</b> repo to run Brackets.",
|
||||
|
||||
// FileIndexManager error string
|
||||
"ERROR_MAX_FILES_TITLE" : "Error Indexing Files",
|
||||
"ERROR_MAX_FILES" : "The maximum number of files have been indexed. Actions that look up files in the index may function incorrectly.",
|
||||
|
||||
// CSSManager error strings
|
||||
"ERROR_PARSE_TITLE" : "Error parsing CSS file(s):",
|
||||
|
||||
// Live Development error strings
|
||||
"ERROR_LAUNCHING_BROWSER_TITLE" : "Error launching browser",
|
||||
"ERROR_CANT_FIND_CHROME" : "The Google Chrome browser could not be found. Please make sure it is installed.",
|
||||
"ERROR_LAUNCHING_BROWSER" : "An error occurred when launching the browser. (error {0})",
|
||||
|
||||
"LIVE_DEVELOPMENT_ERROR_TITLE" : "Live Development Error",
|
||||
"LIVE_DEVELOPMENT_ERROR_MESSAGE" : "A live development connection to Chrome could not be established. "
|
||||
+ "For live development to work, Chrome needs to be started with remote debugging enabled."
|
||||
+ "<br /><br />Would you like to relaunch Chrome and enable remote debugging?",
|
||||
"LIVE_DEV_NEED_HTML_MESSAGE" : "Open an HTML file in order to launch live preview.",
|
||||
|
||||
"LIVE_DEV_STATUS_TIP_NOT_CONNECTED" : "Live File Preview",
|
||||
"LIVE_DEV_STATUS_TIP_PROGRESS1" : "Live File Preview: Connecting...",
|
||||
"LIVE_DEV_STATUS_TIP_PROGRESS2" : "Live File Preview: Initializing...",
|
||||
"LIVE_DEV_STATUS_TIP_CONNECTED" : "Disconnect Live File Preview",
|
||||
|
||||
"SAVE_CLOSE_TITLE" : "Save Changes",
|
||||
"SAVE_CLOSE_MESSAGE" : "Do you want to save the changes you made in the document <span class='dialog-filename'>{0}</span>?",
|
||||
"SAVE_CLOSE_MULTI_MESSAGE" : "Do you want to save your changes to the following files?",
|
||||
"EXT_MODIFIED_TITLE" : "External Changes",
|
||||
"EXT_MODIFIED_MESSAGE" : "<span class='dialog-filename'>{0}</span> has been modified on disk, but also has unsaved changes in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Which version do you want to keep?",
|
||||
"EXT_DELETED_MESSAGE" : "<span class='dialog-filename'>{0}</span> has been deleted on disk, but has unsaved changes in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Do you want to keep your changes?",
|
||||
|
||||
// Find, Replace, Find in Files
|
||||
"SEARCH_REGEXP_INFO" : "Use /re/ syntax for regexp search",
|
||||
"WITH" : "With",
|
||||
"BUTTON_YES" : "Yes",
|
||||
"BUTTON_NO" : "No",
|
||||
"BUTTON_STOP" : "Stop",
|
||||
|
||||
"OPEN_FILE" : "Open File",
|
||||
|
||||
// Switch language
|
||||
"LANGUAGE_TITLE" : "Switch Language",
|
||||
"LANGUAGE_MESSAGE" : "Please select the desired language from the list below:",
|
||||
"LANGUAGE_SUBMIT" : "Reload Brackets",
|
||||
"LANGUAGE_CANCEL" : "Cancel",
|
||||
|
||||
/**
|
||||
* ProjectManager
|
||||
*/
|
||||
|
||||
"UNTITLED" : "Untitled",
|
||||
|
||||
/**
|
||||
* Command Name Constants
|
||||
*/
|
||||
|
||||
// File menu commands
|
||||
"FILE_MENU" : "File",
|
||||
"CMD_FILE_NEW" : "New",
|
||||
"CMD_FILE_OPEN" : "Open\u2026",
|
||||
"CMD_ADD_TO_WORKING_SET" : "Add To Working Set",
|
||||
"CMD_OPEN_FOLDER" : "Open Folder\u2026",
|
||||
"CMD_FILE_CLOSE" : "Close",
|
||||
"CMD_FILE_CLOSE_ALL" : "Close All",
|
||||
"CMD_FILE_SAVE" : "Save",
|
||||
"CMD_FILE_SAVE_ALL" : "Save All",
|
||||
"CMD_LIVE_FILE_PREVIEW" : "Live File Preview",
|
||||
"CMD_QUIT" : "Quit",
|
||||
|
||||
// Edit menu commands
|
||||
"EDIT_MENU" : "Edit",
|
||||
"CMD_SELECT_ALL" : "Select All",
|
||||
"CMD_FIND" : "Find",
|
||||
"CMD_FIND_IN_FILES" : "Find in Files",
|
||||
"CMD_FIND_NEXT" : "Find Next",
|
||||
"CMD_FIND_PREVIOUS" : "Find Previous",
|
||||
"CMD_REPLACE" : "Replace",
|
||||
"CMD_INDENT" : "Indent",
|
||||
"CMD_UNINDENT" : "Unindent",
|
||||
"CMD_DUPLICATE" : "Duplicate",
|
||||
"CMD_COMMENT" : "Comment/Uncomment Lines",
|
||||
"CMD_LINE_UP" : "Move Line(s) Up",
|
||||
"CMD_LINE_DOWN" : "Move Line(s) Down",
|
||||
|
||||
// View menu commands
|
||||
"VIEW_MENU" : "View",
|
||||
"CMD_HIDE_SIDEBAR" : "Hide Sidebar",
|
||||
"CMD_SHOW_SIDEBAR" : "Show Sidebar",
|
||||
"CMD_INCREASE_FONT_SIZE" : "Increase Font Size",
|
||||
"CMD_DECREASE_FONT_SIZE" : "Decrease Font Size",
|
||||
"CMD_RESTORE_FONT_SIZE" : "Restore Font Size",
|
||||
|
||||
// Navigate menu Commands
|
||||
"NAVIGATE_MENU" : "Navigate",
|
||||
"CMD_QUICK_OPEN" : "Quick Open",
|
||||
"CMD_GOTO_LINE" : "Go to Line",
|
||||
"CMD_GOTO_DEFINITION" : "Go to Definition",
|
||||
"CMD_TOGGLE_QUICK_EDIT" : "Quick Edit",
|
||||
"CMD_QUICK_EDIT_PREV_MATCH" : "Previous Match",
|
||||
"CMD_QUICK_EDIT_NEXT_MATCH" : "Next Match",
|
||||
"CMD_NEXT_DOC" : "Next Document",
|
||||
"CMD_PREV_DOC" : "Previous Document",
|
||||
|
||||
// Debug menu commands
|
||||
"DEBUG_MENU" : "Debug",
|
||||
"CMD_REFRESH_WINDOW" : "Reload Brackets",
|
||||
"CMD_SHOW_DEV_TOOLS" : "Show Developer Tools",
|
||||
"CMD_RUN_UNIT_TESTS" : "Run Tests",
|
||||
"CMD_JSLINT" : "Enable JSLint",
|
||||
"CMD_SHOW_PERF_DATA" : "Show Performance Data",
|
||||
"CMD_NEW_BRACKETS_WINDOW" : "New Brackets Window",
|
||||
"CMD_USE_TAB_CHARS" : "Use Tab Characters",
|
||||
"CMD_SWITCH_LANGUAGE" : "Switch Language",
|
||||
|
||||
// Help menu commands
|
||||
"CMD_ABOUT" : "About",
|
||||
|
||||
// Special commands invoked by the native shell
|
||||
"CMD_CLOSE_WINDOW" : "Close Window",
|
||||
"CMD_ABORT_QUIT" : "Abort Quit",
|
||||
|
||||
// Strings for main-view.html
|
||||
"EXPERIMENTAL_BUILD" : "Experimental Build",
|
||||
"JSLINT_ERRORS" : "JSLint Errors",
|
||||
"SEARCH_RESULTS" : "Search Results",
|
||||
"OK" : "OK",
|
||||
"DONT_SAVE" : "Don't Save",
|
||||
"SAVE" : "Save",
|
||||
"CANCEL" : "Cancel",
|
||||
"RELOAD_FROM_DISK" : "Reload from Disk",
|
||||
"KEEP_CHANGES_IN_EDITOR" : "Keep Changes in Editor",
|
||||
"CLOSE_DONT_SAVE" : "Close (Don't Save)",
|
||||
"RELAUNCH_CHROME" : "Relaunch Chrome",
|
||||
"ABOUT" : "About",
|
||||
"BRACKETS" : "Brackets",
|
||||
"CLOSE" : "Close",
|
||||
"ABOUT_TEXT_LINE1" : "sprint 13 experimental build ",
|
||||
"ABOUT_TEXT_LINE2" : "Copyright 2012 Adobe Systems Incorporated and its licensors. All rights reserved.",
|
||||
"ABOUT_TEXT_LINE3" : "Notices; terms and conditions pertaining to third party software are located at ",
|
||||
"ABOUT_TEXT_LINE4" : " and incorporated by reference herein.",
|
||||
"ABOUT_TEXT_LINE5" : "Documentation and source at "
|
||||
});
|
|
@ -0,0 +1,215 @@
|
|||
/*
|
||||
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
|
||||
/*global define */
|
||||
|
||||
define({
|
||||
/**
|
||||
* Errors
|
||||
*/
|
||||
|
||||
// General file io error strings
|
||||
"GENERIC_ERROR" : "(error {0})",
|
||||
"NOT_FOUND_ERR" : "The file could not be found.",
|
||||
"NOT_READABLE_ERR" : "The file could not be read.",
|
||||
"NO_MODIFICATION_ALLOWED_ERR" : "The target directory cannot be modified.",
|
||||
"NO_MODIFICATION_ALLOWED_ERR_FILE" : "The permissions do not allow you to make modifications.",
|
||||
|
||||
// Project error strings
|
||||
"ERROR_LOADING_PROJECT" : "Error loading project",
|
||||
"OPEN_DIALOG_ERROR" : "An error occurred when showing the open file dialog. (error {0})",
|
||||
"REQUEST_NATIVE_FILE_SYSTEM_ERROR" : "An error occurred when trying to load the directory <span class='dialog-filename'>{0}</span>. (error {1})",
|
||||
"READ_DIRECTORY_ENTRIES_ERROR" : "An error occurred when reading the contents of the directory <span class='dialog-filename'>{0}</span>. (error {1})",
|
||||
|
||||
// File open/save error string
|
||||
"ERROR_OPENING_FILE_TITLE" : "Error opening file",
|
||||
"ERROR_OPENING_FILE" : "An error occurred when trying to open the file <span class='dialog-filename'>{0}</span>. {1}",
|
||||
"ERROR_RELOADING_FILE_TITLE" : "Error reloading changes from disk",
|
||||
"ERROR_RELOADING_FILE" : "An error occurred when trying to reload the file <span class='dialog-filename'>{0}</span>. {1}",
|
||||
"ERROR_SAVING_FILE_TITLE" : "Error saving file",
|
||||
"ERROR_SAVING_FILE" : "An error occurred when trying to save the file <span class='dialog-filename'>{0}</span>. {1}",
|
||||
"INVALID_FILENAME_TITLE" : "Invalid file name",
|
||||
"INVALID_FILENAME_MESSAGE" : "Filenames cannot contain the following characters: /?*:;{}<>\\|",
|
||||
"FILE_ALREADY_EXISTS" : "The file <span class='dialog-filename'>{0}</span> already exists.",
|
||||
"ERROR_CREATING_FILE_TITLE" : "Error creating file",
|
||||
"ERROR_CREATING_FILE" : "An error occurred when trying to create the file <span class='dialog-filename'>{0}</span>. {1}",
|
||||
|
||||
// Application error strings
|
||||
"ERROR_BRACKETS_IN_BROWSER_TITLE" : "Oops! Brackets doesn't run in browsers yet.",
|
||||
"ERROR_BRACKETS_IN_BROWSER" : "Brackets is built in HTML, but right now it runs as a desktop app so you can use it to edit local files. Please use the application shell in the <b>github.com/adobe/brackets-app</b> repo to run Brackets.",
|
||||
|
||||
// FileIndexManager error string
|
||||
"ERROR_MAX_FILES_TITLE" : "Error Indexing Files",
|
||||
"ERROR_MAX_FILES" : "The maximum number of files have been indexed. Actions that look up files in the index may function incorrectly.",
|
||||
|
||||
// CSSManager error strings
|
||||
"ERROR_PARSE_TITLE" : "Error parsing CSS file(s):",
|
||||
|
||||
// Live Development error strings
|
||||
"ERROR_LAUNCHING_BROWSER_TITLE" : "Error launching browser",
|
||||
"ERROR_CANT_FIND_CHROME" : "The Google Chrome browser could not be found. Please make sure it is installed.",
|
||||
"ERROR_LAUNCHING_BROWSER" : "An error occurred when launching the browser. (error {0})",
|
||||
|
||||
"LIVE_DEVELOPMENT_ERROR_TITLE" : "Live Development Error",
|
||||
"LIVE_DEVELOPMENT_ERROR_MESSAGE" : "A live development connection to Chrome could not be established. "
|
||||
+ "For live development to work, Chrome needs to be started with remote debugging enabled."
|
||||
+ "<br /><br />Would you like to relaunch Chrome and enable remote debugging?",
|
||||
"LIVE_DEV_NEED_HTML_MESSAGE" : "Open an HTML file in order to launch live preview.",
|
||||
|
||||
"LIVE_DEV_STATUS_TIP_NOT_CONNECTED" : "Live File Preview",
|
||||
"LIVE_DEV_STATUS_TIP_PROGRESS1" : "Live File Preview: Connecting...",
|
||||
"LIVE_DEV_STATUS_TIP_PROGRESS2" : "Live File Preview: Initializing...",
|
||||
"LIVE_DEV_STATUS_TIP_CONNECTED" : "Disconnect Live File Preview",
|
||||
|
||||
"SAVE_CLOSE_TITLE" : "Save Changes",
|
||||
"SAVE_CLOSE_MESSAGE" : "Do you want to save the changes you made in the document <span class='dialog-filename'>{0}</span>?",
|
||||
"SAVE_CLOSE_MULTI_MESSAGE" : "Do you want to save your changes to the following files?",
|
||||
"EXT_MODIFIED_TITLE" : "External Changes",
|
||||
"EXT_MODIFIED_MESSAGE" : "<span class='dialog-filename'>{0}</span> has been modified on disk, but also has unsaved changes in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Which version do you want to keep?",
|
||||
"EXT_DELETED_MESSAGE" : "<span class='dialog-filename'>{0}</span> has been deleted on disk, but has unsaved changes in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Do you want to keep your changes?",
|
||||
|
||||
// Find, Replace, Find in Files
|
||||
"SEARCH_REGEXP_INFO" : "Use /re/ syntax for regexp search",
|
||||
"WITH" : "With",
|
||||
"BUTTON_YES" : "Yes",
|
||||
"BUTTON_NO" : "No",
|
||||
"BUTTON_STOP" : "Stop",
|
||||
|
||||
"OPEN_FILE" : "Open File",
|
||||
|
||||
"RELEASE_NOTES" : "Release Notes",
|
||||
"NO_UPDATE_TITLE" : "You're up to date!",
|
||||
"NO_UPDATE_MESSAGE" : "You are running the latest version of Brackets.",
|
||||
|
||||
// Switch language
|
||||
"LANGUAGE_TITLE" : "Switch Language",
|
||||
"LANGUAGE_MESSAGE" : "Please select the desired language from the list below:",
|
||||
"LANGUAGE_SUBMIT" : "Reload Brackets",
|
||||
"LANGUAGE_CANCEL" : "Cancel",
|
||||
|
||||
/**
|
||||
* ProjectManager
|
||||
*/
|
||||
|
||||
"UNTITLED" : "Untitled",
|
||||
|
||||
/**
|
||||
* Command Name Constants
|
||||
*/
|
||||
|
||||
// File menu commands
|
||||
"FILE_MENU" : "File",
|
||||
"CMD_FILE_NEW" : "New",
|
||||
"CMD_FILE_OPEN" : "Open\u2026",
|
||||
"CMD_ADD_TO_WORKING_SET" : "Add To Working Set",
|
||||
"CMD_OPEN_FOLDER" : "Open Folder\u2026",
|
||||
"CMD_FILE_CLOSE" : "Close",
|
||||
"CMD_FILE_CLOSE_ALL" : "Close All",
|
||||
"CMD_FILE_SAVE" : "Save",
|
||||
"CMD_FILE_SAVE_ALL" : "Save All",
|
||||
"CMD_LIVE_FILE_PREVIEW" : "Live File Preview",
|
||||
"CMD_QUIT" : "Quit",
|
||||
|
||||
// Edit menu commands
|
||||
"EDIT_MENU" : "Edit",
|
||||
"CMD_SELECT_ALL" : "Select All",
|
||||
"CMD_FIND" : "Find",
|
||||
"CMD_FIND_IN_FILES" : "Find in Files",
|
||||
"CMD_FIND_NEXT" : "Find Next",
|
||||
"CMD_FIND_PREVIOUS" : "Find Previous",
|
||||
"CMD_REPLACE" : "Replace",
|
||||
"CMD_INDENT" : "Indent",
|
||||
"CMD_UNINDENT" : "Unindent",
|
||||
"CMD_DUPLICATE" : "Duplicate",
|
||||
"CMD_COMMENT" : "Comment/Uncomment Lines",
|
||||
"CMD_LINE_UP" : "Move Line(s) Up",
|
||||
"CMD_LINE_DOWN" : "Move Line(s) Down",
|
||||
|
||||
// View menu commands
|
||||
"VIEW_MENU" : "View",
|
||||
"CMD_HIDE_SIDEBAR" : "Hide Sidebar",
|
||||
"CMD_SHOW_SIDEBAR" : "Show Sidebar",
|
||||
"CMD_INCREASE_FONT_SIZE" : "Increase Font Size",
|
||||
"CMD_DECREASE_FONT_SIZE" : "Decrease Font Size",
|
||||
"CMD_RESTORE_FONT_SIZE" : "Restore Font Size",
|
||||
|
||||
// Navigate menu Commands
|
||||
"NAVIGATE_MENU" : "Navigate",
|
||||
"CMD_QUICK_OPEN" : "Quick Open",
|
||||
"CMD_GOTO_LINE" : "Go to Line",
|
||||
"CMD_GOTO_DEFINITION" : "Go to Definition",
|
||||
"CMD_TOGGLE_QUICK_EDIT" : "Quick Edit",
|
||||
"CMD_QUICK_EDIT_PREV_MATCH" : "Previous Match",
|
||||
"CMD_QUICK_EDIT_NEXT_MATCH" : "Next Match",
|
||||
"CMD_NEXT_DOC" : "Next Document",
|
||||
"CMD_PREV_DOC" : "Previous Document",
|
||||
|
||||
// Debug menu commands
|
||||
"DEBUG_MENU" : "Debug",
|
||||
"CMD_REFRESH_WINDOW" : "Reload Brackets",
|
||||
"CMD_SHOW_DEV_TOOLS" : "Show Developer Tools",
|
||||
"CMD_RUN_UNIT_TESTS" : "Run Tests",
|
||||
"CMD_JSLINT" : "Enable JSLint",
|
||||
"CMD_SHOW_PERF_DATA" : "Show Performance Data",
|
||||
"CMD_NEW_BRACKETS_WINDOW" : "New Brackets Window",
|
||||
"CMD_USE_TAB_CHARS" : "Use Tab Characters",
|
||||
"CMD_SWITCH_LANGUAGE" : "Switch Language",
|
||||
"CMD_CHECK_FOR_UPDATE" : "Check for Updates",
|
||||
|
||||
// Help menu commands
|
||||
"CMD_ABOUT" : "About",
|
||||
|
||||
// Special commands invoked by the native shell
|
||||
"CMD_CLOSE_WINDOW" : "Close Window",
|
||||
"CMD_ABORT_QUIT" : "Abort Quit",
|
||||
|
||||
// Strings for main-view.html
|
||||
"EXPERIMENTAL_BUILD" : "Experimental Build",
|
||||
"JSLINT_ERRORS" : "JSLint Errors",
|
||||
"SEARCH_RESULTS" : "Search Results",
|
||||
"OK" : "OK",
|
||||
"DONT_SAVE" : "Don't Save",
|
||||
"SAVE" : "Save",
|
||||
"CANCEL" : "Cancel",
|
||||
"RELOAD_FROM_DISK" : "Reload from Disk",
|
||||
"KEEP_CHANGES_IN_EDITOR" : "Keep Changes in Editor",
|
||||
"CLOSE_DONT_SAVE" : "Close (Don't Save)",
|
||||
"RELAUNCH_CHROME" : "Relaunch Chrome",
|
||||
"ABOUT" : "About",
|
||||
"BRACKETS" : "Brackets",
|
||||
"CLOSE" : "Close",
|
||||
"ABOUT_TEXT_LINE1" : "sprint 13 experimental build ",
|
||||
"ABOUT_TEXT_LINE2" : "Copyright 2012 Adobe Systems Incorporated and its licensors. All rights reserved.",
|
||||
"ABOUT_TEXT_LINE3" : "Notices; terms and conditions pertaining to third party software are located at ",
|
||||
"ABOUT_TEXT_LINE4" : " and incorporated by reference herein.",
|
||||
"ABOUT_TEXT_LINE5" : "Documentation and source at ",
|
||||
"UPDATE_NOTIFICATION_TOOLTIP" : "There's a new build of Brackets available! Click here for details.",
|
||||
"UPDATE_AVAILABLE_TITLE" : "Update Available",
|
||||
"UPDATE_MESSAGE" : "Hey, there's a new build of Brackets available. Here are some of the new features:",
|
||||
"GET_IT_NOW" : "Get it now!"
|
||||
});
|
|
@ -28,196 +28,16 @@ define(function (require, exports, module) {
|
|||
|
||||
'use strict';
|
||||
|
||||
// This file contains all the user visible strings in English.
|
||||
// Code that needs to display user strings should call require("strings") to load
|
||||
// src/strings.js. This file will dynically load strings.js for the specified by bracketes.locale.
|
||||
//
|
||||
// Translations for other locals should be placed in src/nls/localName/strings.js
|
||||
// Localization is provided via the i18n plugin and this file is considered the "master bundle" or root.
|
||||
// Translations for other locales should be placed in src/nls/<locale<optional country code>>/strings.js
|
||||
// Localization is provided via the i18n plugin.
|
||||
// All other bundles for languages need to add a prefix to the exports below so i18n can find them.
|
||||
// TODO: dynamically populate the local prefix list below
|
||||
// TODO: dynamically populate the local prefix list below?
|
||||
module.exports = {
|
||||
root: exports,
|
||||
"de-DE": true
|
||||
root: true,
|
||||
"de": true,
|
||||
"fr": true
|
||||
};
|
||||
|
||||
// General file io error strings
|
||||
exports.GENERIC_ERROR = "(error {0})";
|
||||
exports.NOT_FOUND_ERR = "The file could not be found.";
|
||||
exports.NOT_READABLE_ERR = "The file could not be read.";
|
||||
exports.NO_MODIFICATION_ALLOWED_ERR = "The target directory cannot be modified.";
|
||||
exports.NO_MODIFICATION_ALLOWED_ERR_FILE = "The permissions do not allow you to make modifications.";
|
||||
|
||||
// Project error strings
|
||||
exports.ERROR_LOADING_PROJECT = "Error loading project";
|
||||
exports.OPEN_DIALOG_ERROR = "An error occurred when showing the open file dialog. (error {0})";
|
||||
exports.REQUEST_NATIVE_FILE_SYSTEM_ERROR = "An error occurred when trying to load the directory <span class='dialog-filename'>{0}</span>. (error {1})";
|
||||
exports.READ_DIRECTORY_ENTRIES_ERROR = "An error occurred when reading the contents of the directory <span class='dialog-filename'>{0}</span>. (error {1})";
|
||||
|
||||
// File open/save error string
|
||||
exports.ERROR_OPENING_FILE_TITLE = "Error opening file";
|
||||
exports.ERROR_OPENING_FILE = "An error occurred when trying to open the file <span class='dialog-filename'>{0}</span>. {1}";
|
||||
exports.ERROR_RELOADING_FILE_TITLE = "Error reloading changes from disk";
|
||||
exports.ERROR_RELOADING_FILE = "An error occurred when trying to reload the file <span class='dialog-filename'>{0}</span>. {1}";
|
||||
exports.ERROR_SAVING_FILE_TITLE = "Error saving file";
|
||||
exports.ERROR_SAVING_FILE = "An error occurred when trying to save the file <span class='dialog-filename'>{0}</span>. {1}";
|
||||
exports.INVALID_FILENAME_TITLE = "Invalid file name";
|
||||
exports.INVALID_FILENAME_MESSAGE = "Filenames cannot contain the following characters: /?*:;{}<>\\|";
|
||||
exports.FILE_ALREADY_EXISTS = "The file <span class='dialog-filename'>{0}</span> already exists.";
|
||||
exports.ERROR_CREATING_FILE_TITLE = "Error creating file";
|
||||
exports.ERROR_CREATING_FILE = "An error occurred when trying to create the file <span class='dialog-filename'>{0}</span>. {1}";
|
||||
|
||||
// Application error strings
|
||||
exports.ERROR_BRACKETS_IN_BROWSER_TITLE = "Oops! Brackets doesn't run in browsers yet.";
|
||||
exports.ERROR_BRACKETS_IN_BROWSER = "Brackets is built in HTML, but right now it runs as a desktop app so you can use it to edit local files. Please use the application shell in the <b>github.com/adobe/brackets-app</b> repo to run Brackets.";
|
||||
|
||||
// FileIndexManager error string
|
||||
exports.ERROR_MAX_FILES_TITLE = "Error Indexing Files";
|
||||
exports.ERROR_MAX_FILES = "The maximum number of files have been indexed. Actions that look up files in the index may function incorrectly.";
|
||||
|
||||
// CSSManager error strings
|
||||
exports.ERROR_PARSE_TITLE = "Error parsing CSS file(s):";
|
||||
|
||||
// Live Development error strings
|
||||
exports.ERROR_LAUNCHING_BROWSER_TITLE = "Error launching browser";
|
||||
exports.ERROR_CANT_FIND_CHROME = "The Google Chrome browser could not be found. Please make sure it is installed.";
|
||||
exports.ERROR_LAUNCHING_BROWSER = "An error occurred when launching the browser. (error {0})";
|
||||
|
||||
exports.LIVE_DEVELOPMENT_ERROR_TITLE = "Live Development Error";
|
||||
exports.LIVE_DEVELOPMENT_ERROR_MESSAGE = "A live development connection to Chrome could not be established. "
|
||||
+ "For live development to work, Chrome needs to be started with remote debugging enabled."
|
||||
+ "<br /><br />Would you like to relaunch Chrome and enable remote debugging?";
|
||||
exports.LIVE_DEV_NEED_HTML_MESSAGE = "Open an HTML file in order to launch live preview.";
|
||||
|
||||
exports.LIVE_DEV_STATUS_TIP_NOT_CONNECTED = "Live File Preview";
|
||||
exports.LIVE_DEV_STATUS_TIP_PROGRESS1 = "Live File Preview: Connecting...";
|
||||
exports.LIVE_DEV_STATUS_TIP_PROGRESS2 = "Live File Preview: Initializing...";
|
||||
exports.LIVE_DEV_STATUS_TIP_CONNECTED = "Disconnect Live File Preview";
|
||||
|
||||
exports.SAVE_CLOSE_TITLE = "Save Changes";
|
||||
exports.SAVE_CLOSE_MESSAGE = "Do you want to save the changes you made in the document <span class='dialog-filename'>{0}</span>?";
|
||||
exports.SAVE_CLOSE_MULTI_MESSAGE = "Do you want to save your changes to the following files?";
|
||||
exports.EXT_MODIFIED_TITLE = "External Changes";
|
||||
exports.EXT_MODIFIED_MESSAGE = "<span class='dialog-filename'>{0}</span> has been modified on disk, but also has unsaved changes in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Which version do you want to keep?";
|
||||
exports.EXT_DELETED_MESSAGE = "<span class='dialog-filename'>{0}</span> has been deleted on disk, but has unsaved changes in Brackets."
|
||||
+ "<br /><br />"
|
||||
+ "Do you want to keep your changes?";
|
||||
|
||||
// Find, Replace, Find in Files
|
||||
exports.SEARCH_REGEXP_INFO = "Use /re/ syntax for regexp search";
|
||||
exports.WITH = "With";
|
||||
exports.SEARCHING = "Searching";
|
||||
exports.BUTTON_YES = "Yes";
|
||||
exports.BUTTON_NO = "No";
|
||||
exports.BUTTON_STOP = "Stop";
|
||||
|
||||
exports.OPEN_FILE = "Open File";
|
||||
|
||||
exports.RELEASE_NOTES = "Release Notes";
|
||||
exports.NO_UPDATE_TITLE = "You're up to date!";
|
||||
exports.NO_UPDATE_MESSAGE = "You are running the latest version of Brackets.";
|
||||
|
||||
// Switch language
|
||||
exports.LANGUAGE_TITLE = "Switch Language";
|
||||
exports.LANGUAGE_MESSAGE = "Please select the desired language from the list below:";
|
||||
exports.LANGUAGE_SUBMIT = "Reload Brackets";
|
||||
exports.LANGUAGE_CANCEL = "Cancel";
|
||||
|
||||
/**
|
||||
* Command Name Constants
|
||||
*/
|
||||
|
||||
// File menu commands
|
||||
exports.FILE_MENU = "File";
|
||||
exports.CMD_FILE_NEW = "New";
|
||||
exports.CMD_FILE_OPEN = "Open\u2026";
|
||||
exports.CMD_ADD_TO_WORKING_SET = "Add To Working Set";
|
||||
exports.CMD_OPEN_FOLDER = "Open Folder\u2026";
|
||||
exports.CMD_FILE_CLOSE = "Close";
|
||||
exports.CMD_FILE_CLOSE_ALL = "Close All";
|
||||
exports.CMD_FILE_SAVE = "Save";
|
||||
exports.CMD_FILE_SAVE_ALL = "Save All";
|
||||
exports.CMD_LIVE_FILE_PREVIEW = "Live File Preview";
|
||||
exports.CMD_QUIT = "Quit";
|
||||
|
||||
// Edit menu commands
|
||||
exports.EDIT_MENU = "Edit";
|
||||
exports.CMD_SELECT_ALL = "Select All";
|
||||
exports.CMD_FIND = "Find";
|
||||
exports.CMD_FIND_IN_FILES = "Find in Files";
|
||||
exports.CMD_FIND_NEXT = "Find Next";
|
||||
exports.CMD_FIND_PREVIOUS = "Find Previous";
|
||||
exports.CMD_REPLACE = "Replace";
|
||||
exports.CMD_INDENT = "Indent";
|
||||
exports.CMD_UNINDENT = "Unindent";
|
||||
exports.CMD_DUPLICATE = "Duplicate";
|
||||
exports.CMD_COMMENT = "Comment/Uncomment Lines";
|
||||
exports.CMD_LINE_UP = "Move Line(s) Up";
|
||||
exports.CMD_LINE_DOWN = "Move Line(s) Down";
|
||||
|
||||
// View menu commands
|
||||
exports.VIEW_MENU = "View";
|
||||
exports.CMD_HIDE_SIDEBAR = "Hide Sidebar";
|
||||
exports.CMD_SHOW_SIDEBAR = "Show Sidebar";
|
||||
exports.CMD_INCREASE_FONT_SIZE = "Increase Font Size";
|
||||
exports.CMD_DECREASE_FONT_SIZE = "Decrease Font Size";
|
||||
exports.CMD_RESTORE_FONT_SIZE = "Restore Font Size";
|
||||
|
||||
// Navigate menu Commands
|
||||
exports.NAVIGATE_MENU = "Navigate";
|
||||
exports.CMD_QUICK_OPEN = "Quick Open";
|
||||
exports.CMD_GOTO_LINE = "Go to Line";
|
||||
exports.CMD_GOTO_DEFINITION = "Go to Definition";
|
||||
exports.CMD_TOGGLE_QUICK_EDIT = "Quick Edit";
|
||||
exports.CMD_QUICK_EDIT_PREV_MATCH = "Previous Match";
|
||||
exports.CMD_QUICK_EDIT_NEXT_MATCH = "Next Match";
|
||||
exports.CMD_NEXT_DOC = "Next Document";
|
||||
exports.CMD_PREV_DOC = "Previous Document";
|
||||
|
||||
// Debug menu commands
|
||||
exports.DEBUG_MENU = "Debug";
|
||||
exports.CMD_REFRESH_WINDOW = "Reload Brackets";
|
||||
exports.CMD_SHOW_DEV_TOOLS = "Show Developer Tools";
|
||||
exports.CMD_RUN_UNIT_TESTS = "Run Tests";
|
||||
exports.CMD_JSLINT = "Enable JSLint";
|
||||
exports.CMD_SHOW_PERF_DATA = "Show Performance Data";
|
||||
exports.CMD_NEW_BRACKETS_WINDOW = "New Brackets Window";
|
||||
exports.CMD_USE_TAB_CHARS = "Use Tab Characters";
|
||||
exports.CMD_SWITCH_LANGUAGE = "Switch Language";
|
||||
exports.CMD_CHECK_FOR_UPDATE = "Check for Updates";
|
||||
|
||||
// Help menu commands
|
||||
exports.CMD_ABOUT = "About";
|
||||
|
||||
// Special commands invoked by the native shell
|
||||
exports.CMD_CLOSE_WINDOW = "Close Window";
|
||||
exports.CMD_ABORT_QUIT = "Abort Quit";
|
||||
|
||||
// Strings for main-view.html
|
||||
exports.EXPERIMENTAL_BUILD = "Experimental Build";
|
||||
exports.JSLINT_ERRORS = "JSLint Errors";
|
||||
exports.SEARCH_RESULTS = "Search Results";
|
||||
exports.OK = "OK";
|
||||
exports.DONT_SAVE = "Don't Save";
|
||||
exports.SAVE = "Save";
|
||||
exports.CANCEL = "Cancel";
|
||||
exports.RELOAD_FROM_DISK = "Reload from Disk";
|
||||
exports.KEEP_CHANGES_IN_EDITOR = "Keep Changes in Editor";
|
||||
exports.CLOSE_DONT_SAVE = "Close (Don't Save)";
|
||||
exports.KEEP_CHANGES_IN_EDITOR = "Keep Changes in Editor";
|
||||
exports.RELAUNCH_CHROME = "Relaunch Chrome";
|
||||
exports.ABOUT = "About";
|
||||
exports.BRACKETS = "Brackets";
|
||||
exports.CLOSE = "Close";
|
||||
exports.ABOUT_TEXT_LINE1 = "sprint 13 experimental build ";
|
||||
exports.ABOUT_TEXT_LINE2 = "Copyright 2012 Adobe Systems Incorporated and its licensors. All rights reserved.";
|
||||
exports.ABOUT_TEXT_LINE3 = "Notices; terms and conditions pertaining to third party software are located at ";
|
||||
exports.ABOUT_TEXT_LINE4 = " and incorporated by reference herein.";
|
||||
exports.ABOUT_TEXT_LINE5 = "Documentation and source at ";
|
||||
exports.UPDATE_NOTIFICATION_TOOLTIP = "There is a new build of Brackets available! Click here for details.";
|
||||
exports.UPDATE_AVAILABLE_TITLE = "Update Available";
|
||||
exports.UPDATE_MESSAGE = "Hey, there's a new build of Brackets available. Here are some of the new features:";
|
||||
exports.GET_IT_NOW = "Get it now!";
|
||||
});
|
||||
|
|
|
@ -120,7 +120,7 @@ define(function (require, exports, module) {
|
|||
if (cm.lineCount() < 2000) { // This is too expensive on big documents.
|
||||
var cursor = getSearchCursor(cm, query);
|
||||
while (cursor.findNext()) {
|
||||
state.marked.push(cm.markText(cursor.from(), cursor.to(), Strings.SEARCHING));
|
||||
state.marked.push(cm.markText(cursor.from(), cursor.to(), "CodeMirror-searching"));
|
||||
}
|
||||
}
|
||||
state.posFrom = state.posTo = cm.getCursor();
|
||||
|
|
|
@ -35,6 +35,7 @@ define(function (require, exports, module) {
|
|||
NativeApp = require("utils/NativeApp"),
|
||||
PreferencesManager = require("preferences/PreferencesManager"),
|
||||
Strings = require("strings"),
|
||||
StringUtils = require("utils/StringUtils"),
|
||||
BuildNumberJSON = require("text!buildNumber.json");
|
||||
|
||||
// Current build number.
|
||||
|
@ -69,7 +70,7 @@ define(function (require, exports, module) {
|
|||
// {String} name Name of the feature
|
||||
// {String} description Description of the feature
|
||||
//
|
||||
// This array must be sorted by buildNumber
|
||||
// This array must be reverse sorted by buildNumber (newest build info first)
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -79,8 +80,16 @@ define(function (require, exports, module) {
|
|||
|
||||
/**
|
||||
* Get a data structure that has information for all builds of Brackets.
|
||||
*
|
||||
* If force is true, the information is always fetched from _versionInfoURL.
|
||||
* If force is false, we try to use cached information. If more than
|
||||
* 24 hours have passed since the last fetch, or if cached data can't be found,
|
||||
* the data is fetched again.
|
||||
*
|
||||
* If new data is fetched and dontCache is false, the data is saved in preferences
|
||||
* for quick fetching later.
|
||||
*/
|
||||
function _getVersionInformation(force, dontCache) {
|
||||
function _getUpdateInformation(force, dontCache) {
|
||||
var result = new $.Deferred();
|
||||
var fetchData = false;
|
||||
var data;
|
||||
|
@ -91,7 +100,7 @@ define(function (require, exports, module) {
|
|||
}
|
||||
|
||||
// If we don't have data saved in prefs, fetch
|
||||
data = _prefs.getValue("versionInfo");
|
||||
data = _prefs.getValue("updateInfo");
|
||||
if (!data) {
|
||||
fetchData = true;
|
||||
}
|
||||
|
@ -112,7 +121,7 @@ define(function (require, exports, module) {
|
|||
if (!dontCache) {
|
||||
_lastInfoURLFetchTime = (new Date()).getTime();
|
||||
_prefs.setValue("lastInfoURLFetchTime", _lastInfoURLFetchTime);
|
||||
_prefs.setValue("versionInfo", data);
|
||||
_prefs.setValue("updateInfo", data);
|
||||
}
|
||||
result.resolve(data);
|
||||
} catch (e) {
|
||||
|
@ -126,6 +135,13 @@ define(function (require, exports, module) {
|
|||
// When loading data for unit tests, the error handler is
|
||||
// called but the responseText is valid. Try to use it here,
|
||||
// but *don't* save the results in prefs.
|
||||
|
||||
if (!jqXHR.responseText) {
|
||||
// Text is NULL or empty string, reject().
|
||||
result.reject();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
data = JSON.parse(jqXHR.responseText);
|
||||
result.resolve(data);
|
||||
|
@ -166,11 +182,6 @@ define(function (require, exports, module) {
|
|||
return null;
|
||||
}
|
||||
|
||||
function _sanitizeString(str) {
|
||||
// Simple string sanitize - entity encode angle brackets
|
||||
return str.replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a dialog that shows the update
|
||||
*/
|
||||
|
@ -194,18 +205,18 @@ define(function (require, exports, module) {
|
|||
item.newFeatures.forEach(function (feature, index) {
|
||||
$features.append(
|
||||
"<li><b>" +
|
||||
_sanitizeString(feature.name) +
|
||||
StringUtils.htmlEscape(feature.name) +
|
||||
"</b> - " +
|
||||
_sanitizeString(feature.description) +
|
||||
StringUtils.htmlEscape(feature.description) +
|
||||
"</li>"
|
||||
);
|
||||
});
|
||||
|
||||
var $item = $("<div>")
|
||||
.append("<h3>" +
|
||||
_sanitizeString(item.versionString) +
|
||||
StringUtils.htmlEscape(item.versionString) +
|
||||
" - " +
|
||||
_sanitizeString(item.dateString) +
|
||||
StringUtils.htmlEscape(item.dateString) +
|
||||
" (<a href='#' data-url='" + item.releaseNotesURL + "'>" +
|
||||
Strings.RELEASE_NOTES +
|
||||
"</a>)</h3>")
|
||||
|
@ -233,49 +244,47 @@ define(function (require, exports, module) {
|
|||
* If an update is available, show the "update available" notification icon in the title bar.
|
||||
*
|
||||
* @param {boolean} force If true, always show the notification dialog.
|
||||
* @param {Object} _testValues This should only be used for testing purposes. See comments for details.
|
||||
* @return {$.Promise} jQuery Promise object that is resolved or rejected after the update check is complete.
|
||||
*/
|
||||
function checkForUpdate(force) {
|
||||
// There is a secret second parameter. If the second param is an Object, fields
|
||||
function checkForUpdate(force, _testValues) {
|
||||
// The second param, if non-null, is an Object containing value overrides. Values
|
||||
// in the object temporarily override the local values. This should *only* be used for testing.
|
||||
// If any overrides are set, permanent changes are not made (including showing
|
||||
// the update notification icon and saving prefs).
|
||||
var oldValues;
|
||||
var usingOverrides = false;
|
||||
var usingOverrides = false; // true if any of the values are overridden.
|
||||
var result = new $.Deferred();
|
||||
|
||||
if (arguments.length > 1) {
|
||||
var overrides = Array.prototype.slice.call(arguments)[1];
|
||||
|
||||
if (_testValues) {
|
||||
oldValues = {};
|
||||
|
||||
if (overrides.hasOwnProperty("_buildNumber")) {
|
||||
if (_testValues.hasOwnProperty("_buildNumber")) {
|
||||
oldValues._buildNumber = _buildNumber;
|
||||
_buildNumber = overrides._buildNumber;
|
||||
_buildNumber = _testValues._buildNumber;
|
||||
usingOverrides = true;
|
||||
}
|
||||
|
||||
if (overrides.hasOwnProperty("_lastNotifiedBuildNumber")) {
|
||||
if (_testValues.hasOwnProperty("_lastNotifiedBuildNumber")) {
|
||||
oldValues._lastNotifiedBuildNumber = _lastNotifiedBuildNumber;
|
||||
_lastNotifiedBuildNumber = overrides._lastNotifiedBuildNumber;
|
||||
_lastNotifiedBuildNumber = _testValues._lastNotifiedBuildNumber;
|
||||
usingOverrides = true;
|
||||
}
|
||||
|
||||
if (overrides.hasOwnProperty("_versionInfoURL")) {
|
||||
if (_testValues.hasOwnProperty("_versionInfoURL")) {
|
||||
oldValues._versionInfoURL = _versionInfoURL;
|
||||
_versionInfoURL = overrides._versionInfoURL;
|
||||
_versionInfoURL = _testValues._versionInfoURL;
|
||||
usingOverrides = true;
|
||||
}
|
||||
}
|
||||
|
||||
_getVersionInformation(force || usingOverrides, usingOverrides)
|
||||
_getUpdateInformation(force || usingOverrides, usingOverrides)
|
||||
.done(function (versionInfo) {
|
||||
// Get all available updates
|
||||
var allUpdates = _stripOldVersionInfo(versionInfo, _buildNumber);
|
||||
|
||||
if (allUpdates) {
|
||||
// Always show the "update available" icon if any updates are available
|
||||
if (!usingOverrides) {
|
||||
var $updateNotification = $("#update-notification");
|
||||
|
||||
$updateNotification.show();
|
||||
|
@ -285,11 +294,10 @@ define(function (require, exports, module) {
|
|||
checkForUpdate(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Only show the update dialog if force = true, or if the user hasn't been
|
||||
// alerted of this update
|
||||
if (force || _stripOldVersionInfo(allUpdates, _lastNotifiedBuildNumber)) {
|
||||
if (force || allUpdates[0].buildNumber > _lastNotifiedBuildNumber) {
|
||||
_showUpdateNotificationDialog(allUpdates);
|
||||
|
||||
// Update prefs with the last notified build number
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
[
|
||||
{
|
||||
"buildNumber": 93,
|
||||
"versionString": "Sprint 12",
|
||||
"dateString": "8-13-2012",
|
||||
"versionString": "<script>alert('GOTCHA!')</script>Sprint 12",
|
||||
"dateString": "<script>alert('BOOM!')</script>8-13-2012",
|
||||
"releaseNotesURL": "https://github.com/adobe/brackets/wiki/Release-Notes:-Sprint-12",
|
||||
"downloadURL": "https://github.com/adobe/brackets/downloads",
|
||||
"newFeatures": [
|
||||
{
|
||||
"name": "Code Completion for HTML Attributes",
|
||||
"name": "<script>alert('PWNED!')</script>Code Completion for HTML Attributes",
|
||||
"description": "<script>alert('SECURITY BREACH!')</script>Basic code hinting for HTML attribute names. Appears when you type Space within a tag (or press Ctrl+Space)."
|
||||
},
|
||||
{
|
||||
|
|
|
@ -66,7 +66,7 @@ define(function (require, exports, module) {
|
|||
});
|
||||
});
|
||||
|
||||
it("should show a update information for all available updates", function () {
|
||||
it("should show update information for all available updates", function () {
|
||||
var updateInfo = {
|
||||
_buildNumber: 10,
|
||||
_lastNotifiedBuildNumber: 0,
|
||||
|
@ -103,6 +103,24 @@ define(function (require, exports, module) {
|
|||
});
|
||||
});
|
||||
|
||||
it("should not show dialog if app is up to date", function () {
|
||||
var updateInfo = {
|
||||
_buildNumber: 93,
|
||||
_lastNotifiedBuildNumber: 0,
|
||||
_versionInfoURL: updateInfoURL
|
||||
};
|
||||
|
||||
runs(function () {
|
||||
var promise = UpdateNotification.checkForUpdate(false, updateInfo);
|
||||
waitsForDone(promise, "Check for updates");
|
||||
});
|
||||
|
||||
runs(function () {
|
||||
var $doc = $(testWindow.document);
|
||||
expect($doc.find(".update-dialog.instance").length).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
it("should show an 'up to date' alert if no updates are available and the user manually checks for updates", function () {
|
||||
var updateInfo = {
|
||||
_buildNumber: 93,
|
||||
|
|
Загрузка…
Ссылка в новой задаче