Commit Graph

1134 Commits

Author SHA1 Message Date
N. Taylor Mullen 2b1bdb7342 Move RazorCompletionFactsService to CodeAnalysis.Workspaces.Razor.
- Also updated workspaces test project to also compile for netcoreapp2.2.
2018-09-18 17:34:45 -07:00
Ryan Nowak 40080f3637 add issue numbers 2018-09-13 16:04:17 -07:00
Ryan Nowak 8d537a3c43 Add Issue numbers 2018-09-13 16:03:36 -07:00
Ryan Nowak b67fa0664d Check for spans that are missing from output 2018-09-13 14:51:46 -07:00
N. Taylor Mullen d2d84d00f5 Allow GeneratedCodeContainer to accept initial output. 2018-09-10 16:14:25 -07:00
N. Taylor Mullen da935bfa95 Generated document output persists result to generated code container.
- Prior to this we had a `BackgroundDocumentGenerator` that would constantly be updating generated code containers. With this changes we've changed the details in how a `GeneratedCodeContainer` can be mutated. It can now be touched from any thread and is updated when an underlying `DocumentSnapshot` has available content. However, if a generated output comes through that's older then the last seen output we no-op.
- Removed `BackgroundDocumentGenerator` SetOutput logic.
- Updated tests to react to new behavior of `GetGeneratedOutputAsync`.
- Added new test to verify getting generated output results in the setting of the host documents output.
2018-09-10 15:24:35 -07:00
Ajay Bhargav Baaskaran 96709c4d77
Actually verify classified spans (#2575) 2018-09-10 10:48:47 -07:00
N. Taylor Mullen 4619d59828 Add IVT to Razor LanguageServer.
- `LanguageServer.StrongNamed` isn't a thing anymore.
2018-08-30 11:26:02 -07:00
N. Taylor Mullen b8ff40fbbd Merge remote-tracking branch 'origin/release/2.2' 2018-08-29 16:00:27 -07:00
N. Taylor Mullen 852ad8df87 Allow content to be written after caught exception from child TagHelper.
- The issue was that the `executeChildContentAsync` call was stopping the invocation of the `_endTagHelperWritingScope`. Therefore, we'd never finish the TagHelper content scope and all following content would be ignored.
- Added two tests to validate the new functionality.

#2561
2018-08-29 16:00:15 -07:00
Ajay Bhargav Baaskaran 9e4c4079f2
Renamed HtmlTextSyntax to HtmlTextLiteralSyntax for consistency (#2560)
* Renamed HtmlTextSyntax to HtmlTextLiteralSyntax for consistency

* Generated baselines
2018-08-28 14:00:32 -07:00
Ajay Bhargav Baaskaran f4808b50b5 Renamed WhiteSpace to Whitespace 2018-08-24 15:45:55 -07:00
Ajay Bhargav Baaskaran 27a9991f21
Auto generate CSharp syntax tree nodes (#2550)
* Auto generate CSharp syntax tree nodes
- Auto generated syntax nodes, visitors and factories
- Renamed RazorComment to RazorCommentLiteral to avoid a conflict
- Modified the Visit() contract
- Added new SyntaxKinds
- Regenerated baselines
2018-08-21 14:20:33 -07:00
Ajay Bhargav Baaskaran db2a142132
Updated the tokenizer and parser to operate on SyntaxTokens directly (#2540)
* Updated the tokenizer and parser to operate on SyntaxTokens directly
- The tokenizer and parser now operates directly on SyntaxTokens (Green)
- The SyntaxToken(Red) is now created when the Span is built with the correct parent and position
- All other passes that run after the parsing is complete(TagHelperRewriter etc) will operate on the Red tokens.
- There is now only one type for all SyntaxTokens. They are differentiated by their SyntaxKind.
- Added equivalence checking for tokens
- Updated test code to react
- Regenerated baselines
2018-08-16 16:11:01 -07:00
Ryan Nowak 13e13d7632 Add generated documents to workspace 2018-08-15 10:54:32 -07:00
Ajay Bhargav Baaskaran 9a9931d59f
Initial infrastrucure for a better html parser (#2522)
Initial infrastrucure for a better html parser
- Added new syntax node types that follow Roslyn's red/green pattern
- Modified the html text node in the current syntax tree to use the new
nodes
- Updated test infrastructure
- Generated baselines
2018-08-13 11:26:24 -07:00
Artak 692e09b017
Fixes #2491: Treating RazorCommentTransition-s similar to Transitions in tag content (#2531)
* Treating RazorCommentTransition-s similar to Transitions in tag content
2018-08-10 14:46:58 -07:00
N. Taylor Mullen 572b55690d Refactor completion logic into standalone service.
- Migrated the completion item source provider and the legacy directive completion provider to use the new service.
- Cleaned up duplicate tests that were both verifying common completion functionality.
- Ensured that the legacy `RazorDirectiveCompletionProvider` did not result in additional Razor assembly loads when in C# scenarios.

#2530
2018-08-10 14:46:13 -07:00
N. Taylor Mullen aec88e3eba Change Razor directive completions to use new completions API.
- Kept the same behavior as we previously had with Razor directive completions.
- Attempted adding additional functionalities such as lighting up Razor directive completion when completion was invoked on top of Razor directives (non-C#) but ran into issues involving the core HTML editor not consuming the new completion APIs yet. That's something we'll have to re-visit once they move to the new completion APIs.
- Added tests to validate all aspects of new completion APIs.
- Made completion provider turn on and off based off of feature flag.

#1743
#1813
2018-08-10 11:37:47 -07:00
Ajay Bhargav Baaskaran d097adee5f
Unblock VSTS linux builds (#2526)
* Unblock VSTS linux builds

* Updated yml
2018-08-08 10:48:16 -07:00
Pranav K 3ff064cea3 Lock when reading \ writing process output
Fixes #2516
2018-07-30 16:21:42 -07:00
N. Taylor Mullen cb557cf771 Changed `GetDesiredIndentation` to be resilient to our SyntaxTree which occasionally has gaps.
- Added a test to cover the scenario.

#2489
2018-07-30 10:45:18 -07:00
N. Taylor Mullen 38e145389e Fix BackgroundDocumentGenerator flaky tests.
- Some time spans were too aggressive for parsing a Razor file on a slow environment.
- Fixed an obvious race where we'd expect 0 pending notifications when it was possible to be in the process of clearing notifications.

#2506
2018-07-27 14:49:12 -07:00
Pranav K 676543b8c9 Skip BuildIncremental_SimpleMvc_PersistsTargetInputFile on xplat
For some inexplicable reason timestamps returned as part of the test often show up
as being different resulting in test flakiness. We've manually verified that this
is not a product issue and builds are correctly incremental on xplat. See #2219
for past discussions.

Fixes https://github.com/aspnet/Razor/issues/2503
2018-07-27 14:22:23 -07:00
Ajay Bhargav Baaskaran 8e23eb38b4 Honor NoBuild flag during publish 2018-07-26 11:40:38 -07:00
Doug Bunting 684e7855a6
Handle `null` entries correctly for `IsEmptyOrWhiteSpace`
- #2497

nits:
- take VS suggestions
- un-scramble `IsEmptyOrWhiteSpaceCore(...)` for readability
2018-07-23 15:25:41 -07:00
Ajay Bhargav Baaskaran eb6faf1754 Redo baselines 2018-07-19 15:29:30 -07:00
Ajay Bhargav Baaskaran 8e667ba730 Rename parser tests to have shorter names 2018-07-19 15:22:30 -07:00
Ajay Bhargav Baaskaran 7f6b05149d Generate deterministic unique ids for tag helpers 2018-07-17 14:01:42 -07:00
Ajay Bhargav Baaskaran 21f2edce16 Generate and verify baselines for ClassifiedSpans and TagHelperSpans
- Moved GetClassifiedSpans and GetTagHelperSpans logic to Razor.Language
2018-07-17 10:54:42 -07:00
N. Taylor Mullen cfd63e1e2e Change HTML splitting logic to not split on surrogate pairs.
- When a surrogate pair is about to be split down the middle we reduce the size of our split by 1 character. This way we split right before a surrogate pair. In the case of zero width joiners, if we split on a zero width joiner we still render valid bytes because the zero width joiner by itself can stand alone.
- Added tests for the various split cases.

#2470
2018-07-13 17:18:56 -07:00
Ajay Bhargav Baaskaran ce4780a830 Renamed symbol to token everywhere
- Updated Resources
- Updated test code
- Regenerated baselines
- Added exclusions for apicheck (See https://github.com/aspnet/BuildTools/issues/704)
2018-07-06 16:29:36 -07:00
Ajay Bhargav Baaskaran ed7c4e8f5c Parser tests clean up 2018-07-06 16:24:39 -07:00
Ajay Bhargav Baaskaran f9a09372b7 Converted TagHelperBlockRewriterTest 2018-06-29 15:33:21 -07:00
Ajay Bhargav Baaskaran 984e7826d6 Converted TagHelperParseTreeRewriterTest 2018-06-29 12:23:52 -07:00
Ajay Bhargav Baaskaran b232a1103a Prereq for converting tag helper tests 2018-06-29 12:15:13 -07:00
Ryan Nowak 942d4d194c Convert HtmlToCodeSwitchTest 2018-06-28 13:30:52 -07:00
N. Taylor Mullen 42e8f4abc8 Convert HtmlTagsTest to use baselines.
#2263
2018-06-28 10:49:15 -07:00
N. Taylor Mullen 8211dfff9c Convert HtmlErrorTest to use baselines.
#2263
2018-06-28 10:49:15 -07:00
Ryan Nowak ea96c50dce Convert WhitespaceRewriterTest 2018-06-27 17:02:03 -07:00
Ajay Bhargav Baaskaran 8eef4a4bb3 Convert HtmlDocumentTest 2018-06-27 15:47:57 -07:00
N. Taylor Mullen 67b5588185 Convert CSharpWhitespaceHandlingTest to use baselines.
#2263
2018-06-27 15:09:33 -07:00
Ajay Bhargav Baaskaran 048a6ec3ea Converted HtmlAttributeTest 2018-06-27 14:47:44 -07:00
N. Taylor Mullen 5950928baa Convert CSharpSpecialBlockTest to use baselines.
#2263
2018-06-27 14:35:22 -07:00
Ajay Bhargav Baaskaran a7fd53b3a3 Convert CSharpNestedStatementsTest 2018-06-27 13:43:51 -07:00
Ajay Bhargav Baaskaran df22392996 Convert CSharpImplicitExpressionTest 2018-06-27 13:43:51 -07:00
Ajay Bhargav Baaskaran d48946c2e0 Convert CSharpExplicitExpressionTest 2018-06-27 13:43:50 -07:00
Ryan Nowak 363be73a00 Convert more tests
CSharpRazorCommentsTest
CSharpReservedKeyWordsTest
CSharpToMarkupSwitchTest
2018-06-27 13:14:58 -07:00
Ryan Nowak 4fda468f06 Convert CSharpSectionTest 2018-06-27 13:14:58 -07:00
Ajay Bhargav Baaskaran c0929a9002 Convert CSharpErrorTest 2018-06-27 12:53:52 -07:00