Skip to content

Commit

Permalink
Bug-fix: restore missing hover tooltip for SDK-style project import.
Browse files Browse the repository at this point in the history
  • Loading branch information
tintoy committed Oct 9, 2017
1 parent 57401b4 commit cdf68b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
The extension will automatically upgrade settings in the legacy format (i.e. ones without `'schemaVersion': 1`), but now ignores the old `msbuildProjectFileTools` configuration section.
* Bug-fix: completions for item metadata expressions being offered when only completions for item group expressions should be offered.
* Bug-fix: `NullReferenceException` when listing completions for item group expressions.
* Bug-fix: restore missing hover tooltip for SDK-style project import.

## v0.2.11

Expand Down
4 changes: 3 additions & 1 deletion src/LanguageServer.Engine/Handlers/HoverHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ async Task<Hover> OnHover(TextDocumentPositionParams parameters, CancellationTok
return null;
}

Log.Debug("Examining location {Location:l}...", location);

if (!location.IsElementOrAttribute())
{
Log.Debug("Not providing hover information for {Position} in {ProjectFile} (position does not represent an element or attribute).",
Expand Down Expand Up @@ -226,7 +228,7 @@ async Task<Hover> OnHover(TextDocumentPositionParams parameters, CancellationTok
}
else if (location.IsAttribute(out XSAttribute attribute))
{
msbuildObject = projectDocument.GetMSBuildObjectAtPosition(attribute.Element.Start);
msbuildObject = projectDocument.GetMSBuildObjectAtPosition(attribute.Start);
switch (msbuildObject)
{
case MSBuildItemGroup itemGroup:
Expand Down
3 changes: 2 additions & 1 deletion src/LanguageServer.SemanticModel.Xml/XmlLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ public override string ToString()
{
string nodeDescription = Node.Kind.ToString();

return String.Format("XmlPosition({0}) -> {1} @ {2}",
return String.Format("{0} -> {1}:{2} ({3})",
Position,
Node.Kind,
Node.Path,
Node.Range
);
Expand Down

0 comments on commit cdf68b9

Please sign in to comment.