Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14730 from adobe/master
Browse files Browse the repository at this point in the history
Merge master to release for 1.14 release
  • Loading branch information
shubhsnov committed Apr 26, 2019
2 parents 49d29a8 + ee01b79 commit 329d08f
Show file tree
Hide file tree
Showing 104 changed files with 10,905 additions and 809 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.js
Expand Up @@ -80,5 +80,15 @@ module.exports = {
"Uint32Array": false,
"WebSocket": false,
"XMLHttpRequest": false
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "script",
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true
}
}
};
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -2,6 +2,8 @@ language: node_js
sudo: false # use container-based Travis infrastructure
node_js:
- "6"
before_install:
- phpenv global 7.0 #switch to php7, since that's what php-Tooling extension requires
before_script:
- npm install -g grunt-cli
- npm install -g jasmine-node
Expand Down
3 changes: 3 additions & 0 deletions Gruntfile.js
Expand Up @@ -82,6 +82,9 @@ module.exports = function (grunt) {
src: [
'extensibility/node/**',
'JSUtils/node/**',
'languageTools/node/**',
'languageTools/styles/**',
'languageTools/LanguageClient/**',
'!extensibility/node/spec/**',
'!extensibility/node/node_modules/**/{test,tst}/**/*',
'!extensibility/node/node_modules/**/examples/**/*',
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "Brackets",
"version": "1.13.0-0",
"apiVersion": "1.13.0",
"version": "1.14.0-0",
"apiVersion": "1.14.0",
"homepage": "http://brackets.io",
"issues": {
"url": "http://github.com/adobe/brackets/issues"
Expand Down Expand Up @@ -64,7 +64,7 @@
"scripts": {
"prepush": "npm run eslint",
"postinstall": "grunt install",
"test": "grunt test cla-check-pull",
"test": "grunt test",
"eslint": "grunt eslint"
},
"licenses": [
Expand Down
6 changes: 6 additions & 0 deletions src/base-config/keyboard.json
Expand Up @@ -162,6 +162,9 @@
"cmd.findInFiles": [
"Ctrl-Shift-F"
],
"cmd.findAllReferences": [
"Shift-F12"
],
"cmd.replaceInFiles": [
{
"key": "Ctrl-Shift-H"
Expand Down Expand Up @@ -281,6 +284,9 @@
"navigate.gotoDefinition": [
"Ctrl-T"
],
"navigate.gotoDefinitionInProject": [
"Ctrl-Shift-T"
],
"navigate.jumptoDefinition": [
"Ctrl-J"
],
Expand Down
1 change: 1 addition & 0 deletions src/brackets.config.dev.json
Expand Up @@ -4,5 +4,6 @@
"serviceKey" : "brackets-service",
"environment" : "stage",
"update_info_url" : "https://s3.amazonaws.com/files.brackets.io/updates/prerelease/<locale>.json",
"notification_info_url" : "https://s3.amazonaws.com/files.brackets.io/notifications/prerelease/<locale>.json",
"buildtype" : "dev"
}
1 change: 1 addition & 0 deletions src/brackets.config.dist.json
Expand Up @@ -4,5 +4,6 @@
"serviceKey" : "brackets-service",
"environment" : "production",
"update_info_url" : "https://getupdates.brackets.io/getupdates/",
"notification_info_url" : "https://getupdates.brackets.io/getnotifications?locale=<locale>",
"buildtype" : "production"
}
1 change: 1 addition & 0 deletions src/brackets.config.prerelease.json
Expand Up @@ -4,5 +4,6 @@
"serviceKey" : "brackets-service",
"environment" : "production",
"update_info_url" : "https://s3.amazonaws.com/files.brackets.io/updates/prerelease/<locale>.json",
"notification_info_url" : "https://s3.amazonaws.com/files.brackets.io/notifications/prerelease/<locale>.json",
"buildtype" : "prerelease"
}
16 changes: 16 additions & 0 deletions src/brackets.js
Expand Up @@ -137,6 +137,10 @@ define(function (require, exports, module) {
return PathUtils;
}
});

//load language features
require("features/ParameterHintsManager");
require("features/JumpToDefManager");

// Load modules that self-register and just need to get included in the main project
require("command/DefaultMenus");
Expand All @@ -151,10 +155,22 @@ define(function (require, exports, module) {
require("search/FindInFilesUI");
require("search/FindReplace");

//Load find References Feature Manager
require("features/FindReferencesManager");

//Load common JS module
require("JSUtils/Session");
require("JSUtils/ScopeManager");

//load Language Tools Module
require("languageTools/PathConverters");
require("languageTools/LanguageTools");
require("languageTools/ClientLoader");
require("languageTools/BracketsToNodeInterface");
require("languageTools/DefaultProviders");
require("languageTools/DefaultEventHandlers");


PerfUtils.addMeasurement("brackets module dependencies resolved");

// Local variables
Expand Down
4 changes: 3 additions & 1 deletion src/command/Commands.js
Expand Up @@ -97,6 +97,7 @@ define(function (require, exports, module) {
exports.CMD_REPLACE = "cmd.replace"; // FindReplace.js _replace()
exports.CMD_REPLACE_IN_FILES = "cmd.replaceInFiles"; // FindInFilesUI.js _showReplaceBar()
exports.CMD_REPLACE_IN_SUBTREE = "cmd.replaceInSubtree"; // FindInFilesUI.js _showReplaceBarForSubtree()
exports.CMD_FIND_ALL_REFERENCES = "cmd.findAllReferences"; // findReferencesManager.js _openReferencesPanel()

// VIEW
exports.CMD_THEMES_OPEN_SETTINGS = "view.themesOpenSetting"; // MenuCommands.js Settings.open()
Expand All @@ -123,8 +124,9 @@ define(function (require, exports, module) {
exports.NAVIGATE_SHOW_IN_FILE_TREE = "navigate.showInFileTree"; // DocumentCommandHandlers.js handleShowInTree()
exports.NAVIGATE_SHOW_IN_OS = "navigate.showInOS"; // DocumentCommandHandlers.js handleShowInOS()
exports.NAVIGATE_QUICK_OPEN = "navigate.quickOpen"; // QuickOpen.js doFileSearch()
exports.NAVIGATE_JUMPTO_DEFINITION = "navigate.jumptoDefinition"; // EditorManager.js _doJumpToDef()
exports.NAVIGATE_JUMPTO_DEFINITION = "navigate.jumptoDefinition"; // JumpToDefManager.js _doJumpToDef()
exports.NAVIGATE_GOTO_DEFINITION = "navigate.gotoDefinition"; // QuickOpen.js doDefinitionSearch()
exports.NAVIGATE_GOTO_DEFINITION_PROJECT = "navigate.gotoDefinitionInProject"; // QuickOpen.js doDefinitionSearchInProject()
exports.NAVIGATE_GOTO_LINE = "navigate.gotoLine"; // QuickOpen.js doGotoLine()
exports.NAVIGATE_GOTO_FIRST_PROBLEM = "navigate.gotoFirstProblem"; // CodeInspection.js handleGotoFirstProblem()
exports.TOGGLE_QUICK_EDIT = "navigate.toggleQuickEdit"; // EditorManager.js _toggleInlineWidget()
Expand Down
3 changes: 3 additions & 0 deletions src/command/DefaultMenus.js
Expand Up @@ -136,6 +136,7 @@ define(function (require, exports, module) {
menu.addMenuItem(Commands.CMD_SKIP_CURRENT_MATCH);
menu.addMenuDivider();
menu.addMenuItem(Commands.CMD_FIND_IN_FILES);
menu.addMenuItem(Commands.CMD_FIND_ALL_REFERENCES);
menu.addMenuDivider();
menu.addMenuItem(Commands.CMD_REPLACE);
menu.addMenuItem(Commands.CMD_REPLACE_IN_FILES);
Expand Down Expand Up @@ -172,6 +173,7 @@ define(function (require, exports, module) {
menu.addMenuItem(Commands.NAVIGATE_QUICK_OPEN);
menu.addMenuItem(Commands.NAVIGATE_GOTO_LINE);
menu.addMenuItem(Commands.NAVIGATE_GOTO_DEFINITION);
menu.addMenuItem(Commands.NAVIGATE_GOTO_DEFINITION_PROJECT);
menu.addMenuItem(Commands.NAVIGATE_JUMPTO_DEFINITION);
menu.addMenuItem(Commands.NAVIGATE_GOTO_FIRST_PROBLEM);
menu.addMenuDivider();
Expand Down Expand Up @@ -282,6 +284,7 @@ define(function (require, exports, module) {
// editor_cmenu.addMenuItem(Commands.NAVIGATE_JUMPTO_DEFINITION);
editor_cmenu.addMenuItem(Commands.TOGGLE_QUICK_EDIT);
editor_cmenu.addMenuItem(Commands.TOGGLE_QUICK_DOCS);
editor_cmenu.addMenuItem(Commands.CMD_FIND_ALL_REFERENCES);
editor_cmenu.addMenuDivider();
editor_cmenu.addMenuItem(Commands.EDIT_CUT);
editor_cmenu.addMenuItem(Commands.EDIT_COPY);
Expand Down
6 changes: 3 additions & 3 deletions src/config.json
Expand Up @@ -26,8 +26,8 @@
"update_info_url": "https://s3.amazonaws.com/files.brackets.io/updates/prerelease/<locale>.json"
},
"name": "Brackets",
"version": "1.13.0-0",
"apiVersion": "1.13.0",
"version": "1.14.0-0",
"apiVersion": "1.14.0",
"homepage": "http://brackets.io",
"issues": {
"url": "http://github.com/adobe/brackets/issues"
Expand Down Expand Up @@ -90,7 +90,7 @@
"scripts": {
"prepush": "npm run eslint",
"postinstall": "grunt install",
"test": "grunt test cla-check-pull",
"test": "grunt test",
"eslint": "grunt eslint"
},
"licenses": [
Expand Down
12 changes: 12 additions & 0 deletions src/document/DocumentCommandHandlers.js
Expand Up @@ -689,6 +689,15 @@ define(function (require, exports, module) {
var doc = DocumentManager.createUntitledDocument(_nextUntitledIndexToUse++, defaultExtension);
MainViewManager._edit(MainViewManager.ACTIVE_PANE, doc);

HealthLogger.sendAnalyticsData(
HealthLogger.commonStrings.USAGE +
HealthLogger.commonStrings.FILE_OPEN +
HealthLogger.commonStrings.FILE_NEW,
HealthLogger.commonStrings.USAGE,
HealthLogger.commonStrings.FILE_OPEN,
HealthLogger.commonStrings.FILE_NEW
);

return new $.Deferred().resolve(doc).promise();
}

Expand Down Expand Up @@ -788,6 +797,7 @@ define(function (require, exports, module) {
.done(function () {
docToSave.notifySaved();
result.resolve(file);
HealthLogger.fileSaved(docToSave);
})
.fail(function (err) {
if (err === FileSystemError.CONTENTS_MODIFIED) {
Expand Down Expand Up @@ -967,6 +977,7 @@ define(function (require, exports, module) {
} else {
openNewFile();
}
HealthLogger.fileSaved(doc);
})
.fail(function (error) {
_showSaveFileError(error, path)
Expand Down Expand Up @@ -1186,6 +1197,7 @@ define(function (require, exports, module) {
function doClose(file) {
if (!promptOnly) {
MainViewManager._close(paneId, file);
HealthLogger.fileClosed(file);
}
}

Expand Down
21 changes: 19 additions & 2 deletions src/editor/CodeHintList.js
Expand Up @@ -152,7 +152,7 @@ define(function (require, exports, module) {
ViewUtils.scrollElementIntoView($view, $item, false);

if (this.handleHighlight) {
this.handleHighlight($item.find("a"));
this.handleHighlight($item.find("a"), this.$hintMenu.find("#codehint-desc"));
}
}
};
Expand Down Expand Up @@ -191,6 +191,7 @@ define(function (require, exports, module) {

this.hints = hintObj.hints;
this.hints.handleWideResults = hintObj.handleWideResults;
this.enableDescription = hintObj.enableDescription;

// if there is no match, assume name is already a formatted jQuery
// object; otherwise, use match to format name for display.
Expand Down Expand Up @@ -265,6 +266,13 @@ define(function (require, exports, module) {
// attach to DOM
$parent.append($ul);

// If a a description field requested attach one
if (this.enableDescription) {
// Remove the desc element first to ensure DOM order
$parent.find("#codehint-desc").remove();
$parent.append("<div id='codehint-desc' class='dropdown-menu quiet-scrollbars'></div>");
$ul.addClass("withDesc");
}
this._setSelectedIndex(selectInitial ? 0 : -1);
}
};
Expand All @@ -283,7 +291,9 @@ define(function (require, exports, module) {
textHeight = this.editor.getTextHeight(),
$window = $(window),
$menuWindow = this.$hintMenu.children("ul"),
menuHeight = $menuWindow.outerHeight();
$descElement = this.$hintMenu.find("#codehint-desc"),
descOverhang = $descElement.length === 1 ? $descElement.height() : 0,
menuHeight = $menuWindow.outerHeight() + descOverhang;

// TODO Ty: factor out menu repositioning logic so code hints and Context menus share code
// adjust positioning so menu is not clipped off bottom or right
Expand All @@ -304,6 +314,13 @@ define(function (require, exports, module) {
availableWidth = menuWidth + Math.abs(rightOverhang);
}

//Creating the offset element for hint description element
var descOffset = this.$hintMenu.find("ul.dropdown-menu")[0].getBoundingClientRect().height;
if (descOffset === 0) {
descOffset = menuHeight - descOverhang;
}
this.$hintMenu.find("#codehint-desc").css("margin-top", descOffset - 1);

return {left: posLeft, top: posTop, width: availableWidth};
};

Expand Down
19 changes: 15 additions & 4 deletions src/editor/CodeHintManager.js
Expand Up @@ -507,10 +507,21 @@ define(function (require, exports, module) {

sessionEditor = editor;
hintList = new CodeHintList(sessionEditor, insertHintOnTab, maxCodeHints);
hintList.onHighlight(function ($hint) {
// If the current hint provider listening for hint item highlight change
if (sessionProvider.onHighlight) {
sessionProvider.onHighlight($hint);
hintList.onHighlight(function ($hint, $hintDescContainer) {
if (hintList.enableDescription && $hintDescContainer && $hintDescContainer.length) {
// If the current hint provider listening for hint item highlight change
if (sessionProvider.onHighlight) {
sessionProvider.onHighlight($hint, $hintDescContainer);
}

// Update the hint description
if (sessionProvider.updateHintDescription) {
sessionProvider.updateHintDescription($hint, $hintDescContainer);
}
} else {
if (sessionProvider.onHighlight) {
sessionProvider.onHighlight($hint);
}
}
});
hintList.onSelect(function (hint) {
Expand Down

0 comments on commit 329d08f

Please sign in to comment.