-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
@shubhsnov @swmitra Please review |
@@ -0,0 +1,151 @@ | |||
/* | |||
* Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the banner. Copyright (c) 2019 - present Adobe. All rights reserved.
|
||
var model = searchModel; | ||
_resultsView = new SearchResultsView( | ||
model, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directly use searchModel here.
), | ||
removeFindReferencesProvider = _providerRegistrationHandler.removeProvider.bind(_providerRegistrationHandler); | ||
|
||
var SHOW_FIND_REFERENCES_CMD_ID = "showrReferences", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Typo "showReferences"
searchModel.numMatches = rcvdObj.numMatches; | ||
searchModel.allResultsAvailable = true; | ||
searchModel.setQueryInfo({query: rcvdObj.queryInfo, caseSensitive: true, isRegExp: false}); | ||
//searchModel.fireChanged(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code.
} | ||
|
||
function _openReferencesPanel() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty line.
referencespromise = _getReferences(referencesProvider, editor, pos); | ||
|
||
// Use default error message if none other provided | ||
errorMsg = errorMsg || defaultErrorMsg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are errorMsg and defaultErrorMsg being set?
}; | ||
|
||
ReferencesProvider.prototype.getReferences = function() { | ||
var editor = EditorManager.getActiveEditor(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't you using the hostEditor and pos that is being passed by manager?
src/search/SearchResultsView.js
Outdated
@@ -72,14 +72,16 @@ define(function (require, exports, module) { | |||
* @param {SearchModel} model The model that this view is showing. | |||
* @param {string} panelID The CSS ID to use for the panel. | |||
* @param {string} panelName The name to use for the panel, as passed to WorkspaceManager.createBottomPanel(). | |||
* @param {string} type type to indentify if it is reference search or string match serach |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: identify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need to fix this.
@niteskum I've still got to check the functional aspects, but I've given a few code nits that I came across on first glance. Could you also please add a proper description for the PR along with the UI aspects. |
@niteskum The string should get highlighted as in search results. Is there any particular reason for why this is not happening? |
@shubhsnov fixed it. |
src/search/SearchResultsView.js
Outdated
@@ -72,14 +72,16 @@ define(function (require, exports, module) { | |||
* @param {SearchModel} model The model that this view is showing. | |||
* @param {string} panelID The CSS ID to use for the panel. | |||
* @param {string} panelName The name to use for the panel, as passed to WorkspaceManager.createBottomPanel(). | |||
* @param {string} type type to indentify if it is reference search or string match serach |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need to fix this.
Apart from a few refactoring changes, this looks good to me. |
@shubhsnov Addressed all review comments. |
ctrl+k is used for quick docs and ctrl+shift+k is not very intuitive. is there any non used ctrl+ available for usage? |
LGTM 👍 |
No description provided.