Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the right way to do this? #1

Closed
haacked opened this issue Jun 20, 2014 · 4 comments · Fixed by #2 or #17
Closed

What's the right way to do this? #1

haacked opened this issue Jun 20, 2014 · 4 comments · Fixed by #2 or #17

Comments

@haacked
Copy link
Owner

haacked commented Jun 20, 2014

Hey @jaredpar, I hope you don't mind another VS question. I'm trying to write a stupid silly extension that will show a tool tip wherever the cursor is when you save your document.

Seems pretty simple, eh?

I thought I'd try to leverage the QuickInfo stuff because it provides the right tooltip behavior. But I can't seem to trigger it programmatically on save. Also, it seems intrinsically tied to mouse hover.

Am I going about this totally wrong? Got any suggestions for how I should be doing this?

@jaredpar
Copy link
Collaborator

Don't mind at all. Let me take a look.

@jaredpar
Copy link
Collaborator

Quick Info is pretty much tied to mouse hover. It sounds like you want the tool tip to display immediately in which case Signature Help is a better option. I created a demo branch that converted your sample to use signature help in place of quick info

https://github.com/Haacked/Encourage/tree/demo-signature-help

I'm in a bit of a time crunch so this was done in a pretty sloppy fashion. Given more time I would have done proper rename of times to SignatureHelp vs. QuickInfo. But as is it serves as a nice demo.

Although I think you may want to consider a text adornment here instead of signature help. Text adornments allow you to just basically throw up a WPF control anywhere on the screen at pretty much any time you want. It seems like this is closer to the experience you want here. This for example is how I draw the block caret in VsVim

https://github.com/jaredpar/VsVim/tree/master/Src/VimWpf/Implementation/BlockCaret

@haacked
Copy link
Owner Author

haacked commented Jun 20, 2014

BTW, I want change the license to MIT. May I have your contribution under that license?

@jaredpar
Copy link
Collaborator

That's definitely fine.

jaredpar added a commit that referenced this issue Jul 11, 2014
The Javascript IDE implementation has a bug where by it will insert its
signature help into any ISignatureHelpSession that is started.  This
includes the session that is started by the Enouragement extension.
This causes encouragement tips to be intermixed with javascript
signatures

Due to the implementation of the Javascript provider the only suitable
short term fix is to a) run after them and b) just remove their
signatures from our session.

This fixes #16

As a consequence it also fixes #1 as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants