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

Add 'onHighlight' optional event callback mechanism for better extensibility features in hint providers #14140

Merged
merged 1 commit into from
Mar 28, 2018

Conversation

swmitra
Copy link
Collaborator

@swmitra swmitra commented Mar 1, 2018

This PR is targeted to add an optional onHighlight hook handling for Code hint providers. This will help extension developers to add interactive workflows when a user crawls over hint items in hint popup.

@nethip @petetnt All yours now, please have a look at the change set.

Copy link
Collaborator

@petetnt petetnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this should be a Event Emitter instead?

Documentation would be nice to the userguide.

@swmitra
Copy link
Collaborator Author

swmitra commented Mar 4, 2018

Thanks a lot @petetnt for quick review :+1.

This would be a provider specific implementation. IMHO, scoping the event emitter to a provider will make the listener code ambiguous. Also, keeping this as a hook keeps the reach of the handling very shallow and declaration of the intent is upfront. But that's my thought, want to hear the advantages of event emitter in this case as well.

@nethip
Copy link
Contributor

nethip commented Mar 6, 2018

@swmitra LGTM. But +1 on @petetnt comment about documentation.

@petetnt
Copy link
Collaborator

petetnt commented Mar 6, 2018

FWIW I am okay with this not being an event emitter too as code hint list providers provide functions anyway now that I looked at this more 👍

@swmitra
Copy link
Collaborator Author

swmitra commented Mar 28, 2018

@nethip @petetnt Added this to our wiki for code hint API's.
https://github.com/adobe/brackets/wiki/New-Code-Hinting-API-Proposal

@nethip nethip merged commit cec41f4 into master Mar 28, 2018
@nethip
Copy link
Contributor

nethip commented Mar 28, 2018

Thanks @swmitra

@swmitra swmitra deleted the swmitra/hintHighlight branch March 28, 2018 09:57
@swmitra
Copy link
Collaborator Author

swmitra commented Mar 28, 2018

Thanks @nethip 😃

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants