Commit Graph

1385 Commits

Author SHA1 Message Date
Ryan Brandenburg 3da41ae4bb Remove unneeded exclusion 2017-12-04 12:49:33 -08:00
Ajay Bhargav Baaskaran 8abbaa46cc Added imports tracking to TagHelper project system
- #1744
2017-12-01 16:54:36 -08:00
Ryan Brandenburg 99cb120571 Update bootstrappers 2017-12-01 12:29:02 -08:00
N. Taylor Mullen b6fb9bda50 Remove flaky, already tested test.
- This test was flaky due to the nature of what it was testing and had negative value due to the testing complexities. In the integration test pieces (running VS) this is already tested thoroughly.
2017-11-30 10:41:26 -08:00
Pranav K ee3bc17559 Specify runtime versions to install 2017-11-29 14:09:29 -08:00
N. Taylor Mullen 182714c324 Move away from WPF text view connection listener.
- Had to add a new NuGet feed to access latest VS bits.
- Updated tests to react to new ITextViewConnectionListener.

#1735
2017-11-28 10:42:35 -08:00
N. Taylor Mullen df1d0bbcd4 Change text buffer code document provider to follow our public API MEF rules. 2017-11-27 17:28:18 -08:00
N. Taylor Mullen 345eb29c62 Update code doc provider to only rely on VSRazorParser.
- Prior to this change the code document provider took in many sub-providers to allow for understanding of the old RazorEditorParser AND VisualStudioRazorParser. Now that RazorEditorParser is gone we can also change the code doc provider.
2017-11-27 16:54:53 -08:00
Ajay Bhargav Baaskaran 0a76ad7017 Added TagHelper discovery to Razor project systen 2017-11-22 10:56:52 -08:00
Ajay Bhargav Baaskaran 90120f6a3b Added necessary infrastructure for Tag helper project system imports
tracking
2017-11-22 08:48:57 -08:00
Pranav K ece080466b Replace aspnetcore-ci-dev feed with aspnetcore-dev 2017-11-21 15:53:12 -08:00
Nate McMaster 5acef44685 Use MSBuild to set NuGet feeds instead of NuGet.config 2017-11-20 12:30:45 -08:00
N. Taylor Mullen 00ab662429 Merge branch 'rel/vs15.6' into dev 2017-11-20 02:32:12 -08:00
N. Taylor Mullen 4af7a47aac Change code document provider to work in old Razor.
- Prior to this the old code document provider would utilize the editor factory service which would incorrectly create a parser for older Razor documents. This was wrong on many levels.
- Updated tests to react to new expectations.
2017-11-20 02:26:14 -08:00
Pranav K adaa204b06 Use MicrosoftNETCoreApp21PackageVersion to determine the runtime framework in netcoreapp2.1 2017-11-17 13:00:26 -08:00
N. Taylor Mullen 4f7aab7720 Prevent Razor Core from running in non-core scenarios.
- Also added tests.

#1776
2017-11-16 16:23:24 -08:00
N. Taylor Mullen fa2d79296a Merge branch 'dev' into rel/vs15.6 2017-11-15 16:55:09 -08:00
Ajay Bhargav Baaskaran 9a2e3ceab6 Added public api changes for TagHelper project system 2017-11-15 15:52:02 -08:00
N. Taylor Mullen 6cf78ceb1b Move TagHelperCompletionService to VS.Editor.Razor and export it.
- Moved service poco types: `AttributeCompletionContext`, `AttributeCompletionResult`, `ElementCompletionContext` and `ElementCompletionResult`.
- Exported DefaultTagHelperCompletionService.

#1762
2017-11-15 13:01:06 -08:00
N. Taylor Mullen 458111ad03 Move TagHelperFactsService and export it.
- Created a `TagHelperFactsServiceInternal` and export its public counterpart in `Microsoft.VisualStudio.Editor.Razor`.
- Updated tests to react to new naming.

#1762
2017-11-15 13:01:06 -08:00
N. Taylor Mullen 520876e55d Re-add some Legacy ITagHelperResolver infrastructure.
- This is required until the TagHelperProjectSystem is completed.
2017-11-14 16:49:35 -08:00
N. Taylor Mullen 44b4bf6bc6 Cleanup legacy and unintentionally public bits.
- Made `RazorTemplateEngineFactoryService`, `TagHelperResolver`, `RazorDiagnosticJsonConverter` and `RazorLanguageServiceException` internal.
- Deleted all items in the Legacy folder in VisualStudio.LanguageServices.Razor and `RazorLanguageServiceException`.

#1762
2017-11-14 15:42:40 -08:00
N. Taylor Mullen 44e5874029 Move RazorSyntaxFactsService to VS.Editor.Razor and export it.
- Moved service poco types: `AcceptedCharacters`, `BlockKind`, `ClassifiedSpan`, `SpanKind` and `TagHelperSpan` into VS.Editor.Razor.

#1762
2017-11-14 15:42:40 -08:00
N. Taylor Mullen de23788019 Move indentation service to VS.Editor.Razor and export it.
- Removed indentation service extensions and made `GetDesiredIndentation` understand `ITextSnapshot`s and `ITextLineSnapshot`.
- Updated our test `StringTextSnapshot` implementation to have the required features our indentation tests require.
- Updated indentation service tests to use new API.

#1762
2017-11-14 15:42:40 -08:00
N. Taylor Mullen 44a47182b2 Add EditorSettingsManager as an exported MEF component.
- Internalized the core implementation of `EditorSettingsManagerInternal`.
- Added a `VisualStudioWorkspaceAccessor` to enable the `Microsoft.VisualStudio.Editor.Razor` project to have access to the current workspace. Only added the Windows specific implementation of this type since the VS for mac implementation will require infrastructural work to make happen.

#1762
2017-11-14 15:42:40 -08:00
Pranav K 82247fbb09 Update samples and tests to target netcoreapp2.1 2017-11-14 09:45:28 -08:00
Pranav K c61e9b3e84 Preparing to update to 2.2 SDK 2017-11-09 16:45:26 -08:00
Nate McMaster 809dedd40c Preserve DotNetPackageVersionPropsPath when restoring with msbuild.exe 2017-11-08 10:17:50 -08:00
N. Taylor Mullen 80fdad0551 Revert "Only use release VS."
This reverts commit 834fd5a5d0.
2017-11-08 09:35:47 -08:00
N. Taylor Mullen 801ad07560 Add TextBuffer snapshot restriction back to VisualStudioRazorParser. 2017-11-07 10:50:06 -08:00
N. Taylor Mullen 399dcca4f2 Make Foreground dispatchable methods noop if parser is disposed.
- Added tests to validate each of the new noopable methods.

#1750
2017-11-06 16:18:43 -08:00
N. Taylor Mullen 834fd5a5d0 Only use release VS. 2017-11-06 15:06:06 -08:00
N. Taylor Mullen a2972ebf1c Dispatch DocumentStructureChanged event on foreground thread.
- Had to add extra logic to track document structure changes so listeners could know if an event was on its way or not.
- Added and fixed some tests.

#1748
2017-11-06 14:49:18 -08:00
Ajay Bhargav Baaskaran 7002dbf20a Added Name and Documentation to DirectiveTokenDescriptor 2017-11-06 10:55:52 -08:00
Nate McMaster 4d737af167 Pin tool and package versions to make builds more repeatable
Part of aspnet/Universe#575
2017-11-01 18:12:08 -07:00
Nate McMaster 6c7551d9c7 Require the Microsoft.VisualStudio.Component.VSSDK workload to be installed 2017-10-30 08:59:20 -07:00
N. Taylor Mullen ab62ea9321 React to API feedback on VisualStudioRazorParser.
- Changed `ReparseAsync` to be `QueueReparse`. It's now async void to not give the misconception that it blocks until a reparse has been completed.
- Removed `IContextChangedListener`. People can get the same effect of the interface by retrieving the document tracker interface via the `RazorEditorFactoryService` and then when its context changes getting the parser.
- Exposed `TryGetParser` to aid in replacing `IContextChangedListener`.
- Updated tests to not rely on `IContextChangedListener`.
2017-10-25 10:28:01 -07:00
N. Taylor Mullen d027697389 Merge branch 'rel/vs15.5' into dev 2017-10-25 09:45:28 -07:00
N. Taylor Mullen 6ac0137a9f Make AtDirectiveCompletionPoint resilient to null owners.
- Added a test to verify the new owner == null case.

#1733
2017-10-25 09:44:33 -07:00
N. Taylor Mullen fb8aff12f1 Add EditorSettings management to workspaces.
- Built a design where there's a singleton `EditorSettingsManager` that handles the "current" settings state in the world. When it detects that settings have changed via an update method being called it dispatches a `Changed` event.
- Exposed editor settings on the document tracker. When the editor settings change the document tracker dispatches to any listeners that its context has changed.
- Added tests to validate all the various settings management.

#1718
2017-10-24 10:42:49 -07:00
N. Taylor Mullen 212d97e511 Manage VisualStudioRazorParser lifetime.
- Exposed `VisualStudioRazorParser`, `DocumentStructureChangedEventArgs` and `ICanHasContextChangedListener` as ways to consume the new parser for a Razor document.
- Split the `VisualStudioRazorParser` into an abstract base and an implementation to avoid internal constructors.
- Changed the parser and corresponding smart indenter to take in document trackers, template engine factories and parser context change listeners. Of these additions the parser context change listeners will be deprecated once we own the TagHelper discovery mechanisms.
- Changed how the parser manages its internal parsing life cycle. It now creates template engines when the document tracker tells it to. So when project changes happen or new documents are opened the parser will re-instantiate its internal parser to ensure that it is parsing against the correct configurations.
- Removed all accessor services in favor of a singular RazorEditorFactoryService. This service is responsible for retrieving/creating various Razor components.
- Changed the code document provider to now use the parser provider in order to locate code documents associated with buffers. Prior to this that logic was hard coded.
- Removed old template engine reconstruction logic in the document tracker now that the parser owns that piece.
- Updated tracker to notify listeners when it's unsubscribing. This is how listeners can know when to tear bits down.
- Refactored/added pieces to the `DefaultVisualStudioRazorParser` in order to improve its unit/integration testing ability.
- Updated existing tests to react to new signatures.
- Added new visual studio razor parser tests, uncommented existing ones, and re-enforced ones that were previously flakey.
- Added various tests for the new services added, i.e. text buffer factory service tests.

#1630
2017-10-23 14:39:15 -07:00
Sergei Dorogin a0733ffa91 RazorPageGenerator: extracted creating RazorEngine into a method [refactoring] (#1727)
* RazorPageGenerator: extracted creating RazorEngine into a method to simplify reusing logic in custom generators

RazorPageGenerator: added optional cli argument with base directory  (previously current dir always was used)
2017-10-23 12:44:29 -07:00
Ryan Nowak 984713c297 Add an opt-out for building the VSIX
Ex:
.\build.cmd /p:BuildVSIX=false
2017-10-20 16:33:38 -07:00
Ryan Nowak b6d01fda46 Target 15.6 for the VSIX in dev 2017-10-20 14:10:18 -07:00
Nate McMaster b064a28dcf Ensure the VSIX project is skipped when executing restore and build from dotnet-cli 2017-10-18 15:10:25 -07:00
Ryan Brandenburg c28940c915 Add RepositoryRoot 2017-10-18 09:37:36 -07:00
N. Taylor Mullen 0241e8ff8b Pin CodeAnalysis.CSharp to workaround newer VS MSBuild restore fixes.
- Noticed that our VSIX target would fail to restore the project on newer versions of MSBuild 15.0.
2017-10-17 16:45:17 -07:00
N. Taylor Mullen 31c16af40b Add smart indentation for brace completion.
- Added a standalone brace smart indenter that listens to `ITextBuffer` changed events to determine when a brace completion event needs to be handled.
- Added methods to deal with getting document trackers from `ITextBuffer`s.
- Added a `BraceSmartIndenterTest` and `BraceSmartIndenterIntegrationTest` to verify all parts of the smart indenter.
- Moved private test infrastructure classes into their own files and expanded on their functionality to enable the brace completion smart indent scenarios.

#1538
2017-10-12 15:30:28 -07:00
Ajay Bhargav Baaskaran f4e9ddad22 Link syntax tree Span nodes 2017-10-10 13:07:27 -07:00
N. Taylor Mullen e3d2b48b89 Fix [ForegroundFact].
#1716
2017-10-10 10:27:37 -07:00