brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Only query hint providers that have offered to show hints #2171

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by iwehrman Saturday Dec 01, 2012 at 01:50 GMT Originally opened as https://github.com/adobe/brackets/pull/2261


@raymondlim@gruehle@joelrbrandt

Partially addresses adobe/brackets#2258 by way of solution #2. The shouldShowHintsOnChange flag, which indicated that some provider was willing to provide hints, is removed in favor of a list, enabledHintProviders, that is populated with hint providers for which shouldShowHintsOnKey returns true. Consequently, only those providers that have offered to provide hints are queried. If the hint list is requested explicitly via Ctrl-Space, the individual providers are not initially queried with shouldShowHintsOnKey, and so an additional flag queryAllProviders indicates in this case that hints should be elicited from all providers instead of just those that are enabled.


iwehrman included the following code: https://github.com/adobe/brackets/pull/2261/commits

core-ai-bot commented 3 years ago

Comment by RaymondLim Saturday Dec 01, 2012 at 03:40 GMT


@iwehrman I just posted my comments in #2258. The issue is not really in shouldShowHintsOnKey api, and getQueryInfo api should be called for every provider so that each provider has a chance to decide whether it should show hints or not.

The real issue is the lacking of an api to provide the CSS context info and Joel has implemented his version as getFontTokenAtCursor in EWF/cssFontParser.js. I would say we need a general api in CSSUtils.js and once we have that, you need to switch to use the new api that provides better context info.

core-ai-bot commented 3 years ago

Comment by joelrbrandt Saturday Dec 01, 2012 at 16:43 GMT


@RaymondLim Thanks for the reply! Please see comment in https://github.com/adobe/brackets/issues/2258#issuecomment-10918998

core-ai-bot commented 3 years ago

Comment by RaymondLim Saturday Dec 01, 2012 at 22:24 GMT


@iwehrman I was wrong to say that the issue #2258 is not in shouldShowHintsOnKey api. It does have an unintended side effect and causes EWF to work even though it does not return true in shouldShowHintsOnKey api for space characters. So your changes seem to fix that side effect.

core-ai-bot commented 3 years ago

Comment by iwehrman Monday Dec 03, 2012 at 17:07 GMT


@RaymondLim Thanks for the review! I've updated the pull request.

core-ai-bot commented 3 years ago

Comment by RaymondLim Tuesday Dec 04, 2012 at 06:33 GMT


Thanks for making all these changes, but sorry to say that we're making another change in registerHintProvider api (pull request #2279) and we no longer need this pull request.

core-ai-bot commented 3 years ago

Comment by joelrbrandt Wednesday Dec 12, 2012 at 00:27 GMT


Closing this pull request as we're working on an alternate solution.