Better attribute completion#2095
Conversation
try to handle attributes in a special way at attribute application point (wip)
|
Now this is nice. |
src/fsharp/vs/ServiceDeclarations.fs
Outdated
| | [] -> failwith "Unexpected empty bag" | ||
| | items -> | ||
| let glyphMajor, glyphMinor = GlyphOfItem(denv,items.Head) | ||
| let nm = if atAttributeApplication && IsAttribute infoReader items.Head then nm.[0..nm.Length-10] else nm |
There was a problem hiding this comment.
nit: can you add a comment?
|
Looks great! |
|
Thanks for doing this so quickly - fantastic 👍 |
|
@dotnet-bot test this please |
|
Great stuff. |
|
Yes, this is great |
|
some autocomplete test failures may be related: |
…does not have it fix related tests
…e application position
|
Different attribute completiion tests fails from launch to launch. I think it's because completion list caching:
This behavior is also reproduced in the editor. We should clean the cache if we move from attr appl point to non such a point. |
|
You need to click into the left menu to "console output". Then scroll down
to the bottom and read from bottom to top.
Am 28.12.2016 18:12 schrieb "Vasily Kirichenko" <notifications@github.com>:
… Where can I find why the tests failed? I examined all the files in this
list:
[image: image]
<https://cloud.githubusercontent.com/assets/873919/21527110/eee782ee-cd39-11e6-864c-c2b9e76856d8.png>
and found nothing labeled as "error" or "failure".
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2095 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNFmkQSQ1-xR6jMdg4xbsr-lJWMFJks5rMpiUgaJpZM4LVDKk>
.
|
|
@forki Thanks, but I didn't find any failures in the console output, the only thing that has helped is searching for "failure" in the text that's available by "View as plain text" link. |
|
@dotnet-bot test this please |
|
Still a couple of failures: |
…mpletion # Conflicts: # vsintegration/src/FSharp.Editor/Common/LanguageService.fs
|
I think it's finally ready. |
|
Thanks for taking care of this. Kevin |
* add FSharpDeclarationListItem.IsAttribute try to handle attributes in a special way at attribute application point (wip) * almost works * suggest all types, modules and namespaces at attribute application position * fix Context.AttributeApplication detection * autocomplete does not remove "Attribute" suffix if an attribute type does not have it fix related tests * do not try to use AstVisitorBase to determine that we are at attribute application position * try to fix tests * fix some tests * cut attribute prefix on editor side * fixed: IsAttribute can throw exceptions which results with empty completion list * fix tests


It fixes #2041
At attribute application position: