Permalink
Browse files

Merging

  • Loading branch information...
2 parents 9e20a8c + 2ad7c7b commit ec9753c8d0702a111372796f9e5947d042182cd1 @TomMalbran TomMalbran committed Mar 20, 2013
Showing 654 changed files with 67,688 additions and 497 deletions.
View
@@ -10,6 +10,3 @@
[submodule "src/thirdparty/mustache"]
path = src/thirdparty/mustache
url = https://github.com/janl/mustache.js.git
-[submodule "src/extensions/default/jslint/thirdparty/jslint"]
- path = src/extensions/default/jslint/thirdparty/jslint
- url = https://github.com/douglascrockford/JSLint.git
View
@@ -35,7 +35,7 @@ module.exports = function (grunt) {
'!src/extensions/**/thirdparty/**/*.js',
'!src/extensions/dev/**',
'!src/extensions/disabled/**',
- '!src/extensions/**/node_modules/**/*.js',
+ '!**/node_modules/**/*.js',
'!src/**/*-min.js',
'!src/**/*.min.js'
],
@@ -50,8 +50,8 @@ module.exports = function (grunt) {
/* specs that can run in phantom.js */
specs : [
'test/spec/CommandManager-test.js',
- 'test/spec/LanguageManager-test.js',
- 'test/spec/PreferencesManager-test.js',
+ //'test/spec/LanguageManager-test.js',
+ //'test/spec/PreferencesManager-test.js',
'test/spec/ViewUtils-test.js'
]
},
@@ -77,7 +77,8 @@ module.exports = function (grunt) {
'src/thirdparty/CodeMirror2/lib/util/dialog.js',
'src/thirdparty/CodeMirror2/lib/util/searchcursor.js',
'src/thirdparty/mustache/mustache.js',
- 'src/thirdparty/path-utils/path-utils.min'
+ 'src/thirdparty/path-utils/path-utils.min',
+ 'src/thirdparty/less-1.3.0.min.js'
],
helpers : [
'test/spec/PhantomHelper.js'
View
@@ -1,6 +1,7 @@
{
"name": "Brackets",
"version": "0.22.0-0",
+ "apiVersion": "0.22.0",
"homepage": "http://brackets.io",
"issues": {
"url": "http://github.com/adobe/brackets/issues"
@@ -151,11 +151,19 @@ define(function Inspector(require, exports, module) {
/** WebSocket reported an error */
function _onError(error) {
+ if (_connectDeferred) {
+ _connectDeferred.reject();
+ _connectDeferred = null;
+ }
$exports.triggerHandler("error", [error]);
}
/** WebSocket did open */
function _onConnect() {
+ if (_connectDeferred) {
+ _connectDeferred.resolve();
+ _connectDeferred = null;
+ }
$exports.triggerHandler("connect");
}
@@ -186,11 +194,11 @@ define(function Inspector(require, exports, module) {
/** Public Functions *****************************************************/
- /** Get the available debugger sockets from the remote debugger
+ /** Get a list of the available windows/tabs/extensions that are remote-debuggable
* @param {string} host IP or name
* @param {integer} debugger port
*/
- function getAvailableSockets(host, port) {
+ function getDebuggableWindows(host, port) {
if (!host) {
host = "127.0.0.1";
}
@@ -264,17 +272,14 @@ define(function Inspector(require, exports, module) {
}
var deferred = new $.Deferred();
_connectDeferred = deferred;
- var promise = getAvailableSockets();
+ var promise = getDebuggableWindows();
promise.done(function onGetAvailableSockets(response) {
- if (deferred.isRejected()) {
- return;
- }
var i, page;
for (i in response) {
page = response[i];
if (page.webSocketDebuggerUrl && page.url.indexOf(url) === 0) {
connect(page.webSocketDebuggerUrl);
- deferred.resolve();
+ // _connectDeferred may be resolved by onConnect or rejected by onError
return;
}
}
@@ -288,7 +293,7 @@ define(function Inspector(require, exports, module) {
/** Check if the inspector is connected */
function connected() {
- return _socket !== undefined;
+ return _socket !== undefined && _socket.readyState === WebSocket.OPEN;
}
/** Initialize the Inspector
@@ -297,25 +302,23 @@ define(function Inspector(require, exports, module) {
*/
function init(theConfig) {
exports.config = theConfig;
- var request = new XMLHttpRequest();
- request.open("GET", "LiveDevelopment/Inspector/Inspector.json");
- request.onload = function onLoad() {
- var InspectorJSON = JSON.parse(request.response);
- var i, j, domain, domainDef, command;
- for (i in InspectorJSON.domains) {
- domain = InspectorJSON.domains[i];
- exports[domain.domain] = {};
- for (j in domain.commands) {
- command = domain.commands[j];
- exports[domain.domain][command.name] = _send.bind(undefined, domain.domain + "." + command.name, command.parameters);
- }
+
+ var InspectorText = require("text!LiveDevelopment/Inspector/Inspector.json"),
+ InspectorJSON = JSON.parse(InspectorText);
+
+ var i, j, domain, domainDef, command;
+ for (i in InspectorJSON.domains) {
+ domain = InspectorJSON.domains[i];
+ exports[domain.domain] = {};
+ for (j in domain.commands) {
+ command = domain.commands[j];
+ exports[domain.domain][command.name] = _send.bind(undefined, domain.domain + "." + command.name, command.parameters);
}
- };
- request.send(null);
+ }
}
// Export public functions
- exports.getAvailableSockets = getAvailableSockets;
+ exports.getDebuggableWindows = getDebuggableWindows;
exports.on = on;
exports.off = off;
exports.disconnect = disconnect;
Oops, something went wrong.

0 comments on commit ec9753c

Please sign in to comment.