LSP Find References Feature#14693
LSP Find References Feature#14693shubhsnov merged 14 commits intoadobe:masterfrom niteskum:lspFindReferences
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.
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.
Directly use searchModel here.
| ), | ||
| removeFindReferencesProvider = _providerRegistrationHandler.removeProvider.bind(_providerRegistrationHandler); | ||
|
|
||
| var SHOW_FIND_REFERENCES_CMD_ID = "showrReferences", |
There was a problem hiding this comment.
Nit: Typo "showReferences"
| searchModel.numMatches = rcvdObj.numMatches; | ||
| searchModel.allResultsAvailable = true; | ||
| searchModel.setQueryInfo({query: rcvdObj.queryInfo, caseSensitive: true, isRegExp: false}); | ||
| //searchModel.fireChanged(); |
| } | ||
|
|
||
| function _openReferencesPanel() { | ||
|
|
| referencespromise = _getReferences(referencesProvider, editor, pos); | ||
|
|
||
| // Use default error message if none other provided | ||
| errorMsg = errorMsg || defaultErrorMsg; |
There was a problem hiding this comment.
Where are errorMsg and defaultErrorMsg being set?
| }; | ||
|
|
||
| ReferencesProvider.prototype.getReferences = function() { | ||
| var editor = EditorManager.getActiveEditor(), |
There was a problem hiding this comment.
Why aren't you using the hostEditor and pos that is being passed by manager?
| * @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.
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. |
| * @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.
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.