Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bockover <abock@microsoft.com>2019-03-23 21:42:04 +0300
committerAaron Bockover <abock@microsoft.com>2019-04-01 20:07:12 +0300
commitef5646ad0085b99e6e687fada5d3affdd6460d3f (patch)
treec6cb21833f388f72186c9f7e43d2686c627a570d
parente3e204e15e9d27e843eecc5f6959cb86774a8674 (diff)
Sync VS-Platform
-rw-r--r--src/Editor/Core/Def/BaseUtility/Microsoft.VisualStudio.Utilities.Overview.mht1818
-rw-r--r--src/Editor/Core/Def/BaseUtility/Microsoft.VisualStudio.Utilities.UsageGuide.mht3288
-rw-r--r--src/Editor/Core/Def/CoreUtility.csproj21
-rw-r--r--src/Editor/Core/Def/CoreUtilityAssemblyInfo.cs23
-rw-r--r--src/Editor/Core/Def/Features/PredefinedEditorFeatureNames.cs6
-rw-r--r--src/Editor/Core/Def/GettextCatalog.cs47
-rw-r--r--src/Editor/Core/Def/IImageService.cs27
-rw-r--r--src/Editor/Core/Def/ImageDescription.cs69
-rw-r--r--src/Editor/Core/Def/ImageTags.cs17
-rw-r--r--src/Editor/Core/Impl/ContentType/Strings.Designer.cs2
-rw-r--r--src/Editor/Core/Impl/CoreUtilityImpl.csproj44
-rw-r--r--src/Editor/Core/Impl/CoreUtilityImplAssemblyInfo.cs30
-rw-r--r--src/Editor/Core/Impl/Features/StandardEditorFeatureDefinitions.cs5
-rw-r--r--src/Editor/Language/Def/Intellisense/AssemblyInfo.cs25
-rw-r--r--src/Editor/Language/Def/Intellisense/BulkObservableCollection.cs245
-rw-r--r--src/Editor/Language/Def/Intellisense/Completion.cs161
-rw-r--r--src/Editor/Language/Def/Intellisense/Completion2.cs90
-rw-r--r--src/Editor/Language/Def/Intellisense/Completion3.cs93
-rw-r--r--src/Editor/Language/Def/Intellisense/Completion4.cs53
-rw-r--r--src/Editor/Language/Def/Intellisense/CompletionIcon.cs58
-rw-r--r--src/Editor/Language/Def/Intellisense/CompletionIcon2.cs68
-rw-r--r--src/Editor/Language/Def/Intellisense/CompletionMatchType.cs22
-rw-r--r--src/Editor/Language/Def/Intellisense/CompletionPresenterStyle.cs115
-rw-r--r--src/Editor/Language/Def/Intellisense/CompletionSelectionStatus.cs123
-rw-r--r--src/Editor/Language/Def/Intellisense/CompletionSet.cs567
-rw-r--r--src/Editor/Language/Def/Intellisense/CompletionSet2.cs53
-rw-r--r--src/Editor/Language/Def/Intellisense/CurrentParameterChangedEventArgs.cs44
-rw-r--r--src/Editor/Language/Def/Intellisense/FilteredObservableCollection.cs262
-rw-r--r--src/Editor/Language/Def/Intellisense/ICompletionBroker.cs73
-rw-r--r--src/Editor/Language/Def/Intellisense/ICompletionSession.cs57
-rw-r--r--src/Editor/Language/Def/Intellisense/ICompletionSource.cs29
-rw-r--r--src/Editor/Language/Def/Intellisense/ICompletionSourceProvider.cs27
-rw-r--r--src/Editor/Language/Def/Intellisense/ICustomCommit.cs17
-rw-r--r--src/Editor/Language/Def/Intellisense/ICustomIntellisensePresenter.cs17
-rw-r--r--src/Editor/Language/Def/Intellisense/ICustomKeyboardHandler.cs22
-rw-r--r--src/Editor/Language/Def/Intellisense/IFocusableIntellisensePresenter.cs17
-rw-r--r--src/Editor/Language/Def/Intellisense/IGlyphService.cs26
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisenseCommandTarget.cs23
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisenseController.cs40
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisenseControllerProvider.cs24
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisenseFilter.cs51
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisensePresenter.cs17
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisensePresenterProvider.cs25
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisenseSession.cs122
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisenseSessionStack.cs51
-rw-r--r--src/Editor/Language/Def/Intellisense/IIntellisenseSessionStackMapService.cs22
-rw-r--r--src/Editor/Language/Def/Intellisense/ILightBulbBroker.cs155
-rw-r--r--src/Editor/Language/Def/Intellisense/ILightBulbBroker2.cs96
-rw-r--r--src/Editor/Language/Def/Intellisense/ILightBulbSession.cs74
-rw-r--r--src/Editor/Language/Def/Intellisense/IParameter.cs46
-rw-r--r--src/Editor/Language/Def/Intellisense/IPopupIntellisensePresenter.cs75
-rw-r--r--src/Editor/Language/Def/Intellisense/ISignature.cs71
-rw-r--r--src/Editor/Language/Def/Intellisense/ISignatureHelpBroker.cs81
-rw-r--r--src/Editor/Language/Def/Intellisense/ISignatureHelpSession.cs30
-rw-r--r--src/Editor/Language/Def/Intellisense/ISignatureHelpSource.cs43
-rw-r--r--src/Editor/Language/Def/Intellisense/ISignatureHelpSourceProvider.cs28
-rw-r--r--src/Editor/Language/Def/Intellisense/ITelemetryDiagnosticID.cs19
-rw-r--r--src/Editor/Language/Def/Intellisense/ITextFormattable.cs42
-rw-r--r--src/Editor/Language/Def/Intellisense/IWpfKeyboardTrackingService.cs32
-rw-r--r--src/Editor/Language/Def/Intellisense/IconDescription.cs53
-rw-r--r--src/Editor/Language/Def/Intellisense/IntellisenseDef.csproj28
-rw-r--r--src/Editor/Language/Def/Intellisense/IntellisenseFilter.cs70
-rw-r--r--src/Editor/Language/Def/Intellisense/IntellisenseKeyboardCommand.cs78
-rw-r--r--src/Editor/Language/Def/Intellisense/IntellisenseSpaceReservationManagerNames.cs35
-rw-r--r--src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoBroker.cs77
-rw-r--r--src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSession.cs50
-rw-r--r--src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSession2.cs19
-rw-r--r--src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSource.cs31
-rw-r--r--src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSourceProvider.cs27
-rw-r--r--src/Editor/Language/Def/Intellisense/LegacyQuickInfo/QuickInfoPresenterStyle.cs52
-rw-r--r--src/Editor/Language/Def/Intellisense/LightBulbPresenterStyle.cs193
-rw-r--r--src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableRelationship.cs21
-rw-r--r--src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbol.cs29
-rw-r--r--src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbolSource.cs42
-rw-r--r--src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbolSourceProvider.cs41
-rw-r--r--src/Editor/Language/Def/Intellisense/NavigableSymbol/PredefinedNavigableRelationships.cs29
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/ExceptionEventArgs.cs27
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IDesiredHeightProvider.cs23
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResult.cs60
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResultScrollState.cs30
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IExternallyBrowsablePeekResult.cs13
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IFindPeekResultsCallback.cs26
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekBroker.cs160
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekRelationship.cs21
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResizeListener.cs17
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResult.cs54
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultCollection.cs79
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultDisplayInfo.cs41
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultDisplayInfo2.cs36
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultFactory.cs161
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultPresentation.cs129
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultPresenter.cs36
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultQuery.cs45
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultScrollState.cs22
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekResultSource.cs30
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekSession.cs52
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekableItem.cs44
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekableItemSource.cs30
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/IPeekableItemSourceProvider.cs30
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/NestedPeekTriggeredEventArgs.cs53
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/PeekResizeEventArgs.cs38
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/PeekResultDisplayInfo.cs74
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/PeekResultDisplayInfo2.cs52
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/PeekSessionCreationOptions.cs106
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/PredefinedPeekRelationships.cs32
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/RecreateContentEventArgs.cs27
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/SupportsPeekRelationshipAttribute.cs37
-rw-r--r--src/Editor/Language/Def/Intellisense/Peek/SupportsStandaloneFilesAttribute.cs33
-rw-r--r--src/Editor/Language/Def/Intellisense/QuerySuggestedActionCompletionStatus.cs23
-rw-r--r--src/Editor/Language/Def/Intellisense/SelectedSignatureChangedEventArgs.cs44
-rw-r--r--src/Editor/Language/Def/Intellisense/SignatureHelpPresenterStyle.cs76
-rw-r--r--src/Editor/Language/Def/Intellisense/StandardGlyphGroup.cs392
-rw-r--r--src/Editor/Language/Def/Intellisense/StandardGlyphItem.cs47
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction.cs96
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction2.cs19
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategory.cs36
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategoryRegistryService.cs62
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategoryRegistryService2.cs30
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategorySet.cs20
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionWithFlavors.cs16
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSource.cs45
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSource2.cs42
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSourceProvider.cs33
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/PredefinedSuggestedActionCategoryNames.cs36
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryDefinition.cs27
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryToIconDefinition.cs53
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionSet.cs109
-rw-r--r--src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionSetPriority.cs32
-rw-r--r--src/Editor/Language/Def/Intellisense/UIElementType.cs32
-rw-r--r--src/Editor/Language/Def/Intellisense/ValueChangedEventArgs.cs41
-rw-r--r--src/Editor/Language/Def/Language/AssemblyInfo.cs35
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/Data/AggregatedCompletionContext.cs56
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionContext.cs8
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionFilter.cs15
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionItem.cs27
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionPresentationViewModel.cs8
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionStartData.cs2
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/Data/FilteredCompletionModel.cs2
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionBroker.cs35
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionCommitManagerProvider.cs2
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionItemManagerProvider.cs2
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSource.cs2
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSourceProvider.cs5
-rw-r--r--src/Editor/Language/Def/Language/AsyncCompletion/ICompletionPresenterProvider.cs2
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/CodeCleanUpExecutionContext.cs25
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/ConfigurationKeyAttribute.cs29
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/FixIdAttribute.cs29
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/FixIdContainer.cs39
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/FixIdDefinition.cs16
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/HelpLinkAttrbute.cs29
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpExecutionContext.cs21
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpFixerRegistrationService.cs40
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpScope.cs12
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanupFixer.cs22
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanupFixerProvider.cs22
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/IFixInformation.cs31
-rw-r--r--src/Editor/Language/Def/Language/CodeCleanup/TextBufferCodeCleanupScope.cs22
-rw-r--r--src/Editor/Language/Def/Language/CodeElementKinds.cs110
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/ICodeLensCallbackListener.cs53
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/ICodeLensDescriptor.cs42
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/ICodeLensTag.cs25
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/CodeLensServiceProtocolNames.cs68
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDataPointDescriptor.cs37
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDataPointProviderDescriptor.cs54
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDescriptor.cs44
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailEntryCommand.cs38
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailEntryFieldDescriptor.cs24
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailHeaderDescriptor.cs37
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailPaneCommand.cs31
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailsDescriptor.cs34
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailsEntryDescriptor.cs40
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/PredefinedCodeLensDetailFieldNames.cs54
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/ReferenceDetailEntryDescriptor.cs70
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/DetailsTemplateNameAttribute.cs27
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/IAsyncCodeLensDataPoint.cs43
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/IAsyncCodeLensDataPointProvider.cs52
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/ICodeLensCallbackService.cs65
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/CodeLensAggregateJsonConverter.cs146
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/ImageIdJsonConverter.cs35
-rw-r--r--src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/SpanJsonConverter.cs35
-rw-r--r--src/Editor/Language/Def/Language/LanguageDef.csproj26
-rw-r--r--src/Editor/Language/Def/Language/QuickInfo/IAsyncQuickInfoSession2.cs14
-rw-r--r--src/Editor/Language/Def/StandardClassification/AssemblyInfo.cs27
-rw-r--r--src/Editor/Language/Def/StandardClassification/IStandardClassificationService.cs96
-rw-r--r--src/Editor/Language/Def/StandardClassification/LanguagePriority.cs36
-rw-r--r--src/Editor/Language/Def/StandardClassification/PredefinedClassificationTypeNames.cs162
-rw-r--r--src/Editor/Language/Def/StandardClassification/StandardClassification.csproj16
-rw-r--r--src/Editor/Language/Impl/Language/AssemblyInfo.cs22
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionBroker.cs283
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionSession.cs332
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/CompletionAvailabilityCacheKey.cs34
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/CompletionAvailabilityUtility.cs73
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/CompletionCommandHandlers.cs391
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/CompletionSourceConnectionResult.cs30
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/CompletionTelemetry.cs245
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/CompletionUtilities.cs18
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/IModelComputationCallbackHandler.cs4
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/MetadataUtilities.cs62
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/ModelComputation.cs23
-rw-r--r--src/Editor/Language/Impl/Language/AsyncCompletion/UseAsyncCompletionOptionDefinition.cs30
-rw-r--r--src/Editor/Language/Impl/Language/CodeCleanup/CodeCleanupFixerRegistrationService.cs66
-rw-r--r--src/Editor/Language/Impl/Language/CodeCleanup/FixerCodeInfo.cs44
-rw-r--r--src/Editor/Language/Impl/Language/CodeCleanup/IFixerCodeDefinitionMetadata.cs36
-rw-r--r--src/Editor/Language/Impl/Language/LanguageImpl.csproj40
-rw-r--r--src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoPresentationSession.cs31
-rw-r--r--src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoSession.cs20
-rw-r--r--src/Editor/Language/Impl/Language/QuickInfo/QuickInfoController.cs16
-rw-r--r--src/Editor/Language/Impl/Language/QuickInfo/QuickInfoTextViewCreationListener.cs4
-rw-r--r--src/Editor/Language/Impl/Language/QuickInfo/SquiggleQuickInfoSourceProvider.cs4
-rw-r--r--src/Editor/Language/Impl/Language/Strings.Designer.cs2
-rw-r--r--src/Editor/Language/Impl/StandardClassification/StandardClassificationService.cs335
-rw-r--r--src/Editor/Language/Util/Directory.Build.props8
-rw-r--r--src/Editor/Language/Util/LanguageUtil/AssemblyInfo.cs21
-rw-r--r--src/Editor/Language/Util/LanguageUtil/LanguageUtil.csproj20
-rw-r--r--src/Editor/Microsoft.VisualStudio.Text.Implementation.csproj143
-rw-r--r--src/Editor/Text/Def/Extras/Extras.csproj19
-rw-r--r--src/Editor/Text/Def/Extras/Find/FindCommandArgs.cs84
-rw-r--r--src/Editor/Text/Def/Extras/Find/IFindPresenter.cs21
-rw-r--r--src/Editor/Text/Def/Extras/Find/IFindPresenterFactory.cs19
-rw-r--r--src/Editor/Text/Def/Extras/InfoBar/IInfoBarPresenter.cs12
-rw-r--r--src/Editor/Text/Def/Extras/InfoBar/IInfoBarPresenterFactory.cs10
-rw-r--r--src/Editor/Text/Def/Extras/InfoBar/InfoBarViewModel.cs51
-rw-r--r--src/Editor/Text/Def/Extras/PreviewEditorCommandArgs.cs23
-rw-r--r--src/Editor/Text/Def/Internal/AssemblyInfo.cs45
-rw-r--r--src/Editor/Text/Def/Internal/Internal.csproj49
-rw-r--r--src/Editor/Text/Def/Internal/Language/CompletionPresenterStylePrivate.cs41
-rw-r--r--src/Editor/Text/Def/Internal/Language/IWaitContext.cs28
-rw-r--r--src/Editor/Text/Def/Internal/Language/IWaitIndicator.cs20
-rw-r--r--src/Editor/Text/Def/Internal/Language/Intellisense/ICompletionSession2.cs24
-rw-r--r--src/Editor/Text/Def/Internal/Language/Intellisense/NativeMethods.cs81
-rw-r--r--src/Editor/Text/Def/Internal/Language/Intellisense/VisualTreeExtensions.cs104
-rw-r--r--src/Editor/Text/Def/Internal/Language/WaitHelper.cs48
-rw-r--r--src/Editor/Text/Def/Internal/TestContracts/ICodeLensAdornment_Test.cs22
-rw-r--r--src/Editor/Text/Def/Internal/TestContracts/ICompletionSession_Test.cs20
-rw-r--r--src/Editor/Text/Def/Internal/TestContracts/IOverviewMarkMargin_Test.cs23
-rw-r--r--src/Editor/Text/Def/Internal/TextData/IStructureSpanningTreeManager.cs60
-rw-r--r--src/Editor/Text/Def/Internal/TextData/IStructureSpanningTreeService.cs35
-rw-r--r--src/Editor/Text/Def/Internal/TextLogic/ITypingTelemetrySession.cs18
-rw-r--r--src/Editor/Text/Def/Internal/TextLogic/ITypingTelemetrySessionProvider.cs17
-rw-r--r--src/Editor/Text/Def/Internal/TextUI/LegacySelection.cs4
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IEditorOptionDescription.cs50
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IOptionControl.cs53
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IOptionsPage.cs10
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/GlyphMarginAttribute.cs42
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/HorizontalPositioningMode.cs30
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/IClassificationFormatMetadata.cs23
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/ICompositingLineTransformSource.cs27
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/IDataStorage.cs28
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/IDataStorageService.cs24
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/IEditorFormatMetadata.cs35
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/IRtfBuilderService2.cs108
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/ISuggestionTag.cs19
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/IViewSynchronizationManager.cs22
-rw-r--r--src/Editor/Text/Def/Internal/TextUIWpf/IsOverlayLayerAttribute.cs37
-rw-r--r--src/Editor/Text/Def/TextData/Diagrams/BufferMarkers.cd47
-rw-r--r--src/Editor/Text/Def/TextData/Diagrams/Projection.cd131
-rw-r--r--src/Editor/Text/Def/TextData/Diagrams/ReadOnlyRegions.cd92
-rw-r--r--src/Editor/Text/Def/TextData/Diagrams/SnapshotMarkers.cd50
-rw-r--r--src/Editor/Text/Def/TextData/Diagrams/Text.cd137
-rw-r--r--src/Editor/Text/Def/TextData/Diagrams/TextEdit.cd25
-rw-r--r--src/Editor/Text/Def/TextData/Diagrams/TextEvents.cd75
-rw-r--r--src/Editor/Text/Def/TextData/Model/Microsoft.VisualStudio.Text.Model.Overview.mht4612
-rw-r--r--src/Editor/Text/Def/TextData/Model/TextSnapshotExtensions.cs81
-rw-r--r--src/Editor/Text/Def/TextData/TextData.csproj2
-rw-r--r--src/Editor/Text/Def/TextLogic/AssemblyInfo.cs5
-rw-r--r--src/Editor/Text/Def/TextLogic/Classification/Microsoft.VisualStudio.Text.Classification.Overview.mht3155
-rw-r--r--src/Editor/Text/Def/TextLogic/Diagrams/Tagging.cd77
-rw-r--r--src/Editor/Text/Def/TextLogic/Diagrams/Undo.cd98
-rw-r--r--src/Editor/Text/Def/TextLogic/DifferenceBuffer/IDifferenceBuffer2.cs30
-rw-r--r--src/Editor/Text/Def/TextLogic/DifferenceBuffer/IDifferenceBufferFactoryService.cs1
-rw-r--r--src/Editor/Text/Def/TextLogic/TextLogic.csproj2
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/AdornmentLayerDefinition.cs28
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/IXplatAdornmentLayer.cs107
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/IXplatAdornmentLayerElement.cs37
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/Legacy/BlockContext.cs70
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContext.cs33
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContextProvider.cs32
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContextSource.cs29
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/Legacy/PredefinedStructureTypes.cs48
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/Legacy/StructureAdornmentStyle.cs16
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/PredefinedAdornmentLayers.cs81
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/ToolTipService/IToolTipPresenter.cs2
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/ToolTipService/IToolTipPresenter2.cs11
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/XPlatAdornmentPositioningBehavior.cs32
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/XPlatAdornmentRemovedCallback.cs15
-rw-r--r--src/Editor/Text/Def/TextUI/Adornments/XPlatIntraTextAdornmentTag.cs122
-rw-r--r--src/Editor/Text/Def/TextUI/AssemblyInfo.cs12
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/CommandExecutionContext.cs6
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/CommandSelector.cs292
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/CommandState.cs5
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/CodeCleanupCommandArgs.cs9
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/ErrorCommandArgsBase.cs35
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/GoToContainingDeclarationCommandArgs.cs9
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/IncrementLastSecondaryCaretCommandArgs.cs21
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/InsertAllMatchingCaretsCommandArgs.cs18
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/InsertNextMatchingCaretCommandArgs.cs18
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/InvokeQuickFixCommandArgs.cs9
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/MoveLastCaretDownCommandArgs.cs21
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/NavigateToNextIssueInDocumentCommandArgs.cs35
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/NavigateToPreviousIssueInDocumentCommandArgs.cs35
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindBaseSymbolsCommandArgs.cs31
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindDerivedSymbolsCommandArgs.cs32
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindExtensionMethodsCommandArgs.cs31
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindImplementingMembersCommandArgs.cs32
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindMemberOverloadsCommandArgs.cs32
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindReferencesOfOverloadsCommandArgs.cs32
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/RedoCommandArgs.cs2
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/RemoveLastSecondaryCaretCommandArgs.cs20
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/RotatePrimaryCaretNextCommandArgs.cs18
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/RotatePrimaryCaretPreviousCommandArgs.cs18
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/SelectContainingDeclarationCommandArgs.cs9
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/ShowClipboardHistoryCommandArgs.cs9
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/ShowNavigateMenuCommandArgs.cs9
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/ToggleCommentSelectionCommandArgs.cs9
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/Commands/UndoCommandArgs.cs2
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/IChainedCommandHandler.cs6
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/ICommandDispatcherFactory.cs7
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/ICommandHandler.cs11
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/IEditorCommandHandlerServiceFactory.cs9
-rw-r--r--src/Editor/Text/Def/TextUI/Commanding/ISelectorCommandDispatcher.cs14
-rw-r--r--src/Editor/Text/Def/TextUI/Diagrams/BasePrimitives.cd72
-rw-r--r--src/Editor/Text/Def/TextUI/Diagrams/Editor.cd102
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/ISpaceReservationAgent.cs51
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/ISpaceReservationManager.cs88
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/ITextView.cs11
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/ITextView2.cs4
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/ITextView3.cs28
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/ITextViewFactoryService.cs174
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/PredefinedMarginNames.cs4
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/SpaceReservationAgentChangedEventArgs.cs39
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/SpaceReservationManagerDefinition.cs27
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/TextViewExtensions.cs7
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/TextViewExtensions2.cs131
-rw-r--r--src/Editor/Text/Def/TextUI/EditorOptions/ViewOptions.cs300
-rw-r--r--src/Editor/Text/Def/TextUI/Formatting/ILineTransformSource.cs27
-rw-r--r--src/Editor/Text/Def/TextUI/Formatting/ILineTransformSourceProvider.cs26
-rw-r--r--src/Editor/Text/Def/TextUI/Formatting/ITextViewLine.cs38
-rw-r--r--src/Editor/Text/Def/TextUI/Formatting/ITextViewLineSource.cs133
-rw-r--r--src/Editor/Text/Def/TextUI/MultiCaret/IPlatformCaret.cs12
-rw-r--r--src/Editor/Text/Def/TextUI/Operations/IEditorOperations4.cs37
-rw-r--r--src/Editor/Text/Def/TextUI/Operations/Microsoft.VisualStudio.Text.Operations.Overview.mht3843
-rw-r--r--src/Editor/Text/Def/TextUI/Tags/Legacy/BlockTag.cs104
-rw-r--r--src/Editor/Text/Def/TextUI/Tags/Legacy/IBlockTag.cs90
-rw-r--r--src/Editor/Text/Def/TextUI/TextUI.csproj4
-rw-r--r--src/Editor/Text/Def/TextUIWpf/AssemblyInfo.cs31
-rw-r--r--src/Editor/Text/Def/TextUIWpf/Classification/ClassificationFormatDefinition.cs252
-rw-r--r--src/Editor/Text/Def/TextUIWpf/Classification/EditorFormatDefinition.cs157
-rw-r--r--src/Editor/Text/Def/TextUIWpf/Classification/EditorFormatItemsEventArgs.cs34
-rw-r--r--src/Editor/Text/Def/TextUIWpf/Classification/IEditorFormatMap.cs85
-rw-r--r--src/Editor/Text/Def/TextUIWpf/Classification/IEditorFormatMapService.cs33
-rw-r--r--src/Editor/Text/Def/TextUIWpf/Classification/MarkerFormatDefinition.cs101
-rw-r--r--src/Editor/Text/Def/TextUIWpf/Classification/Priority.cs32
-rw-r--r--src/Editor/Text/Def/TextUIWpf/Classification/UserVisibleAttribute.cs28
-rw-r--r--src/Editor/Text/Def/TextUIWpf/EditorOptions/WpfViewOptionDefinition.cs26
-rw-r--r--src/Editor/Text/Def/TextUIWpf/EditorOptions/WpfViewOptions.cs120
-rw-r--r--src/Editor/Text/Def/TextUIWpf/RTF/IRtfBuilderService.cs95
-rw-r--r--src/Editor/Text/Def/TextUIWpf/TextUIWpf.csproj36
-rw-r--r--src/Editor/Text/Impl/BraceCompletion/AssemblyInfo.cs27
-rw-r--r--src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentService.cs213
-rw-r--r--src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentServiceFactory.cs37
-rw-r--r--src/Editor/Text/Impl/BraceCompletion/BraceCompletionCommandHandler.cs194
-rw-r--r--src/Editor/Text/Impl/BraceCompletion/BraceCompletionFormat.cs32
-rw-r--r--src/Editor/Text/Impl/BraceCompletion/BraceCompletionImpl.csproj52
-rw-r--r--src/Editor/Text/Impl/BraceCompletion/Strings.Designer.cs2
-rw-r--r--src/Editor/Text/Impl/ClassificationAggregator/AssemblyInfo.cs28
-rw-r--r--src/Editor/Text/Impl/ClassificationAggregator/ClassificationAggregatorImpl.csproj25
-rw-r--r--src/Editor/Text/Impl/ClassificationType/AssemblyInfo.cs27
-rw-r--r--src/Editor/Text/Impl/ClassificationType/ClassificationTypeImpl.csproj35
-rw-r--r--src/Editor/Text/Impl/ClassificationType/Strings.Designer.cs2
-rw-r--r--src/Editor/Text/Impl/Commanding/AssemblyInfo.cs28
-rw-r--r--src/Editor/Text/Impl/Commanding/CommandingImpl.csproj43
-rw-r--r--src/Editor/Text/Impl/Commanding/CommandingStrings.Designer.cs2
-rw-r--r--src/Editor/Text/Impl/Commanding/EditorCommandHandlerService.cs16
-rw-r--r--src/Editor/Text/Impl/DifferenceAlgorithm/AssemblyInfo.cs30
-rw-r--r--src/Editor/Text/Impl/DifferenceAlgorithm/DifferenceAlgorithmImpl.csproj19
-rw-r--r--src/Editor/Text/Impl/EditorOperations/AssemblyInfo.cs28
-rw-r--r--src/Editor/Text/Impl/EditorOperations/EditorOperations.cs170
-rw-r--r--src/Editor/Text/Impl/EditorOperations/EditorOperationsFactoryService.cs10
-rw-r--r--src/Editor/Text/Impl/EditorOperations/EditorOperationsImpl.csproj43
-rw-r--r--src/Editor/Text/Impl/EditorOperations/Strings.Designer.cs2
-rw-r--r--src/Editor/Text/Impl/EditorOptions/AssemblyInfo.cs30
-rw-r--r--src/Editor/Text/Impl/EditorOptions/EditorOptionsImpl.csproj30
-rw-r--r--src/Editor/Text/Impl/EditorPrimitives/AssemblyInfo.cs29
-rw-r--r--src/Editor/Text/Impl/EditorPrimitives/DefaultSelectionPrimitive.cs19
-rw-r--r--src/Editor/Text/Impl/EditorPrimitives/EditorPrimitivesImpl.csproj37
-rw-r--r--src/Editor/Text/Impl/EditorPrimitives/FxCopSupressions.cs49
-rw-r--r--src/Editor/Text/Impl/EditorPrimitives/Strings.Designer.cs2
-rw-r--r--src/Editor/Text/Impl/Navigation/AssemblyInfo.cs28
-rw-r--r--src/Editor/Text/Impl/Navigation/NavigationImpl.csproj22
-rw-r--r--src/Editor/Text/Impl/Outlining/AssemblyInfo.cs28
-rw-r--r--src/Editor/Text/Impl/Outlining/Outlining.cd35
-rw-r--r--src/Editor/Text/Impl/Outlining/Outlining.csproj39
-rw-r--r--src/Editor/Text/Impl/PatternMatching/AssemblyInfo.cs24
-rw-r--r--src/Editor/Text/Impl/PatternMatching/PatternMatchingImpl.csproj28
-rw-r--r--src/Editor/Text/Impl/StandaloneUndo/AssemblyInfo.cs27
-rw-r--r--src/Editor/Text/Impl/StandaloneUndo/StandaloneUndoImpl.csproj28
-rw-r--r--src/Editor/Text/Impl/TagAggregator/AssemblyInfo.cs29
-rw-r--r--src/Editor/Text/Impl/TagAggregator/TagAggregator.cs438
-rw-r--r--src/Editor/Text/Impl/TagAggregator/TagAggregatorImpl.csproj33
-rw-r--r--src/Editor/Text/Impl/TextBufferUndoManager/AssemblyInfo.cs27
-rw-r--r--src/Editor/Text/Impl/TextBufferUndoManager/Strings.Designer.cs2
-rw-r--r--src/Editor/Text/Impl/TextBufferUndoManager/TextBufferChangeUndoPrimitive.cs2
-rw-r--r--src/Editor/Text/Impl/TextBufferUndoManager/TextBufferUndoManager.cs2
-rw-r--r--src/Editor/Text/Impl/TextBufferUndoManager/TextBufferUndoManagerImpl.csproj39
-rw-r--r--src/Editor/Text/Impl/TextModel/AssemblyInfo.cs25
-rw-r--r--src/Editor/Text/Impl/TextModel/BaseBuffer.cs3
-rw-r--r--src/Editor/Text/Impl/TextModel/Diagrams/StringRebuilder.cd107
-rw-r--r--src/Editor/Text/Impl/TextModel/FileUtilities.cs41
-rw-r--r--src/Editor/Text/Impl/TextModel/NativeMethods.cs11
-rw-r--r--src/Editor/Text/Impl/TextModel/Strings.Designer.cs2
-rw-r--r--src/Editor/Text/Impl/TextModel/TextDocumentFactoryService.cs12
-rw-r--r--src/Editor/Text/Impl/TextModel/TextModelImpl.csproj43
-rw-r--r--src/Editor/Text/Impl/TextSearch/AssemblyInfo.cs27
-rw-r--r--src/Editor/Text/Impl/TextSearch/BackgroundSearch.cs451
-rw-r--r--src/Editor/Text/Impl/TextSearch/TextSearchImpl.csproj27
-rw-r--r--src/Editor/Text/Impl/TextSearch/TextSearchTagger.cs281
-rw-r--r--src/Editor/Text/Impl/TextSearch/TextSearchTaggerFactoryService.cs37
-rw-r--r--src/Editor/Text/Impl/XPlat/MultiCaretImpl/AssemblyInfo.cs31
-rw-r--r--src/Editor/Text/Impl/XPlat/MultiCaretImpl/MultiCaretImpl.csproj29
-rw-r--r--src/Editor/Text/Impl/XPlat/MultiCaretImpl/MultiSelectionBroker.cs83
-rw-r--r--src/Editor/Text/Impl/XPlat/MultiCaretImpl/SelectionTransformer.cs18
-rw-r--r--src/Editor/Text/Impl/XPlat/MultiCaretImpl/Strings.Designer.cs2
-rw-r--r--src/Editor/Text/Util/TextDataUtil/AssemblyInfo.cs82
-rw-r--r--src/Editor/Text/Util/TextDataUtil/GuardedOperations.cs6
-rw-r--r--src/Editor/Text/Util/TextDataUtil/MappingHelper.cs42
-rw-r--r--src/Editor/Text/Util/TextDataUtil/StableContentTypeComparer.cs92
-rw-r--r--src/Editor/Text/Util/TextDataUtil/StableOrderer.cs5
-rw-r--r--src/Editor/Text/Util/TextDataUtil/TextDataUtil.csproj29
-rw-r--r--src/Editor/Text/Util/TextLogicUtil/AssemblyInfo.cs28
-rw-r--r--src/Editor/Text/Util/TextLogicUtil/TextLogicUtil.csproj20
-rw-r--r--src/Editor/Text/Util/TextLogicUtil/TextUndoPrimitive.cs2
-rw-r--r--src/Editor/Text/Util/TextUIUtil/AssemblyInfo.cs42
-rw-r--r--src/Editor/Text/Util/TextUIUtil/BaseProxyService.cs4
-rw-r--r--src/Editor/Text/Util/TextUIUtil/ChangeBrushes.cs34
-rw-r--r--src/Editor/Text/Util/TextUIUtil/DefaultStatusBarService.cs15
-rw-r--r--src/Editor/Text/Util/TextUIUtil/DefaultUIThreadOperationExecutor.cs2
-rw-r--r--src/Editor/Text/Util/TextUIUtil/DifferenceBrushManager.cs119
-rw-r--r--src/Editor/Text/Util/TextUIUtil/ExtensionMethods.cs2
-rw-r--r--src/Editor/Text/Util/TextUIUtil/IDragDropMouseProcessor.cs27
-rw-r--r--src/Editor/Text/Util/TextUIUtil/IOrderableContentTypeAndTextViewRoleMetadata.cs15
-rw-r--r--src/Editor/Text/Util/TextUIUtil/IScrollMap2.cs28
-rw-r--r--src/Editor/Text/Util/TextUIUtil/Markers.cs78
-rw-r--r--src/Editor/Text/Util/TextUIUtil/MultiSelectionMouseState.cs63
-rw-r--r--src/Editor/Text/Util/TextUIUtil/PerformanceBlockMarker.cs72
-rw-r--r--src/Editor/Text/Util/TextUIUtil/StatusBarService.cs20
-rw-r--r--src/Editor/Text/Util/TextUIUtil/Strings.Designer.cs279
-rw-r--r--src/Editor/Text/Util/TextUIUtil/Strings.resx213
-rw-r--r--src/Editor/Text/Util/TextUIUtil/TelemetryLogger.cs126
-rw-r--r--src/Editor/Text/Util/TextUIUtil/TextUIUtil.csproj49
-rw-r--r--src/Editor/Text/Util/TextUIUtil/TransformedDispatcherCollection.cs268
-rw-r--r--src/Editor/Text/Util/TextUIUtil/UIExtensionSelector.cs4
-rw-r--r--src/Editor/Text/Util/TextUIUtil/UIThreadOperationExecutor.cs2
-rw-r--r--src/Editor/Text/Util/TextUIUtil/VacuousTextViewModel.cs2
-rw-r--r--src/Editor/Text/Util/TextUIUtil/WpfHelper.cs853
-rw-r--r--src/FPF/PresentationCore/System.Windows.TextDecorationCollection.cs68
455 files changed, 21058 insertions, 19912 deletions
diff --git a/src/Editor/Core/Def/BaseUtility/Microsoft.VisualStudio.Utilities.Overview.mht b/src/Editor/Core/Def/BaseUtility/Microsoft.VisualStudio.Utilities.Overview.mht
deleted file mode 100644
index 0b95cd5..0000000
--- a/src/Editor/Core/Def/BaseUtility/Microsoft.VisualStudio.Utilities.Overview.mht
+++ /dev/null
@@ -1,1818 +0,0 @@
-MIME-Version: 1.0
-Content-Type: multipart/related; boundary="----=_NextPart_01C7A2E1.BF2B3650"
-
-This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Windows® Internet Explorer®.
-
-------=_NextPart_01C7A2E1.BF2B3650
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Utilities.Overview.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link rel=3DFile-List
-href=3D"Microsoft.VisualStudio.Utilities.Overview_files/filelist.xml">
-<title>Utilities</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Subject>VisualStudio Shell</o:Subject>
- <o:Author>Vijaye Raji</o:Author>
- <o:Template>VisualStudio SDK Overview.dot</o:Template>
- <o:LastAuthor>Dmitry Goncharenko</o:LastAuthor>
- <o:Revision>9</o:Revision>
- <o:TotalTime>186</o:TotalTime>
- <o:LastPrinted>2005-05-26T01:48:00Z</o:LastPrinted>
- <o:Created>2007-01-05T22:13:00Z</o:Created>
- <o:LastSaved>2007-05-31T00:41:00Z</o:LastSaved>
- <o:Pages>1</o:Pages>
- <o:Words>430</o:Words>
- <o:Characters>2452</o:Characters>
- <o:Company>Microsoft Corporation</o:Company>
- <o:Lines>20</o:Lines>
- <o:Paragraphs>5</o:Paragraphs>
- <o:CharactersWithSpaces>2877</o:CharactersWithSpaces>
- <o:Version>12.00</o:Version>
- </o:DocumentProperties>
-</xml><![endif]-->
-<link rel=3DthemeData
-href=3D"Microsoft.VisualStudio.Utilities.Overview_files/themedata.thmx">
-<link rel=3DcolorSchemeMapping
-href=3D"Microsoft.VisualStudio.Utilities.Overview_files/colorschememapping.xml">
-<!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:Zoom>140</w:Zoom>
- <w:TrackMoves>false</w:TrackMoves>
- <w:TrackFormatting/>
- <w:PunctuationKerning/>
- <w:ValidateAgainstSchemas/>
- <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
- <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
- <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
- <w:DoNotPromoteQF/>
- <w:LidThemeOther>EN-US</w:LidThemeOther>
- <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
- <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
- <w:Compatibility>
- <w:BreakWrappedTables/>
- <w:SnapToGridInCell/>
- <w:WrapTextWithPunct/>
- <w:UseAsianBreakRules/>
- <w:DontGrowAutofit/>
- <w:SplitPgBreakAndParaMark/>
- <w:DontVertAlignCellWithSp/>
- <w:DontBreakConstrainedForcedTables/>
- <w:DontVertAlignInTxbx/>
- <w:Word11KerningPairs/>
- <w:CachedColBalance/>
- </w:Compatibility>
- <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
- <m:mathPr>
- <m:mathFont m:val=3D"Cambria Math"/>
- <m:brkBin m:val=3D"before"/>
- <m:brkBinSub m:val=3D"--"/>
- <m:smallFrac m:val=3D"off"/>
- <m:dispDef/>
- <m:lMargin m:val=3D"0"/>
- <m:rMargin m:val=3D"0"/>
- <m:defJc m:val=3D"centerGroup"/>
- <m:wrapIndent m:val=3D"1440"/>
- <m:intLim m:val=3D"subSup"/>
- <m:naryLim m:val=3D"undOvr"/>
- </m:mathPr></w:WordDocument>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:LatentStyles DefLockedState=3D"false" DefUnhideWhenUsed=3D"false"
- DefSemiHidden=3D"false" DefQFormat=3D"false" DefPriority=3D"1"
- LatentStyleCount=3D"267">
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-Normal"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 9"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"footnote text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-caption"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"footnote referenc=
-e"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation refere=
-nce"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Title"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Subtitle"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Hyperlink"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-Strong"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"HTML Top of Form"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"HTML Bottom of Fo=
-rm"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Normal (Web)"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Normal Table"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation subjec=
-t"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" Name=3D"No List"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 1"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 2"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 3"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Contemporar=
-y"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Elegant"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Professiona=
-l"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Subtle 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Subtle 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Balloon Text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Theme"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true"
- Name=3D"Placeholder Text"/>
- <w:LsdException Locked=3D"false" Priority=3D"2" QFormat=3D"true" Name=3D"=
-No Spacing"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true" Name=
-=3D"Revision"/>
- <w:LsdException Locked=3D"false" Priority=3D"34" QFormat=3D"true"
- Name=3D"List Paragraph"/>
- <w:LsdException Locked=3D"false" Priority=3D"29" QFormat=3D"true" Name=3D=
-"Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"30" QFormat=3D"true"
- Name=3D"Intense Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"19" QFormat=3D"true"
- Name=3D"Subtle Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"21" QFormat=3D"true"
- Name=3D"Intense Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"31" QFormat=3D"true"
- Name=3D"Subtle Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"32" QFormat=3D"true"
- Name=3D"Intense Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"33" QFormat=3D"true" Name=3D=
-"Book Title"/>
- <w:LsdException Locked=3D"false" Priority=3D"37" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" Name=3D"Bibliography"/>
- <w:LsdException Locked=3D"false" Priority=3D"39" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"TOC Heading"/>
- </w:LatentStyles>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
- @font-face
- {font-family:PMingLiU;
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-alt:\65B0\7D30\660E\9AD4;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
-@font-face
- {font-family:"Cambria Math";
- panose-1:2 4 5 3 5 4 6 3 2 4;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Calibri;
- panose-1:2 15 5 2 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-1610611985 1073750139 0 0 159 0;}
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-520082689 -1073717157 41 0 66047 0;}
-@font-face
- {font-family:"Trebuchet MS";
- panose-1:2 11 6 3 2 2 2 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:647 0 0 0 159 0;}
-@font-face
- {font-family:"Lucida Console";
- panose-1:2 11 6 9 4 5 4 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-2147482993 6144 0 0 31 0;}
-@font-face
- {font-family:Consolas;
- panose-1:2 11 6 9 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-1610611985 1073750091 0 0 159 0;}
-@font-face
- {font-family:"\@PMingLiU";
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-h1
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 1 Char";
- mso-style-next:Normal;
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- font-weight:normal;
- mso-bidi-font-weight:bold;}
-h2
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-style-link:"Heading 2 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:14.0pt;
- font-family:"Trebuchet MS","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#5F5F5F;
- letter-spacing:2.0pt;}
-h3
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"Heading 4";
- mso-style-link:"Heading 3 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:3;
- font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- color:#FF6600;
- font-weight:normal;
- mso-bidi-font-weight:bold;
- font-style:italic;}
-h4
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 4 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:4;
- font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:"Times New Roman";
- color:olive;}
-p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Footnote Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Comment Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoHeader, li.MsoHeader, div.MsoHeader
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-link:"Header Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoFooter, li.MsoFooter, div.MsoFooter
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-link:"Footer Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCaption, li.MsoCaption, div.MsoCaption
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-span.MsoFootnoteReference
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- vertical-align:super;}
-span.MsoCommentReference
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;}
-p.MsoListBullet, li.MsoListBullet, div.MsoListBullet
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpFirst, li.MsoListBulletCxSpFirst, div.MsoListBulletCxSpF=
-irst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpMiddle, li.MsoListBulletCxSpMiddle, div.MsoListBulletCxS=
-pMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpLast, li.MsoListBulletCxSpLast, div.MsoListBulletCxSpLast
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2, li.MsoListBullet2, div.MsoListBullet2
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpFirst, li.MsoListBullet2CxSpFirst, div.MsoListBullet2Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpMiddle, li.MsoListBullet2CxSpMiddle, div.MsoListBullet2=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpLast, li.MsoListBullet2CxSpLast, div.MsoListBullet2CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3, li.MsoListBullet3, div.MsoListBullet3
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpFirst, li.MsoListBullet3CxSpFirst, div.MsoListBullet3Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpMiddle, li.MsoListBullet3CxSpMiddle, div.MsoListBullet3=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpLast, li.MsoListBullet3CxSpLast, div.MsoListBullet3CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2, li.MsoListNumber2, div.MsoListNumber2
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpFirst, li.MsoListNumber2CxSpFirst, div.MsoListNumber2Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpMiddle, li.MsoListNumber2CxSpMiddle, div.MsoListNumber2=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpLast, li.MsoListNumber2CxSpLast, div.MsoListNumber2CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-a:link, span.MsoHyperlink
- {mso-style-unhide:no;
- color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {mso-style-priority:1;
- mso-style-unhide:no;
- color:purple;
- mso-themecolor:followedhyperlink;
- text-decoration:underline;
- text-underline:single;}
-p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-parent:"Comment Text";
- mso-style-link:"Comment Subject Char";
- mso-style-next:"Comment Text";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Balloon Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";}
-p.MsoQuote, li.MsoQuote, div.MsoQuote
- {mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Quote Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:black;
- font-style:italic;}
-span.Heading1Char
- {mso-style-name:"Heading 1 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 1";
- mso-ansi-font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-span.Heading2Char
- {mso-style-name:"Heading 2 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 2";
- mso-ansi-font-size:13.0pt;
- mso-bidi-font-size:13.0pt;
- font-family:"Cambria","serif";
- mso-ascii-font-family:Cambria;
- mso-ascii-theme-font:major-latin;
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:major-fareast;
- mso-hansi-font-family:Cambria;
- mso-hansi-theme-font:major-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:major-bidi;
- color:#4F81BD;
- mso-themecolor:accent1;
- font-weight:bold;}
-span.Heading4Char
- {mso-style-name:"Heading 4 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 4";
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:olive;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- font-weight:bold;}
-span.Heading3Char
- {mso-style-name:"Heading 3 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 3";
- mso-ansi-font-size:14.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:#FF6600;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- mso-bidi-font-weight:bold;}
-span.FootnoteTextChar
- {mso-style-name:"Footnote Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Footnote Text";}
-span.CommentTextChar
- {mso-style-name:"Comment Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Comment Text";}
-span.HeaderChar
- {mso-style-name:"Header Char";
- mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Header;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.FooterChar
- {mso-style-name:"Footer Char";
- mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Footer;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.CommentSubjectChar
- {mso-style-name:"Comment Subject Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-parent:"Comment Text Char";
- mso-style-link:"Comment Subject";
- font-weight:bold;}
-span.BalloonTextChar
- {mso-style-name:"Balloon Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Balloon Text";
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;}
-span.QuoteChar
- {mso-style-name:"Quote Char";
- mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Quote;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- color:black;
- font-style:italic;}
-p.Heading0, li.Heading0, div.Heading0
- {mso-style-name:"Heading 0";
- mso-style-unhide:no;
- mso-style-parent:"Heading 1";
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:28.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:Arial;
- color:#006699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-p.SubHeading, li.SubHeading, div.SubHeading
- {mso-style-name:SubHeading;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:maroon;
- font-weight:bold;
- mso-bidi-font-weight:normal;}
-span.CodeCharChar
- {mso-style-name:"Code Char Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Code;
- mso-ansi-font-size:9.0pt;
- mso-bidi-font-size:9.0pt;
- font-family:"Lucida Console";
- mso-ascii-font-family:"Lucida Console";
- mso-hansi-font-family:"Lucida Console";
- mso-no-proof:yes;}
-p.Code, li.Code, div.Code
- {mso-style-name:Code;
- mso-style-unhide:no;
- mso-style-link:"Code Char Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:3.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-layout-grid-align:none;
- text-autospace:none;
- font-size:9.0pt;
- font-family:"Lucida Console";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-span.NoteChar
- {mso-style-name:"Note Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Note;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- background:#F3F3F3;
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Note, li.Note, div.Note
- {mso-style-name:Note;
- mso-style-unhide:no;
- mso-style-link:"Note Char";
- margin-top:0in;
- margin-right:.2in;
- margin-bottom:12.0pt;
- margin-left:.2in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- background:#F3F3F3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Style2, li.Style2, div.Style2
- {mso-style-name:Style2;
- mso-style-unhide:no;
- mso-style-parent:"";
- mso-style-next:Normal;
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- background:#F9FFF3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-p.Style3, li.Style3, div.Style3
- {mso-style-name:Style3;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- background:#F5FAF4;
- mso-layout-grid-align:none;
- text-autospace:none;
- border:none;
- mso-border-alt:solid windowtext 1.0pt;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- mso-border-shadow:yes;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:PMingLiU;
- mso-bidi-font-family:"Times New Roman";
- mso-fareast-language:ZH-CN;
- mso-no-proof:yes;}
-span.DescriptionTextChar
- {mso-style-name:"Description Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Description Text";}
-p.DescriptionText, li.DescriptionText, div.DescriptionText
- {mso-style-name:"Description Text";
- mso-style-unhide:no;
- mso-style-link:"Description Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.25in;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-.MsoChpDefault
- {mso-style-type:export-only;
- mso-default-props:yes;
- font-size:10.0pt;
- mso-ansi-font-size:10.0pt;
- mso-bidi-font-size:10.0pt;
- mso-ascii-font-family:Calibri;
- mso-hansi-font-family:Calibri;}
- /* Page Definitions */
- @page
- {mso-footnote-separator:url("Microsoft.VisualStudio.Utilities.Overview_files/h=
-eader.htm") fs;
- mso-footnote-continuation-separator:url("Microsoft.VisualStudio.Utilities.Over=
-view_files/header.htm") fcs;
- mso-endnote-separator:url("Microsoft.VisualStudio.Utilities.Overview_files/hea=
-der.htm") es;
- mso-endnote-continuation-separator:url("Microsoft.VisualStudio.Utilities.Overv=
-iew_files/header.htm") ecs;}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
- @list l0
- {mso-list-id:-129;
- mso-list-type:simple;
- mso-list-template-ids:-1739002844;}
-@list l0:level1
- {mso-level-style-link:"List Number 2";
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l1
- {mso-list-id:-126;
- mso-list-type:simple;
- mso-list-template-ids:-1045901690;}
-@list l1:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 3";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.75in;
- mso-level-number-position:left;
- margin-left:.75in;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l2
- {mso-list-id:-125;
- mso-list-type:simple;
- mso-list-template-ids:-1069260336;}
-@list l2:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 2";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l3
- {mso-list-id:-119;
- mso-list-type:simple;
- mso-list-template-ids:1390696726;}
-@list l3:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.25in;
- mso-level-number-position:left;
- margin-left:.25in;
- text-indent:-.25in;
- font-family:Symbol;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-priority:99;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-table.MsoTableGrid
- {mso-style-name:"Table Grid";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-unhide:no;
- border:solid windowtext 1.0pt;
- mso-border-alt:solid windowtext .5pt;
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-border-insideh:.5pt solid windowtext;
- mso-border-insidev:.5pt solid windowtext;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-</style>
-<![endif]--><!--[if gte mso 9]><xml>
- <o:shapedefaults v:ext=3D"edit" spidmax=3D"7170"/>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <o:shapelayout v:ext=3D"edit">
- <o:idmap v:ext=3D"edit" data=3D"1"/>
- </o:shapelayout></xml><![endif]-->
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple style=3D'tab-interval:.5in'>
-
-<div class=3DSection1>
-
-<p class=3DHeading0>Utilities</p>
-
-<div style=3D'mso-element:para-border-div;border:none;border-bottom:solid w=
-indowtext 1.0pt;
-mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in'>
-
-<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:solid windo=
-wtext .75pt;
-padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><o:p>&nbsp;</o:p></p>
-
-</div>
-
-<h1><a name=3D"_Toc76978452"></a><a name=3D"_Toc151974416"></a><a
-name=3D"_Toc151973942"><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-"Times New Roman"'>Introduction</span></span></span></a><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'>The Utilities subsystem is a collection=
- of
-commonly used types, constants and utility classes which all are located in
-Microsoft.VisualStudio.CoreUtility.dll. The elements of the subsystem fall into=
- the
-utility slice of the VisualStudio platform and can be used by components in any
-slice or layer.</span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:=
-_Toc76978452'><a
-name=3D"_Toc124327313"></a><a name=3D"_Toc151973943"><span style=3D'mso-boo=
-kmark:
-_Toc124327313'><span style=3D'mso-fareast-font-family:"Times New Roman"'>Ve=
-rify
-Class</span></span></a></span></span><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><strong><span
-style=3D'font-family:"Calibri","sans-serif"'>Microsoft.VisualStudio.Utilities.V=
-erify</span></strong>
-is a static class containing a number of <strong><span style=3D'font-family=
-:"Calibri","sans-serif"'>ThrowIfXXXX</span></strong>
-methods commonly used by components for parameter verification and applicat=
-ion
-state asserting. This class will not be discussed in details here since it =
-is
-going to be reworked significantly in the future releases of VisualStudio platf=
-orm.</span></span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:=
-_Toc76978452'><span
-style=3D'mso-bookmark:_Toc124327313'><a name=3D"_Toc151973944"><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Extensions Ordering</sp=
-an></a></span></span></span><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'>The
-Utilities subsystem provides the ability to logically order a group of
-extension productions of the same type in a consistent manner. Orderable
-extensions get names assigned to them so they can refer to each other by the
-name and specify their relative positions.</span></span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:=
-_Toc76978452'><span
-style=3D'mso-bookmark:_Toc124327313'><a name=3D"_Toc140564570"></a><a
-name=3D"_Toc151973945"><span style=3D'mso-bookmark:_Toc140564570'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Name Attribute</span></=
-span></a></span></span></span><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><strong><span
-style=3D'font-family:"Calibri","sans-serif"'>Microsoft.VisualStudio.AssetSy=
-stem.CommonAttributes.Name</span></strong>
-attribute is used for associating names with extension productions. A name =
-is
-just a text string.</span></span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:=
-_Toc76978452'><span
-style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'>DisplayName
-Attribute<o:p></o:p></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><strong><span
-style=3D'font-family:"Calibri","sans-serif"'>Microsoft.VisualStudio.AssetSy=
-stem.CommonAttributes.DisplayNameAttribute</span></strong><strong><span
-style=3D'font-family:"Calibri","sans-serif";font-weight:normal;mso-bidi-fon=
-t-weight:
-bold'> is intended </span></strong>to be used for providing a displayable in
-the UI user friendly name of an extension production.</span></span></span><=
-/p>
-
-<h1><span style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:=
-_Toc76978452'><span
-style=3D'mso-bookmark:_Toc124327313'><a name=3D"_Toc151973946"></a><a
-name=3D"_Toc140564571"><span style=3D'mso-bookmark:_Toc151973946'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Order Attribute</span><=
-/span></a></span></span></span><span
-style=3D'mso-bookmark:_Toc151973946'></span><span style=3D'mso-bookmark:_To=
-c140564571'></span><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-bidi-font-size:8.0p=
-t;
-mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></span></span>=
-</span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><strong><span
-style=3D'font-family:"Calibri","sans-serif"'>Microsoft.VisualStudio.AssetSy=
-stem.CommonAttributes.Order</span></strong>
-attribute is used for defining the logical ordering of related extension pr=
-oductions.
-The attribute has two string properties: <strong><span style=3D'font-family=
-:"Calibri","sans-serif"'>Before</span></strong>
-and <strong><span style=3D'font-family:"Calibri","sans-serif"'>After</span>=
-</strong>
-that are used for referencing names defined using the Name attribute. At le=
-ast
-one of the properties must be initialized with a non-empty string.</span></=
-span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:=
-_Toc76978452'><span
-style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'>Default
-Attribute<o:p></o:p></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><strong><span
-style=3D'font-family:"Calibri","sans-serif"'>Microsoft.VisualStudio.AssetSy=
-stem.DefaultAttribute</span></strong>
-attribute is used to mark the default production for an extension. This is =
-done
-to allow components to provide an alternative implementation for the
-production. There is no currently a common mechanism for selecting between =
-default
-and not-default productions for an extension, therefore the consumer of such
-extension must make sure to implement the mechanism that prefers any
-non-default productions over the one marked with this attribute.</span></sp=
-an></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:=
-_Toc76978452'><span
-style=3D'mso-bookmark:_Toc124327313'><a name=3D"_Toc151973947"></a><a
-name=3D"_Toc140564572"><span style=3D'mso-bookmark:_Toc151973947'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>IOrderable</span></span=
-></a></span></span></span><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-bookmark:_Toc151973=
-947'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'> Interface</span></span=
-></span></span></span><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'>The
-extension types that are derived from <strong><span style=3D'font-family:"C=
-alibri","sans-serif"'>IOrderable</span></strong>
-interface can be ordered using the default ordering capabilities of the
-Utilities subsystem. <strong><span style=3D'font-family:"Calibri","sans-ser=
-if"'>IOrderable</span></strong>
-interface defines <strong><span style=3D'font-family:"Calibri","sans-serif"=
-'>Name</span></strong>,
-Before and After properties for an extension. <strong><span style=3D'font-f=
-amily:
-"Calibri","sans-serif"'>Name</span></strong> property is marked as unique. =
-All
-the properties are optional. If a production of an orderable extension
-doesn&#8217;t have a name then no other production of the extension can be
-positioned relative to it.</span></span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:=
-_Toc76978452'><span
-style=3D'mso-bookmark:_Toc124327313'><a name=3D"_Toc151973949"></a><a
-name=3D"_Toc140564574"><span style=3D'mso-bookmark:_Toc151973949'>Orderer</=
-span></a><span
-style=3D'mso-bookmark:_Toc151973949'> Class</span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151974416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'>Microsoft.VisualStudio.Utilities.Orderer
-provides the functionality for ordering of extensions. This is a static cla=
-ss
-with a single method that takes a collection of orderable extensions and
-returns an ordered list of them. </span></span></span></p>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C7A2E1.BF2B3650
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Utilities.Overview_files/themedata.thmx
-Content-Transfer-Encoding: base64
-Content-Type: application/vnd.ms-officetheme
-
-UEsDBBQABgAIAAAAIQCCirwT+gAAABwCAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKyRy2rDMBBF
-94X+g9C22HK6KKXYzqJJd30s0g8Y5LEtao+ENAnJ33fsuFC6CC10IxBizpl7Va6P46AOGJPzVOlV
-XmiFZH3jqKv0++4pu9cqMVADgyes9AmTXtfXV+XuFDApmaZU6Z45PBiTbI8jpNwHJHlpfRyB5Ro7
-E8B+QIfmtijujPXESJzxxNB1+SoLRNegeoPILzCKx7Cg8Pv5DCSAmAtYq8czYVqi0hDC4CywRDAH
-an7oM9+2zmLj7X4UaT6DF9jNBDO/XGD1P+ov5wZb2A+stkfp4lx/xCH9LdtSay6Tc/7Uu5AuGC6X
-t7Rh5r+tPwEAAP//AwBQSwMEFAAGAAgAAAAhAKXWp+fAAAAANgEAAAsAAABfcmVscy8ucmVsc4SP
-z2rDMAyH74W9g9F9UdLDGCV2L6WQQy+jfQDhKH9oIhvbG+vbT8cGCrsIhKTv96k9/q6L+eGU5yAW
-mqoGw+JDP8to4XY9v3+CyYWkpyUIW3hwhqN727VfvFDRozzNMRulSLYwlRIPiNlPvFKuQmTRyR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AAAAKwEAAF9yZWxzLy5yZWxzUEsBAi0AFAAGAAgAAAAhAGt5
-lhaDAAAAigAAABwAAAAAAAAAAAAAAAAAFAIAAHRoZW1lL3RoZW1lL3RoZW1lTWFuYWdlci54bWxQ
-SwECLQAUAAYACAAAACEAlrWt4pYGAABQGwAAFgAAAAAAAAAAAAAAAADRAgAAdGhlbWUvdGhlbWUv
-dGhlbWUxLnhtbFBLAQItABQABgAIAAAAIQAN0ZCftgAAABsBAAAnAAAAAAAAAAAAAAAAAJsJAAB0
-aGVtZS90aGVtZS9fcmVscy90aGVtZU1hbmFnZXIueG1sLnJlbHNQSwUGAAAAAAUABQBdAQAAlgoA
-AAAA
-
-------=_NextPart_01C7A2E1.BF2B3650
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Utilities.Overview_files/colorschememapping.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml
-
-<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?>
-<a:clrMap xmlns:a=3D"http://schemas.openxmlformats.org/drawingml/2006/main"=
- bg1=3D"lt1" tx1=3D"dk1" bg2=3D"lt2" tx2=3D"dk2" accent1=3D"accent1" accent=
-2=3D"accent2" accent3=3D"accent3" accent4=3D"accent4" accent5=3D"accent5" a=
-ccent6=3D"accent6" hlink=3D"hlink" folHlink=3D"folHlink"/>
-------=_NextPart_01C7A2E1.BF2B3650
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Utilities.Overview_files/header.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link id=3DMain-File rel=3DMain-File
-href=3D"../Microsoft.VisualStudio.Utilities.Overview.htm">
-<![if IE]>
-<base
-href=3D"file:///C:\515CB117\Microsoft.VisualStudio.Utilities.Overview_files\hea=
-der.htm"
-id=3D"webarch_temp_base_tag">
-<![endif]>
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
-
-<div style=3D'mso-element:footnote-separator' id=3Dfs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:footnote-continuation-separator' id=3Dfcs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-separator' id=3Des>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-continuation-separator' id=3Decs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C7A2E1.BF2B3650
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Utilities.Overview_files/filelist.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml; charset="utf-8"
-
-<xml xmlns:o=3D"urn:schemas-microsoft-com:office:office">
- <o:MainFile HRef=3D"../Microsoft.VisualStudio.Utilities.Overview.htm"/>
- <o:File HRef=3D"themedata.thmx"/>
- <o:File HRef=3D"colorschememapping.xml"/>
- <o:File HRef=3D"header.htm"/>
- <o:File HRef=3D"filelist.xml"/>
-</xml>
-------=_NextPart_01C7A2E1.BF2B3650--
diff --git a/src/Editor/Core/Def/BaseUtility/Microsoft.VisualStudio.Utilities.UsageGuide.mht b/src/Editor/Core/Def/BaseUtility/Microsoft.VisualStudio.Utilities.UsageGuide.mht
deleted file mode 100644
index 2442598..0000000
--- a/src/Editor/Core/Def/BaseUtility/Microsoft.VisualStudio.Utilities.UsageGuide.mht
+++ /dev/null
@@ -1,3288 +0,0 @@
-MIME-Version: 1.0
-Content-Type: multipart/related; boundary="----=_NextPart_01C7A2E1.D90FC860"
-
-This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Windows® Internet Explorer®.
-
-------=_NextPart_01C7A2E1.D90FC860
-Content-Location: file:///C:/8EAC30E5/Microsoft.VisualStudio.Utilities.UsageGuide.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link rel=3DFile-List
-href=3D"Microsoft.VisualStudio.Utilities.UsageGuide_files/filelist.xml">
-<link rel=3DEdit-Time-Data
-href=3D"Microsoft.VisualStudio.Utilities.UsageGuide_files/editdata.mso">
-<link rel=3DOLE-Object-Data
-href=3D"Microsoft.VisualStudio.Utilities.UsageGuide_files/oledata.mso">
-<!--[if !mso]>
-<style>
-v\:* {behavior:url(#default#VML);}
-o\:* {behavior:url(#default#VML);}
-w\:* {behavior:url(#default#VML);}
-.shape {behavior:url(#default#VML);}
-</style>
-<![endif]-->
-<title>Utilities Subsystem Usage Guide</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Subject>VisualStudio Shell</o:Subject>
- <o:Author>Chris Burrows</o:Author>
- <o:Template>VisualStudio SDK Overview.dot</o:Template>
- <o:LastAuthor>Dmitry Goncharenko</o:LastAuthor>
- <o:Revision>12</o:Revision>
- <o:TotalTime>48</o:TotalTime>
- <o:LastPrinted>2005-05-26T01:48:00Z</o:LastPrinted>
- <o:Created>2007-01-05T21:56:00Z</o:Created>
- <o:LastSaved>2007-05-31T00:42:00Z</o:LastSaved>
- <o:Pages>2</o:Pages>
- <o:Words>562</o:Words>
- <o:Characters>3204</o:Characters>
- <o:Company>Microsoft Corporation</o:Company>
- <o:Lines>26</o:Lines>
- <o:Paragraphs>7</o:Paragraphs>
- <o:CharactersWithSpaces>3759</o:CharactersWithSpaces>
- <o:Version>12.00</o:Version>
- </o:DocumentProperties>
-</xml><![endif]-->
-<link rel=3DthemeData
-href=3D"Microsoft.VisualStudio.Utilities.UsageGuide_files/themedata.thmx">
-<link rel=3DcolorSchemeMapping
-href=3D"Microsoft.VisualStudio.Utilities.UsageGuide_files/colorschememapping.xm=
-l">
-<!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:Zoom>110</w:Zoom>
- <w:TrackMoves>false</w:TrackMoves>
- <w:TrackFormatting/>
- <w:PunctuationKerning/>
- <w:ValidateAgainstSchemas/>
- <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
- <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
- <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
- <w:AutoFmtOverride/>
- <w:DoNotPromoteQF/>
- <w:LidThemeOther>EN-US</w:LidThemeOther>
- <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
- <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
- <w:Compatibility>
- <w:BreakWrappedTables/>
- <w:SnapToGridInCell/>
- <w:WrapTextWithPunct/>
- <w:UseAsianBreakRules/>
- <w:DontGrowAutofit/>
- <w:SplitPgBreakAndParaMark/>
- <w:DontVertAlignCellWithSp/>
- <w:DontBreakConstrainedForcedTables/>
- <w:DontVertAlignInTxbx/>
- <w:Word11KerningPairs/>
- <w:CachedColBalance/>
- </w:Compatibility>
- <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
- <m:mathPr>
- <m:mathFont m:val=3D"Cambria Math"/>
- <m:brkBin m:val=3D"before"/>
- <m:brkBinSub m:val=3D"--"/>
- <m:smallFrac m:val=3D"off"/>
- <m:dispDef/>
- <m:lMargin m:val=3D"0"/>
- <m:rMargin m:val=3D"0"/>
- <m:defJc m:val=3D"centerGroup"/>
- <m:wrapIndent m:val=3D"1440"/>
- <m:intLim m:val=3D"subSup"/>
- <m:naryLim m:val=3D"undOvr"/>
- </m:mathPr></w:WordDocument>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:LatentStyles DefLockedState=3D"false" DefUnhideWhenUsed=3D"false"
- DefSemiHidden=3D"false" DefQFormat=3D"false" LatentStyleCount=3D"267">
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Normal"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"heading 1"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"heading 2"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"heading 3"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"heading 4"/>
- <w:LsdException Locked=3D"false" SemiHidden=3D"true" UnhideWhenUsed=3D"tr=
-ue"
- QFormat=3D"true" Name=3D"heading 5"/>
- <w:LsdException Locked=3D"false" SemiHidden=3D"true" UnhideWhenUsed=3D"tr=
-ue"
- QFormat=3D"true" Name=3D"heading 6"/>
- <w:LsdException Locked=3D"false" SemiHidden=3D"true" UnhideWhenUsed=3D"tr=
-ue"
- QFormat=3D"true" Name=3D"heading 7"/>
- <w:LsdException Locked=3D"false" SemiHidden=3D"true" UnhideWhenUsed=3D"tr=
-ue"
- QFormat=3D"true" Name=3D"heading 8"/>
- <w:LsdException Locked=3D"false" SemiHidden=3D"true" UnhideWhenUsed=3D"tr=
-ue"
- QFormat=3D"true" Name=3D"heading 9"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"caption"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Title"/>
- <w:LsdException Locked=3D"false" Priority=3D"1" Name=3D"Default Paragraph=
- Font"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Subtitle"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Strong"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" Name=3D"No List"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true"
- Name=3D"Placeholder Text"/>
- <w:LsdException Locked=3D"false" Priority=3D"1" QFormat=3D"true" Name=3D"=
-No Spacing"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true" Name=
-=3D"Revision"/>
- <w:LsdException Locked=3D"false" Priority=3D"34" QFormat=3D"true"
- Name=3D"List Paragraph"/>
- <w:LsdException Locked=3D"false" Priority=3D"29" QFormat=3D"true" Name=3D=
-"Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"30" QFormat=3D"true"
- Name=3D"Intense Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"19" QFormat=3D"true"
- Name=3D"Subtle Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"21" QFormat=3D"true"
- Name=3D"Intense Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"31" QFormat=3D"true"
- Name=3D"Subtle Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"32" QFormat=3D"true"
- Name=3D"Intense Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"33" QFormat=3D"true" Name=3D=
-"Book Title"/>
- <w:LsdException Locked=3D"false" Priority=3D"37" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" Name=3D"Bibliography"/>
- <w:LsdException Locked=3D"false" Priority=3D"39" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"TOC Heading"/>
- </w:LatentStyles>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
- @font-face
- {font-family:PMingLiU;
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-alt:\65B0\7D30\660E\9AD4;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
-@font-face
- {font-family:"Cambria Math";
- panose-1:2 4 5 3 5 4 6 3 2 4;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Calibri;
- panose-1:2 15 5 2 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-1610611985 1073750139 0 0 159 0;}
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-520082689 -1073717157 41 0 66047 0;}
-@font-face
- {font-family:"Trebuchet MS";
- panose-1:2 11 6 3 2 2 2 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:647 0 0 0 159 0;}
-@font-face
- {font-family:"Lucida Console";
- panose-1:2 11 6 9 4 5 4 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-2147482993 6144 0 0 31 0;}
-@font-face
- {font-family:Consolas;
- panose-1:2 11 6 9 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-1610611985 1073750091 0 0 159 0;}
-@font-face
- {font-family:Verdana;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-1593833729 1073750107 16 0 415 0;}
-@font-face
- {font-family:"\@PMingLiU";
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
-@font-face
- {font-family:Georgia;
- panose-1:2 4 5 2 5 4 5 2 3 3;
- mso-font-charset:0;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:647 0 0 0 159 0;}
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-h1
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 1 Char";
- mso-style-next:Normal;
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- font-weight:normal;
- mso-bidi-font-weight:bold;}
-h2
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-style-link:"Heading 2 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:14.0pt;
- font-family:"Trebuchet MS","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#5F5F5F;
- letter-spacing:2.0pt;}
-h3
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"Heading 4";
- mso-style-link:"Heading 3 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:3;
- font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- color:#FF6600;
- font-weight:normal;
- mso-bidi-font-weight:bold;}
-h4
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 4 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:4;
- font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:"Times New Roman";
- color:olive;}
-p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Footnote Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Comment Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoHeader, li.MsoHeader, div.MsoHeader
- {mso-style-unhide:no;
- mso-style-link:"Header Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoFooter, li.MsoFooter, div.MsoFooter
- {mso-style-unhide:no;
- mso-style-link:"Footer Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCaption, li.MsoCaption, div.MsoCaption
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-span.MsoFootnoteReference
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- vertical-align:super;}
-span.MsoCommentReference
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;}
-p.MsoListBullet, li.MsoListBullet, div.MsoListBullet
- {mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpFirst, li.MsoListBulletCxSpFirst, div.MsoListBulletCxSpF=
-irst
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpMiddle, li.MsoListBulletCxSpMiddle, div.MsoListBulletCxS=
-pMiddle
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpLast, li.MsoListBulletCxSpLast, div.MsoListBulletCxSpLast
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2, li.MsoListBullet2, div.MsoListBullet2
- {mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpFirst, li.MsoListBullet2CxSpFirst, div.MsoListBullet2Cx=
-SpFirst
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpMiddle, li.MsoListBullet2CxSpMiddle, div.MsoListBullet2=
-CxSpMiddle
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpLast, li.MsoListBullet2CxSpLast, div.MsoListBullet2CxSp=
-Last
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3, li.MsoListBullet3, div.MsoListBullet3
- {mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpFirst, li.MsoListBullet3CxSpFirst, div.MsoListBullet3Cx=
-SpFirst
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpMiddle, li.MsoListBullet3CxSpMiddle, div.MsoListBullet3=
-CxSpMiddle
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpLast, li.MsoListBullet3CxSpLast, div.MsoListBullet3CxSp=
-Last
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2, li.MsoListNumber2, div.MsoListNumber2
- {mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpFirst, li.MsoListNumber2CxSpFirst, div.MsoListNumber2Cx=
-SpFirst
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpMiddle, li.MsoListNumber2CxSpMiddle, div.MsoListNumber2=
-CxSpMiddle
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpLast, li.MsoListNumber2CxSpLast, div.MsoListNumber2CxSp=
-Last
- {mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-a:link, span.MsoHyperlink
- {mso-style-unhide:no;
- color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {mso-style-unhide:no;
- color:purple;
- mso-themecolor:followedhyperlink;
- text-decoration:underline;
- text-underline:single;}
-p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-parent:"Comment Text";
- mso-style-link:"Comment Subject Char";
- mso-style-next:"Comment Text";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Balloon Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";}
-p.MsoQuote, li.MsoQuote, div.MsoQuote
- {mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Quote Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:black;
- font-style:italic;}
-span.Heading1Char
- {mso-style-name:"Heading 1 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 1";
- mso-ansi-font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-span.Heading2Char
- {mso-style-name:"Heading 2 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 2";
- mso-ansi-font-size:13.0pt;
- mso-bidi-font-size:13.0pt;
- font-family:"Cambria","serif";
- mso-ascii-font-family:Cambria;
- mso-ascii-theme-font:major-latin;
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:major-fareast;
- mso-hansi-font-family:Cambria;
- mso-hansi-theme-font:major-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:major-bidi;
- color:#4F81BD;
- mso-themecolor:accent1;
- font-weight:bold;}
-span.Heading4Char
- {mso-style-name:"Heading 4 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 4";
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:olive;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- font-weight:bold;}
-span.Heading3Char
- {mso-style-name:"Heading 3 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 3";
- mso-ansi-font-size:14.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:#FF6600;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- mso-bidi-font-weight:bold;}
-span.FootnoteTextChar
- {mso-style-name:"Footnote Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Footnote Text";}
-span.CommentTextChar
- {mso-style-name:"Comment Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Comment Text";}
-span.HeaderChar
- {mso-style-name:"Header Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Header;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.FooterChar
- {mso-style-name:"Footer Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Footer;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.CommentSubjectChar
- {mso-style-name:"Comment Subject Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-parent:"Comment Text Char";
- mso-style-link:"Comment Subject";
- font-weight:bold;}
-span.BalloonTextChar
- {mso-style-name:"Balloon Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Balloon Text";
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;}
-span.QuoteChar
- {mso-style-name:"Quote Char";
- mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Quote;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- color:black;
- font-style:italic;}
-p.Heading0, li.Heading0, div.Heading0
- {mso-style-name:"Heading 0";
- mso-style-unhide:no;
- mso-style-parent:"Heading 1";
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:28.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:Arial;
- color:#006699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-p.SubHeading, li.SubHeading, div.SubHeading
- {mso-style-name:SubHeading;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:maroon;
- font-weight:bold;
- mso-bidi-font-weight:normal;}
-span.CodeCharChar
- {mso-style-name:"Code Char Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Code;
- mso-ansi-font-size:9.0pt;
- mso-bidi-font-size:9.0pt;
- font-family:"Lucida Console";
- mso-ascii-font-family:"Lucida Console";
- mso-hansi-font-family:"Lucida Console";
- mso-no-proof:yes;}
-p.Code, li.Code, div.Code
- {mso-style-name:Code;
- mso-style-unhide:no;
- mso-style-link:"Code Char Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:3.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-layout-grid-align:none;
- text-autospace:none;
- font-size:9.0pt;
- font-family:"Lucida Console";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-span.NoteChar
- {mso-style-name:"Note Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Note;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- background:#F3F3F3;
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Note, li.Note, div.Note
- {mso-style-name:Note;
- mso-style-unhide:no;
- mso-style-link:"Note Char";
- margin-top:0in;
- margin-right:.2in;
- margin-bottom:12.0pt;
- margin-left:.2in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- background:#F3F3F3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Style2, li.Style2, div.Style2
- {mso-style-name:Style2;
- mso-style-unhide:no;
- mso-style-parent:"";
- mso-style-next:Normal;
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- background:#F9FFF3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-p.Style3, li.Style3, div.Style3
- {mso-style-name:Style3;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- background:#F5FAF4;
- mso-layout-grid-align:none;
- text-autospace:none;
- border:none;
- mso-border-alt:solid windowtext 1.0pt;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- mso-border-shadow:yes;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:PMingLiU;
- mso-bidi-font-family:"Times New Roman";
- mso-fareast-language:ZH-CN;
- mso-no-proof:yes;}
-.MsoChpDefault
- {mso-style-type:export-only;
- mso-default-props:yes;
- font-size:10.0pt;
- mso-ansi-font-size:10.0pt;
- mso-bidi-font-size:10.0pt;
- mso-ascii-font-family:Calibri;
- mso-hansi-font-family:Calibri;}
- /* Page Definitions */
- @page
- {mso-footnote-separator:url("Microsoft.VisualStudio.Utilities.UsageGuide_files=
-/header.htm") fs;
- mso-footnote-continuation-separator:url("Microsoft.VisualStudio.Utilities.Usag=
-eGuide_files/header.htm") fcs;
- mso-endnote-separator:url("Microsoft.VisualStudio.Utilities.UsageGuide_files/h=
-eader.htm") es;
- mso-endnote-continuation-separator:url("Microsoft.VisualStudio.Utilities.Usage=
-Guide_files/header.htm") ecs;}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
- @list l0
- {mso-list-id:-129;
- mso-list-type:simple;
- mso-list-template-ids:-1739002844;}
-@list l0:level1
- {mso-level-style-link:"List Number 2";
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l1
- {mso-list-id:-126;
- mso-list-type:simple;
- mso-list-template-ids:-1045901690;}
-@list l1:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 3";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.75in;
- mso-level-number-position:left;
- margin-left:.75in;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l2
- {mso-list-id:-125;
- mso-list-type:simple;
- mso-list-template-ids:-1069260336;}
-@list l2:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 2";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l3
- {mso-list-id:-119;
- mso-list-type:simple;
- mso-list-template-ids:1390696726;}
-@list l3:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.25in;
- mso-level-number-position:left;
- margin-left:.25in;
- text-indent:-.25in;
- font-family:Symbol;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-priority:99;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-table.MsoTableGrid
- {mso-style-name:"Table Grid";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-unhide:no;
- border:solid windowtext 1.0pt;
- mso-border-alt:solid windowtext .5pt;
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-border-insideh:.5pt solid windowtext;
- mso-border-insidev:.5pt solid windowtext;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-table.MsoTableColorfulListAccent5
- {mso-style-name:"Colorful List - Accent 5";
- mso-tstyle-rowband-size:1;
- mso-tstyle-colband-size:0;
- mso-style-priority:72;
- mso-style-unhide:no;
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-tstyle-shading:#EDF6F9;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- color:black;}
-table.MsoTableColorfulListAccent5FirstRow
- {mso-style-name:"Colorful List - Accent 5";
- mso-table-condition:first-row;
- mso-style-priority:72;
- mso-style-unhide:no;
- mso-tstyle-shading:#F2730A;
- mso-tstyle-border-bottom:1.5pt solid white;
- color:white;
- mso-ansi-font-weight:bold;
- mso-bidi-font-weight:bold;}
-table.MsoTableColorfulListAccent5LastRow
- {mso-style-name:"Colorful List - Accent 5";
- mso-table-condition:last-row;
- mso-style-priority:72;
- mso-style-unhide:no;
- mso-tstyle-shading:white;
- mso-tstyle-border-top:1.5pt solid black;
- color:#F2730A;
- mso-ansi-font-weight:bold;
- mso-bidi-font-weight:bold;}
-table.MsoTableColorfulListAccent5FirstCol
- {mso-style-name:"Colorful List - Accent 5";
- mso-table-condition:first-column;
- mso-style-priority:72;
- mso-style-unhide:no;
- mso-ansi-font-weight:bold;
- mso-bidi-font-weight:bold;}
-table.MsoTableColorfulListAccent5LastCol
- {mso-style-name:"Colorful List - Accent 5";
- mso-table-condition:last-column;
- mso-style-priority:72;
- mso-style-unhide:no;
- mso-ansi-font-weight:bold;
- mso-bidi-font-weight:bold;}
-table.MsoTableColorfulListAccent5OddRow
- {mso-style-name:"Colorful List - Accent 5";
- mso-table-condition:odd-row;
- mso-style-priority:72;
- mso-style-unhide:no;
- mso-tstyle-shading:#DAEEF3;}
-</style>
-<![endif]--><!--[if gte mso 9]><xml>
- <o:shapedefaults v:ext=3D"edit" spidmax=3D"9218"/>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <o:shapelayout v:ext=3D"edit">
- <o:idmap v:ext=3D"edit" data=3D"1"/>
- </o:shapelayout></xml><![endif]-->
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple style=3D'tab-interval:.5in'>
-
-<div class=3DSection1>
-
-<p class=3DHeading0>Utilities Subsystem Usage Guide<o:p></o:p></p>
-
-<div style=3D'mso-element:para-border-div;border:none;border-bottom:solid w=
-indowtext 1.0pt;
-mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in'>
-
-<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:solid windo=
-wtext .75pt;
-padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><o:p>&nbsp;</o:p></p>
-
-</div>
-
-<h1><a name=3D"_Toc151974049"><span style=3D'mso-fareast-font-family:"Times=
- New Roman"'>Introduction</span></a><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h1>
-
-<p class=3DMsoNormal>The Usage Guide gives a high level design overview of =
-the
-Utilities subsystem and provides a number of code snippets showing how to u=
-se the
-components of the subsystem. The complete sample code is located in
-Samples\ApplicationModel\Sequences\ExtensionsOrderer\ folder. <o:p></o:p></=
-p>
-
-<h1><a name=3D"_Toc151974050"><span style=3D'mso-fareast-font-family:"Times=
- New Roman"'>Design
-Diagram</span></a><span style=3D'mso-fareast-font-family:"Times New Roman"'=
-><o:p></o:p></span></h1>
-
-<p class=3DMsoNormal>The diagram below shows the components the subsystem
-consists of (all of them are defined in Microsoft.VisualStudio.CoreUtility.dll)=
-: <o:p></o:p></p>
-
-<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Verdana",=
-"sans-serif"'><!--[if gte vml 1]><v:shapetype
- id=3D"_x0000_t75" coordsize=3D"21600,21600" o:spt=3D"75" o:preferrelative=
-=3D"t"
- path=3D"m@4@5l@4@11@9@11@9@5xe" filled=3D"f" stroked=3D"f">
- <v:stroke joinstyle=3D"miter"/>
- <v:formulas>
- <v:f eqn=3D"if lineDrawn pixelLineWidth 0"/>
- <v:f eqn=3D"sum @0 1 0"/>
- <v:f eqn=3D"sum 0 0 @1"/>
- <v:f eqn=3D"prod @2 1 2"/>
- <v:f eqn=3D"prod @3 21600 pixelWidth"/>
- <v:f eqn=3D"prod @3 21600 pixelHeight"/>
- <v:f eqn=3D"sum @0 0 1"/>
- <v:f eqn=3D"prod @6 1 2"/>
- <v:f eqn=3D"prod @7 21600 pixelWidth"/>
- <v:f eqn=3D"sum @8 21600 0"/>
- <v:f eqn=3D"prod @7 21600 pixelHeight"/>
- <v:f eqn=3D"sum @10 21600 0"/>
- </v:formulas>
- <v:path o:extrusionok=3D"f" gradientshapeok=3D"t" o:connecttype=3D"rect"/>
- <o:lock v:ext=3D"edit" aspectratio=3D"t"/>
-</v:shapetype><v:shape id=3D"_x0000_i1025" type=3D"#_x0000_t75" style=3D'wi=
-dth:301.5pt;
- height:150.75pt' o:ole=3D"">
- <v:imagedata src=3D"Microsoft.VisualStudio.Utilities.UsageGuide_files/image001=
-.emz"
- o:title=3D""/>
-</v:shape><![endif]--><![if !vml]><img width=3D402 height=3D201
-src=3D"Microsoft.VisualStudio.Utilities.UsageGuide_files/image006.gif" border=
-=3D0
-v:shapes=3D"_x0000_i1025"><![endif]><!--[if gte mso 9]><xml>
- <o:OLEObject Type=3D"Embed" ProgID=3D"Visio.Drawing.11" ShapeID=3D"_x0000_=
-i1025"
- DrawAspect=3D"Content" ObjectID=3D"_1242052083">
- </o:OLEObject>
-</xml><![endif]--></span><o:p></o:p></p>
-
-<h1><a name=3D"_Toc151974051"><span style=3D'mso-fareast-font-family:"Times=
- New Roman"'>Microsoft.VisualStudio.Utilities.Verify
-Class</span></a><span style=3D'mso-fareast-font-family:"Times New Roman"'><=
-o:p></o:p></span></h1>
-
-<p class=3DMsoNormal>This static class contains various utility methods. Th=
-e most
-commonly used ones are the utilities that check for different conditions and
-report errors. <o:p></o:p></p>
-
-<p class=3DMsoNormal>For example in order to check whether some arguments a=
-re not
-null one can write a code like below:<o:p></o:p></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'color:blue'>if</s=
-pan> (args
-=3D=3D <span style=3D'color:blue'>null</span>)<o:p></o:p></p>
-
-<p class=3DCode style=3D'margin-left:.5in'>{<o:p></o:p></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span style=3D'color:b=
-lue'>throw</span>
-<span style=3D'color:blue'>new</span> <span style=3D'color:teal'>ArgumentEx=
-ception</span>(<span
-style=3D'color:maroon'>&quot;Arguments cannot be null.&quot;</span>);<o:p><=
-/o:p></p>
-
-<p class=3DCode style=3D'margin-left:.5in'>}<o:p></o:p></p>
-
-<p class=3DMsoNormal><span style=3D'font-family:"Georgia","serif"'><o:p>&nb=
-sp;</o:p></span></p>
-
-<p class=3DMsoNormal>By using the utility methods provided by the Utilities
-subsystem the same result can be achieved with code that is more compact and
-easier to read:<o:p></o:p></p>
-
-<p class=3DCode style=3D'text-indent:.5in'><span style=3D'color:teal'>Verif=
-y</span>.ThrowIfArgumentNull(args,
-<span style=3D'color:maroon'>&quot;Arguments cannot be null.&quot;</span>);=
-<span
-style=3D'font-family:"Georgia","serif"'><o:p></o:p></span></p>
-
-<h1><a name=3D"_Toc124327313"></a><a name=3D"_Toc151974052"><span style=3D'=
-mso-bookmark:
-_Toc124327313'><span style=3D'mso-fareast-font-family:"Times New Roman"'>Ex=
-tension
-Ordering</span></span></a><span style=3D'mso-bookmark:_Toc124327313'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc124327313'><b
-style=3D'mso-bidi-font-weight:normal'>Microsoft.VisualStudio.Utilities.IOrderab=
-le</b>
-interface is designed to identify orderable extensions. All extension types
-that are derived from this interface automatically become orderable. By
-deriving from IOrderable an extension inherits the option of having Name and
-Order attributes declared for its production. <o:p></o:p></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc124327313'><a name=3D"_Toc151974053"><s=
-pan
-style=3D'mso-fareast-font-family:"Times New Roman"'>Orderable Extension
-Declaration</span></a></span><span style=3D'mso-bookmark:_Toc124327313'><sp=
-an
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc124327313'>Let&#8217;s=
- assume
-that in an application there is abstract definition for a music title class
-that knows how to play the title:<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><o:p>&nbsp;</o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>public
-abstract class <span style=3D'color:teal'>Music</span> <o:p></o:p></span></=
-p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>{<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>public abstract void P=
-lay();<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>}<o:p></o:p></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc124327313'><o:p>&nbsp;=
-</o:p></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc124327313'>If we need =
-to play
-different music in some predefined order and have the list of titles extens=
-ible
-then we can declare them as an orderable extension, for example like below:=
-<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>[<span
-style=3D'color:teal'>ExtensionDefinition</span>]<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><span
-style=3D'color:blue'>public</span> <span style=3D'color:blue'>interface</sp=
-an> <span
-style=3D'color:teal'>IMusicExtension</span> : <span style=3D'color:teal'>IE=
-xtension</span>&lt;<span
-style=3D'color:teal'>Music</span>&gt;, <span style=3D'color:teal'>IOrderabl=
-e </span>{}<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><o:p>&nbsp;</o:p></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-fareast-f=
-ont-family:
-"Times New Roman"'><span style=3D'mso-spacerun:yes'>&nbsp;</span><a
-name=3D"_Toc151974054">Orderable Extension Productions</a><o:p></o:p></span=
-></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc124327313'>The product=
-ions of orderable
-extensions optionally can have <b style=3D'mso-bidi-font-weight:normal'>Mic=
-rosoft.VisualStudio.AssetSystem.CommonAttributes.Name</b>
-and <b style=3D'mso-bidi-font-weight:normal'>Microsoft.VisualStudio.AssetSy=
-stem.CommonAttributes.Order</b>
-provided attributes for them. The names should be unique within an asset ty=
-pe.
-The order attribute usually should be referring to an existing name though =
-this
-is not a requirement, i.e. orderable extenton productions can be positioned=
- relative
-to a non-existing one. The same order attribute can be applied to multiple
-extensions of the same type which usually means that they all have the same
-position relatively to some other extension.<o:p></o:p></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc124327313'>The public
-extension names should be publicly declared for example in some definition
-assembly. Continuing with the sample, let&#8217;s define names for a couple=
- of
-music titles:<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>public
-const string TheShowMustGoOn =3D <span style=3D'color:maroon'>&quot;The Sho=
-w Must
-Go On&quot;</span>;<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>public
-const string TheWall =3D <span style=3D'color:maroon'>&quot;The Wall&quot;<=
-/span>;<o:p></o:p></span></p>
-
-<p class=3DCode><span style=3D'mso-bookmark:_Toc124327313'><span style=3D'f=
-ont-family:
-"Georgia","serif";mso-no-proof:no'><o:p>&nbsp;</o:p></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc124327313'>And now let=
-&#8217;s
-create the productions for the extensions:<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><o:p>&nbsp;</o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>[<span
-style=3D'color:teal'>ExtensionProduction</span>(<span style=3D'color:blue'>=
-typeof</span>(<span
-style=3D'color:teal'>IMusicExtension</span>))]<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>[<span
-style=3D'color:teal'>Name</span>(TheShowMustGoOn)]<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><span
-style=3D'color:blue'>private</span> <span style=3D'color:blue'>void</span>
-PlayTheShowMustGoOn() { <span style=3D'color:green'>/* ... */ </span>}<o:p>=
-</o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><o:p>&nbsp;</o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>[<span
-style=3D'color:teal'>ExtensionProduction</span>(<span style=3D'color:blue'>=
-typeof</span>(<span
-style=3D'color:teal'>IMusicExtension</span>))]<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'>[<span
-style=3D'color:teal'>Name</span>(TheWall), <span style=3D'color:teal'>Order=
-</span>(Before
-=3D TheShowMustGoOn)]<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><span
-style=3D'color:blue'>private</span> <span style=3D'color:blue'>void</span>
-PlayTheWall(){ <span style=3D'color:green'>/* ... */ </span>}<o:p></o:p></s=
-pan></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><o:p>&nbsp;</o:p></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc124327313'><a name=3D"_Toc151974055"><s=
-pan
-style=3D'mso-fareast-font-family:"Times New Roman"'>Using the Orderer</span=
-></a></span><span
-style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc124327313'>Once you ha=
-ve the collection
-of orderable extension productions you can easily sort them using the <b
-style=3D'mso-bidi-font-weight:normal'>Microsoft.VisualStudio.Utilities.Order.Or=
-derer</b>
-static method. <o:p></o:p></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc124327313'>Assuming the
-extensions declared above were used, this sample code will produce a list w=
-ith
-&#8220;The Wall&#8221; extension followed by &#8220;The Show Must Go On&#82=
-21;
-one:<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><o:p>&nbsp;</o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><span
-style=3D'mso-spacerun:yes'>&nbsp;</span>[<span style=3D'color:teal'>Extensi=
-onConsumption</span>]<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><span
-style=3D'mso-spacerun:yes'>&nbsp;</span><span style=3D'color:blue'>private<=
-/span> <span
-style=3D'color:teal'>ICollection</span>&lt;<span style=3D'color:teal'>IMusi=
-cExtension</span>&gt;
-musicExtensions;<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span style=3D'mso-bookmark:_Toc=
-124327313'><span
-style=3D'font-family:"Verdana","sans-serif";mso-no-proof:no'><o:p>&nbsp;</o=
-:p></span></span></p>
-
-<span style=3D'mso-bookmark:_Toc124327313'></span>
-
-<p class=3DCode style=3D'margin-left:.5in'><span
-style=3D'mso-spacerun:yes'>&nbsp;</span><span style=3D'color:blue'>private<=
-/span> <span
-style=3D'color:blue'>void</span> PlayAllMusic()<o:p></o:p></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span
-style=3D'mso-spacerun:yes'>&nbsp;</span>{<o:p></o:p></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span><span
-style=3D'color:teal'>IList</span>&lt;<span style=3D'color:teal'>IMusicExten=
-sion</span>&gt;
-orderedMusicExtensions =3D<o:p></o:p></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span><span style=3D'color:teal'>Orderer</span>.Order&lt;<span style=3D'co=
-lor:
-teal'>IMusicExtension</span>&gt;(musicExtensions);<o:p></o:p></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><o:p>&nbsp;</o:p></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span><span
-style=3D'color:green'>// Play the music after it has been ordered.<o:p></o:=
-p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'><span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp; </span><span
-style=3D'color:green'>// ...<o:p></o:p></span></p>
-
-<p class=3DCode style=3D'margin-left:.5in'>}<o:p></o:p></p>
-
-<h1><span style=3D'mso-fareast-font-family:"Times New Roman"'><o:p>&nbsp;</=
-o:p></span></h1>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C7A2E1.D90FC860
-Content-Location: file:///C:/8EAC30E5/Microsoft.VisualStudio.Utilities.UsageGuide_files/themedata.thmx
-Content-Transfer-Encoding: base64
-Content-Type: application/vnd.ms-officetheme
-
-UEsDBBQABgAIAAAAIQCCirwT+gAAABwCAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKyRy2rDMBBF
-94X+g9C22HK6KKXYzqJJd30s0g8Y5LEtao+ENAnJ33fsuFC6CC10IxBizpl7Va6P46AOGJPzVOlV
-XmiFZH3jqKv0++4pu9cqMVADgyes9AmTXtfXV+XuFDApmaZU6Z45PBiTbI8jpNwHJHlpfRyB5Ro7
-E8B+QIfmtijujPXESJzxxNB1+SoLRNegeoPILzCKx7Cg8Pv5DCSAmAtYq8czYVqi0hDC4CywRDAH
-an7oM9+2zmLj7X4UaT6DF9jNBDO/XGD1P+ov5wZb2A+stkfp4lx/xCH9LdtSay6Tc/7Uu5AuGC6X
-t7Rh5r+tPwEAAP//AwBQSwMEFAAGAAgAAAAhAKXWp+fAAAAANgEAAAsAAABfcmVscy8ucmVsc4SP
-z2rDMAyH74W9g9F9UdLDGCV2L6WQQy+jfQDhKH9oIhvbG+vbT8cGCrsIhKTv96k9/q6L+eGU5yAW
-mqoGw+JDP8to4XY9v3+CyYWkpyUIW3hwhqN727VfvFDRozzNMRulSLYwlRIPiNlPvFKuQmTRyRDS
-SkXbNGIkf6eRcV/XH5ieGeA2TNP1FlLXN2Cuj6jJ/7PDMMyeT8F/ryzlRQRuN5RMaeRioagv41O9
-kKhlqtQe0LW4+db9AQAA//8DAFBLAwQUAAYACAAAACEAa3mWFoMAAACKAAAAHAAAAHRoZW1lL3Ro
-ZW1lL3RoZW1lTWFuYWdlci54bWwMzE0KwyAQQOF9oXeQ2TdjuyhFY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htbFBLAQItABQABgAIAAAAIQAN0ZCftgAAABsBAAAnAAAAAAAAAAAAAAAAAJsJAAB0
-aGVtZS90aGVtZS9fcmVscy90aGVtZU1hbmFnZXIueG1sLnJlbHNQSwUGAAAAAAUABQBdAQAAlgoA
-AAAA
-
-------=_NextPart_01C7A2E1.D90FC860
-Content-Location: file:///C:/8EAC30E5/Microsoft.VisualStudio.Utilities.UsageGuide_files/colorschememapping.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml
-
-<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?>
-<a:clrMap xmlns:a=3D"http://schemas.openxmlformats.org/drawingml/2006/main"=
- bg1=3D"lt1" tx1=3D"dk1" bg2=3D"lt2" tx2=3D"dk2" accent1=3D"accent1" accent=
-2=3D"accent2" accent3=3D"accent3" accent4=3D"accent4" accent5=3D"accent5" a=
-ccent6=3D"accent6" hlink=3D"hlink" folHlink=3D"folHlink"/>
-------=_NextPart_01C7A2E1.D90FC860
-Content-Location: file:///C:/8EAC30E5/Microsoft.VisualStudio.Utilities.UsageGuide_files/image001.emz
-Content-Transfer-Encoding: base64
-Content-Type: image/x-emz
-
-H4sIAAAAAAACC+1cC3RUxRme3Ww2IQQNIZGgIa4IJSClUYJAGsIlUQgYNMUYOFRx00QeNmCUlODp
-2l5r0GCpRsEjStQgqCBKKx4VlaOL0AO2iNUi4KOKaCkKUlDAt+n3zexsLje7cVmSwKkOfvvN+858
-M/PP3Ed0CCEqAbrBQI1DiCMypH7++zMh5p4mhOfCcaOEcAjfxUKsQp4YSx7pjcWvSwgDaQfsabtc
-wlwRI1CBGAB4AFR3jgOZ0+FPApxJ/rdRVHgDYN56oBZg3izDKfPhEnDmiDMNl0iUfiEyjNigv6ch
-RAri4wEncIh+Q8RkgzMZh+voth/Z81zB+DXr8slXPTVXMsPCcWNMiiHMJOTn9Zrg2B4vUAKwPfGG
-w2nAz3pZJ0hs4Q9cwvaleby2FYzX+eBtSjVUv1k/+30WwDb/C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0LRko2r/qFZGMI9kSW
-y5guWXTHWyyEvYfmqvgb/ijZX3W7Cv8UT2VZX4fsiW3798lfN+3cmyLeGD5/WMWyuU7aVNp0E/gi
-Afsiwukwvgbggf8bxMMrkjB57/beNUx0ZUg5Od4b6Fd769/gG6iSxLcot2eX2hOTdiVLe+76IBmp
-3/v3HBv0nrgJ+VddWTdsWumtzj2X3erciXro5uyL/O85ClGH5e85NoTbE/2otyfwc9YPFAJqPqs9
-kWm0Y5yzRYDVoavSVSMywvks9y4X8rsBMu0B/XZmnI6PC/h1fjJdH4C2ucv37n0Op4F82UA0dpf3
-KrkomxUor68/99dnyGepijPxTnIB3kkqls8/TrJnqRzbq4H7gLUA+/FMpxWdn+k0L+F+F9G2zygW
-ov46oC32Po4Bxy8T4Bhyvii3OP/BF/flU3tqvmr0fBk+2Z6lXojGUvtLgDkA27/DNSWOmpeD9VzG
-XA/e4yNLROcMasJ1QAtVBFQAXMPnAzXwHLaF/Qj3E4/iV7twdzg6/WjuhSCvx8U/CpwOJAEcZ6eh
-0hAUpwAp9MAlAfT/D5d6D/x8TgAA
-
-------=_NextPart_01C7A2E1.D90FC860
-Content-Location: file:///C:/8EAC30E5/Microsoft.VisualStudio.Utilities.UsageGuide_files/header.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link id=3DMain-File rel=3DMain-File
-href=3D"../Microsoft.VisualStudio.Utilities.UsageGuide.htm">
-<![if IE]>
-<base
-href=3D"file:///C:\8EAC30E5\Microsoft.VisualStudio.Utilities.UsageGuide_files\h=
-eader.htm"
-id=3D"webarch_temp_base_tag">
-<![endif]>
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
-
-<div style=3D'mso-element:footnote-separator' id=3Dfs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:footnote-continuation-separator' id=3Dfcs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-separator' id=3Des>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-continuation-separator' id=3Decs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C7A2E1.D90FC860
-Content-Location: file:///C:/8EAC30E5/Microsoft.VisualStudio.Utilities.UsageGuide_files/oledata.mso
-Content-Transfer-Encoding: base64
-Content-Type: application/x-mso
-
-0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAACAAAAAQAAAAAAAAAA
-EAAA/v///wAAAAD+////AAAAAAAAAAACAAAA////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////9
-/////v////3///8EAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8A
-AAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAA
-AB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACQAAAAlAAAAJgAAACcAAAAoAAAAKQAAACoAAAArAAAA
-LAAAAC0AAAAuAAAALwAAADAAAAAxAAAAMgAAADMAAAA0AAAANQAAADYAAAA3AAAAOAAAADkAAAA6
-AAAAOwAAADwAAAA9AAAAPgAAAD8AAABAAAAAQQAAAEIAAABDAAAARAAAAEUAAABGAAAARwAAAEgA
-AABJAAAASgAAAEsAAABMAAAATQAAAE4AAABPAAAAUAAAAFEAAABSAAAAUwAAAFQAAABVAAAAVgAA
-AFcAAABYAAAAWQAAAFoAAABbAAAAXAAAAF0AAABeAAAAXwAAAGAAAABhAAAAYgAAAGMAAABkAAAA
-ZQAAAGYAAABnAAAAaAAAAGkAAABqAAAAawAAAGwAAABtAAAAbgAAAG8AAABwAAAAcQAAAHIAAABz
-AAAAdAAAAHUAAAB2AAAAdwAAAHgAAAB5AAAAegAAAHsAAAB8AAAAfQAAAH4AAAB/AAAAgAAAAFIA
-bwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAWAAUA//////////8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAEr4Uco8cB
-/v///wAAAAAAAAAAXwAxADIANAAyADAANQAyADAAOAAzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAABgAAgH///////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAADAAAAuf4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////////wAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////
-////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgQAA
-AIIAAAD+////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////8AhgEA
-eJzsXQdAFEfbnr1G92iHIugdIIoGKSKKjTuKYgcVNBoTOhEVDwVEo8mdClYMFrCSHChGJSp2TSyA
-JWpiiyWaRAVFkXLxliaIwv4zO7dyIhhixC/f/2WTx3dmd2Z35pl3Z953Zm65esWoIGNfx/ugyeEO
-2KCB0gE8jXMsCIKJGDbGGyiKYk73hKD+Pf5rjnoIe3Ub5kDJhUBtrgWhDaEDoQuhB6EPYQDRDoKP
-VQAYQRhDmECYQgggzCDaQ3SAMIfoCGEBYQnRCaIzhBBCBGEFYQ1hA9EFwhaiK0Q3CDuI7hA9ID5Q
-lzEXSlRmRyidIJwhekG4QPSGcIXoA9EXwg2iH0R/iAEQAyEG0boNgBhCAuEB4QnhBeENMRhiCIQP
-xFCIYRDDIUZAjIQYBTEawhfCD2IMxFiIcRD+EAEQ4yEmQHwIMRFiEsRHEJMhPob4BCIQIggiGCIE
-IhQiDCIcIgLiU4gpEJEQUyGmQUyHiIKYASGFiIaYCTELIgYiFiIOYjZEP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.D90FC860
-Content-Location: file:///C:/8EAC30E5/Microsoft.VisualStudio.Utilities.UsageGuide_files/image006.gif
-Content-Transfer-Encoding: base64
-Content-Type: image/gif
-
-R0lGODlhkgHJAHcAMSH+GlNvZnR3YXJlOiBNaWNyb3NvZnQgT2ZmaWNlACH5BAEAAAAALAEALAAy
-AZwAhQAAAAAAABgYGBQUFAwMDAYGBgMDAxYWFhoaGgkJCQcHBxAQEDExMTw8PCUlJT8/PyAgIDMz
-My0tLUBAQFFRUUdHR39/f2NjY3R0dGBgYHBwcJSUlIWFhb+/v7GxsaOjo9nZ2czMzObm5vPz8///
-/wECAwECAwECAwECAwECAwECAwECAwECAwECAwECAwECAwECAwECAwECAwECAwECAwECAwECAwEC
-AwECAwECAwECAwECAwECAwECAwECAwECAwb/QAAgMCwSj8YkcqlsMp/OKHQqrUKF2Kx2y+16v+Cw
-eEwum8/miWXNbrvf8Lh8Tq/b73QBEc3v+/+AgYJaARYkh4iJiouMjY6PkJGSk5AMg5eYmZqbYIaU
-n6ChoqOPDHucqKmqq16FpK+wsbIklqy2t7iYnrO8vb6JprnCw8Rhrr+IIiQdG5IcI58jz4cbHY3M
-JB4cILO1xd/gxLuwDSGKIA4kGxeSDuafDs0kDtyM6/MY0LLB4f3+qcdEcWhAAcSFAA1IDKQgokGA
-C/dAUGjgIdGFBhzmmbvIzkMDigoJ1iNxkcSHdCQmVqSAgcK6gxgxZKPwytu/mzgFjQPlgNmG/xAO
-PoigEALjyRAD523YQPMQhQseRbjzgKGDO4wdZPZcighdSpksPaRzAHUg0A9WScokxS+n27dlAoai
-4CCoRhIYGjjgADSkV0XuELkz6DAEhrpg635IFI/ePILuAicN7EDsSFE24QaiwtmK586gP4sGsPMT
-BxEcxobYkBBj38kehiJqAFZqCJYj3G0AYfl06kSHUVYe0UxywsB5E9Y8pflPBjzQo0ufbmdCALmg
-JtKe19PBxwvoKHCgmdrB2mV1jyP1HjQ5Te3nSaDLaNI7O8k0A0uVx7Z5oAHWICPggCRYQ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yqA0KDIhvW90DLcEjKEibn4Yv+A4ysCEl46BQYIBMUpyzl
-qDsF0QxG03qkY4DNwBLmiHuIQI+LUHsGRBKEyBIdEW0dYHz2IGeEuBjBJ3sFwULsIBHRpo/GtxsG
-cSz6qBZGU2tdY3xG80WLYI/OWH/Ph3kauSpo0TqQF0+idwixcUGa4zYdWZJoZn/pJQoMEgqB4zJt
-owjMIxCHgBrX43uScJOESE6fp12icIyXlEBSN2hHGQnrQgFZdDWMYIeK4IRQCUQuSVShxwiVsjLv
-w3uyAiZBYzpEBH2KUD1O8X8bgYL/dDR7R5OS6QA/oJOBdNQSM5GQLYGBKCgxYNIUGVhMQXlokWBA
-ckkUE7g9zVAVErOG15eYYjOHiBIxf2INjMggWSQTbHl9ygYNDQeGHcEXEwiZSJERVTE/iXlBVUle
-Pal74HFINPQRS8M6nmgm4QgYWGIOK/gnIpESkyKbY6Q/o1iKvLd+tck6IjQPvAebVLmSjcASupdF
-iAQVYYJE5sBpv7eEjaAcx3IbFeFAucOUUehm6VA9vCiFNJE/KvhKP6E02YkUi/EBuhcq0DCdlFSa
-UTVEPkiGiDQUAyEN5hCX0Rd9hGOST+GYRjMQWRFtQoERojkyh5AX+mc/FNc1LMGUidN4LMkyHoE5
-E3K5S315bcjUfCzJCPLZVc1EfR/6CBuKdiXakiN5YSn6dSc6di16ZiFaYjEqo8hZo0C5ooiFo2P2
-omQVAB0QpEI6pERapEZ6pEiapEq6pEzapE76pFAapU+aADqKCwqwAFiapVq6pVzapV76pWAapmI6
-pmRapmZ6pmhqpmC2CkEAADs=
-
-------=_NextPart_01C7A2E1.D90FC860
-Content-Location: file:///C:/8EAC30E5/Microsoft.VisualStudio.Utilities.UsageGuide_files/filelist.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml; charset="utf-8"
-
-<xml xmlns:o=3D"urn:schemas-microsoft-com:office:office">
- <o:MainFile HRef=3D"../Microsoft.VisualStudio.Utilities.UsageGuide.htm"/>
- <o:File HRef=3D"themedata.thmx"/>
- <o:File HRef=3D"colorschememapping.xml"/>
- <o:File HRef=3D"image001.emz"/>
- <o:File HRef=3D"image006.gif"/>
- <o:File HRef=3D"header.htm"/>
- <o:File HRef=3D"oledata.mso"/>
- <o:File HRef=3D"filelist.xml"/>
-</xml>
-------=_NextPart_01C7A2E1.D90FC860--
diff --git a/src/Editor/Core/Def/CoreUtility.csproj b/src/Editor/Core/Def/CoreUtility.csproj
index 6426d95..e89b22f 100644
--- a/src/Editor/Core/Def/CoreUtility.csproj
+++ b/src/Editor/Core/Def/CoreUtility.csproj
@@ -1,17 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.VisualStudio.CoreUtility</AssemblyName>
- <TargetFramework>net46</TargetFramework>
+ <RootNamespace>Microsoft.VisualStudio.Utilities</RootNamespace>
+ <PushToPublicFeed>true</PushToPublicFeed>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <LocalizationEnabled>false</LocalizationEnabled>
+ <InsertNuget>true</InsertNuget>
+ <IncludeInOptProf>true</IncludeInOptProf>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
</PropertyGroup>
-
<ItemGroup>
- <PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(MicrosoftVisualStudioThreadingVersion)" />
- <PackageReference Include="Microsoft.VisualStudio.Validation" Version="$(MicrosoftVisualStudioValidationVersion)" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.ComponentModel.Composition" />
</ItemGroup>
-
<ItemGroup>
- <Reference Include="System.ComponentModel.Composition" />
+ <PackageReference Include="Microsoft.VisualStudio.Threading" />
</ItemGroup>
-
</Project> \ No newline at end of file
diff --git a/src/Editor/Core/Def/CoreUtilityAssemblyInfo.cs b/src/Editor/Core/Def/CoreUtilityAssemblyInfo.cs
new file mode 100644
index 0000000..a47d690
--- /dev/null
+++ b/src/Editor/Core/Def/CoreUtilityAssemblyInfo.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Reflection;
+using System.Runtime.ConstrainedExecution;
+using System.Runtime.Versioning;
+using System.Security.Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+
+[assembly: ComponentGuarantees(ComponentGuaranteesOptions.Stable)]
+
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+#pragma warning disable 618
+[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Core/Def/Features/PredefinedEditorFeatureNames.cs b/src/Editor/Core/Def/Features/PredefinedEditorFeatureNames.cs
index 08d7568..8ccceee 100644
--- a/src/Editor/Core/Def/Features/PredefinedEditorFeatureNames.cs
+++ b/src/Editor/Core/Def/Features/PredefinedEditorFeatureNames.cs
@@ -26,5 +26,11 @@
/// Descends from <see cref="InteractivePopup"/> and <see cref="Editor"/>
/// </summary>
public const string Completion = nameof(Completion);
+
+ /// <summary>
+ /// Definition of IntelliSense Completion.
+ /// Descends from <see cref="InteractivePopup"/> and <see cref="Editor"/>
+ /// </summary>
+ public const string AsyncCompletion = nameof(AsyncCompletion);
}
}
diff --git a/src/Editor/Core/Def/GettextCatalog.cs b/src/Editor/Core/Def/GettextCatalog.cs
new file mode 100644
index 0000000..c10c777
--- /dev/null
+++ b/src/Editor/Core/Def/GettextCatalog.cs
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using System;
+
+namespace Microsoft.VisualStudio.UI
+{
+ public static class GettextCatalog
+ {
+ static bool initialized;
+
+ static Func<string, string> getStringHandler;
+ static Func<string, object [], string> getStringFormatHandler;
+
+ public static void Initialize(
+ Func<string, string> getStringHandler,
+ Func<string, object[], string> getStringFormatHandler)
+ {
+ if (initialized)
+ return;
+
+ GettextCatalog.getStringHandler = getStringHandler
+ ?? throw new ArgumentNullException(nameof(getStringHandler));
+
+ GettextCatalog.getStringFormatHandler = getStringFormatHandler
+ ?? throw new ArgumentNullException(nameof(getStringFormatHandler));
+
+ initialized = true;
+ }
+
+ public static string GetString(string message)
+ {
+ if (getStringHandler != null)
+ return getStringHandler(message);
+
+ return message;
+ }
+
+ public static string GetString(string format, params object[] args)
+ {
+ if (getStringFormatHandler != null)
+ return getStringFormatHandler(format, args);
+
+ return string.Format(format, args);
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Core/Def/IImageService.cs b/src/Editor/Core/Def/IImageService.cs
new file mode 100644
index 0000000..9ae87a0
--- /dev/null
+++ b/src/Editor/Core/Def/IImageService.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Core.Imaging
+{
+ public interface IImageService
+ {
+ object GetImage(ImageDescription description);
+ }
+
+ public static class ImageServiceExtensions
+ {
+ public static object GetImage(
+ this IImageService imageService,
+ ImageId id,
+ ImageTags tags = ImageTags.None)
+ => imageService.GetImage(new ImageDescription(id, tags));
+
+ public static object GetImage(
+ this IImageService imageService,
+ ImageId id,
+ int size,
+ ImageTags tags = ImageTags.None)
+ => imageService.GetImage(new ImageDescription(id, size, tags));
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Core/Def/ImageDescription.cs b/src/Editor/Core/Def/ImageDescription.cs
new file mode 100644
index 0000000..1ec4c7e
--- /dev/null
+++ b/src/Editor/Core/Def/ImageDescription.cs
@@ -0,0 +1,69 @@
+using System;
+
+namespace Microsoft.VisualStudio.Core.Imaging
+{
+ public readonly struct ImageDescription : IEquatable<ImageDescription>
+ {
+ public readonly ImageId Id;
+ public readonly int Width;
+ public readonly int Height;
+ public readonly ImageTags Tags;
+
+ public ImageDescription(ImageId id, ImageTags tags)
+ : this(id, 0, 0, tags)
+ {
+ }
+
+ public ImageDescription(ImageId id, int size)
+ : this(id, size, size, ImageTags.None)
+ {
+ }
+
+ public ImageDescription(ImageId id, int size, ImageTags tags)
+ : this(id, size, size, tags)
+ {
+ }
+
+ public ImageDescription(ImageId id, int width, int height, ImageTags tags)
+ {
+ Id = id;
+ Width = width;
+ Height = height;
+ Tags = tags;
+ }
+
+ public ImageDescription WithAdditionalTags(ImageTags tags)
+ => new ImageDescription(Id, Width, Height, Tags | tags);
+
+ public ImageDescription WithoutTags(ImageTags tags)
+ => new ImageDescription(Id, Width, Height, Tags & ~tags);
+
+ public override string ToString ()
+ => $"'{Id}' @ {Width}x{Height} [{Tags}]";
+
+ public bool Equals(ImageDescription other)
+ => Width == other.Width &&
+ Height == other.Height &&
+ Tags == other.Tags &&
+ Id.Equals(other.Id);
+
+ public override bool Equals(object obj)
+ => obj is ImageDescription other && Equals(other);
+
+ public override int GetHashCode()
+ {
+ var hash = 23;
+ hash = hash * 31 + Id.GetHashCode();
+ hash = hash * 31 + (int)Tags;
+ hash = hash * 31 + Width;
+ hash = hash * 31 + Height;
+ return hash;
+ }
+
+ public static bool operator ==(ImageDescription left, ImageDescription right)
+ => left.Equals(right);
+
+ public static bool operator !=(ImageDescription left, ImageDescription right)
+ => !(left == right);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Core/Def/ImageTags.cs b/src/Editor/Core/Def/ImageTags.cs
new file mode 100644
index 0000000..814d7c1
--- /dev/null
+++ b/src/Editor/Core/Def/ImageTags.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace Microsoft.VisualStudio.Core.Imaging
+{
+ [Flags]
+ public enum ImageTags
+ {
+ None = 0 << 0,
+ Dark = 1 << 0,
+ Disabled = 1 << 1,
+ Error = 1 << 2,
+ Hover = 1 << 3,
+ Pressed = 1 << 4,
+ Selected = 1 << 5,
+ Template = 1 << 6
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Core/Impl/ContentType/Strings.Designer.cs b/src/Editor/Core/Impl/ContentType/Strings.Designer.cs
index e6aa278..736d04f 100644
--- a/src/Editor/Core/Impl/ContentType/Strings.Designer.cs
+++ b/src/Editor/Core/Impl/ContentType/Strings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.Utilities.Implementation {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Core.Impl.ContentType.Strings", typeof(Strings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.CoreUtilityImplementation.ContentType.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Core/Impl/CoreUtilityImpl.csproj b/src/Editor/Core/Impl/CoreUtilityImpl.csproj
new file mode 100644
index 0000000..1fcc7f9
--- /dev/null
+++ b/src/Editor/Core/Impl/CoreUtilityImpl.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.CoreUtilityImplementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <IsPackable>false</IsPackable>
+ <NonShipping>true</NonShipping>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Runtime" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="System.Collections.Immutable" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Text\Util\TextDataUtil\TextDataUtil.csproj" />
+ <ProjectReference Include="..\Def\CoreUtility.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="ContentType\Strings.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>ContentType\Strings.Designer.cs</LastGenOutput>
+ <LogicalName>Microsoft.VisualStudio.CoreUtilityImplementation.ContentType.Strings.resources</LogicalName>
+ <ManifestResourceName>Microsoft.VisualStudio.CoreUtilityImplementation.ContentType.Strings.resources</ManifestResourceName>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="ContentType\Strings.Designer.cs">
+ <DesignTime>true</DesignTime>
+ <AutoGen>true</AutoGen>
+ <DependentUpon>ContentType\Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Core/Impl/CoreUtilityImplAssemblyInfo.cs b/src/Editor/Core/Impl/CoreUtilityImplAssemblyInfo.cs
new file mode 100644
index 0000000..bb6b90b
--- /dev/null
+++ b/src/Editor/Core/Impl/CoreUtilityImplAssemblyInfo.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.ContentType.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.ApplicationModel.Context.EnvironmentUnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("ComponentModel, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+//[assembly: AssemblyTrademark ("")]
+//[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Core/Impl/Features/StandardEditorFeatureDefinitions.cs b/src/Editor/Core/Impl/Features/StandardEditorFeatureDefinitions.cs
index c8c04fb..03d4045 100644
--- a/src/Editor/Core/Impl/Features/StandardEditorFeatureDefinitions.cs
+++ b/src/Editor/Core/Impl/Features/StandardEditorFeatureDefinitions.cs
@@ -25,5 +25,10 @@ namespace Microsoft.VisualStudio.Utilities.Features.Implementation
[BaseDefinition(PredefinedEditorFeatureNames.InteractivePopup)]
[BaseDefinition(PredefinedEditorFeatureNames.Editor)]
public FeatureDefinition CompletionDefinition;
+
+ [Export]
+ [Name(PredefinedEditorFeatureNames.AsyncCompletion)]
+ [BaseDefinition(PredefinedEditorFeatureNames.Completion)]
+ public FeatureDefinition AsyncCompletionDefinition;
}
}
diff --git a/src/Editor/Language/Def/Intellisense/AssemblyInfo.cs b/src/Editor/Language/Def/Intellisense/AssemblyInfo.cs
new file mode 100644
index 0000000..d0c7d34
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/AssemblyInfo.cs
@@ -0,0 +1,25 @@
+//********************************************************************************
+// Copyright (c) Microsoft Corporation Inc. All rights reserved
+//********************************************************************************
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+using System.Runtime.Versioning;
+using System.Security.Permissions;
+using Microsoft.VisualStudio.Language.Intellisense;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+
+[assembly: ComponentGuarantees(ComponentGuaranteesOptions.Stable)]
+
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+#pragma warning disable 618
+[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+[assembly: TypeForwardedTo(typeof(IInteractiveQuickInfoContent))]
diff --git a/src/Editor/Language/Def/Intellisense/BulkObservableCollection.cs b/src/Editor/Language/Def/Intellisense/BulkObservableCollection.cs
new file mode 100644
index 0000000..b67bd07
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/BulkObservableCollection.cs
@@ -0,0 +1,245 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Linq;
+using System.Windows.Threading;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an ObservableCollection that allows the AddRange operation.
+ /// </summary>
+ public class BulkObservableCollection<T> : ObservableCollection<T>
+ {
+ private delegate void AddRangeCallback(IList<T> items);
+ private delegate void SetItemCallback(int index, T item);
+ private delegate void RemoveItemCallback(int index);
+ private delegate void ClearItemsCallback();
+ private delegate void InsertItemCallback(int index, T item);
+ private delegate void MoveItemCallback(int oldIndex, int newIndex);
+
+ private int _rangeOperationCount = 0;
+ private bool _collectionChangedDuringRangeOperation = false;
+ private Dispatcher _dispatcher;
+ private ReadOnlyObservableCollection<T> _readOnlyAccessor;
+
+ private static readonly PropertyChangedEventArgs _countChanged = new PropertyChangedEventArgs("Count");
+ private static readonly PropertyChangedEventArgs _indexerChanged = new PropertyChangedEventArgs("Item[]");
+ private static readonly NotifyCollectionChangedEventArgs _resetChange = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset);
+
+ /// <summary>
+ /// Initializes a new instance of a <see cref="BulkObservableCollection&lt;T&gt;"/>.
+ /// </summary>
+ public BulkObservableCollection()
+ {
+ _dispatcher = Dispatcher.CurrentDispatcher;
+ }
+
+ /// <summary>
+ /// Adds a list of items to the ObservableCollection without firing an event for each item.
+ /// </summary>
+ /// <param name="items">A list of items to add.</param>
+ public void AddRange(IEnumerable<T> items)
+ {
+ // If we were given null, nothing to do.
+ if ((items == null) || !items.Any())
+ {
+ return;
+ }
+
+ if (_dispatcher.CheckAccess())
+ {
+ try
+ {
+ this.BeginBulkOperation();
+ _collectionChangedDuringRangeOperation = true;
+
+ foreach (T item in items)
+ {
+ // Call down to the underlying collection to ensure that no collection changed event is generated (we've marked ourselves dirty above so a reset event will be raised at the end of the bulk operation).
+ base.Items.Add(item);
+ }
+ }
+ finally
+ {
+ this.EndBulkOperation();
+ }
+ }
+ else
+ {
+ _dispatcher.BeginInvoke(new AddRangeCallback(this.AddRange), DispatcherPriority.Send, items);
+ }
+ }
+
+ /// <summary>
+ /// Suspends change events on the collection in order to perform a bulk change operation.
+ /// </summary>
+ public void BeginBulkOperation()
+ {
+ _rangeOperationCount++;
+ _collectionChangedDuringRangeOperation = false;
+ }
+
+ /// <summary>
+ /// Restores change events on the collection after a bulk change operation has been completed.
+ /// </summary>
+ public void EndBulkOperation()
+ {
+ if ((_rangeOperationCount > 0) && (--_rangeOperationCount == 0) && _collectionChangedDuringRangeOperation)
+ {
+ // Assume that, as a result of a change, the count & indexer changes (which are the only two properties that could change).
+ this.OnPropertyChanged(_countChanged);
+ this.OnPropertyChanged(_indexerChanged);
+
+ this.OnCollectionChanged(_resetChange);
+ }
+ }
+
+ /// <summary>
+ /// Gets a read-only version of the collection.
+ /// </summary>
+ /// <returns>A read-only version of the collection.</returns>
+ public ReadOnlyObservableCollection<T> AsReadOnly()
+ {
+ if (_readOnlyAccessor == null)
+ {
+ _readOnlyAccessor = new ReadOnlyObservableCollection<T>(this);
+ }
+
+ return _readOnlyAccessor;
+ }
+
+ /// <summary>
+ /// Occurs when a property on the collection has changed.
+ /// </summary>
+ /// <param name="e">The event arguments.</param>
+ protected override void OnPropertyChanged(PropertyChangedEventArgs e)
+ {
+ if (_rangeOperationCount == 0)
+ {
+ base.OnPropertyChanged(e);
+ }
+ else
+ {
+ _collectionChangedDuringRangeOperation = true;
+ }
+ }
+
+ /// <summary>
+ /// Occurs when the collection has changed.
+ /// </summary>
+ /// <param name="e">The event arguments.</param>
+ protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
+ {
+ if (_rangeOperationCount == 0)
+ {
+ base.OnCollectionChanged(e);
+ }
+ else
+ {
+ _collectionChangedDuringRangeOperation = true;
+ }
+ }
+
+ /// <summary>
+ /// Replaces the item at the specified index.
+ /// </summary>
+ /// <param name="index">The place at which to replace the item.</param>
+ /// <param name="item">The item to replace.</param>
+ protected override void SetItem(int index, T item)
+ {
+ if (_dispatcher.CheckAccess())
+ {
+ base.SetItem(index, item);
+ }
+ else
+ {
+ _dispatcher.BeginInvoke(new SetItemCallback(this.SetItem), DispatcherPriority.Send, index, item);
+ }
+ }
+
+ /// <summary>
+ /// Inserts an item at the specified index.
+ /// </summary>
+ /// <param name="index">The location at which to insert the item.</param>
+ /// <param name="item">The item to insert.</param>
+ protected override void InsertItem(int index, T item)
+ {
+ if (_dispatcher.CheckAccess())
+ {
+ // Dev12 #619282. During range operation avoid calling base.InsertItem() because it would allocate
+ // NotifyCollectionChangedEventArgs object for each item, but this.OnCollectionChanged would not fire
+ // the event during range operation.
+ if (_rangeOperationCount == 0)
+ {
+ base.InsertItem(index, item);
+ }
+ else
+ {
+ base.Items.Insert(index, item);
+ _collectionChangedDuringRangeOperation = true;
+ }
+ }
+ else
+ {
+ _dispatcher.BeginInvoke(new InsertItemCallback(this.InsertItem), DispatcherPriority.Send, index, item);
+ }
+ }
+
+ /// <summary>
+ /// Moves the item from one location to another.
+ /// </summary>
+ /// <param name="oldIndex">The original location.</param>
+ /// <param name="newIndex">The new location.</param>
+ protected override void MoveItem(int oldIndex, int newIndex)
+ {
+ if (_dispatcher.CheckAccess())
+ {
+ base.MoveItem(oldIndex, newIndex);
+ }
+ else
+ {
+ _dispatcher.BeginInvoke(new MoveItemCallback(this.MoveItem), DispatcherPriority.Send, oldIndex, newIndex);
+ }
+ }
+
+ /// <summary>
+ /// Removes an item from the collection at the specified location.
+ /// </summary>
+ /// <param name="index">The location at which to remove the item.</param>
+ protected override void RemoveItem(int index)
+ {
+ if (_dispatcher.CheckAccess())
+ {
+ base.RemoveItem(index);
+ }
+ else
+ {
+ _dispatcher.BeginInvoke(new RemoveItemCallback(this.RemoveItem), DispatcherPriority.Send, index);
+ }
+ }
+
+ /// <summary>
+ /// Removes all items from the collection.
+ /// </summary>
+ protected override void ClearItems()
+ {
+ if (_dispatcher.CheckAccess())
+ {
+ if (this.Count > 0)
+ {
+ base.ClearItems();
+ }
+ }
+ else
+ {
+ _dispatcher.BeginInvoke(new ClearItemsCallback(this.ClearItems), DispatcherPriority.Send);
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Completion.cs b/src/Editor/Language/Def/Intellisense/Completion.cs
new file mode 100644
index 0000000..e65bb48
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Completion.cs
@@ -0,0 +1,161 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using Microsoft.VisualStudio.Utilities;
+using System.Windows.Media;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an item in a completion set.
+ /// </summary>
+ public class Completion : IPropertyOwner
+ {
+ // unfortunately this public class, intended to be inherited from, was declared with
+ // copious private state that is never used by the predominant completion implementation.
+ // Given the high frequency with which these objects are created, it makes sense to
+ // allocate that rarely (never?) used state only on demand.
+ private class CompletionState
+ {
+ public string displayText;
+ public string insertionText;
+ public string description;
+ public ImageSource iconSource;
+ public string iconAutomationText;
+ public PropertyCollection properties;
+ }
+
+ private CompletionState _state; // rarely if ever used with shim completion
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion"/>.
+ /// </summary>
+ public Completion()
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion"/> with the specified text and description.
+ /// </summary>
+ /// <param name="displayText">The text that is to be displayed by an IntelliSense presenter.</param>
+ public Completion(string displayText)
+ {
+ _state = new CompletionState();
+ _state.displayText = displayText;
+ _state.insertionText = displayText;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion"/> with the specified text and description.
+ /// </summary>
+ /// <param name="displayText">The text that is to be displayed by an IntelliSense presenter.</param>
+ /// <param name="insertionText">The text that is to be inserted into the buffer if this completion is committed.</param>
+ /// <param name="description">A description that could be displayed with the display text of the completion.</param>
+ /// <param name="iconSource">The icon to describe the completion item.</param>
+ /// <param name="iconAutomationText">The automation name for the icon.</param>
+ public Completion(string displayText,
+ string insertionText,
+ string description,
+ ImageSource iconSource,
+ string iconAutomationText)
+ {
+ _state = new CompletionState();
+ _state.displayText = displayText;
+ _state.insertionText = insertionText;
+ _state.description = description;
+ _state.iconSource = iconSource;
+ _state.iconAutomationText = iconAutomationText;
+ }
+
+ /// <summary>
+ /// Gets/Sets the text that is to be displayed by an IntelliSense presenter.
+ /// </summary>
+ public virtual string DisplayText
+ {
+ get { return _state != null ? _state.displayText : null; }
+ set
+ {
+ EnsureState();
+ _state.displayText = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets/Sets the text that is to be inserted into the buffer if this completion is committed.
+ /// </summary>
+ public virtual string InsertionText
+ {
+ get { return _state != null ? _state.insertionText : null; }
+ set
+ {
+ EnsureState();
+ _state.insertionText = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets/Sets a description that could be displayed with the display text of the completion.
+ /// </summary>
+ public virtual string Description
+ {
+ get { return _state != null ? _state.description : null; }
+ set
+ {
+ EnsureState();
+ _state.description = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets/Sets an icon that could be used to describe the completion.
+ /// </summary>
+ public virtual ImageSource IconSource
+ {
+ get { return _state != null ? _state.iconSource : null; }
+ set
+ {
+ EnsureState();
+ _state.iconSource = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets/Sets the text to be used as the automation name for the icon when it's displayed.
+ /// </summary>
+ public virtual string IconAutomationText
+ {
+ get { return _state != null ? _state.iconAutomationText : null; }
+ set
+ {
+ EnsureState();
+ _state.iconAutomationText = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets the properties of the completion.
+ /// </summary>
+ public virtual PropertyCollection Properties
+ {
+ get
+ {
+ EnsureState();
+ if (_state.properties == null)
+ {
+ _state.properties = new PropertyCollection();
+ }
+
+ return _state.properties;
+ }
+ }
+
+ private void EnsureState()
+ {
+ if (_state == null)
+ {
+ _state = new CompletionState();
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Completion2.cs b/src/Editor/Language/Def/Intellisense/Completion2.cs
new file mode 100644
index 0000000..0b049f7
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Completion2.cs
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System.Collections.Generic;
+using System.Windows.Media;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Completion2 adds an additional context icon to the completion.
+ /// </summary>
+ public class Completion2 : Completion
+ {
+ private List<CompletionIcon> _attributeIcons;
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion2"/>.
+ /// </summary>
+ public Completion2()
+ : base()
+ {
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion2"/> with the specified text and description.
+ /// </summary>
+ /// <param name="displayText">The text that is to be displayed by an IntelliSense presenter.</param>
+ /// <param name="insertionText">The text that is to be inserted into the buffer if this completion is committed.</param>
+ /// <param name="description">A description that could be displayed with the display text of the completion.</param>
+ /// <param name="iconSource">The icon to describe the completion item.</param>
+ /// <param name="iconAutomationText">The automation name for the icon.</param>
+ public Completion2(string displayText,
+ string insertionText,
+ string description,
+ ImageSource iconSource,
+ string iconAutomationText)
+ : base(displayText, insertionText, description, iconSource, iconAutomationText)
+ {
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion2"/> with the specified text and description.
+ /// </summary>
+ /// <param name="displayText">The text that is to be displayed by an IntelliSense presenter.</param>
+ /// <param name="insertionText">The text that is to be inserted into the buffer if this completion is committed.</param>
+ /// <param name="description">A description that could be displayed with the display text of the completion.</param>
+ /// <param name="iconSource">The icon to describe the completion item.</param>
+ /// <param name="iconAutomationText">The automation name for the icon.</param>
+ /// <param name="attributeIcons">Additional icons shown to the right of the DisplayText.</param>
+ public Completion2(string displayText,
+ string insertionText,
+ string description,
+ ImageSource iconSource,
+ string iconAutomationText,
+ IEnumerable<CompletionIcon> attributeIcons)
+ : base(displayText, insertionText, description, iconSource, iconAutomationText)
+ {
+ if (attributeIcons != null)
+ {
+ AttributeIcons = attributeIcons;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the additional icons displayed for this completion item.
+ /// </summary>
+ /// <remarks>Returns null if no attribute icons were provided.</remarks>
+ public virtual IEnumerable<CompletionIcon> AttributeIcons
+ {
+ get
+ {
+ return _attributeIcons;
+ }
+ set
+ {
+ _attributeIcons = SortIcons(value);
+ }
+ }
+
+ private static List<CompletionIcon> SortIcons(IEnumerable<CompletionIcon> icons)
+ {
+ // evaluate and sort the IEnumerable here
+ List<CompletionIcon> sortedIcons = new List<CompletionIcon>(icons);
+ sortedIcons.Sort();
+ return sortedIcons;
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Completion3.cs b/src/Editor/Language/Def/Intellisense/Completion3.cs
new file mode 100644
index 0000000..1abba8a
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Completion3.cs
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using Microsoft.VisualStudio.Imaging.Interop;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Windows.Media;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Completion3 uses <see cref="ImageMoniker"/>s instead of <see cref="ImageSource"/>s to reference icons.
+ /// </summary>
+ [CLSCompliant(false)]
+ public class Completion3 : Completion2
+ {
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion3"/>.
+ /// </summary>
+ public Completion3()
+ : base()
+ {
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion3"/> with the specified text and description.
+ /// </summary>
+ /// <param name="displayText">The text that is to be displayed by an IntelliSense presenter.</param>
+ /// <param name="insertionText">The text that is to be inserted into the buffer if this completion is committed.</param>
+ /// <param name="description">A description that could be displayed with the display text of the completion.</param>
+ /// <param name="iconMoniker">The icon to describe the completion item.</param>
+ /// <param name="iconAutomationText">The automation name for the icon.</param>
+ public Completion3(string displayText,
+ string insertionText,
+ string description,
+ ImageMoniker iconMoniker,
+ string iconAutomationText)
+ : this(displayText, insertionText, description,
+ iconMoniker, iconAutomationText: iconAutomationText, attributeIcons: null)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion3"/> with the specified text, description, and icon.
+ /// </summary>
+ /// <param name="displayText">The text that is to be displayed by an IntelliSense presenter.</param>
+ /// <param name="insertionText">The text that is to be inserted into the buffer if this completion is committed.</param>
+ /// <param name="description">A description that could be displayed with the display text of the completion.</param>
+ /// <param name="iconMoniker">The icon to describe the completion item.</param>
+ /// <param name="iconAutomationText">The automation name for the icon.</param>
+ /// <param name="attributeIcons">Additional icons shown to the right of the DisplayText.</param>
+ public Completion3(string displayText,
+ string insertionText,
+ string description,
+ ImageMoniker iconMoniker,
+ string iconAutomationText,
+ IEnumerable<CompletionIcon2> attributeIcons)
+ : base(displayText, insertionText, description,
+ iconSource: null, iconAutomationText: iconAutomationText,
+ attributeIcons: attributeIcons)
+ {
+ this.IconMoniker = iconMoniker;
+ }
+
+ /// <summary>
+ /// Gets or sets the moniker used to define a multi-resolution image.
+ /// </summary>
+ public virtual ImageMoniker IconMoniker
+ {
+ get;
+ private set;
+ }
+
+ /// <summary>
+ /// This property is not supported by <see cref="Completion3"/> and will always return <value>null</value>.
+ /// To get the current icon use <see cref="IconMoniker"/>.
+ /// </summary>
+ public override ImageSource IconSource
+ {
+ get
+ {
+ Debug.Fail("IconSource should not be used on Completion3");
+ return null;
+ }
+ set
+ {
+ Debug.Assert(value == null, "IconSource should never be set on Completion3");
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Completion4.cs b/src/Editor/Language/Def/Intellisense/Completion4.cs
new file mode 100644
index 0000000..dec2eac
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Completion4.cs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using Microsoft.VisualStudio.Imaging.Interop;
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Completion4 adds the Suffix property, which is the text displayed to the right of the display text (with different text properties).
+ /// </summary>
+ [CLSCompliant(false)]
+ public class Completion4 : Completion3
+ {
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion4"/>.
+ /// </summary>
+ public Completion4()
+ : base()
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Completion4"/> with the specified text and description.
+ /// </summary>
+ /// <param name="displayText">The text that is to be displayed by an IntelliSense presenter.</param>
+ /// <param name="insertionText">The text that is to be inserted into the buffer if this completion is committed.</param>
+ /// <param name="description">A description that could be displayed with the display text of the completion.</param>
+ /// <param name="iconMoniker">The icon to describe the completion item.</param>
+ /// <param name="iconAutomationText">The automation name for the icon.</param>
+ /// <param name="attributeIcons">Additional icons shown to the right of the DisplayText.</param>
+ /// <param name="suffix">Additional text to be shown to the right of the DisplayText.</param>
+ public Completion4(string displayText,
+ string insertionText,
+ string description,
+ ImageMoniker iconMoniker,
+ string iconAutomationText = null,
+ IEnumerable<CompletionIcon2> attributeIcons = null,
+ string suffix = null)
+ : base(displayText, insertionText, description,
+ iconMoniker: iconMoniker, iconAutomationText: iconAutomationText,
+ attributeIcons: attributeIcons)
+ {
+ this.Suffix = suffix;
+ }
+
+ /// <summary>
+ /// The text to be displayed to the right of the DisplayText (and before the attributeIcons).
+ /// </summary>
+ public string Suffix { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/CompletionIcon.cs b/src/Editor/Language/Def/Intellisense/CompletionIcon.cs
new file mode 100644
index 0000000..d5160a7
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/CompletionIcon.cs
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Windows.Media;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+#pragma warning disable CA1036 // Override methods on comparable types
+ /// <summary>
+ /// Represents an icon used in the completion.
+ /// </summary>
+ public class CompletionIcon : IComparable<CompletionIcon>
+#pragma warning restore CA1036 // Override methods on comparable types
+ {
+ public virtual ImageSource IconSource { get; set; }
+ public virtual string AutomationName { get; set; }
+ public virtual string AutomationId { get; set; }
+ public virtual int Position { get; set; }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="CompletionIcon"/>.
+ /// </summary>
+ public CompletionIcon()
+ {
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="CompletionIcon"/> with the given image, automation values, and position.
+ /// </summary>
+ /// <param name="imageSource">The icon to describe the completion item.</param>
+ /// <param name="automationName">The automation name for the icon.</param>
+ /// <param name="automationId">The automation id for the icon.</param>
+ /// <param name="position">The display position of the icon. If no value is provided this will be zero.</param>
+ public CompletionIcon(ImageSource imageSource, string automationName, string automationId, int position=0)
+ {
+ this.IconSource = imageSource ?? throw new ArgumentNullException(nameof(imageSource));
+ this.AutomationName = automationName;
+ this.AutomationId = automationId;
+ this.Position = position;
+ }
+
+ public int CompareTo(CompletionIcon obj)
+ {
+ // Sort CompletionIcons by position.
+ int x = this.Position.CompareTo(obj.Position);
+
+ if (x == 0 && this.AutomationName != null && obj.AutomationName != null)
+ {
+ x = string.Compare(this.AutomationName, obj.AutomationName, StringComparison.Ordinal);
+ }
+
+ return x;
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/CompletionIcon2.cs b/src/Editor/Language/Def/Intellisense/CompletionIcon2.cs
new file mode 100644
index 0000000..2f1209a
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/CompletionIcon2.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved.
+
+using Microsoft.VisualStudio.Imaging.Interop;
+using System;
+using System.Diagnostics;
+using System.Windows.Media;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// CompletionIcon2 uses <see cref="ImageMoniker"/>s instead of <see cref="ImageSource"/>s to reference icons.
+ /// </summary>
+ [CLSCompliant(false)]
+#pragma warning disable CA1036 // Override methods on comparable types
+ public class CompletionIcon2 : CompletionIcon
+#pragma warning restore CA1036 // Override methods on comparable types
+ {
+ /// <summary>
+ /// Initializes a new instance of <see cref="CompletionIcon2"/>.
+ /// </summary>
+ public CompletionIcon2() : base()
+ {
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="CompletionIcon2"/> with the given image, automation values, and position.
+ /// </summary>
+ /// <param name="imageMoniker">The moniker for the icon that describes the completion item.</param>
+ /// <param name="automationName">The automation name for the icon.</param>
+ /// <param name="automationId">The automation id for the icon.</param>
+ /// <param name="position">The display position of the icon. If no value is provided this will be zero.</param>
+ public CompletionIcon2(ImageMoniker imageMoniker, string automationName, string automationId, int position=0) : base()
+ {
+ this.IconMoniker = imageMoniker;
+ this.AutomationName = automationName;
+ this.AutomationId = automationId;
+ this.Position = position;
+ }
+
+ /// <summary>
+ /// Gets or sets the moniker used to define a multi-resolution image.
+ /// </summary>
+ public virtual ImageMoniker IconMoniker
+ {
+ get;
+ private set;
+ }
+
+ /// <summary>
+ /// This property is not supported by <see cref="CompletionIcon2"/> and will always return <value>null</value>.
+ /// To get the current icon use <see cref="IconMoniker"/>.
+ /// </summary>
+ public override ImageSource IconSource
+ {
+ get
+ {
+ Debug.Fail("IconSource should not be used on Completion3");
+ return null;
+ }
+ set
+ {
+ Debug.Assert(value == null, "IconSource should never be set on Completion3");
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/CompletionMatchType.cs b/src/Editor/Language/Def/Intellisense/CompletionMatchType.cs
new file mode 100644
index 0000000..7e956e2
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/CompletionMatchType.cs
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines the types of matching that can be done on completion items.
+ /// </summary>
+ public enum CompletionMatchType
+ {
+ /// <summary>
+ /// Match the display text of the completion.
+ /// </summary>
+ MatchDisplayText,
+
+ /// <summary>
+ /// Match the insertion text of the completion.
+ /// </summary>
+ MatchInsertionText
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/CompletionPresenterStyle.cs b/src/Editor/Language/Def/Intellisense/CompletionPresenterStyle.cs
new file mode 100644
index 0000000..d190586
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/CompletionPresenterStyle.cs
@@ -0,0 +1,115 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Windows.Media;
+using System.Windows.Media.TextFormatting;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ ///<summary>
+ /// Defines a set of properties that will be used to style the default completion presenter.
+ ///</summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attributes:
+ /// [Export(typeof(CompletionPresenterStyle))]
+ /// [ContentType]
+ /// [Name]
+ /// [Order]
+ /// All exports of this component part should be ordered after the "default" completion presenter style. At a minimum,
+ /// this means adding [Order(After="default")] to the export metadata.
+ /// </remarks>
+ public class CompletionPresenterStyle
+ {
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to format the text of the individual completion items.
+ /// </summary>
+ /// <remarks>
+ /// The individual completion items may override this value by implementing the <see cref="ITextFormattable"/> interface.
+ /// </remarks>
+ public virtual TextRunProperties CompletionTextRunProperties { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the borders in the completion presenter.
+ /// </summary>
+ public virtual Brush BorderBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the completion presenter.
+ /// </summary>
+ public virtual Brush BackgroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the border rectangle around the selected completion item.
+ /// </summary>
+ public virtual Brush SelectionBorderBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the selected completion item.
+ /// </summary>
+ public virtual Brush SelectionBackgroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to paint the foreground of the completion item's suffix text.
+ /// </summary>
+ public virtual TextRunProperties SuffixTextRunProperties { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to paint the text of the selected completion item.
+ /// </summary>
+ /// <remarks>
+ /// This <see cref="TextRunProperties"/> object should be constructed so as to keep from clashing with the
+ /// SelectionBackgroundBrush.
+ /// </remarks>
+ public virtual TextRunProperties SelectionTextRunProperties { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the border around the completion tooltip.
+ /// </summary>
+ public virtual Brush TooltipBorderBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the completion tooltip.
+ /// </summary>
+ public virtual Brush TooltipBackgroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to format the text in the completion tooltip.
+ /// </summary>
+ public virtual TextRunProperties TooltipTextRunProperties { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the completion tab panel.
+ /// </summary>
+ public virtual Brush TabPanelBackgroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the border of a completion tab item when the mouse is
+ /// hovering over it.
+ /// </summary>
+ public virtual Brush TabItemHotBorderBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of a completion tab item when the mouse is
+ /// hovering over it.
+ /// </summary>
+ public virtual Brush TabItemHotBackgroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to format the text of a completion tab item when the mouse is
+ /// hovering over it.
+ /// </summary>
+ public virtual TextRunProperties TabItemHotTextRunProperties { get; protected set; }
+
+ /// <summary>
+ /// Gets a value determining whether or not gradients should be used in the presentation of a
+ /// <see cref="ICompletionSession"/>.
+ /// </summary>
+ public virtual bool? AreGradientsAllowed { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="BitmapScalingMode"/> value that indicates the desired scaling mode for items' images
+ /// </summary>
+ public virtual BitmapScalingMode BitmapScalingMode { get; protected set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/CompletionSelectionStatus.cs b/src/Editor/Language/Def/Intellisense/CompletionSelectionStatus.cs
new file mode 100644
index 0000000..c0b0b02
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/CompletionSelectionStatus.cs
@@ -0,0 +1,123 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents the full selection status of a completion set.
+ /// </summary>
+ /// <remarks>
+ /// Completion sets maintain their own selection status, which is a
+ /// combination of a completion item, a value indicating whether or not the completion is fully selected, and a value
+ /// indicating whether or not the completion is a unique match.
+ /// </remarks>
+ public class CompletionSelectionStatus
+ {
+ private Completion _completion;
+ private bool _isSelected;
+ private bool _isUnique;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CompletionSelectionStatus"/>.
+ /// </summary>
+ /// <param name="completion">The selected completion in this selection status.</param>
+ /// <param name="isSelected"><c>true</c> if the completion is fully-selected, <c>false</c> otherwise.</param>
+ /// <param name="isUnique"><c>true</c> if the completion is a unique match, <c>false</c> otherwise.</param>
+ public CompletionSelectionStatus(Completion completion, bool isSelected, bool isUnique)
+ {
+ _completion = completion;
+ _isSelected = isSelected;
+ _isUnique = isUnique;
+ }
+
+ /// <summary>
+ /// Gets the selected completion represented by this selection status instance.
+ /// </summary>
+ public Completion Completion
+ {
+ get { return _completion; }
+ }
+
+ /// <summary>
+ /// Determines whether the completion is fully-selected.
+ /// </summary>
+ public bool IsSelected
+ {
+ get { return _isSelected; }
+ }
+
+ /// <summary>
+ /// Determines whether the completion is a unique match.
+ /// </summary>
+ public bool IsUnique
+ {
+ get { return _isUnique; }
+ }
+
+ /// <summary>
+ /// Determines whether two instances of <see cref="CompletionSelectionStatus"/> are the same.
+ /// </summary>
+ /// <param name="obj"></param>
+ /// <returns></returns>
+ public override bool Equals(object obj)
+ {
+ CompletionSelectionStatus otherStatus = obj as CompletionSelectionStatus;
+ if (otherStatus != null)
+ {
+ return this == otherStatus;
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Gets the hash code of this instance.
+ /// </summary>
+ /// <returns>The hash code.</returns>
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
+ /// <summary>
+ /// Determines whether two instances of <see cref="CompletionSelectionStatus"/> are the same.
+ /// </summary>
+ /// <param name="status1">The first instance.</param>
+ /// <param name="status2">The second instance.</param>
+ /// <returns><c>true</c> if the instances are the same, otherwise <c>false</c>.</returns>
+ public static bool operator ==(CompletionSelectionStatus status1, CompletionSelectionStatus status2)
+ {
+ if (object.ReferenceEquals(status1, status2))
+ {
+ return true;
+ }
+ if (object.ReferenceEquals(status1, null) || object.ReferenceEquals(status2, null))
+ {
+ return false;
+ }
+
+ if (
+ (status1.Completion == status2.Completion) &&
+ (status1.IsSelected == status2.IsSelected) &&
+ (status1.IsUnique == status2.IsUnique)
+ )
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Determines whether two instances of <see cref="CompletionSelectionStatus"/> are different.
+ /// </summary>
+ /// <param name="status1">The first instance.</param>
+ /// <param name="status2">The second instance.</param>
+ /// <returns><c>true</c> if the instances are different, otherwise <c>false</c>.</returns>
+ public static bool operator !=(CompletionSelectionStatus status1, CompletionSelectionStatus status2)
+ {
+ return !(status1 == status2);
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/CompletionSet.cs b/src/Editor/Language/Def/Intellisense/CompletionSet.cs
new file mode 100644
index 0000000..e50b1fa
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/CompletionSet.cs
@@ -0,0 +1,567 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Diagnostics;
+using System.Globalization;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a set of completions.
+ /// </summary>
+ public class CompletionSet
+ {
+ private string _displayName;
+ private ITrackingSpan _applicableTo;
+ private CompletionSelectionStatus _selectionStatus = new CompletionSelectionStatus(null, false, false);
+ private BulkObservableCollection<Completion> _completions = new BulkObservableCollection<Completion>();
+ private BulkObservableCollection<Completion> _completionBuilders = new BulkObservableCollection<Completion>();
+ private FilteredObservableCollection<Completion> _filteredCompletions;
+ private FilteredObservableCollection<Completion> _filteredCompletionBuilders;
+ private CompletionMatchType _filterMatchType = CompletionMatchType.MatchDisplayText;
+ private bool _filterCaseSensitive = false;
+ private string _filterBufferText;
+ private int _filterBufferTextVersionNumber = -1;
+
+ /// <summary>
+ /// Stores information about the completion match result.
+ /// </summary>
+ protected class CompletionMatchResult
+ {
+ /// <summary>
+ /// The selection status of the completion set.
+ /// </summary>
+ public CompletionSelectionStatus SelectionStatus { get; set; }
+
+ /// <summary>
+ /// The number of characters matched in the completion set.
+ /// </summary>
+ public int CharsMatchedCount { get; set; }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="CompletionSet"/>.
+ /// </summary>
+ public CompletionSet()
+ {
+ this.Initialize();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="CompletionSet"/> with the specified name and text.
+ /// </summary>
+ /// <param name="moniker">The unique, non-localized identifier for the completion set.</param>
+ /// <param name="displayName">The localized name of the completion set.</param>
+ /// <param name="applicableTo">The tracking span to which the completions apply.</param>
+ /// <param name="completions">The list of completions.</param>
+ /// <param name="completionBuilders">The list of completion builders.</param>
+ public CompletionSet
+ (
+ string moniker,
+ string displayName,
+ ITrackingSpan applicableTo,
+ IEnumerable<Completion> completions,
+ IEnumerable<Completion> completionBuilders
+ )
+ {
+ // Save-off passed-in values.
+ this.Moniker = moniker;
+ _displayName = displayName;
+ _applicableTo = applicableTo;
+
+ // Copy the completions and completion builders to observable collections
+ _completions.AddRange(completions);
+ _completionBuilders.AddRange(completionBuilders);
+
+ this.Initialize();
+ }
+
+ private void Initialize()
+ {
+ _filteredCompletions = new FilteredObservableCollection<Completion>(_completions);
+ _filteredCompletionBuilders = new FilteredObservableCollection<Completion>(_completionBuilders);
+ }
+
+ /// <summary>
+ /// The unique, non-localized identifier for the completion set.
+ /// </summary>
+ public virtual string Moniker { get; protected set; }
+
+ /// <summary>
+ /// Gets or sets the localized name of this completion set.
+ /// </summary>
+ /// <remarks>In the default presenter, the display name
+ /// appears as the header of a tab item in a WPF TabControl.</remarks>
+ public virtual string DisplayName
+ {
+ get { return _displayName; }
+ set { _displayName = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the text tracking span to which this completion applies.
+ /// </summary>
+ /// <remarks>If this completion is committed to the buffer, the
+ /// span will be replaced with the completion insertion text.</remarks>
+ public virtual ITrackingSpan ApplicableTo
+ {
+ get { return _applicableTo; }
+ protected set
+ {
+ _filterBufferText = null;
+ _applicableTo = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets the list of completions that are part of this completion set.
+ /// </summary>
+ /// <remarks>
+ /// When overriding this property, if you would like to provide a dynamic collection of completions,
+ /// take care to implement <see cref="INotifyCollectionChanged" /> for your collection of completions.
+ /// The default completion presenter uses <see cref="INotifyCollectionChanged" /> to listen for changes.
+ /// </remarks>
+ public virtual IList<Completion> Completions
+ {
+ get { return _filteredCompletions; }
+ }
+
+ /// <summary>
+ /// Gets the list of completion builders that are part of this completion set.
+ /// </summary>
+ /// <remarks>
+ /// Completion builders are completions that are displayed separately from the other completions in the completion set.
+ /// In the default presentation, completion builders appear in a non-scrolled list above the scrolled list of completions.
+ /// When overriding this property, if you would like to provide a dynamic collection of completion builders,
+ /// take care to implement <see cref="INotifyCollectionChanged" /> for your collection of completion builders.
+ /// The default completion presenter uses <see cref="INotifyCollectionChanged" /> to listen for changes.
+ /// </remarks>
+ public virtual IList<Completion> CompletionBuilders
+ {
+ get { return _filteredCompletionBuilders; }
+ }
+
+ /// <summary>
+ /// Determines the best match in the completion set.
+ /// </summary>
+ public virtual void SelectBestMatch()
+ {
+ this.SelectBestMatch(CompletionMatchType.MatchDisplayText, false);
+ }
+
+ /// <summary>
+ /// Filters the set of completions to those that match the applicability text of the completion
+ /// set and determines the best match.
+ /// </summary>
+ /// <exception cref="InvalidOperationException">Both the completions and the completion builders have been overridden.</exception>
+ public virtual void Filter()
+ {
+ this.Filter(CompletionMatchType.MatchDisplayText, false);
+ }
+
+ /// <summary>
+ /// Recalculates the set of completions for this completion set.
+ /// </summary>
+ /// <remarks>
+ /// The base implementation of Recalculate() does nothing.
+ /// Derived classes should override this method to implement custom
+ /// recalculation behavior.
+ /// </remarks>
+ public virtual void Recalculate()
+ { }
+
+ /// <summary>
+ /// Returns a list of spans (of character positions) that should be highlighted in the display text.
+ /// </summary>
+ /// <returns>A list of spans (e.g. {[0,1), [4,6)} to highlight the 1st, 5th and 6th characters) or null if no highlighting is desired</returns>
+ public virtual IReadOnlyList<Span> GetHighlightedSpansInDisplayText(string displayText)
+ {
+#if false
+ if (!string.IsNullOrEmpty(displayText))
+ {
+ var filterBufferText = this.FilterBufferText;
+
+ if (!string.IsNullOrEmpty(filterBufferText))
+ {
+ var highlightedSpans = new List<Span>();
+
+ int matchIndexStart = -1;
+ int matchIndexEnd = -1;
+ int filterIndex = 0;
+ for (int textIndex = 0; ((filterIndex < filterBufferText.Length) && (textIndex < displayText.Length)); ++textIndex)
+ {
+ if (_filterCaseSensitive ? (filterBufferText[filterIndex] == displayText[textIndex])
+ : (char.ToLowerInvariant(filterBufferText[filterIndex]) == char.ToLowerInvariant(displayText[textIndex])))
+ {
+ if (matchIndexStart == -1)
+ {
+ matchIndexStart = textIndex;
+ }
+
+ matchIndexEnd = textIndex + 1;
+
+ ++filterIndex;
+ }
+ else if (matchIndexStart != -1)
+ {
+ highlightedSpans.Add(Span.FromBounds(matchIndexStart, textIndex));
+ matchIndexStart = matchIndexEnd = -1;
+ }
+ }
+
+ if (matchIndexStart != -1)
+ {
+ highlightedSpans.Add(Span.FromBounds(matchIndexStart, matchIndexEnd));
+ }
+
+ if (highlightedSpans.Count != 0)
+ {
+ return highlightedSpans;
+ }
+ }
+ }
+#endif
+
+ return null;
+ }
+
+ /// <summary>
+ /// Gets or sets the <see cref="CompletionSelectionStatus"/>.
+ /// </summary>
+ /// <exception cref="ArgumentNullException">The value is null.</exception>
+ /// <exception cref="ArgumentException">The <see cref="CompletionSelectionStatus"/> is not contained in either the
+ /// completions or the completion builders.</exception>
+ public CompletionSelectionStatus SelectionStatus
+ {
+ get { return _selectionStatus; }
+ set
+ {
+ // The selection status can never be null.
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
+ // If nothing changed, there's no work to do.
+ if (_selectionStatus == value)
+ {
+ return;
+ }
+
+ // The completion may be null. Otherwise, it must be part of the list of completions (or builders) in this
+ // completion set.
+ if (
+ (value.Completion != null) &&
+ (!this.CompletionBuilders.Contains(value.Completion)) &&
+ (!this.Completions.Contains(value.Completion))
+ )
+ {
+ throw new ArgumentException
+ (
+ "The Selection Status may not be set to a completion that isn't part of the completion/builder list in the completion set",
+ nameof(value)
+ );
+ }
+
+ // We've passed all of the tests. Save off the old value and set the field, firing both events afterward.
+ CompletionSelectionStatus oldSelectionStatus = _selectionStatus;
+ _selectionStatus = value;
+
+ this.RaiseSelectionStatusChanged(oldSelectionStatus);
+ }
+ }
+
+ /// <summary>
+ /// Occurs when the selection status has changed.
+ /// </summary>
+ public event EventHandler<ValueChangedEventArgs<CompletionSelectionStatus>> SelectionStatusChanged;
+
+ private string FilterBufferText
+ {
+ get
+ {
+ if (_applicableTo != null)
+ {
+ ITextSnapshot snapshot = _applicableTo.TextBuffer.CurrentSnapshot;
+ if ((_filterBufferText == null) || (_filterBufferTextVersionNumber != snapshot.Version.VersionNumber))
+ {
+ _filterBufferText = _applicableTo.GetText(snapshot);
+ _filterBufferTextVersionNumber = snapshot.Version.VersionNumber;
+ }
+ }
+ else
+ {
+ Debug.Assert(_filterBufferText == null);
+ }
+
+ return _filterBufferText;
+ }
+ }
+
+ /// <summary>
+ /// Gets the ObservableCollection of writable completions.
+ /// </summary>
+ protected BulkObservableCollection<Completion> WritableCompletions
+ {
+ get { return _completions; }
+ }
+
+ /// <summary>
+ /// Gets the ObservableCollection of writable completion builders.
+ /// </summary>
+ protected BulkObservableCollection<Completion> WritableCompletionBuilders
+ {
+ get { return _completionBuilders; }
+ }
+
+ /// <summary>
+ /// Filters the set of completions to those that match the applicability text of the completion
+ /// set and determines the best match.
+ /// </summary>
+ /// <param name="matchType">The <see cref="CompletionMatchType"/>.</param>
+ /// <param name="caseSensitive"><c>true</c> if the match is case-sensitive, otherwise <c>false</c>.</param>
+ /// <exception cref="InvalidOperationException">Both the completions and the completion builders have been overridden.</exception>
+ protected void Filter(CompletionMatchType matchType, bool caseSensitive)
+ {
+ // Get the actual text from the buffer
+ var filterBufferText = this.FilterBufferText;
+
+ if (string.IsNullOrEmpty(filterBufferText))
+ {
+ _filteredCompletions.StopFiltering();
+ _filteredCompletionBuilders.StopFiltering();
+ }
+ else
+ {
+ _filterMatchType = matchType;
+ _filterCaseSensitive = caseSensitive;
+
+ _filteredCompletions.Filter(new Predicate<Completion>(this.DoesCompletionMatchApplicabilityText));
+ _filteredCompletionBuilders.Filter(new Predicate<Completion>(this.DoesCompletionMatchApplicabilityText));
+ }
+ }
+
+ /// <summary>
+ /// Redetermines the best matching completion in the completion set.
+ /// </summary>
+ /// <param name="matchType">The <see cref="CompletionMatchType"/>.</param>
+ /// <param name="caseSensitive"><c>true</c> if the match is case-sensitive, otherwise <c>false</c>.</param>
+ protected void SelectBestMatch(CompletionMatchType matchType, bool caseSensitive)
+ {
+ CompletionMatchResult completionMatch = this.MatchCompletionList
+ (
+ this.Completions,
+ matchType,
+ caseSensitive
+ );
+ CompletionMatchResult builderMatch = this.MatchCompletionList
+ (
+ this.CompletionBuilders,
+ matchType,
+ caseSensitive
+ );
+
+ // Only select a builder if it's far-and-away better. Otherwise, select a completion
+ int builderScore = 0;
+ if (builderMatch != null)
+ {
+ builderScore =
+ builderMatch.CharsMatchedCount +
+ (builderMatch.SelectionStatus.IsSelected ? 1 : 0) +
+ (builderMatch.SelectionStatus.IsUnique ? 1 : 0);
+ }
+ int completionScore = 0;
+ if (completionMatch != null)
+ {
+ completionScore =
+ completionMatch.CharsMatchedCount +
+ (completionMatch.SelectionStatus.IsSelected ? 1 : 0) +
+ (completionMatch.SelectionStatus.IsUnique ? 1 : 0);
+ }
+
+ if ((builderScore > completionScore) && (builderMatch != null))
+ {
+ this.SelectionStatus = builderMatch.SelectionStatus;
+ }
+ else if (completionMatch != null)
+ {
+ this.SelectionStatus = completionMatch.SelectionStatus;
+ }
+ else if (this.Completions.Count > 0)
+ {
+ // If we've already got a pretty good selection, just leave it selected, but not fully-selected.
+ if (this.Completions.Contains(this.SelectionStatus.Completion))
+ this.SelectionStatus = new CompletionSelectionStatus(this.SelectionStatus.Completion, false, false);
+ else
+ this.SelectionStatus = new CompletionSelectionStatus(this.Completions[0], false, false);
+ }
+ else if (this.CompletionBuilders.Count > 0)
+ {
+ // If we've already got a pretty good selection, just leave it selected, but not fully-selected.
+ if (this.CompletionBuilders.Contains(this.SelectionStatus.Completion))
+ this.SelectionStatus = new CompletionSelectionStatus(this.SelectionStatus.Completion, false, false);
+ else
+ this.SelectionStatus = new CompletionSelectionStatus(this.CompletionBuilders[0], false, false);
+ }
+ else
+ {
+ this.SelectionStatus = new CompletionSelectionStatus(null, false, false);
+ }
+ }
+
+ /// <summary>
+ /// Matches the completion list.
+ /// </summary>
+ /// <param name="completionList">The list of completions.</param>
+ /// <param name="matchType">The <see cref="CompletionMatchType"/>.</param>
+ /// <param name="caseSensitive"><c>true</c> if the match is case-sensitive, otherwise <c>false</c>.</param>
+ /// <returns>A <see cref="CompletionMatchResult"/>.</returns>
+ /// <exception cref="InvalidOperationException">The span to which this completion applies is null.</exception>
+ protected CompletionMatchResult MatchCompletionList
+ (
+ IList<Completion> completionList,
+ CompletionMatchType matchType,
+ bool caseSensitive
+ )
+ {
+ if (_applicableTo == null)
+ {
+ throw new InvalidOperationException("Cannot match completion set with no applicability span.");
+ }
+
+ // Get the actual text from the buffer
+ ITextSnapshot snapshot = _applicableTo.TextBuffer.CurrentSnapshot;
+ string bufferText = _applicableTo.GetText(snapshot);
+
+ // Short-circuit if we detect that there's no text to match.
+ if (bufferText.Length == 0)
+ {
+ return null;
+ }
+
+ Completion bestMatch = null;
+ int bestMatchNumCharsMatched = -1;
+ bool uniqueMatch = false;
+ bool fullMatch = false;
+ foreach (Completion completion in completionList)
+ {
+ // Determine what text should be matched.
+ string matchText = string.Empty;
+ if (matchType == CompletionMatchType.MatchDisplayText)
+ {
+ matchText = completion.DisplayText;
+ }
+ else if (matchType == CompletionMatchType.MatchInsertionText)
+ {
+ matchText = completion.InsertionText;
+ }
+
+ // Count the number of characters that match.
+ int numCharsMatched = 0;
+ for (int i = 0; i < bufferText.Length; i++)
+ {
+ if (i >= matchText.Length)
+ {
+ break;
+ }
+ else
+ {
+ char b = bufferText[i];
+ char m = matchText[i];
+ if (!caseSensitive)
+ {
+ b = char.ToLowerInvariant(b);
+ m = char.ToLowerInvariant(m);
+ }
+
+ if (b == m)
+ {
+ numCharsMatched++;
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+
+ // See if this completion is the best match.
+ if (numCharsMatched > bestMatchNumCharsMatched)
+ {
+ bestMatchNumCharsMatched = numCharsMatched;
+ bestMatch = completion;
+
+ // Since we've found a completion with more characters matching than any before, this is now a unique
+ // match
+ uniqueMatch = true;
+
+ // Let's see if this is also a full match. In order to be a full match, all of the characters in the buffer
+ // must have matched. In addition, we must have at least one character matched.
+ if ((numCharsMatched == bufferText.Length) && (bestMatchNumCharsMatched > 0))
+ {
+ fullMatch = true;
+ }
+ }
+ else if (numCharsMatched == bestMatchNumCharsMatched)
+ {
+ // We've come across a completion that matches exactly the same number of buffer characters as a previous
+ // completion. We're going to take that to mean that we no longer have a unique match.
+ uniqueMatch = false;
+
+ // Now that we know we no longer have a unique match, we may be able to break out of the loop without looking at
+ // any more completions. We can only do this if we've matched all of the characters in the applicable-to text,
+ // however. If we've matched all of the text so far, there can't possibly be another completion that will match
+ // more.
+ if (fullMatch)
+ {
+ break;
+ }
+ }
+ }
+
+ // If there was a match, return it.
+ if (bestMatch != null)
+ {
+ return new CompletionMatchResult()
+ {
+ SelectionStatus = new CompletionSelectionStatus(bestMatch, fullMatch, uniqueMatch),
+ CharsMatchedCount = bestMatchNumCharsMatched >= 0 ? bestMatchNumCharsMatched : 0
+ };
+ }
+
+ // We didn't find anything. Return an "empty" match status.
+ return null;
+ }
+
+ private void RaiseSelectionStatusChanged(CompletionSelectionStatus oldValue)
+ {
+ EventHandler<ValueChangedEventArgs<CompletionSelectionStatus>> tempHandler = this.SelectionStatusChanged;
+ if (tempHandler != null)
+ {
+ tempHandler(this, new ValueChangedEventArgs<CompletionSelectionStatus>(oldValue, _selectionStatus));
+ }
+ }
+
+ private bool DoesCompletionMatchApplicabilityText(Completion completion)
+ {
+ // Determine the match text
+ string matchText = string.Empty;
+ if (_filterMatchType == CompletionMatchType.MatchDisplayText)
+ {
+ matchText = completion.DisplayText;
+ }
+ else if (_filterMatchType == CompletionMatchType.MatchInsertionText)
+ {
+ matchText = completion.InsertionText;
+ }
+
+ // Is the actual buffer text a prefix of the match text?
+ return matchText.StartsWith(this.FilterBufferText, !_filterCaseSensitive, CultureInfo.CurrentCulture);
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/CompletionSet2.cs b/src/Editor/Language/Def/Intellisense/CompletionSet2.cs
new file mode 100644
index 0000000..71d8f8a
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/CompletionSet2.cs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a set of completions that supports a row of filter buttons displayed at the bottom on the intellisense popup.
+ /// </summary>
+ [CLSCompliant(false)]
+ public class CompletionSet2 : CompletionSet
+ {
+ private readonly IReadOnlyList<IIntellisenseFilter> _filters = null;
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="CompletionSet2"/>.
+ /// </summary>
+ public CompletionSet2()
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="CompletionSet2"/> with the specified name, text and filters.
+ /// </summary>
+ /// <param name="moniker">The unique, non-localized identifier for the completion set.</param>
+ /// <param name="displayName">The localized name of the completion set.</param>
+ /// <param name="applicableTo">The tracking span to which the completions apply.</param>
+ /// <param name="completions">The list of completions.</param>
+ /// <param name="completionBuilders">The list of completion builders.</param>
+ /// <param name="filters">The list of <see cref="IIntellisenseFilter"/>s that will be displayed at the bottom of the completion dialog.</param>
+ public CompletionSet2(string moniker,
+ string displayName,
+ ITrackingSpan applicableTo,
+ IEnumerable<Completion> completions,
+ IEnumerable<Completion> completionBuilders,
+ IReadOnlyList<IIntellisenseFilter> filters)
+ : base(moniker, displayName, applicableTo, completions, completionBuilders)
+ {
+ _filters = filters;
+ }
+
+ public virtual IReadOnlyList<IIntellisenseFilter> Filters
+ {
+ get
+ {
+ return _filters;
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/CurrentParameterChangedEventArgs.cs b/src/Editor/Language/Def/Intellisense/CurrentParameterChangedEventArgs.cs
new file mode 100644
index 0000000..aa06934
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/CurrentParameterChangedEventArgs.cs
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides information about the change of the current parameter in a signature help session.
+ /// </summary>
+ public class CurrentParameterChangedEventArgs : EventArgs
+ {
+ private IParameter _prevCurrentParameter;
+ private IParameter _newCurrentParameter;
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="CurrentParameterChangedEventArgs"/>.
+ /// </summary>
+ /// <param name="previousCurrentParameter">The parameter that was previously the current parameter.</param>
+ /// <param name="newCurrentParameter">The parameter that is now the current parameter.</param>
+ public CurrentParameterChangedEventArgs(IParameter previousCurrentParameter, IParameter newCurrentParameter)
+ {
+ _prevCurrentParameter = previousCurrentParameter;
+ _newCurrentParameter = newCurrentParameter;
+ }
+
+ /// <summary>
+ /// Gets the parameter that was previously the current parameter.
+ /// </summary>
+ public IParameter PreviousCurrentParameter
+ {
+ get { return _prevCurrentParameter; }
+ }
+
+ /// <summary>
+ /// Gets the parameter that is now the current parameter.
+ /// </summary>
+ public IParameter NewCurrentParameter
+ {
+ get { return _newCurrentParameter; }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/FilteredObservableCollection.cs b/src/Editor/Language/Def/Intellisense/FilteredObservableCollection.cs
new file mode 100644
index 0000000..70c7fb5
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/FilteredObservableCollection.cs
@@ -0,0 +1,262 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ public class FilteredObservableCollection<T> : IList, IList<T>, INotifyCollectionChanged
+ {
+ private IList<T> _underlyingList;
+ private bool _isFiltering = false;
+ private Predicate<T> _filterPredicate;
+ private List<T> _filteredList = new List<T>();
+
+ public FilteredObservableCollection(IList<T> underlyingList)
+ {
+ if (underlyingList == null)
+ throw new ArgumentNullException(nameof(underlyingList));
+ if (!(underlyingList is INotifyCollectionChanged))
+ throw new ArgumentException("Underlying collection must implement INotifyCollectionChanged", nameof(underlyingList));
+ if (!(underlyingList is IList))
+ throw new ArgumentException("Underlying collection must implement IList", nameof(underlyingList));
+
+ _underlyingList = underlyingList;
+ ((INotifyCollectionChanged)_underlyingList).CollectionChanged += this.OnUnderlyingList_CollectionChanged;
+ }
+
+ public int Add(object value)
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+
+ public bool Contains(object value)
+ {
+ return ((IList<T>)this).Contains((T)value);
+ }
+
+ public int IndexOf(object value)
+ {
+ return ((IList<T>)this).IndexOf((T)value);
+ }
+
+ public void Insert(int index, object value)
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+
+ public bool IsFixedSize
+ {
+ get { return false; }
+ }
+
+ public void Remove(object value)
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+
+ object IList.this[int index]
+ {
+ get
+ {
+ return ((IList<T>)this)[index];
+ }
+ set
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+ }
+
+ public void CopyTo(Array array, int index)
+ {
+ if (_isFiltering)
+ {
+ if ((array.Length - index) < this.Count)
+ {
+ throw new ArgumentException("Array not big enough", nameof(array));
+ }
+
+ int i = index;
+ foreach (var item in _filteredList)
+ {
+ array.SetValue(item, i);
+ i++;
+ }
+ }
+ else
+ {
+ ((IList)_underlyingList).CopyTo(array, index);
+ }
+ }
+
+ public bool IsSynchronized
+ {
+ get { return false; }
+ }
+
+ public object SyncRoot
+ {
+ get
+ {
+ if (_isFiltering)
+ return ((IList)_filteredList).SyncRoot;
+ else
+ return ((IList)_underlyingList).SyncRoot;
+ }
+ }
+
+ public int IndexOf(T item)
+ {
+ if (_isFiltering)
+ return _filteredList.IndexOf(item);
+ else
+ return _underlyingList.IndexOf(item);
+ }
+
+ public void Insert(int index, T item)
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+
+ public void RemoveAt(int index)
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+
+ public T this[int index]
+ {
+ get
+ {
+ if (_isFiltering)
+ return _filteredList[index];
+ else
+ return _underlyingList[index];
+ }
+ set
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+ }
+
+ public void Add(T item)
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+
+ public void Clear()
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+
+ public bool Contains(T item)
+ {
+ if (_isFiltering)
+ return _filteredList.Contains(item);
+ else
+ return _underlyingList.Contains(item);
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ if (_isFiltering)
+ _filteredList.CopyTo(array, arrayIndex);
+ else
+ _underlyingList.CopyTo(array, arrayIndex);
+ }
+
+ public int Count
+ {
+ get
+ {
+ if (_isFiltering)
+ return _filteredList.Count;
+ else
+ return _underlyingList.Count;
+ }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return true; }
+ }
+
+ public bool Remove(T item)
+ {
+ throw new InvalidOperationException("FilteredObservableCollections are read-only");
+ }
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ if (_isFiltering)
+ return _filteredList.GetEnumerator();
+ else
+ return _underlyingList.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ if (_isFiltering)
+ return ((IEnumerable)_filteredList).GetEnumerator();
+ else
+ return ((IEnumerable)_underlyingList).GetEnumerator();
+ }
+
+ public event NotifyCollectionChangedEventHandler CollectionChanged;
+
+ public void Filter(Predicate<T> filterPredicate)
+ {
+ if (filterPredicate == null)
+ throw new ArgumentNullException(nameof(filterPredicate));
+
+ _filterPredicate = filterPredicate;
+ _isFiltering = true;
+ this.UpdateFilteredItems();
+ this.RaiseCollectionChanged();
+ }
+
+ public void StopFiltering()
+ {
+ if (_isFiltering)
+ {
+ _filterPredicate = null;
+ _isFiltering = false;
+ this.UpdateFilteredItems();
+ this.RaiseCollectionChanged();
+ }
+ }
+
+ private void OnUnderlyingList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+ {
+ UpdateFilteredItems();
+ this.RaiseCollectionChanged();
+ }
+
+ private void RaiseCollectionChanged()
+ {
+ NotifyCollectionChangedEventHandler tempHandler = this.CollectionChanged;
+ if (tempHandler != null)
+ {
+ tempHandler(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+ }
+ }
+
+ private void UpdateFilteredItems()
+ {
+ _filteredList.Clear();
+ if (_isFiltering)
+ {
+ foreach (T underlyingItem in _underlyingList)
+ {
+ if (_filterPredicate(underlyingItem))
+ {
+ _filteredList.Add(underlyingItem);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ICompletionBroker.cs b/src/Editor/Language/Def/Intellisense/ICompletionBroker.cs
new file mode 100644
index 0000000..daa224e
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ICompletionBroker.cs
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Collections.ObjectModel;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents the central broker responsible for statement completion.
+ /// </summary>
+ public interface ICompletionBroker
+ {
+ /// <summary>
+ /// Starts the process of statement completion, assuming the caret position to be the position at which completions should
+ /// be inserted.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger statement completion.</param>
+ /// <returns>A valid statement completion session. May be null if no session could be created.</returns>
+ /// <remarks>When the caret leaves the
+ /// applicability span of all the completions in this session, the session will be automatically dismissed.</remarks>
+ ICompletionSession TriggerCompletion(ITextView textView);
+
+ /// <summary>
+ /// Starts the process of statement completion at a particular position. When called with a specific trigger point, caret
+ /// movements will be ignored and the broker will not be responsible for dismissing the session.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger statement completion.</param>
+ /// <param name="triggerPoint">The point in the text buffer at which statement completion is requested.</param>
+ /// <param name="trackCaret">
+ /// <c>true</c> if this session should track the caret, <c>false</c> otherwise. When the caret is tracked, only completion items whose
+ /// applicability span contains the caret will be displayed.
+ /// </param>
+ /// <returns>A valid statement completion session. May be null if no session could be created.</returns>
+ ICompletionSession TriggerCompletion(ITextView textView, ITrackingPoint triggerPoint, bool trackCaret);
+
+ /// <summary>
+ /// Creates a completion session, but does not start it.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to create a completion session.</param>
+ /// <param name="triggerPoint">The point in the text buffer at which statement completion is requested.</param>
+ /// <param name="trackCaret">
+ /// <c>true</c> if this session should track the caret, <c>false</c> otherwise. When the caret is tracked, only completion items whose
+ /// applicability span contains the caret will be displayed.
+ /// </param>
+ /// <returns>A valid statement completion session. May be null if no session could be created.</returns>
+ /// <remarks>This method is useful if you want to set some properties on the session
+ /// before starting it.</remarks>
+ ICompletionSession CreateCompletionSession(ITextView textView, ITrackingPoint triggerPoint, bool trackCaret);
+
+ /// <summary>
+ /// Dismisses all active statement completion sessions.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to dismiss all sessions.</param>
+ void DismissAllSessions(ITextView textView);
+
+ /// <summary>
+ /// Determines whether or not statement completion is active over the specified <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> for which to determine if statement completion is active.</param>
+ /// <remarks>This property is <c>true</c> when Sessions.Count > 0 and <c>false</c>
+ /// otherwise.</remarks>
+ bool IsCompletionActive(ITextView textView);
+
+ /// <summary>
+ /// Gets the list of active statement completion sessions.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> for which to get completions.</param>
+ ReadOnlyCollection<ICompletionSession> GetSessions(ITextView textView);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ICompletionSession.cs b/src/Editor/Language/Def/Intellisense/ICompletionSession.cs
new file mode 100644
index 0000000..f3a6c2b
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ICompletionSession.cs
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Collections.ObjectModel;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a statement completion session, which is a type of IntelliSense session.
+ /// </summary>
+ public interface ICompletionSession : IIntellisenseSession
+ {
+ /// <summary>
+ /// Gets the collection of <see cref="CompletionSet"/> objects.
+ /// </summary>
+ ReadOnlyObservableCollection<CompletionSet> CompletionSets { get; }
+
+ /// <summary>
+ /// Gets or sets the selected <see cref="CompletionSet"/>.
+ /// </summary>
+ CompletionSet SelectedCompletionSet { get; set; }
+
+ /// <summary>
+ /// Occurs when the SelectedCompletionSet property changes.
+ /// </summary>
+ event EventHandler<ValueChangedEventArgs<CompletionSet>> SelectedCompletionSetChanged;
+
+ /// <summary>
+ /// Filters the session's completion items, based on the current state of the text buffer.
+ /// </summary>
+ /// <remarks>
+ /// If a completion's display text
+ /// or insertion text contains the text in its applicability span, it remains part of the CompletionSets
+ /// collection, otherwise it will be removed. The underlying providers will not be asked for additional completion
+ /// information because of this call.
+ /// </remarks>
+ void Filter();
+
+ /// <summary>
+ /// Commits a completion session. The selected completion's insertion text is inserted into the buffer in place of
+ /// its applicability span.
+ /// </summary>
+ void Commit();
+
+ /// <summary>
+ /// Occurs after a completion session is committed.
+ /// </summary>
+ event EventHandler Committed;
+
+ /// <summary>
+ /// Determines whether the completion session has been started.
+ /// </summary>
+ bool IsStarted { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ICompletionSource.cs b/src/Editor/Language/Def/Intellisense/ICompletionSource.cs
new file mode 100644
index 0000000..15ba8cb
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ICompletionSource.cs
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides completions for a given content type.
+ /// </summary>
+ public interface ICompletionSource : IDisposable
+ {
+ /// <summary>
+ /// Determines which <see cref="CompletionSet"/>s should be part of the specified <see cref="ICompletionSession"/>.
+ /// </summary>
+ /// <param name="session">The session for which completions are to be computed.</param>
+ /// <param name="completionSets">The set of the completionSets to be added to the session.</param>
+ /// <remarks>
+ /// Each applicable <see cref="ICompletionSource.AugmentCompletionSession"/> instance will be called in-order to
+ /// (re)calculate a <see cref="ICompletionSession"/>. <see cref="CompletionSet"/>s can be added to the session by adding
+ /// them to the completionSets collection passed-in as a parameter. In addition, by removing items from the collection, a
+ /// source may filter <see cref="CompletionSet"/>s provided by <see cref="ICompletionSource"/>s earlier in the calculation
+ /// chain.
+ /// </remarks>
+ void AugmentCompletionSession(ICompletionSession session, IList<CompletionSet> completionSets);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ICompletionSourceProvider.cs b/src/Editor/Language/Def/Intellisense/ICompletionSourceProvider.cs
new file mode 100644
index 0000000..a7bf4fb
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ICompletionSourceProvider.cs
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides completion sources.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attribute:
+ /// [Export(typeof(ICompletionSourceProvider))]
+ /// You must provide the ContentType and Order
+ /// attributes.
+ /// </remarks>
+ public interface ICompletionSourceProvider
+ {
+ /// <summary>
+ /// Creates a completion provider for the given context.
+ /// </summary>
+ /// <param name="textBuffer">The text buffer over which to create a provider.</param>
+ /// <returns>A valid <see cref="ICompletionSource"/> instance, or null if none could be created.</returns>
+ ICompletionSource TryCreateCompletionSource ( ITextBuffer textBuffer );
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ICustomCommit.cs b/src/Editor/Language/Def/Intellisense/ICustomCommit.cs
new file mode 100644
index 0000000..f9633aa
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ICustomCommit.cs
@@ -0,0 +1,17 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides custom commit operations for completions.
+ /// </summary>
+ public interface ICustomCommit
+ {
+ /// <summary>
+ /// Commits the completion using the completion's own commit logic.
+ /// </summary>
+ void Commit();
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ICustomIntellisensePresenter.cs b/src/Editor/Language/Def/Intellisense/ICustomIntellisensePresenter.cs
new file mode 100644
index 0000000..ae5f763
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ICustomIntellisensePresenter.cs
@@ -0,0 +1,17 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a custom IntelliSense presenter.
+ /// </summary>
+ public interface ICustomIntellisensePresenter : IIntellisensePresenter
+ {
+ /// <summary>
+ /// Renders the IntelliSense session.
+ /// </summary>
+ void Render ( );
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ICustomKeyboardHandler.cs b/src/Editor/Language/Def/Intellisense/ICustomKeyboardHandler.cs
new file mode 100644
index 0000000..777ef01
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ICustomKeyboardHandler.cs
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a custom handler of keyboard events
+ /// </summary>
+ public interface ICustomKeyboardHandler
+ {
+ /// <summary>
+ /// Signals the handler that it's ok to begin capturing keyboard events.
+ /// </summary>
+ bool CaptureKeyboard();
+
+ /// <summary>
+ /// Signals the handler that it should cease capturing keyboard events.
+ /// </summary>
+ void ReleaseKeyboard();
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IFocusableIntellisensePresenter.cs b/src/Editor/Language/Def/Intellisense/IFocusableIntellisensePresenter.cs
new file mode 100644
index 0000000..b48cb8e
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IFocusableIntellisensePresenter.cs
@@ -0,0 +1,17 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a focusable presenter of IntelliSense information.
+ /// </summary>
+ public interface IFocusableIntellisensePresenter : ICustomIntellisensePresenter
+ {
+ /// <summary>
+ /// Sets focus within the presentation that this presenter is rendering.
+ /// </summary>
+ /// <returns><c>true</c> if focus set successfully, <c>false</c> otherwise.</returns>
+ bool Focus();
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IGlyphService.cs b/src/Editor/Language/Def/Intellisense/IGlyphService.cs
new file mode 100644
index 0000000..f1926a9
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IGlyphService.cs
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Windows.Media;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Gets a standard set of glyphs.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attribute:
+ /// [Export(typeof(IGlyphService))]
+ /// </remarks>
+ public interface IGlyphService
+ {
+ /// <summary>
+ /// Gets a glyph in the form of a WPF <see cref="ImageSource" />.
+ /// </summary>
+ /// <param name="group">The group description for this glyph.</param>
+ /// <param name="item">The item description for this glyph.</param>
+ /// <returns>A valid WPF <see cref="ImageSource" /> that contains the requested glyph.</returns>
+ ImageSource GetGlyph ( StandardGlyphGroup group, StandardGlyphItem item );
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisenseCommandTarget.cs b/src/Editor/Language/Def/Intellisense/IIntellisenseCommandTarget.cs
new file mode 100644
index 0000000..84ae2e1
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IIntellisenseCommandTarget.cs
@@ -0,0 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides a way to intercede in the command-handling chain to handle keyboard commands.
+ /// </summary>
+ public interface IIntellisenseCommandTarget
+ {
+ /// <summary>
+ /// Executes a user-initiated keyboard command.
+ /// </summary>
+ /// <param name="command">The keyboard command to execute.</param>
+ /// <returns><c>true</c> if the command was handled, <c>false</c> otherwise.</returns>
+ /// <remarks>
+ /// Keyboard commands are normally handled by the underlying view, but
+ /// IntelliSense presenters may intercede in the command-handling chain in order to handle certain keyboard commands.
+ /// </remarks>
+ bool ExecuteKeyboardCommand(IntellisenseKeyboardCommand command);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisenseController.cs b/src/Editor/Language/Def/Intellisense/IIntellisenseController.cs
new file mode 100644
index 0000000..363c759
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IIntellisenseController.cs
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Controls the IntelliSense process for one or more subject <see cref="ITextBuffer"/> objects
+ /// exposed through a single <see cref="ITextView"/>.
+ /// </summary>
+ public interface IIntellisenseController
+ {
+ /// <summary>
+ /// Detaches the controller from the specified <see cref="ITextView" />.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView" /> from which the controller should detach.</param>
+ void Detach ( ITextView textView );
+
+ /// <summary>
+ /// Called when a new subject <see cref="ITextBuffer"/> appears in the graph of buffers associated with
+ /// the <see cref="ITextView"/>, due to a change in projection or content type.
+ /// </summary>
+ /// <param name="subjectBuffer">The newly-connected text buffer.</param>
+ void ConnectSubjectBuffer(ITextBuffer subjectBuffer);
+
+ /// <summary>
+ /// Called when a subject <see cref="ITextBuffer"/> is removed from the graph of buffers associated with
+ /// the <see cref="ITextView"/>, due to a change in projection or content type.
+ /// </summary>
+ /// <param name="subjectBuffer">The disconnected text buffer.</param>
+ /// <remarks>
+ /// It is not guaranteed that
+ /// the subject buffer was previously connected to this controller.
+ /// </remarks>
+ void DisconnectSubjectBuffer(ITextBuffer subjectBuffer);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisenseControllerProvider.cs b/src/Editor/Language/Def/Intellisense/IIntellisenseControllerProvider.cs
new file mode 100644
index 0000000..f41feea
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IIntellisenseControllerProvider.cs
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Collections.Generic;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Creates IntelliSense controllers for individual <see cref="ITextView"/> instances.
+ /// </summary>
+ public interface IIntellisenseControllerProvider
+ {
+ /// <summary>
+ /// Attempts to create an IntelliSense controller for a specific text view opened in a specific context.
+ /// </summary>
+ /// <param name="textView">The text view for which a controller should be created.</param>
+ /// <param name="subjectBuffers">The set of text buffers with matching content types that are potentially visible in the view.</param>
+ /// <returns>A valid IntelliSense controller, or null if none could be created.</returns>
+ IIntellisenseController TryCreateIntellisenseController ( ITextView textView, IList<ITextBuffer> subjectBuffers );
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisenseFilter.cs b/src/Editor/Language/Def/Intellisense/IIntellisenseFilter.cs
new file mode 100644
index 0000000..2d0b486
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IIntellisenseFilter.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using Microsoft.VisualStudio.Imaging.Interop;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a filter used to add a row of filter buttons to the bottom
+ /// </summary>
+ [CLSCompliant(false)]
+ public interface IIntellisenseFilter
+ {
+ /// <summary>
+ /// The icon shown on the filter's button.
+ /// </summary>
+ ImageMoniker Moniker { get; }
+
+ /// <summary>
+ /// The tooltip shown when the mouse hovers over the button.
+ /// </summary>
+ string ToolTip { get; }
+
+ /// <summary>
+ /// The key used to toggle the filter's state.
+ /// </summary>
+ string AccessKey { get; }
+
+ /// <summary>
+ /// String used to represent the button for automation.
+ /// </summary>
+ string AutomationText { get; }
+
+ /// <summary>
+ /// Has the user turned the filter on?
+ /// </summary>
+ /// <remarks>
+ /// The setter will be called when the user toggles the corresponding filter button.
+ /// </remarks>
+ bool IsChecked { get; set; }
+
+ /// <summary>
+ /// Is the filter enabled?
+ /// </summary>
+ /// <remarks>
+ /// Disabled filters are shown but are grayed out.
+ /// </remarks>
+ bool IsEnabled { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisensePresenter.cs b/src/Editor/Language/Def/Intellisense/IIntellisensePresenter.cs
new file mode 100644
index 0000000..0a15cb7
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IIntellisensePresenter.cs
@@ -0,0 +1,17 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a presenter of IntelliSense information.
+ /// </summary>
+ public interface IIntellisensePresenter
+ {
+ /// <summary>
+ /// Gets the session that this presenter is rendering.
+ /// </summary>
+ IIntellisenseSession Session { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisensePresenterProvider.cs b/src/Editor/Language/Def/Intellisense/IIntellisensePresenterProvider.cs
new file mode 100644
index 0000000..ddf5429
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IIntellisensePresenterProvider.cs
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Creates IntelliSense presenters over a given IntelliSense session.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attribute:
+ /// [Export(typeof(IIntellisensePresenterProvider))]
+ /// Component exporters must add the Order attribute to define the order of the presenter in the presenter chain.
+ /// </remarks>
+ public interface IIntellisensePresenterProvider
+ {
+ /// <summary>
+ /// Attempts to create an IntelliSense presenter for a given IntelliSense session.
+ /// </summary>
+ /// <param name="session">The session for which a presenter should be created.</param>
+ /// <returns>A valid IntelliSense presenter, or null if none could be created.</returns>
+ IIntellisensePresenter TryCreateIntellisensePresenter ( IIntellisenseSession session );
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisenseSession.cs b/src/Editor/Language/Def/Intellisense/IIntellisenseSession.cs
new file mode 100644
index 0000000..a0df0d2
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IIntellisenseSession.cs
@@ -0,0 +1,122 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an IntelliSense session, or a single instance of the IntelliSense process.
+ /// </summary>
+ /// <remarks>
+ /// A session is returned by each
+ /// IntelliSense triggering operation, and can be used to control the process of IntelliSense operations. IntelliSense sessions
+ /// are aggregated into a stack, managed by an <see cref="IIntellisenseSessionStack"/> instance.
+ /// </remarks>
+ public interface IIntellisenseSession : IPropertyOwner
+ {
+ /// <summary>
+ /// Gets the <see cref="ITrackingPoint"/> at which this IntelliSense session was triggered in terms of the specified
+ /// <see cref="ITextBuffer"/>.
+ /// </summary>
+ /// <remarks>
+ /// Callers should take care to pass only <see cref="ITextBuffer"/>s that are part of the session.TextView.BufferGraph
+ /// </remarks>
+ /// <param name="textBuffer">The <see cref="ITextBuffer"/> for which a trigger point should be returned.</param>
+ /// <returns>
+ /// The trigger point of the session as a <see cref="ITrackingSpan"/> in terms of the specified <see cref="ITextBuffer"/>.
+ /// </returns>
+ ITrackingPoint GetTriggerPoint(ITextBuffer textBuffer);
+
+ /// <summary>
+ /// Gets the <see cref="SnapshotPoint"/> at which this IntelliSense session was triggered in terms of the specified
+ /// <see cref="ITextSnapshot"/>.
+ /// </summary>
+ /// <remarks>
+ /// Callers should take care to pass only <see cref="ITextSnapshot"/>s that are part of the session.TextView.BufferGraph
+ /// </remarks>
+ /// <param name="textSnapshot">The <see cref="ITextSnapshot"/> for which a trigger point should be returned.</param>
+ /// <returns>
+ /// The trigger point of the session as a <see cref="SnapshotPoint"/> in terms of the specified <see cref="ITextSnapshot"/>.
+ /// </returns>
+ SnapshotPoint? GetTriggerPoint(ITextSnapshot textSnapshot);
+
+ /// <summary>
+ /// Gets the <see cref="ITextView"/> inside of which this IntelliSense session was triggered.
+ /// </summary>
+ ITextView TextView { get; }
+
+ /// <summary>
+ /// Gets the <see cref="IIntellisensePresenter"/> that is used to render IntelliSense for this session.
+ /// </summary>
+ /// <remarks>This property can
+ /// change due to session updates.</remarks>
+ IIntellisensePresenter Presenter { get; }
+
+ /// <summary>
+ /// Occurs when the IntelliSense presenter for this session changes.
+ /// </summary>
+ /// <remarks>
+ /// Any consumers of the presenter should re-render the presenter at this time.
+ /// </remarks>
+ event EventHandler PresenterChanged;
+
+ /// <summary>
+ /// Starts the session.
+ /// </summary>
+ /// <remarks>
+ /// Before this method is called, the session is in an initialization state. It begins processing only when Start()
+ /// is called.
+ /// </remarks>
+ void Start();
+
+ /// <summary>
+ /// Dismisses the session, causing the presenter to be destroyed and the session to be removed from the session stack.
+ /// </summary>
+ void Dismiss();
+
+ /// <summary>
+ /// Occurs when the session is dismissed.
+ /// </summary>
+ event EventHandler Dismissed;
+
+ /// <summary>
+ /// Determines whether the session is dismissed.
+ /// </summary>
+ bool IsDismissed { get; }
+
+ /// <summary>
+ /// Recalculates the underlying IntelliSense items pertaining to this session, using the same trigger point.
+ /// </summary>
+ void Recalculate();
+
+ /// <summary>
+ /// Occurs when the session is recalculated.
+ /// </summary>
+ event EventHandler Recalculated;
+
+ /// <summary>
+ /// Determines the best matching item in the session and sets the selection to this item.
+ /// </summary>
+ /// <remarks>
+ /// The best match is determined by
+ /// querying the highest-priority provider for the buffer over which this session is running.
+ /// </remarks>
+ bool Match();
+
+ /// <summary>
+ /// Collapses the session to an unobtrusive state in which it doesn't get in the way of the user. If the session has no
+ /// such state, the session will be dismissed.
+ /// </summary>
+ /// <remarks>
+ /// <see cref="ILightBulbSession"/>s are the only default <see cref="IIntellisenseSession"/>s that have a collapsed state.
+ /// All other default sessions (<see cref="ICompletionSession"/>s, <see cref="ISignatureHelpSession"/>s, and
+ /// <see cref="IQuickInfoSession"/>s) will be dismissed when collapsed.
+ /// </remarks>
+ void Collapse();
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisenseSessionStack.cs b/src/Editor/Language/Def/Intellisense/IIntellisenseSessionStack.cs
new file mode 100644
index 0000000..2fe20c4
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IIntellisenseSessionStack.cs
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Collections.ObjectModel;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a stack of IntelliSense sessions that manages session activation and currency.
+ /// </summary>
+ /// <remarks>
+ /// Each IntelliSense session is
+ /// part of the stack, whether or not it appears in a TextView popup. The topmost session on the stack has
+ /// special privileges, such as being able to capture the keyboard.
+ /// </remarks>
+ public interface IIntellisenseSessionStack
+ {
+ /// <summary>
+ /// Adds a session to the top of the stack.
+ /// </summary>
+ /// <param name="session">An <see cref="IIntellisenseSession"/> to add to the top of the stack.</param>
+ void PushSession(IIntellisenseSession session);
+
+ /// <summary>
+ /// Removes the topmost session from the stack and returns it.
+ /// </summary>
+ /// <returns>The session that was removed.</returns>
+ IIntellisenseSession PopSession();
+
+ /// <summary>
+ /// Moves a session already in the session stack to the top of the stack. The keyboard session will be re-evaluated.
+ /// </summary>
+ void MoveSessionToTop (IIntellisenseSession session);
+
+ /// <summary>
+ /// Gets the list of sessions in the stack, ordered from bottom to top.
+ /// </summary>
+ ReadOnlyObservableCollection<IIntellisenseSession> Sessions { get; }
+
+ /// <summary>
+ /// Gets the topmost session in the stack.
+ /// </summary>
+ IIntellisenseSession TopSession { get; }
+
+ /// <summary>
+ /// Reduces all sessions in the session stack to their collapsed state, or dismisses them if they have no such state.
+ /// </summary>
+ void CollapseAllSessions();
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IIntellisenseSessionStackMapService.cs b/src/Editor/Language/Def/Intellisense/IIntellisenseSessionStackMapService.cs
new file mode 100644
index 0000000..b431d1c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IIntellisenseSessionStackMapService.cs
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides access to all the IntelliSense session stacks created for all the different
+ /// <see cref="ITextView"/> instances in the application.
+ /// </summary>
+ public interface IIntellisenseSessionStackMapService
+ {
+ /// <summary>
+ /// Gets an <see cref="IIntellisenseSessionStack"/> for a specific <see cref="ITextView"/> instance.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/>.</param>
+ /// <returns>The <see cref="IIntellisenseSessionStack"/>.</returns>
+ IIntellisenseSessionStack GetStackForTextView ( ITextView textView );
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ILightBulbBroker.cs b/src/Editor/Language/Def/Intellisense/ILightBulbBroker.cs
new file mode 100644
index 0000000..fd73821
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ILightBulbBroker.cs
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a LightBulb broker, which is globally responsible for managing <see cref="ILightBulbSession"/>s.
+ /// </summary>
+ /// <remarks>This is a MEF component, and should be imported as follows:
+ /// [Import]
+ /// ILightBulbBroker lightBulbBroker = null;
+ /// </remarks>
+ [CLSCompliant(false)]
+ public interface ILightBulbBroker
+ {
+ /// <summary>
+ /// Determines whether or not an <see cref="ILightBulbSession"/> is active over the specified <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> for which to determine if an <see cref="ILightBulbSession"/> is active.</param>
+ /// <returns><c>true</c> if an active <see cref="ILightBulbSession"/> exists for the given <see cref="ITextView"/>, <c>false</c> otherwise.</returns>
+ bool IsLightBulbSessionActive(ITextView textView);
+
+ /// <summary>
+ /// Gets the active <see cref="ILightBulbSession"/> for the specified <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> for which to get an <see cref="ILightBulbSession"/>.</param>
+ /// <returns>The valid active <see cref="ILightBulbSession"/> for the given <see cref="ITextView"/> or null if it doesn't exist.</returns>
+ ILightBulbSession GetSession(ITextView textView);
+
+ /// <summary>
+ /// Asynchronously determines whether any <see cref="ISuggestedAction"/>s are associated with the current caret
+ /// position in a given <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to determine whether any <see cref="ISuggestedAction"/>s
+ /// are associated with the current caret position.</param>
+ /// <param name="cancellationToken">Cancellation token to cancel this asynchronous operation.</param>
+ /// <returns>A task that returns <c>true</c> if any <see cref="ISuggestedAction"/>s are associated with the current caret
+ /// position in a given <see cref="ITextView"/>, <c>false</c> otherwise.</returns>
+ Task<bool> HasSuggestedActionsAsync(ISuggestedActionCategorySet requestedActionCategories, ITextView textView, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Asynchronously determines whether any <see cref="ISuggestedAction"/>s are associated with a given trigger point
+ /// position and span in a given <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to determine whether any <see cref="ISuggestedAction"/>s are associated \
+ /// with a given trigger point position and span.</param>
+ /// <param name="triggerPoint">The <see cref="ITrackingPoint" /> in the text buffer at which to determine whether any <see cref="ISuggestedAction"/>s are
+ /// associated with a given point position and span in a given <see cref="ITextView"/>.</param>
+ /// <param name="triggerSpan">The <see cref="ITrackingSpan" /> in the text buffer for which to determine whether any <see cref="ISuggestedAction"/>s are
+ /// associated with a given trigger point position and span in a given <see cref="ITextView"/>.</param>
+ /// <returns>A task that returns <c>true</c> if any <see cref="ISuggestedAction"/>s are associated with the current caret
+ /// position in a given <see cref="ITextView"/>, <c>false</c> otherwise.</returns>
+ Task<bool> HasSuggestedActionsAsync(ISuggestedActionCategorySet requestedActionCategories, ITextView textView, ITrackingPoint triggerPoint,
+ ITrackingSpan triggerSpan, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Determines whether a <see cref="ILightBulbSession"/> can be created for a given <see cref="ITextView"/>
+ /// with current caret position as a trigger point.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to determine if an <see cref="ILightBulbSession"/> can be created.</param>
+ /// <returns><c>true</c> if a session can be created, <c>false</c> otherwise.</returns>
+ bool CanCreateSession(ISuggestedActionCategorySet requestedActionCategories, ITextView textView);
+
+ /// <summary>
+ /// Determines whether a <see cref="ILightBulbSession"/> can be created for a given <see cref="ITextView"/>
+ /// at given trigger point.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to determine if an <see cref="ILightBulbSession"/> can be created.</param>
+ /// <param name="triggerPoint">The <see cref="ITrackingPoint" /> in the text buffer at which to determine if an <see cref="ILightBulbSession"/> can be created.</param>
+ /// <returns><c>true</c> if a session can be created, <c>false</c> otherwise.</returns>
+ bool CanCreateSession(ISuggestedActionCategorySet requestedActionCategories, ITextView textView, ITrackingPoint triggerPoint);
+
+ /// <summary>
+ /// Creates, but doesn't expand a <see cref="ILightBulbSession"/> for a given <see cref="ITextView"/> with current caret position
+ /// as a trigger point.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <returns>A valid instance of <see cref="ILightBulbSession"/> or null if no <see cref="ILightBulbSession"/> can be created for
+ /// given text view and caret position.</returns>
+ [Obsolete("Use ILightBulbBroker2.CreateSession instead")]
+ ILightBulbSession CreateSession(ISuggestedActionCategorySet requestedActionCategories, ITextView textView);
+
+ /// <summary>
+ /// Creates, but doesn't expand a <see cref="ILightBulbSession"/> for a given <see cref="ITextView"/> with current caret position
+ /// as a trigger point.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <param name="triggerPoint">The <see cref="ITrackingPoint"/> in the text buffer at which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <param name="triggerSpan">The <see cref="ITrackingSpan"/> in the text buffer for which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <param name="trackMouse">Determines whether the session should track the mouse.</param>
+ /// <returns>A valid instance of <see cref="ILightBulbSession"/> or null if no <see cref="ILightBulbSession"/> can be created for
+ /// given text view and caret position.</returns>
+ [Obsolete("Use ILightBulbBroker2.CreateSession instead")]
+ ILightBulbSession CreateSession(ISuggestedActionCategorySet requestedActionCategories, ITextView textView,
+ ITrackingPoint triggerPoint, ITrackingSpan triggerSpan, bool trackMouse);
+
+ /// <summary>
+ /// Tries to create and expand <see cref="ILightBulbSession"/> for the specified <see cref="ITextView"/>.
+ /// If the session already exists, this method expands it.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> for which to create and expand an <see cref="ILightBulbSession"/>.</param>
+ /// <returns><c>true</c> if <see cref="ILightBulbSession"/> was successfully created and expanded, <c>false</c> otherwise.</returns>
+ bool TryExpandSession(ISuggestedActionCategorySet requestedActionCategories, ITextView textView);
+
+ /// <summary>
+ /// Tries to create and expand <see cref="ILightBulbSession"/> for the specified <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> for which to create and expand an <see cref="ILightBulbSession"/>.</param>
+ /// <param name="triggerPoint">The <see cref="ITrackingPoint"/> in the text buffer at which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <param name="triggerSpan">The <see cref="ITrackingSpan"/> in the text buffer for which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <param name="trackMouse">Determines whether the session should track the mouse.</param>
+ /// <returns><c>true</c> if <see cref="ILightBulbSession"/> was successfully created and expanded, <c>false</c> otherwise.</returns>
+ bool TryExpandSession(ISuggestedActionCategorySet requestedActionCategories, ITextView textView,
+ ITrackingPoint triggerPoint, ITrackingSpan triggerSpan, bool trackMouse);
+
+ // <summary>
+ /// Dismisses an active <see cref="ILightBulbSession"/> for a particular <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to dismiss an active <see cref="ILightBulbSession"/> (if any).</param>
+ void DismissSession(ITextView textView);
+
+ /// <summary>
+ /// Determines whether there is at least one <see cref="ISuggestedActionsSourceProvider"/> supporting
+ /// given content type.
+ /// </summary>
+ /// <param name="contentType">The content type to check if there is at least one <see cref="ISuggestedActionsSourceProvider"/> supporting it.</param>
+ /// <returns><c>true</c> if there is at least one <see cref="ISuggestedActionsSourceProvider"/> supporting given content type, <c>false</c> otherwise.</returns>
+ bool IsSupportedContentType(IContentType contentType);
+
+ /// <summary>
+ /// Gets a list of <see cref="ISuggestedActionsSource"/>s for given <see cref="ITextView"/> and <see cref="ITextBuffer"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> for which to get the list of <see cref="ISuggestedActionsSource"/>s.</param>
+ /// <param name="buffer">The <see cref="ITextBuffer"/> for which to get the list of <see cref="ISuggestedActionsSource"/>s.</param>
+ /// <returns>A list of <see cref="ISuggestedActionsSource"/>s for given <see cref="ITextView"/> and <see cref="ITextBuffer"/>
+ /// or null if no <see cref="ISuggestedActionsSource"/>s support given <see cref="ITextView"/> and <see cref="ITextBuffer"/>.</returns>
+ IEnumerable<ISuggestedActionsSource> GetSuggestedActionsSources(ITextView textView, ITextBuffer buffer);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ILightBulbBroker2.cs b/src/Editor/Language/Def/Intellisense/ILightBulbBroker2.cs
new file mode 100644
index 0000000..fa57ce3
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ILightBulbBroker2.cs
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ using System;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using Microsoft.VisualStudio.Text;
+ using Microsoft.VisualStudio.Text.Editor;
+
+ /// <summary>
+ /// Represents a LightBulb broker, which is globally responsible for managing <see cref="ILightBulbSession"/>s.
+ /// </summary>
+ /// <remarks>This is a MEF component, and should be imported as follows:
+ /// [Import]
+ /// ILightBulbBroker2 lightBulbBroker = null;
+ /// </remarks>
+ [CLSCompliant(false)]
+ public interface ILightBulbBroker2 : ILightBulbBroker
+ {
+ /// <summary>
+ /// Asynchronously gets an <see cref="ISuggestedActionCategorySet"/> containing all categories with applicable actions.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to determine whether any <see cref="ISuggestedAction"/>s
+ /// are associated with the current caret position.</param>
+ /// <param name="cancellationToken">Cancellation token to cancel this asynchronous operation.</param>
+ /// <returns>
+ /// A task that returns the <see cref="ISuggestedActionCategorySet"/> of categories with applicable actions.
+ /// </returns>
+ Task<ISuggestedActionCategorySet> GetSuggestedActionCategoriesAsync(
+ ISuggestedActionCategorySet requestedActionCategories,
+ ITextView textView,
+ CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Asynchronously gets an <see cref="ISuggestedActionCategorySet"/> containing all categories with applicable actions.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to determine whether any <see cref="ISuggestedAction"/>s
+ /// are associated with the current caret position.</param>
+ /// <param name="triggerPoint">The <see cref="ITrackingPoint" /> in the text buffer at which to determine whether any <see cref="ISuggestedAction"/>s are
+ /// associated with a given point position and span in a given <see cref="ITextView"/>.</param>
+ /// <param name="trackingSpan">The <see cref="ITrackingSpan" /> in the text buffer for which to determine whether any <see cref="ISuggestedAction"/>s are
+ /// associated with a given trigger point position and span in a given <see cref="ITextView"/>.</param>
+ /// <param name="cancellationToken">Cancellation token to cancel this asynchronous operation.</param>
+ /// <returns>
+ /// A task that returns the <see cref="ISuggestedActionCategorySet"/> of categories with applicable actions.
+ /// </returns>
+ Task<ISuggestedActionCategorySet> GetSuggestedActionCategoriesAsync(
+ ISuggestedActionCategorySet requestedActionCategories,
+ ITextView textView,
+ ITrackingPoint triggerPoint,
+ ITrackingSpan trackingSpan,
+ CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Creates, but doesn't expand an <see cref="ILightBulbSession"/> for a given <see cref="ITextView"/> with current caret position
+ /// as a trigger point.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <param name="applicableCategories">
+ /// The <see cref="ISuggestedActionCategorySet"/> of categories with applicable actions.
+ /// </param>
+ /// <returns>A valid instance of <see cref="ILightBulbSession"/> or null if no <see cref="ILightBulbSession"/> can be created for
+ /// given text view and caret position.</returns>
+ ILightBulbSession CreateSession(
+ ISuggestedActionCategorySet requestedActionCategories,
+ ITextView textView,
+ ISuggestedActionCategorySet applicableCategories);
+
+ /// <summary>
+ /// Creates, but doesn't expand an <see cref="ILightBulbSession"/> for a given <see cref="ITextView"/> with current caret position
+ /// as a trigger point.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="textView">The <see cref="ITextView"/> over which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <param name="triggerPoint">The <see cref="ITrackingPoint"/> in the text buffer at which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <param name="trackingSpan">The <see cref="ITrackingSpan"/> in the text buffer for which to create an <see cref="ILightBulbSession"/>.</param>
+ /// <param name = "applicableCategories" >
+ /// The <see cref="ISuggestedActionCategorySet"/> of categories with applicable actions.
+ /// </param>
+ /// <param name="trackMouse">Determines whether the session should track the mouse.</param>
+ /// <returns>A valid instance of <see cref="ILightBulbSession"/> or null if no <see cref="ILightBulbSession"/> can be created for
+ /// given text view and caret position.</returns>
+ ILightBulbSession CreateSession(
+ ISuggestedActionCategorySet requestedActionCategories,
+ ITextView textView,
+ ITrackingPoint triggerPoint,
+ ITrackingSpan trackingSpan,
+ ISuggestedActionCategorySet applicableCategories,
+ bool trackMouse);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ILightBulbSession.cs b/src/Editor/Language/Def/Intellisense/ILightBulbSession.cs
new file mode 100644
index 0000000..2d093d3
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ILightBulbSession.cs
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a Light Bulb session, which encapsulates all the information about a particular Light Bulb instance.
+ /// </summary>
+ [CLSCompliantAttribute(false)]
+ public interface ILightBulbSession : IIntellisenseSession
+ {
+ /// <summary>
+ /// Determines whether the session is in the collapsed state.
+ /// </summary>
+ bool IsCollapsed { get; }
+
+ /// <summary>
+ /// Determines whether the session is in the expanded state.
+ /// </summary>
+ bool IsExpanded { get; }
+
+ /// <summary>
+ /// Tries to get the list of <see cref="ISuggestedAction"/>s (grouped into <see cref="SuggestedActionSet"/>s)
+ /// this session displays.
+ /// <param name="actionSets">Resulting list of <see cref="SuggestedActionSet"/>s.</param>
+ /// <returns><see cref="QuerySuggestedActionCompletionStatus"/> indicating whether the operation completed successfully
+ /// or was canceled.</returns>
+ /// </summary>
+ /// <remarks>Note that this method is intended to be called in response to a user action (such as Light Bulb expansion)
+ /// and will show a wait dialog if it takes too long to complete.</remarks>
+ QuerySuggestedActionCompletionStatus TryGetSuggestedActionSets(out IEnumerable<SuggestedActionSet> actionSets);
+
+ /// <summary>
+ /// Expands the session.
+ /// </summary>
+ void Expand();
+
+ /// <summary>
+ /// Resets the session content.
+ /// </summary>
+ void Reset();
+
+ /// <summary>
+ /// Fires when the session is collapsed.
+ /// </summary>
+ event EventHandler Collapsed;
+
+ /// <summary>
+ /// Fires when the session is expanded.
+ /// </summary>
+ event EventHandler Expanded;
+
+ /// <summary>
+ /// Determines whether this session tracks the mouse.
+ /// </summary>
+ bool TrackMouse { get; }
+
+ /// <summary>
+ /// Gets the visual span to which this session is applicable in the text buffer. This is used to position the Light Bulb presentation
+ /// that is rendered by Light Bulb presenters.
+ /// </summary>
+ /// <returns></returns>
+ SnapshotSpan ApplicableToSpan { get; }
+
+ /// <summary>
+ /// Gets a set of suggested action categories this session was requested to provide.
+ /// </summary>
+ ISuggestedActionCategorySet ActionCategories { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IParameter.cs b/src/Editor/Language/Def/Intellisense/IParameter.cs
new file mode 100644
index 0000000..493bd9c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IParameter.cs
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an individual parameter description inside the description of a signature.
+ /// </summary>
+ public interface IParameter
+ {
+ /// <summary>
+ /// Gets the signature of which this parameter is a part.
+ /// </summary>
+ ISignature Signature { get; }
+
+ /// <summary>
+ /// Gets the name of this parameter.
+ /// </summary>
+ /// <remarks>
+ /// This is displayed to identify the parameter.
+ /// </remarks>
+ string Name { get; }
+
+ /// <summary>
+ /// Gets the documentation associated with the parameter.
+ /// </summary>
+ /// <remarks>
+ /// This is displayed to describe
+ /// the parameter.
+ /// </remarks>
+ string Documentation { get; }
+
+ /// <summary>
+ /// Gets the text location of this parameter relative to the signature's content.
+ /// </summary>
+ Span Locus { get; }
+
+ /// <summary>
+ /// Gets the text location of this parameter relative to the signature's pretty-printed content.
+ /// </summary>
+ Span PrettyPrintedLocus { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IPopupIntellisensePresenter.cs b/src/Editor/Language/Def/Intellisense/IPopupIntellisensePresenter.cs
new file mode 100644
index 0000000..8b00604
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IPopupIntellisensePresenter.cs
@@ -0,0 +1,75 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Windows;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Adornments;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines an IntelliSense presenter that is rendered as a popup within an
+ /// <see cref="Microsoft.VisualStudio.Text.Editor.ITextView"/>.
+ /// </summary>
+ public interface IPopupIntellisensePresenter : IIntellisensePresenter
+ {
+ /// <summary>
+ /// Gets the WPF <see cref="UIElement"/> that the presenter wants to be displayed inside a
+ /// <see cref="Microsoft.VisualStudio.Text.Editor.ITextView"/> popup.
+ /// </summary>
+ object SurfaceElement { get; }
+
+ /// <summary>
+ /// Occurs when the WPF SurfaceElement is changed.
+ /// </summary>
+ event EventHandler SurfaceElementChanged;
+
+ /// <summary>
+ /// Gets the <see cref="ITrackingSpan"/> to which this presenter is related.
+ /// </summary>
+ /// <remarks>
+ /// This property is used to determine where to
+ /// place the <see cref="Microsoft.VisualStudio.Text.Editor.ITextView"/> popup inside of which the presenter's
+ /// SurfaceElement is hosted.
+ /// </remarks>
+ ITrackingSpan PresentationSpan { get; }
+
+ /// <summary>
+ /// Occurs when the PresentationSpan property changes.
+ /// </summary>
+ /// <remarks>
+ /// This is the way popup presenters signal that they should be moved.
+ /// </remarks>
+ event EventHandler PresentationSpanChanged;
+
+ /// <summary>
+ /// Gets a set of flags that determine the popup style.
+ /// </summary>
+ PopupStyles PopupStyles { get; }
+
+ /// <summary>
+ /// Occurs when the PopupStyles property changes.
+ /// </summary>
+ event EventHandler<ValueChangedEventArgs<PopupStyles>> PopupStylesChanged;
+
+ /// <summary>
+ /// Gets the name of the space reservation manager that should be used to create popups for this presenter.
+ /// </summary>
+ /// <remarks>
+ /// Space reservation
+ /// managers can be ordered, thus ensuring predictable popup placement.
+ /// </remarks>
+ string SpaceReservationManagerName { get; }
+
+ /// <summary>
+ /// Gets or sets the opacity of this popup presenter.
+ /// </summary>
+ /// <remarks>
+ /// The presenter should use this property to set the
+ /// opacity of its surface element and of any other text-obscuring UI elements it has provided.
+ /// </remarks>
+ double Opacity { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ISignature.cs b/src/Editor/Language/Def/Intellisense/ISignature.cs
new file mode 100644
index 0000000..dc36482
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ISignature.cs
@@ -0,0 +1,71 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Collections.ObjectModel;
+using Microsoft.VisualStudio.Text;
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an individual signature displayed in a tool, such as the signature help tool.
+ /// </summary>
+ public interface ISignature
+ {
+ /// <summary>
+ /// Gets the span of text in the buffer to which this signature help is applicable.
+ /// </summary>
+ ITrackingSpan ApplicableToSpan { get; }
+
+ /// <summary>
+ /// Gets the content of the signature, including all the characters to be displayed.
+ /// </summary>
+ /// <remarks>
+ /// This text may appear in a text view, and can be colored using a standard classifier mechanism.
+ /// </remarks>
+ string Content { get; }
+
+ /// <summary>
+ /// Gets the content of the signature, pretty-printed into a form suitable for display on-screen.
+ /// </summary>
+ /// <remarks>
+ /// Pretty-printed signatures are usually displayed in width-constrained environments when the regular signature content
+ /// cannot be displayed on one line.
+ /// </remarks>
+ string PrettyPrintedContent { get; }
+
+ /// <summary>
+ /// Gets the content of the documentation associated with this signature.
+ /// </summary>
+ /// <remarks>
+ /// This text may appear
+ /// alongside the signature in an IntelliSense tool.
+ /// </remarks>
+ string Documentation { get; }
+
+ /// <summary>
+ /// Gets the list of parameters that this signature knows about.
+ /// </summary>
+ /// <remarks>
+ /// Each parameter has information relating to its text position
+ /// within the signature string.
+ /// </remarks>
+ ReadOnlyCollection<IParameter> Parameters { get; }
+
+ /// <summary>
+ /// Gets the current parameter for this signature.
+ /// </summary>
+ /// <remarks>
+ /// When the caret is within the signature's applicability
+ /// span, this value is the parameter over which the caret is positioned. When the caret is not within the signature's
+ /// applicability span, this value is undefined.
+ /// </remarks>
+ IParameter CurrentParameter { get; }
+
+ /// <summary>
+ /// Occurs when the current parameter changes.
+ /// </summary>
+ event EventHandler<CurrentParameterChangedEventArgs> CurrentParameterChanged;
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ISignatureHelpBroker.cs b/src/Editor/Language/Def/Intellisense/ISignatureHelpBroker.cs
new file mode 100644
index 0000000..4dedbe6
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ISignatureHelpBroker.cs
@@ -0,0 +1,81 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Collections.ObjectModel;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines the signature help broker, which is the primary component of the signature help process.
+ /// </summary>
+ /// <remarks>
+ /// The broker is responsible for
+ /// handling each signature help session from beginning to end. IntelliSense controllers
+ /// request this broker to trigger or dismiss signature help. The broker can also be used by other components to determine the
+ /// state of signature help or to trigger the process.
+ /// </remarks>
+ public interface ISignatureHelpBroker
+ {
+ /// <summary>
+ /// Begins the process of signature help at the position of the caret.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger signature help.</param>
+ /// <returns>A valid signature help session. May be null if no session could be created.</returns>
+ ISignatureHelpSession TriggerSignatureHelp(ITextView textView);
+
+ /// <summary>
+ /// Starts the process of signature help at the specified point.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger signature help.</param>
+ /// <param name="triggerPoint">The point in the text buffer at which signature help is requested.</param>
+ /// <param name="trackCaret">
+ /// <c>true</c> if this session should track the caret, <c>false</c> otherwise. When the caret is tracked,
+ /// the only items to be displayed are those whose applicability
+ /// span contains the caret.
+ /// </param>
+ /// <returns>A valid signature help session. May be null if no session could be created.</returns>
+ ISignatureHelpSession TriggerSignatureHelp(ITextView textView, ITrackingPoint triggerPoint, bool trackCaret);
+
+ /// <summary>
+ /// Creates a signature help session without starting it.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which signature help is requested.</param>
+ /// <param name="triggerPoint">The point in the text buffer at which signature help is requested.</param>
+ /// <param name="trackCaret">
+ /// <c>true</c> if this session should track the caret, <c>false</c> otherwise. When the caret is tracked,
+ /// the only items to be displayed are those whose applicability
+ /// span contains the caret.
+ /// </param>
+ /// <returns>A valid, unstarted signature help session. May be null if no session could be created.</returns>
+ ISignatureHelpSession CreateSignatureHelpSession(ITextView textView, ITrackingPoint triggerPoint, bool trackCaret);
+
+ /// <summary>
+ /// Dismisses any active signature help sessions in this broker's <see cref="Microsoft.VisualStudio.Text.Editor.ITextView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which all signature help sessions should be dismissed.</param>
+ /// <remarks>
+ /// This method is valid only when called while signature help is active.
+ /// </remarks>
+ void DismissAllSessions(ITextView textView);
+
+ /// <summary>
+ /// Determines whether signature help is active.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over signature help status should be determined.</param>
+ /// <returns>
+ /// <c>true</c> if there is at least one signature help session over the specified <see cref="ITextView"/>, <c>false</c>
+ /// otherwise.
+ /// </returns>
+ bool IsSignatureHelpActive(ITextView textView);
+
+ /// <summary>
+ /// Gets the list of all signature help sessions for this broker's <see cref="Microsoft.VisualStudio.Text.Editor.ITextView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to retrieve signature help sessions.</param>
+ /// <returns>A <see cref="ReadOnlyCollection&lt;ISignatureHelpSession&gt;"/> of signature help sessions.</returns>
+ ReadOnlyCollection<ISignatureHelpSession> GetSessions(ITextView textView);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ISignatureHelpSession.cs b/src/Editor/Language/Def/Intellisense/ISignatureHelpSession.cs
new file mode 100644
index 0000000..f836215
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ISignatureHelpSession.cs
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Collections.ObjectModel;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines an IntelliSense session used for displaying signature help.
+ /// </summary>
+ public interface ISignatureHelpSession : IIntellisenseSession
+ {
+ /// <summary>
+ /// Gets the set of valid signatures for this session.
+ /// </summary>
+ ReadOnlyObservableCollection<ISignature> Signatures { get; }
+
+ /// <summary>
+ /// Gets the signature from among the set of valid signatures that is currently selected.
+ /// </summary>
+ ISignature SelectedSignature { get; set; }
+
+ /// <summary>
+ /// Occurs when the SelectedSignature property changes.
+ /// </summary>
+ event EventHandler<SelectedSignatureChangedEventArgs> SelectedSignatureChanged;
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ISignatureHelpSource.cs b/src/Editor/Language/Def/Intellisense/ISignatureHelpSource.cs
new file mode 100644
index 0000000..e3ebb91
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ISignatureHelpSource.cs
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a provider of signature help information that is used in the IntelliSense process.
+ /// </summary>
+ public interface ISignatureHelpSource : IDisposable
+ {
+ /// <summary>
+ /// Determines which <see cref="ISignature"/>s should be part of the specified <see cref="ISignatureHelpSession"/>.
+ /// </summary>
+ /// <param name="session">The session for which completions are to be computed.</param>
+ /// <param name="signatures">The set of the <see cref="ISignature"/>s to be added to the session.</param>
+ /// <remarks>
+ /// Each applicable <see cref="ISignatureHelpSource.AugmentSignatureHelpSession"/> instance will be called in-order to
+ /// (re)calculate a <see cref="ISignatureHelpSession"/>. <see cref="ISignature"/>s can be added to the session by adding
+ /// them to the signatures collection passed-in as a parameter. In addition, by removing items from the collection, a
+ /// source may filter <see cref="ISignature"/>s provided by <see cref="ISignatureHelpSource"/>s earlier in the calculation
+ /// chain.
+ /// </remarks>
+ void AugmentSignatureHelpSession(ISignatureHelpSession session, IList<ISignature> signatures);
+
+ /// <summary>
+ /// Computes the best matching <see cref="ISignature" /> instance for the given signature help session. Only the highest-
+ /// priority signature help provider is asked for this information.
+ /// </summary>
+ /// <param name="session">
+ /// The <see cref="ISignatureHelpSession" /> for which the best matching <see cref="ISignature" /> should be determined.
+ /// </param>
+ /// <returns>
+ /// A valid <see cref="ISignature" /> that is also a member of the Signatures collection of the specified
+ /// <see cref="ISignatureHelpSession" />. It can return null if no best match could be determined,
+ /// and the next highest-priority signature help provider will be asked to determine the best match.
+ /// </returns>
+ ISignature GetBestMatch(ISignatureHelpSession session);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ISignatureHelpSourceProvider.cs b/src/Editor/Language/Def/Intellisense/ISignatureHelpSourceProvider.cs
new file mode 100644
index 0000000..eaff412
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ISignatureHelpSourceProvider.cs
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines an extension used to create signature help providers from a given <see cref="ITextBuffer"/> opened in a given
+ /// context.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attribute:
+ /// [Export(typeof(ISignaturehelpSourceProvider))]
+ /// Component exporters must add at least one ContentType attribute to specify the
+ /// content types for which the component is valid, and an Order to specify its order in the chain of signature help providers.
+ /// </remarks>
+ public interface ISignatureHelpSourceProvider
+ {
+ /// <summary>
+ /// Attempts to create a signature help provider for the given text buffer opened in the given context.
+ /// </summary>
+ /// <param name="textBuffer">The text buffer for which to create a signature help provider.</param>
+ /// <returns>A valid signature help provider, or null if none could be created.</returns>
+ ISignatureHelpSource TryCreateSignatureHelpSource ( ITextBuffer textBuffer );
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ITelemetryDiagnosticID.cs b/src/Editor/Language/Def/Intellisense/ITelemetryDiagnosticID.cs
new file mode 100644
index 0000000..82793ae
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ITelemetryDiagnosticID.cs
@@ -0,0 +1,19 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an object that can provide a Diagnostic ID for telemetry purposes.
+ /// </summary>
+ public interface ITelemetryDiagnosticID<T>
+ {
+ /// <summary>
+ /// Get Diagnostic ID for telemetry purposes.
+ /// </summary>
+ /// <returns></returns>
+ T GetDiagnosticID();
+ }
+}
+
diff --git a/src/Editor/Language/Def/Intellisense/ITextFormattable.cs b/src/Editor/Language/Def/Intellisense/ITextFormattable.cs
new file mode 100644
index 0000000..a945bc7
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ITextFormattable.cs
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Windows.Media.TextFormatting;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a contract for implementors to override the text formatting properties for an object.
+ /// </summary>
+ /// <remarks>
+ /// This will mainly be implemented by <see cref="Completion"/> instances that wish to override their textual presentation in
+ /// the statement completion presenter.
+ /// </remarks>
+ public interface ITextFormattable
+ {
+ /// <summary>
+ /// Gets a set of <see cref="TextRunProperties"/> that will override the "default" <see cref="TextRunProperties"/> used to
+ /// display this object's text.
+ /// </summary>
+ /// <param name="defaultTextRunProperties">
+ /// The set of <see cref="TextRunProperties"/> that would have been used to present this object had no overriding taken
+ /// place.
+ /// </param>
+ /// <returns>A set of <see cref="TextRunProperties"/> that should be used to display this object's text.</returns>
+ TextRunProperties GetTextRunProperties(TextRunProperties defaultTextRunProperties);
+
+ /// <summary>
+ /// Gets a set of <see cref="TextRunProperties"/> that will override the "default" <see cref="TextRunProperties"/> used to
+ /// display this object's text when this object is highlighted.
+ /// </summary>
+ /// <param name="defaultHighlightedTextRunProperties">The set of <see cref="TextRunProperties"/> that would have been used to present the highlighted object had no
+ /// overriding taken place.</param>
+ /// <returns>A set of <see cref="TextRunProperties"/> that should be used to display this object's highlighted text.</returns>
+ /// An completion item is highlighted in the default statement completion presenter when it is fully-selected. The
+ /// <see cref="TextRunProperties"/> selected to render the highlighted text should be chosen so as to not clash with the
+ /// style of the selection rectangle.
+ /// </remarks>
+ TextRunProperties GetHighlightedTextRunProperties(TextRunProperties defaultHighlightedTextRunProperties);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IWpfKeyboardTrackingService.cs b/src/Editor/Language/Def/Intellisense/IWpfKeyboardTrackingService.cs
new file mode 100644
index 0000000..0d9dc28
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IWpfKeyboardTrackingService.cs
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a MEF service responsible for tracking the keyboard in hosts of the WPF editor. Keyboard tracking is necessary as
+ /// some hosts (such as VisualStudio) do their own keyboard handling, causing inconsistent behavior of WPF elements, even when
+ /// they have keyboard focus. By tracking the keyboard, all keyboard events will be routed to WPF first, giving focused WPF
+ /// controls a shot at handling keyboard events.
+ /// </summary>
+ [CLSCompliant(false)]
+ public interface IWpfKeyboardTrackingService
+ {
+ /// <summary>
+ /// Starts tracking the keyboard. Once called, all keyboard events will be routed to WPF first, before the host application
+ /// sees them.
+ /// </summary>
+ /// <param name="handle">A valid Win32 window handle (HWND) to which messages should be redirected</param>
+ /// <param name="messagesToCapture">A list of Win32 messages to redirect to the specified window handle</param>
+ void BeginTrackingKeyboard(IntPtr handle, IList<uint> messagesToCapture);
+
+ /// <summary>
+ /// Stops tracking the keyboard.
+ /// </summary>
+ void EndTrackingKeyboard();
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IconDescription.cs b/src/Editor/Language/Def/Intellisense/IconDescription.cs
new file mode 100644
index 0000000..b672c38
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IconDescription.cs
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Globalization;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Describes the icon to use for displaying items in statement completion.
+ /// </summary>
+ public class IconDescription
+ {
+ private StandardGlyphGroup group;
+ private StandardGlyphItem item;
+
+ /// <summary>
+ /// Gets the <see cref="StandardGlyphGroup"/> of the icon to be displayed.
+ /// </summary>
+ public StandardGlyphGroup Group
+ {
+ get { return this.group; }
+ }
+
+ /// <summary>
+ /// Gets the specific <see cref="StandardGlyphItem"/> within the icon group to be displayed.
+ /// </summary>
+ public StandardGlyphItem Item
+ {
+ get { return this.item; }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of an <see cref="IconDescription"/> from a group and an item within the group.
+ /// </summary>
+ /// <param name="group">The icon group of the icon to be displayed.</param>
+ /// <param name="item">The specific icon within the icon group to be displayed.</param>
+ public IconDescription(StandardGlyphGroup group, StandardGlyphItem item)
+ {
+ this.group = group;
+ this.item = item;
+ }
+
+ /// <summary>
+ /// Provides a description of the specific icon.
+ /// </summary>
+ /// <returns>Group.Item</returns>
+ public override string ToString()
+ {
+ return string.Format(CultureInfo.InvariantCulture, "{0}.{1}", group.ToString(), item.ToString());
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/IntellisenseDef.csproj b/src/Editor/Language/Def/Intellisense/IntellisenseDef.csproj
new file mode 100644
index 0000000..7857d74
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IntellisenseDef.csproj
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Language.Intellisense</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <PushToPublicFeed>true</PushToPublicFeed>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.VisualStudio.ImageCatalog" />
+ <PackageReference Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\..\Text\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\..\Text\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\..\Text\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\Language\LanguageDef.csproj" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/IntellisenseFilter.cs b/src/Editor/Language/Def/Intellisense/IntellisenseFilter.cs
new file mode 100644
index 0000000..6abe3ff
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IntellisenseFilter.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using Microsoft.VisualStudio.Imaging.Interop;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ [CLSCompliant(false)]
+ public class IntellisenseFilter : IIntellisenseFilter
+ {
+ /// <summary>
+ /// Create an instance of an IntellisenseFilter with the specified attributes.
+ /// </summary>
+ public IntellisenseFilter(ImageMoniker moniker, string toolTip, string accessKey, string automationText,
+ bool initialIsChecked = false, bool initialIsEnabled = true)
+ {
+ if (string.IsNullOrEmpty(accessKey))
+ {
+ throw new ArgumentException("Must not be null or empty", nameof(accessKey));
+ }
+
+ this.Moniker = moniker;
+ this.ToolTip = toolTip;
+ this.AccessKey = accessKey;
+ this.AutomationText = automationText;
+ this.IsChecked = initialIsChecked;
+ this.IsEnabled = initialIsEnabled;
+ }
+
+ /// <summary>
+ /// The icon shown on the filter's button.
+ /// </summary>
+ public ImageMoniker Moniker { get; }
+
+ /// <summary>
+ /// The tooltip shown when the mouse hovers over the button.
+ /// </summary>
+ public string ToolTip { get; }
+
+ /// <summary>
+ /// The key used to toggle the filter's state.
+ /// </summary>
+ public string AccessKey { get; }
+
+ /// <summary>
+ /// String used to represent the button for automation.
+ /// </summary>
+ public string AutomationText { get; }
+
+ /// <summary>
+ /// Has the user turned the filter on?
+ /// </summary>
+ /// <remarks>
+ /// The setter will be called when the user toggles the corresponding filter button.
+ /// </remarks>
+ public virtual bool IsChecked { get; set; }
+
+ /// <summary>
+ /// Is the filter enabled?
+ /// </summary>
+ /// <remarks>
+ /// <para>Disabled filters are shown but are grayed out.</para>
+ /// <para>Intellisense will never call the setter but the <see cref="CompletionSet2"/> owner may and the Intellisense popup will respect the changes.</para>
+ /// </remarks>
+ public bool IsEnabled { get; set; }
+
+
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IntellisenseKeyboardCommand.cs b/src/Editor/Language/Def/Intellisense/IntellisenseKeyboardCommand.cs
new file mode 100644
index 0000000..75f25b5
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IntellisenseKeyboardCommand.cs
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents the set of keyboard commands that can be issued to IntelliSense presenters.
+ /// </summary>
+ public enum IntellisenseKeyboardCommand
+ {
+ /// <summary>
+ /// The up arrow command.
+ /// </summary>
+ Up,
+
+ /// <summary>
+ /// The down arrow command.
+ /// </summary>
+ Down,
+
+ /// <summary>
+ /// The page up command.
+ /// </summary>
+ PageUp,
+
+ /// <summary>
+ /// The page down command.
+ /// </summary>
+ PageDown,
+
+ /// <summary>
+ /// The go to the top line command
+ /// </summary>
+ TopLine,
+
+ /// <summary>
+ /// The go to the bottom line command.
+ /// </summary>
+ BottomLine,
+
+ /// <summary>
+ /// The home command.
+ /// </summary>
+ Home,
+
+ /// <summary>
+ /// The end command.
+ /// </summary>
+ End,
+
+ /// <summary>
+ /// The enter, or return, command.
+ /// </summary>
+ Enter,
+
+ /// <summary>
+ /// The escape command.
+ /// </summary>
+ Escape,
+
+ /// <summary>
+ /// The increase filter level command.
+ /// </summary>
+ /// <remarks>
+ /// This command is most often used in tabbed completion to switch between the completion tabs.
+ /// </remarks>
+ IncreaseFilterLevel,
+
+ /// <summary>
+ /// The decrease filter level command.
+ /// </summary>
+ /// <remarks>
+ /// This command is most often used in tabbed completion to switch between the completion tabs.
+ /// </remarks>
+ DecreaseFilterLevel
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/IntellisenseSpaceReservationManagerNames.cs b/src/Editor/Language/Def/Intellisense/IntellisenseSpaceReservationManagerNames.cs
new file mode 100644
index 0000000..193b772
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/IntellisenseSpaceReservationManagerNames.cs
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines the names of the space reservation managers used by the default IntelliSense presenters.
+ /// </summary>
+ public static class IntellisenseSpaceReservationManagerNames
+ {
+ /// <summary>
+ /// The space reservation manager name for statement completion.
+ /// </summary>
+ public const string CompletionSpaceReservationManagerName = "completion";
+
+ /// <summary>
+ /// The space reservation manager name for signature help.
+ /// </summary>
+ public const string SignatureHelpSpaceReservationManagerName = "signaturehelp";
+
+ /// <summary>
+ /// The space reservation manager name for Quick Info.
+ /// </summary>
+ public const string QuickInfoSpaceReservationManagerName = "quickinfo";
+
+ /// <summary>
+ /// The space reservation manager name for smart tags.
+ /// </summary>
+ [Obsolete("SmartTag API is no longer supported. To find out more about the replacement API, Light Bulb, refer to http://go.microsoft.com/fwlink/?LinkId=394601.")]
+ public const string SmartTagSpaceReservationManagerName = "smarttag";
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoBroker.cs b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoBroker.cs
new file mode 100644
index 0000000..5f8ea6a
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoBroker.cs
@@ -0,0 +1,77 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Collections.ObjectModel;
+using System;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a Quick Info broker.
+ /// </summary>
+ /// <remarks>
+ /// The broker is responsible for triggering Quick Info sessions
+ /// </remarks>
+ [Obsolete("Use " + nameof(IAsyncQuickInfoBroker) + " instead")]
+ public interface IQuickInfoBroker
+ {
+ /// <summary>
+ /// Determines whether there is at least one active Quick Info session in the specified <see cref="ITextView" />.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView" /> for which Quick Info session status is to be determined.</param>
+ /// <returns>
+ /// <c>true</c> if there is at least one active Quick Info session over the specified <see cref="ITextView" />, <c>false</c>
+ /// otherwise.
+ /// </returns>
+ bool IsQuickInfoActive(ITextView textView);
+
+ /// <summary>
+ /// Triggers Quick Info at the position of the caret in the specified <see cref="ITextView" />.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView" /> for which Quick Info is to be triggered.</param>
+ /// <returns>A valid Quick Info session, or null if none could be created.</returns>
+ /// <remarks>
+ /// Quick Info is triggered in the <see cref="ITextView" /> to which this
+ /// broker is attached.
+ /// </remarks>
+ IQuickInfoSession TriggerQuickInfo(ITextView textView);
+
+ /// <summary>
+ /// Triggers Quick Info at the specified position in the buffer, either tracking or not tracking the mouse.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView" /> for which Quick Info is to be triggered.</param>
+ /// <param name="triggerPoint">
+ /// The <see cref="ITrackingPoint" /> in the text buffer at which Quick Info should be triggered.
+ /// </param>
+ /// <param name="trackMouse">
+ /// <c>true</c> if the session should be dismissed when the mouse leaves the applicability span of the session,
+ /// <c>false</c> otherwise.
+ /// </param>
+ /// <returns>A valid Quick Info session, or null if none could be created.</returns>
+ IQuickInfoSession TriggerQuickInfo(ITextView textView, ITrackingPoint triggerPoint, bool trackMouse);
+
+ /// <summary>
+ /// Creates but does not start a Quick Info session at the specified location in the <see cref="ITextBuffer" />.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView" /> for which a Quick Info should be created.</param>
+ /// <param name="triggerPoint">
+ /// The <see cref="ITrackingPoint" /> in the text buffer at which Quick Info should be triggered.
+ /// </param>
+ /// <param name="trackMouse">
+ /// <c>true</c> if the session should be auto-dismissed when the mouse leaves the applicability span of the session,
+ /// otherwise <c>false</c>.
+ /// </param>
+ /// <returns>A valid Quick Info session, or null if none could be created.</returns>
+ IQuickInfoSession CreateQuickInfoSession(ITextView textView, ITrackingPoint triggerPoint, bool trackMouse);
+
+ /// <summary>
+ /// Gets the set of active Quick Info sessions for the <see cref="ITextView" /> in which this broker operates.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView" /> for which Quick Info sessions should be returned.</param>
+ /// <returns>The list of valid Quick Info sessions active over the specified <see cref="ITextView" />.</returns>
+ ReadOnlyCollection<IQuickInfoSession> GetSessions(ITextView textView);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSession.cs b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSession.cs
new file mode 100644
index 0000000..2ea8c17
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSession.cs
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Windows;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines an IntelliSense session used to display Quick Info information.
+ /// </summary>
+ [Obsolete("Use " + nameof(IAsyncQuickInfoSession) + " instead")]
+ public interface IQuickInfoSession : IIntellisenseSession
+ {
+ /// <summary>
+ /// Gets the content that will be displayed by this session.
+ /// </summary>
+ /// <remarks>
+ /// Several types of content are supported, including strings,
+ /// <see cref="ITextBuffer" /> instances, and <see cref="UIElement" /> instances.
+ /// </remarks>
+ BulkObservableCollection<object> QuickInfoContent { get; }
+
+ /// <summary>
+ /// Gets the applicability span for this session.
+ /// </summary>
+ /// <remarks>
+ /// The applicability span is the span of text in the <see cref="ITextBuffer" /> to which this
+ /// session pertains. The default Quick Info presenter renders a popup near this location. If this session tracks the
+ /// mouse, the session will be dismissed when the mouse leaves this <see cref="ITrackingSpan" />.
+ /// </remarks>
+ ITrackingSpan ApplicableToSpan { get; }
+
+ /// <summary>
+ /// Occurs when the ApplicableToSpan property on this session changes.
+ /// </summary>
+ event EventHandler ApplicableToSpanChanged;
+
+ /// <summary>
+ /// Determines whether this session tracks the mouse.
+ /// </summary>
+ /// <remarks>
+ /// When the session tracks the mouse, it will be dismissed
+ /// when the mouse pointer leaves the applicability span for this session.
+ /// </remarks>
+ bool TrackMouse { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSession2.cs b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSession2.cs
new file mode 100644
index 0000000..ab90378
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSession2.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Extends <see cref="IQuickInfoSession"/> with support for an interactive Quick Info content.
+ /// </summary>
+ [Obsolete("Use " + nameof(IAsyncQuickInfoSession) + " instead")]
+ public interface IQuickInfoSession2 : IQuickInfoSession
+ {
+ /// <summary>
+ /// This <see cref="IQuickInfoSession"/> contains an interactive content.
+ /// </summary>
+ bool HasInteractiveContent { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSource.cs b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSource.cs
new file mode 100644
index 0000000..de8fd5c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSource.cs
@@ -0,0 +1,31 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a QuickInfo provider, which acts as a provider of QuickInfo information over a text buffer.
+ /// </summary>
+ [Obsolete("Use " + nameof(IAsyncQuickInfoSource) + " instead")]
+ public interface IQuickInfoSource : IDisposable
+ {
+ /// <summary>
+ /// Determines which pieces of QuickInfo content should be part of the specified <see cref="IQuickInfoSession"/>.
+ /// </summary>
+ /// <param name="session">The session for which completions are to be computed.</param>
+ /// <param name="quickInfoContent">The QuickInfo content to be added to the session.</param>
+ /// <param name="applicableToSpan">The <see cref="ITrackingSpan"/> to which this session applies.</param>
+ /// <remarks>
+ /// Each applicable <see cref="IQuickInfoSource.AugmentQuickInfoSession"/> instance will be called in-order to (re)calculate a
+ /// <see cref="IQuickInfoSession"/>. Objects can be added to the session by adding them to the quickInfoContent collection
+ /// passed-in as a parameter. In addition, by removing items from the collection, a source may filter content provided by
+ /// <see cref="IQuickInfoSource"/>s earlier in the calculation chain.
+ /// </remarks>
+ void AugmentQuickInfoSession(IQuickInfoSession session, IList<object> quickInfoContent, out ITrackingSpan applicableToSpan);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSourceProvider.cs b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSourceProvider.cs
new file mode 100644
index 0000000..cfcd758
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/IQuickInfoSourceProvider.cs
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Describes a factory of Quick Info providers.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attribute:
+ /// [Export(typeof(IQuickInfoSourceProvider))]
+ /// </remarks>
+ [Obsolete("Use " + nameof(IAsyncQuickInfoSourceProvider) + " instead")]
+ public interface IQuickInfoSourceProvider
+ {
+ /// <summary>
+ /// Creates a Quick Info provider for the specified context.
+ /// </summary>
+ /// <param name="textBuffer">The text buffer for which to create a provider.</param>
+ /// <returns>A valid <see cref="IQuickInfoSource" /> instance, or null if none could be created.</returns>
+ IQuickInfoSource TryCreateQuickInfoSource(ITextBuffer textBuffer);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/QuickInfoPresenterStyle.cs b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/QuickInfoPresenterStyle.cs
new file mode 100644
index 0000000..809dc6e
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/LegacyQuickInfo/QuickInfoPresenterStyle.cs
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+using System.Windows.Media;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ ///<summary>
+ /// Defines a set of properties that will be used to style the default QuickInfo presenter.
+ ///</summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attributes:
+ /// [Export(typeof(QuickInfoPresenterStyle))]
+ /// [ContentType]
+ /// [Name]
+ /// [Order]
+ /// All exports of this component part should be ordered after the "default" QuickInfo presenter style. At a minimum, this
+ /// means adding [Order(After="default")] to the export metadata.
+ /// </remarks>
+ [Obsolete("Use ToolTipPresenterStyle instead")]
+ public class QuickInfoPresenterStyle
+ {
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the borders in the completion presenter.
+ /// </summary>
+ public virtual Brush BorderBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the completion presenter.
+ /// </summary>
+ public virtual Brush BackgroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a string that identifies the appearance category for the <see cref="ITextView"/>s displayed in the default
+ /// QuickInfo presenter.
+ /// </summary>
+ /// <remarks>
+ /// Manipulating this value will change the classification format map used in the translation of classification types to
+ /// classification formats in the QuickInfo <see cref="ITextView"/>.
+ /// </remarks>
+ public virtual string QuickInfoAppearanceCategory { get; protected set; }
+
+ /// <summary>
+ /// Gets a value determining whether or not gradients should be used in the presentation of a
+ /// <see cref="IQuickInfoSession"/>.
+ /// </summary>
+ public virtual bool? AreGradientsAllowed { get; protected set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/LightBulbPresenterStyle.cs b/src/Editor/Language/Def/Intellisense/LightBulbPresenterStyle.cs
new file mode 100644
index 0000000..ee2c6d6
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/LightBulbPresenterStyle.cs
@@ -0,0 +1,193 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//
+
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Windows.Media;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ ///<summary>
+ /// Defines a set of properties that will be used to style the default LightBulb presenter.
+ ///</summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attributes:
+ /// [Export(typeof(LightBulbPresenterStyle))]
+ /// [ContentType]
+ /// [Name]
+ /// [Order]
+ /// All exports of this component part should be ordered after the "default" LightBulb presenter style. At a minimum,
+ /// this means adding [Order(After="default")] to the export metadata.
+ /// </remarks>
+ public class LightBulbPresenterStyle : INotifyPropertyChanged
+ {
+ private Brush _actuatorBackgroundBrush;
+ private Brush _actuatorBorderBrush;
+ private Brush _actuatorHoverBackgroundBrush;
+ private Brush _actuatorHoverBorderBrush;
+ private Brush _actuatorDropdownChevronBrush;
+ private Brush _previewBackgroundBrush;
+ private Brush _previewBorderBrush;
+ private Brush _previewFocusBackgroundBrush;
+ private Color _discoveryModeBackgroundColor;
+ private Color _discoveryModeBorderColor;
+ private Brush _showQuickFixesLinkBrush;
+ private Brush _showQuickFixesKeyBindingBrush;
+ private string _showQuickFixesKeyBinding;
+ private Brush _displayTextSuffixForegroundBrush;
+
+ /// <summary>
+ /// Event raised when a property on this object's value changes.
+ /// </summary>
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the LightBulb actuator.
+ /// </summary>
+ public virtual Brush ActuatorBackgroundBrush
+ {
+ get { return _actuatorBackgroundBrush; }
+ set { SetProperty(ref _actuatorBackgroundBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the border of the LightBulb actuator.
+ /// </summary>
+ public virtual Brush ActuatorBorderBrush
+ {
+ get { return _actuatorBorderBrush; }
+ set { SetProperty(ref _actuatorBorderBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the LightBulb actuator in hover mode.
+ /// </summary>
+ public virtual Brush ActuatorHoverBackgroundBrush
+ {
+ get { return _actuatorHoverBackgroundBrush; }
+ set { SetProperty(ref _actuatorHoverBackgroundBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the border of the LightBulb actuator.
+ /// </summary>
+ public virtual Brush ActuatorHoverBorderBrush
+ {
+ get { return _actuatorHoverBorderBrush; }
+ set { SetProperty(ref _actuatorHoverBorderBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the chevron of the LightBulb actuator.
+ /// </summary>
+ public virtual Brush ActuatorDropdownChevronBrush
+ {
+ get { return _actuatorDropdownChevronBrush; }
+ set { SetProperty(ref _actuatorDropdownChevronBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the LightBulb preview pane.
+ /// </summary>
+ public virtual Brush PreviewBackgroundBrush
+ {
+ get { return _previewBackgroundBrush; }
+ set { SetProperty(ref _previewBackgroundBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the border of the LightBulb preview pane.
+ /// </summary>
+ public virtual Brush PreviewBorderBrush
+ {
+ get { return _previewBorderBrush; }
+ set { SetProperty(ref _previewBorderBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the focused LightBulb preview pane.
+ /// </summary>
+ public virtual Brush PreviewFocusBackgroundBrush
+ {
+ get { return _previewFocusBackgroundBrush; }
+ set { SetProperty(ref _previewFocusBackgroundBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Color"/> that will be used to paint the background of the LightBulb in discovery mode.
+ /// </summary>
+ public virtual Color DiscoveryModeBackgroundColor
+ {
+ get { return _discoveryModeBackgroundColor; }
+ set { SetProperty(ref _discoveryModeBackgroundColor, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Color"/> that will be used to paint the border of the LightBulb in discovery mode.
+ /// </summary>
+ public virtual Color DiscoveryModeBorderColor
+ {
+ get { return _discoveryModeBorderColor; }
+ set { SetProperty(ref _discoveryModeBorderColor, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the hyperlink in QuickInfo that expands QuickInfo-based LightBulb.
+ /// </summary>
+ public virtual Brush ShowQuickFixesLinkBrush
+ {
+ get { return _showQuickFixesLinkBrush; }
+ set { SetProperty(ref _showQuickFixesLinkBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the shortcut of the command that expands LightBulb.
+ /// </summary>
+ public virtual Brush ShowQuickFixesKeyBindingBrush
+ {
+ get { return _showQuickFixesKeyBindingBrush; }
+ set { SetProperty(ref _showQuickFixesKeyBindingBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the suffix part of the LightBulb item's display text.
+ /// </summary>
+ public virtual Brush DisplayTextSuffixForegroundBrush
+ {
+ get { return _displayTextSuffixForegroundBrush; }
+ set { SetProperty(ref _displayTextSuffixForegroundBrush, value); }
+ }
+
+ /// <summary>
+ /// Gets a shortcut of the command that expands LightBulb.
+ /// </summary>
+ public virtual string ShowQuickFixesKeyBinding
+ {
+ get { return _showQuickFixesKeyBinding; }
+ set { SetProperty(ref _showQuickFixesKeyBinding, value); }
+ }
+
+ private void SetProperty<T>(ref T field, T value, [CallerMemberName] string propertyName = null)
+ {
+ if (!object.Equals(field, value))
+ {
+ field = value;
+
+ if (propertyName != null)
+ {
+ NotifyPropertyChanged(propertyName);
+ }
+ }
+ }
+
+ protected void NotifyPropertyChanged(string propertyName)
+ {
+ PropertyChangedEventHandler handler = PropertyChanged;
+ if (handler != null)
+ {
+ handler(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableRelationship.cs b/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableRelationship.cs
new file mode 100644
index 0000000..b7093dc
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableRelationship.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a relationship between an <see cref="INavigableSymbol"/> and its navigation target.
+ /// </summary>
+ public interface INavigableRelationship
+ {
+ /// <summary>
+ /// Gets the unique name identifying this relastionship.
+ /// </summary>
+ string Name { get; }
+
+ /// <summary>
+ /// Gets the localized display name of this relationship.
+ /// </summary>
+ string DisplayName { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbol.cs b/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbol.cs
new file mode 100644
index 0000000..b162d8b
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbol.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System.Collections.Generic;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a navigable symbol in code document.
+ /// </summary>
+ public interface INavigableSymbol
+ {
+ /// <summary>
+ /// Gets the span of the symbol.
+ /// </summary>
+ SnapshotSpan SymbolSpan { get; }
+
+ /// <summary>
+ /// Gets all the supported <see cref="INavigableRelationship"/>s of this symbol.
+ /// </summary>
+ IEnumerable<INavigableRelationship> Relationships { get; }
+
+ /// <summary>
+ /// When invoked, navigates to the target of the specified relationship to the symbol.
+ /// </summary>
+ void Navigate(INavigableRelationship relationship);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbolSource.cs b/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbolSource.cs
new file mode 100644
index 0000000..fea5098
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbolSource.cs
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a source that provides <see cref="INavigableSymbol"/> over a text buffer of a given content type.
+ /// </summary>
+ /// <remarks>
+ /// Providers implement <see cref="INavigableSymbolSource"/> and expose instances of this type via MEF export <see cref="INavigableSymbolSourceProvider"/>.
+ /// </remarks>
+ public interface INavigableSymbolSource : IDisposable
+ {
+ /// <summary>
+ /// Asynchronously gets an <see cref="INavigableSymbol"/> at the trigger span position.
+ /// </summary>
+ /// <param name="triggerSpan">A 1-character length span over which navigable symbol is queried.</param>
+ /// <param name="token">A <see cref="CancellationToken"/> used to cancel the task as needed.</param>
+ /// <returns>
+ /// A task that returns <see cref="INavigableSymbol"/> upon completion.
+ /// </returns>
+ /// <remarks>
+ /// <para>
+ /// This async method is called on background thread.
+ /// </para>
+ /// <para>
+ /// The <paramref name="triggerSpan"/> is a 1-character span containing the character over which a symbol is queried.
+ /// This is to disambiguate the case in a projection buffer where the trigger point is between two buffer boundaries
+ /// and thus multiple symbol sources may be queried. A span eliminates this ambiguity because it can only fall in one buffer.
+ /// </para>
+ /// <para>
+ /// Providers may return a <see cref="Task"/> with null results if no navigable symbol is available over the queried <paramref name="triggerSpan"/>.
+ /// </para>
+ /// </remarks>
+ Task<INavigableSymbol> GetNavigableSymbolAsync(SnapshotSpan triggerSpan, CancellationToken token);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbolSourceProvider.cs b/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbolSourceProvider.cs
new file mode 100644
index 0000000..8022633
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/NavigableSymbol/INavigableSymbolSourceProvider.cs
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides <see cref="INavigableSymbolSource"/> for an <see cref="ITextBuffer"/> of a given content type.
+ /// </summary>
+ /// <remarks>
+ /// <para>This is a MEF component, and should be exported with the following attributes:</para>
+ /// <code>
+ /// [Export(typeof(INavigableSymbolSourceProvider))]
+ /// [Name("name of the provider")]
+ /// [ContentType("content type")]
+ /// </code>
+ /// <para>And optionally, the OrderAttribute.</para>
+ /// </remarks>
+ public interface INavigableSymbolSourceProvider
+ {
+ /// <summary>
+ /// Creates an <see cref="INavigableSymbolSource"/> for the given <see cref="ITextBuffer"/>
+ /// in the specified <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> in which the text buffer was created.</param>
+ /// <param name="buffer">The <see cref="ITextBuffer"/> for which the <see cref="INavigableSymbolSource"/> is created.</param>
+ /// <returns>A valid <see cref="INavigableSymbolSource"/>, or <c>null</c> if the provider could not create one.</returns>
+ /// <remarks>
+ /// <para>
+ /// This method should only be called once on the <paramref name="buffer"/> whose content type matches the provider's.
+ /// </para>
+ /// <para>
+ /// If there are multiple sources matching the content type of the given text buffer, the best match based on the
+ /// Order is used when calling <see cref="INavigableSymbolSource.GetNavigableSymbolAsync"/>.
+ /// </para>
+ /// </remarks>
+ INavigableSymbolSource TryCreateNavigableSymbolSource(ITextView textView, ITextBuffer buffer);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/NavigableSymbol/PredefinedNavigableRelationships.cs b/src/Editor/Language/Def/Intellisense/NavigableSymbol/PredefinedNavigableRelationships.cs
new file mode 100644
index 0000000..4e8ed4c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/NavigableSymbol/PredefinedNavigableRelationships.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System.Diagnostics.CodeAnalysis;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides predefined <see cref="INavigableRelationship"/>s.
+ /// </summary>
+ public static class PredefinedNavigableRelationships
+ {
+ /// <summary>
+ /// A definition relationship.
+ /// </summary>
+ [SuppressMessage("Microsoft.Security", "CA2104", Justification = "Read only type")]
+ public static readonly INavigableRelationship Definition = new DefinitionRelationship();
+
+ private class DefinitionRelationship : INavigableRelationship
+ {
+ public string Name => "IsDefinedBy";
+
+ // TODO: This must be a localized text.
+ // The assembly doesn't contain any resource for now so leave it as is.
+ // Will revisit later.
+ public string DisplayName => "Definition";
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/ExceptionEventArgs.cs b/src/Editor/Language/Def/Intellisense/Peek/ExceptionEventArgs.cs
new file mode 100644
index 0000000..6cf17ec
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/ExceptionEventArgs.cs
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides exception data for an event.
+ /// </summary>
+ public class ExceptionEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Creates a new instance of <see cref="ExceptionEventArgs"/>.
+ /// </summary>
+ /// <param name="e">The exception that details the cause of the failure.</param>
+ public ExceptionEventArgs(Exception e)
+ {
+ Exception = e;
+ }
+
+ /// <summary>
+ /// Gets the exception that details the cause of the failure.
+ /// </summary>
+ public Exception Exception { get; private set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IDesiredHeightProvider.cs b/src/Editor/Language/Def/Intellisense/Peek/IDesiredHeightProvider.cs
new file mode 100644
index 0000000..281dbde
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IDesiredHeightProvider.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Indicates that an implementing object provides its height to a container.
+ /// </summary>
+ public interface IDesiredHeightProvider
+ {
+ /// <summary>
+ /// The desired height in pixels.
+ /// </summary>
+ double DesiredHeight { get; }
+
+ /// <summary>
+ /// Raised when the container should requery DesiredHeight.
+ /// </summary>
+ event EventHandler<EventArgs> DesiredHeightChanged;
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResult.cs b/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResult.cs
new file mode 100644
index 0000000..2ef136c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResult.cs
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using Microsoft.VisualStudio.Imaging.Interop;
+using Microsoft.VisualStudio.Text;
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an <see cref="IPeekResult"/> that is based on a location in a document.
+ /// </summary>
+ /// <remarks>In a typical scenario Peek service creates <see cref="IDocumentPeekResult"/> instances
+ /// representing document based results supplied by Peek providers.
+ /// </remarks>
+ [CLSCompliant(false)]
+ public interface IDocumentPeekResult : IPeekResult
+ {
+ /// <summary>
+ /// The fully qualified file path identifying the document where the result is located.
+ /// </summary>
+ string FilePath { get; }
+
+ /// <summary>
+ /// Gets a <see cref="IPersistentSpan"/> corresponding to the result location span. For example if this result corresponds
+ /// to a method, this span is the span of the method definition.
+ /// </summary>
+ IPersistentSpan Span { get; }
+
+ /// <summary>
+ /// Gets a <see cref="IPersistentSpan"/> corresponding to the span of the identifying
+ /// token inside the result location span.
+ /// For example if this result corresponds to a method, the identifying span is the
+ /// span of the method name token inside method definition span.
+ /// </summary>
+ IPersistentSpan IdentifyingSpan { get; }
+
+ /// <summary>
+ /// Gets whether this result is read-only.
+ /// </summary>
+ bool IsReadOnly { get; }
+
+ /// <summary>
+ /// Gets the display info that represents the <see cref="IDocumentPeekResult"/>, which is used to provide more indication
+ /// on the symbol this <see cref="IDocumentPeekResult"/> represents.
+ /// </summary>
+ IPeekResultDisplayInfo2 DisplayInfo2 { get; }
+
+ /// <summary>
+ /// Gets an <see cref="ImageMoniker"/> representing an image equivalent for the
+ /// <see cref="IDocumentPeekResult"/>.
+ /// </summary>
+ ImageMoniker Image { get; }
+
+ /// <summary>
+ /// Gets the Guid for the desired editor to open when navigating.
+ /// </summary>
+ Guid DesiredEditorGuid { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResultScrollState.cs b/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResultScrollState.cs
new file mode 100644
index 0000000..fb015d5
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IDocumentPeekResultScrollState.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Extends the capability of the <see cref="IPeekResultScrollState" /> to be
+ /// able to scroll and zoom any text view, rather than only the currently visible
+ /// presentation.
+ /// </summary>
+ /// <remarks>This interface is used in keeping the scroll state and zoom level consistent when a document
+ /// presented in Peek is being promoted to a full frame.</remarks>
+ public interface IDocumentPeekResultScrollState : IPeekResultScrollState
+ {
+ /// <summary>
+ /// Scrolls any text view to the the <see cref="IPeekResultScrollState"/> that
+ /// this inherits from.
+ /// </summary>
+ /// <param name="presentation">TextView to scroll.</param>
+ void RestoreScrollState(ITextView presentation);
+
+ /// <summary>
+ /// Restores zoom level in given text view.
+ /// </summary>
+ /// <param name="textView">TextView to restore zoom level in.</param>
+ void RestoreZoomState(ITextView textView);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IExternallyBrowsablePeekResult.cs b/src/Editor/Language/Def/Intellisense/Peek/IExternallyBrowsablePeekResult.cs
new file mode 100644
index 0000000..0f4aa0d
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IExternallyBrowsablePeekResult.cs
@@ -0,0 +1,13 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an <see cref="IPeekResult"/> that is not based on a location in a document, but can
+ /// be browsed externally, for example a metadata class that can only be browsed in Object Browser.
+ /// </summary>
+ public interface IExternallyBrowsablePeekResult : IPeekResult
+ {
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IFindPeekResultsCallback.cs b/src/Editor/Language/Def/Intellisense/Peek/IFindPeekResultsCallback.cs
new file mode 100644
index 0000000..22392c9
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IFindPeekResultsCallback.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a callback object provided to <see cref="IPeekResultSource"/>s to report
+ /// the state of result querying.
+ /// </summary>
+ public interface IFindPeekResultsCallback
+ {
+ /// <summary>
+ /// Reports the progress of query processing.
+ /// </summary>
+ /// <param name="percentProgress">The percentage, from 0 to 100, of a work completion.</param>
+ void ReportProgress(int percentProgress);
+
+ /// <summary>
+ /// Reports a failure of query processing.
+ /// </summary>
+ /// <param name="failure">The exception representing the deails of the failure.</param>
+ void ReportFailure(Exception failure);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekBroker.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekBroker.cs
new file mode 100644
index 0000000..91c27d3
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekBroker.cs
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a Peek broker, which is globally responsible for managing <see cref="IPeekSession"/>s.
+ /// </summary>
+ /// <remarks>This is a MEF component, and should be imported as follows:
+ /// [Import]
+ /// IPeekBroker peekBroker = null;
+ /// </remarks>
+ public interface IPeekBroker
+ {
+ /// <summary>
+ /// Starts a Peek session, assuming the caret position to be the position of a peekable symbol
+ /// on which a Peek session is requested.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger a Peek session.</param>
+ /// <param name="relationshipName">The name of the requested relationship to be explored by a Peek session.</param>
+ /// <returns>A valid Peek session. May be null if no session could be created at the caret position
+ /// for the given relationship.</returns>
+ IPeekSession TriggerPeekSession(ITextView textView, string relationshipName);
+
+ /// <summary>
+ /// Starts a Peek session at a particular position, which is assumed to be the position of a peekable symbol
+ /// on which a Peek session is requested.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger a Peek session.</param>
+ /// <param name="triggerPoint">The point in the text buffer at which a Peek session is requested.</param>
+ /// <param name="relationshipName">The name of the requested relationship to be explored by a Peek session.</param>
+ /// <returns>A valid Peek session. May be null if no session could be created at the trigger point
+ /// for the given relationship.</returns>
+ IPeekSession TriggerPeekSession(ITextView textView, ITrackingPoint triggerPoint, string relationshipName);
+
+ /// <summary>
+ /// Starts a Peek session with the specified options.
+ /// </summary>
+ /// <param name="options">The options needed to create a Peek session.</param>
+ /// <returns>
+ /// A valid Peek session. May be null if no session could be created for the
+ /// <see cref="PeekSessionCreationOptions.TriggerPoint"/> for the given <see cref="PeekSessionCreationOptions.RelationshipName"/>.
+ /// </returns>
+ IPeekSession TriggerPeekSession(PeekSessionCreationOptions options);
+
+ /// <summary>
+ /// Starts a nested Peek session, assuming the caret position to be the position of a peekable symbol
+ /// on which a nested Peek session is requested. A Peek session is considered to be nested when it's
+ /// started from a text view that represents an <see cref="IPeekResult"/> of a containing Peek session.
+ /// This method doesn't create a new Peek session though, instead it adds another <see cref="IPeekableItem"/> to
+ /// the containing session.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger a nested Peek session.</param>
+ /// <param name="relationshipName">The name of the requested relationship to be explored by a nested Peek session.</param>
+ /// <param name="containingSession">The containing Peek session.</param>
+ void TriggerNestedPeekSession(ITextView textView, string relationshipName, IPeekSession containingSession);
+
+ /// <summary>
+ /// Starts a nested Peek session at a particular position, which is assumed to be the position of a peekable symbol
+ /// on which a nested Peek session is requested. A Peek session is considered to be nested when it's
+ /// started from a text view that represents an <see cref="IPeekResult"/> of a containing Peek session.
+ /// This method doesn't create a new Peek session though, instead it adds another <see cref="IPeekableItem"/> to
+ /// the containing session.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger a Peek session.</param>
+ /// <param name="triggerPoint">The point in the text buffer at which a Peek session is requested.</param>
+ /// <param name="relationshipName">The name of the requested relationship to be explored by a Peek session.</param>
+ /// <param name="containingSession">The containing Peek session.</param>
+ void TriggerNestedPeekSession(ITextView textView, ITrackingPoint triggerPoint, string relationshipName, IPeekSession containingSession);
+
+ /// <summary>
+ /// Starts a nested Peek session, assuming the options specify a peekable symbol
+ /// on which a nested Peek session is requested. A Peek session is considered to be nested when it's
+ /// started from a text view that represents an <see cref="IPeekResult"/> of a containing Peek session.
+ /// This method doesn't create a new Peek session though, instead it adds another <see cref="IPeekableItem"/> to
+ /// the containing session.
+ /// </summary>
+ /// <param name="options">The options needed to create a Peek session.</param>
+ /// <param name="containingSession">The containing Peek session.</param>
+ void TriggerNestedPeekSession(PeekSessionCreationOptions options, IPeekSession containingSession);
+
+ /// <summary>
+ /// Determines whether a Peek session can be triggered at the caret position, without actually triggering it.
+ /// Note, that an ability to trigger a Peek session doesn't mean that when triggered the session will necessarily
+ /// provide results.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to check if a Peek session can be triggered.</param>
+ /// <param name="relationshipName">The name of the requested relationship to be explored by a Peek session.</param>
+ /// <param name="isStandaloneFilePredicate">A predicate used to determine whether given file is a standalone (not part of a project) file.</param>
+ /// <returns><c>true</c> if a Peek session can be triggered at the caret position, <c>false</c> otherwise.</returns>
+ bool CanTriggerPeekSession(ITextView textView, string relationshipName, Predicate<string> isStandaloneFilePredicate);
+
+ /// <summary>
+ /// Determines whether a Peek session can be triggered at a particular position, without actually triggering it.
+ /// Note, that an ability to trigger a Peek session doesn't mean that when triggered the session will necessarily
+ /// provide results.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to check if a Peek session can be triggered.</param>
+ /// <param name="triggerPoint">The point in the text buffer at which a Peek session is requested.</param>
+ /// <param name="relationshipName">The name of the requested relationship to be explored by a Peek session.</param>
+ /// <param name="isStandaloneFilePredicate">A predicate used to determine whether given file is a standalone (not part of a project) file.</param>
+ /// <returns><c>true</c> if a Peek session can be triggered at the position, <c>false</c> otherwise.</returns>
+ bool CanTriggerPeekSession(ITextView textView, ITrackingPoint triggerPoint, string relationshipName, Predicate<string> isStandaloneFilePredicate);
+
+ /// <summary>
+ /// Determines whether a Peek session can be triggered with the specified options, without actually triggering it.
+ /// Note, that an ability to trigger a Peek session doesn't mean that when triggered the session will necessarily
+ /// provide results.
+ /// </summary>
+ /// <param name="options">The options needed to create a Peek session.</param>
+ /// <param name="isStandaloneFilePredicate">A predicate used to determine whether given file is a standalone (not part of a project) file.</param>
+ /// <returns><c>true</c> if a Peek session can be triggered at the position, <c>false</c> otherwise.</returns>
+ bool CanTriggerPeekSession(PeekSessionCreationOptions options, Predicate<string> isStandaloneFilePredicate);
+
+ /// <summary>
+ /// Creates, but does not start a Peek session at a particular position, which is assumed to be
+ /// the position of a peekable symbol on which a Peek session is requested.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger a Peek session.</param>
+ /// <param name="triggerPoint">The point in the text buffer at which a Peek session is requested.</param>
+ /// <param name="relationshipName">The name of the requested relationship to be explored by a Peek session.</param>
+ /// <returns>A valid Peek session. May be null if no session could be created at the trigger point
+ /// for the given relationship.</returns>
+ IPeekSession CreatePeekSession(ITextView textView, ITrackingPoint triggerPoint, string relationshipName);
+
+ /// <summary>
+ /// Creates, but does not start a Peek session with the specified options.
+ /// </summary>
+ /// <param name="options">The options needed to create a Peek session.</param>
+ /// <returns>
+ /// A valid Peek session. May be null if no session could be created for the
+ /// <see cref="PeekSessionCreationOptions.TriggerPoint"/> for the given <see cref="PeekSessionCreationOptions.RelationshipName"/>.
+ /// </returns>
+ IPeekSession CreatePeekSession(PeekSessionCreationOptions options);
+
+ /// <summary>
+ /// Dismisses an active Peek session for a particular <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to dismiss an active Peek session (if any).</param>
+ void DismissPeekSession(ITextView textView);
+
+ /// <summary>
+ /// Determines whether or not a Peek session is active over the specified <see cref="ITextView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> for which to determine if Peek session is active.</param>
+ /// <returns>true if an active Peek session exists for the given <see cref="ITextView"/>, false otherwise.</returns>
+ bool IsPeekSessionActive(ITextView textView);
+
+ /// <summary>
+ /// Gets the active Peek session.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> for which to get a Peek session.</param>
+ /// <returns>The valid active Peek session for the given <see cref="ITextView"/> or null if it doesn't exist.</returns>
+ IPeekSession GetPeekSession(ITextView textView);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekRelationship.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekRelationship.cs
new file mode 100644
index 0000000..89ffa4e
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekRelationship.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a relationship between <see cref="IPeekableItem"/>s and <see cref="IPeekResult"/>s.
+ /// </summary>
+ public interface IPeekRelationship
+ {
+ /// <summary>
+ /// Gets the non-localized uniquely-identifying name of this relationship.
+ /// </summary>
+ string Name { get; }
+
+ /// <summary>
+ /// Gets a localizable description of this relationship used for displaying it to the user.
+ /// </summary>
+ string DisplayName { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResizeListener.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResizeListener.cs
new file mode 100644
index 0000000..40e45dd
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResizeListener.cs
@@ -0,0 +1,17 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Describes an object to be notified when the user resizes the Peek control.
+ /// </summary>
+ public interface IPeekResizeListener
+ {
+ /// <summary>
+ /// Gets called after the user has manually resized the Peek control.
+ /// </summary>
+ void OnResized(object sender, PeekResizeEventArgs e);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResult.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResult.cs
new file mode 100644
index 0000000..eee00b7
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResult.cs
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a single result of querying an <see cref="IPeekableItem"/> for a particular relationship.
+ /// </summary>
+ /// <remarks>In a typical scenario Peek providers create <see cref="IPeekResult"/> instances
+ /// using <see cref="IPeekResultFactory"/> to populate <see cref="IPeekResultCollection"/>.
+ /// </remarks>
+ public interface IPeekResult : IDisposable
+ {
+ /// <summary>
+ /// Determines properties used for displaying this result to the user.
+ /// </summary>
+ IPeekResultDisplayInfo DisplayInfo { get; }
+
+ /// <summary>
+ /// Determines whether this result has a place to navigate to.
+ /// </summary>
+ /// <returns>true if can navigate, false otherwise.</returns>
+ bool CanNavigateTo { get; }
+
+ /// <summary>
+ /// This function will be called directly after navigation completes (if navigation was successful).
+ /// </summary>
+ /// <remarks>
+ /// Argument 1: this <see cref="IPeekResult"/>.
+ /// Argument 2: data that this <see cref="IPeekResult"/> decides to pass in from
+ /// the results of its navigation (e.g. a handle to a newly opened text view).
+ /// Note: Argument 2 can be null if this <see cref="IPeekResult"/> has nothing to pass in.
+ /// Argument 3: data that is set by the caller of <see cref="NavigateTo(object)"/>.
+ /// </remarks>
+ Action<IPeekResult, object, object> PostNavigationCallback { get; }
+
+ /// <summary>
+ /// Navigate to the location of this result. If the navigation is succesful, then the PostNavigationCallback
+ /// will be called.
+ /// </summary>
+ /// <param name="data">
+ /// The data that is to be passed directly into the third argument of <see cref="PostNavigationCallback"/>,
+ /// if navigation is successful.
+ /// </param>
+ void NavigateTo(object data);
+
+ /// <summary>
+ /// Occurs when an <see cref="IPeekResult"/> is disposed.
+ /// </summary>
+ event EventHandler Disposed;
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultCollection.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultCollection.cs
new file mode 100644
index 0000000..49d727e
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultCollection.cs
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a collection of <see cref="IPeekResult"/>s populated by content-type specific <see cref="IPeekResultSource"/>
+ /// implementations when they are being queried for <see cref="IPeekResult"/>s.
+ /// </summary>
+ public interface IPeekResultCollection
+ {
+ /// <summary>
+ /// Gets the number of elements contained in the <see cref="IPeekResultCollection"/>.
+ /// </summary>
+ int Count { get; }
+
+ /// <summary>
+ /// Adds an item to the <see cref="IPeekResultCollection"/>.
+ /// </summary>
+ /// <param name="peekResult">The object to add to the <see cref="IPeekResultCollection"/>.</param>
+ void Add(IPeekResult peekResult);
+
+ /// <summary>
+ /// Removes all results from the <see cref="IPeekResultCollection"/>.
+ /// </summary>
+ void Clear();
+
+ /// <summary>
+ /// Determines whether the <see cref="IPeekResultCollection"/> contains a specific result.
+ /// </summary>
+ /// <param name="peekResult">The object to locate in the <see cref="IPeekResultCollection"/>.</param>
+ /// <returns><c>true</c> if the result is found in the <see cref="IPeekResultCollection"/>; <c>false</c> otherwise.</returns>
+ bool Contains(IPeekResult peekResult);
+
+ /// <summary>
+ /// Inserts a result into the collection at the specified index.
+ /// </summary>
+ /// <param name="index">The zero-based index at which the result should be inserted.</param>
+ /// <param name="peekResult">The result to insert.</param>
+ void Insert(int index, IPeekResult peekResult);
+
+ /// <summary>
+ /// Finds the index of the result or returns -1 if the result was not found.
+ /// </summary>
+ /// <param name="peekResult">The result to search for in the list.</param>
+ /// <param name="startAt">The start index for the search.</param>
+ /// <returns>The index of the result in the list, or -1 if the result was not found.</returns>
+ int IndexOf(IPeekResult peekResult, int startAt);
+
+ /// <summary>
+ /// Moves the result at the specified index to a new location in the collection.
+ /// </summary>
+ /// <param name="oldIndex">The zero-based index specifying the location of the result to be moved.</param>
+ /// <param name="newIndex">The zero-based index specifying the new location of the result.</param>
+ /// <remarks>This method inserts the result in the new location.</remarks>
+ void Move(int oldIndex, int newIndex);
+
+ /// <summary>
+ /// Removes the first occurrence of a specific result from the <see cref="IPeekResultCollection"/>.
+ /// </summary>
+ /// <param name="item">The result to remove from the <see cref="IPeekResultCollection"/></param>
+ /// <returns><c>true</c> if the result was successfully removed from the <see cref="IPeekResultCollection"/>; <c>false</c> otherwise.
+ /// This method also returns <c>false</c> if the result is not found in the <see cref="IPeekResultCollection"/>.</returns>
+ bool Remove(IPeekResult item);
+
+ /// <summary>
+ /// Removes the result at the specified index of the collection.
+ /// </summary>
+ /// <param name="index">The zero-based index of the result to remove.</param>
+ void RemoveAt(int index);
+
+ /// <summary>
+ /// Gets or sets the result at the specified index.
+ /// </summary>
+ /// <param name="index">The zero-based index of the element to get or set.</param>
+ /// <returns>The result at the specified index.</returns>
+ IPeekResult this[int index] { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultDisplayInfo.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultDisplayInfo.cs
new file mode 100644
index 0000000..24d3d21
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultDisplayInfo.cs
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Windows;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines elements of <see cref="IPeekResult"/> display information.
+ /// </summary>
+ public interface IPeekResultDisplayInfo : IDisposable
+ {
+ /// <summary>
+ /// Defines the localized label used for displaying this result to the user.
+ /// This value will be used to represent <see cref="IPeekResult"/> in the Peek control's result list.
+ /// </summary>
+ string Label { get; }
+
+ /// <summary>
+ /// Defines the localized label tooltip used for displaying this result to the user.
+ /// </summary>
+ /// <remarks>
+ /// Supported content types are strings and <see cref="UIElement" /> instances.
+ /// </remarks>
+ object LabelTooltip { get; }
+
+ /// <summary>
+ /// Defines the localized title used for displaying this result to the user.
+ /// </summary>
+ string Title { get; }
+
+ /// <summary>
+ /// Defines the localized title tooltip used for displaying this result to the user.
+ /// </summary>
+ /// // <remarks>
+ /// Supported content types are strings and <see cref="UIElement" /> instances.
+ /// </remarks>
+ object TitleTooltip { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultDisplayInfo2.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultDisplayInfo2.cs
new file mode 100644
index 0000000..73c936f
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultDisplayInfo2.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines extensions to <see cref="IPeekResultDisplayInfo"/> to provide
+ /// more information about an <see cref="IPeekResult"/>.
+ /// </summary>
+ public interface IPeekResultDisplayInfo2 : IPeekResultDisplayInfo
+ {
+ /// <summary>
+ /// Defines the first character's index of the "interesting" token in the label.
+ /// For instance, if Peek references was triggered on a method,
+ /// this would be the first character's index in the label that contains the method
+ /// name.
+ /// </summary>
+ /// <remarks>
+ /// This index is bound to <see cref="IPeekResultDisplayInfo.Label"/>.
+ /// It has nothing to do with the span of text that initialized peek.
+ /// </remarks>
+ int StartIndexOfTokenInLabel { get; set; }
+
+ /// <summary>
+ /// Defines the length of the "interesting" token in the label.
+ /// For instance, if Peek references was triggered on a method,
+ /// this would be the length of the method name.
+ /// </summary>
+ /// <remarks>
+ /// This length is bound to <see cref="IPeekResultDisplayInfo.Label"/>.
+ /// It has nothing to do with the span of text that initialized Peek session.
+ /// </remarks>
+ int LengthOfTokenInLabel { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultFactory.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultFactory.cs
new file mode 100644
index 0000000..4647b9a
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultFactory.cs
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Imaging.Interop;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a factory for creating <see cref="IPeekResult"/>s.
+ /// </summary>
+ /// <remarks>This is a MEF Component, and should be imported with the following attribute:
+ /// [Import(typeof(IPeekResultFactory))]
+ /// </remarks>
+ [CLSCompliant(false)]
+ public interface IPeekResultFactory
+ {
+ /// <summary>
+ /// Creates an instance of <see cref="IPeekResult"/> that is based on a location in a document.
+ /// </summary>
+ /// <param name="displayInfo">Defines properties used for displaying this result to the user.</param>
+ /// <param name="filePath">The fully qualified file path identifying the document where the result is located.</param>
+ /// <param name="startLine">Line number of the result location's start position.</param>
+ /// <param name="startIndex">Character index of the result location's start position.</param>
+ /// <param name="endLine">Line number of the result location's end position.</param>
+ /// <param name="endIndex">Character index of the result location's end position.</param>
+ /// <param name="idLine">Line number of the result's identifying position (e.g a position of method's name token).</param>
+ /// <param name="idIndex">Character index of the result's identifying position (e.g a position of method's name token).</param>
+ /// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
+ IDocumentPeekResult Create(IPeekResultDisplayInfo displayInfo, string filePath,
+ int startLine, int startIndex, int endLine, int endIndex,
+ int idLine, int idIndex);
+
+ /// <summary>
+ /// Creates an instance of <see cref="IPeekResult"/> that is based on a location in a document.
+ /// </summary>
+ /// <param name="displayInfo">Defines properties used for displaying this result to the user.</param>
+ /// <param name="filePath">The fully qualified file path identifying the document where the result is located.</param>
+ /// <param name="startLine">Line number of the result location's start position.</param>
+ /// <param name="startIndex">Character index of the result location's start position.</param>
+ /// <param name="endLine">Line number of the result location's end position.</param>
+ /// <param name="endIndex">Character index of the result location's end position.</param>
+ /// <param name="idLine">Line number of the result's identifying position (e.g a position of method's name token).</param>
+ /// <param name="idIndex">Character index of the result's identifying position (e.g a position of method's name token).</param>
+ /// <param name="isReadOnly">Defines whether this result is read-only.</param>
+ /// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
+ IDocumentPeekResult Create(IPeekResultDisplayInfo displayInfo, string filePath,
+ int startLine, int startIndex, int endLine, int endIndex,
+ int idLine, int idIndex,
+ bool isReadOnly);
+
+ /// <summary>
+ /// Creates an instance of <see cref="IPeekResult"/> that is based on a location in a document.
+ /// </summary>
+ /// <param name="displayInfo">Defines properties used for displaying this result to the user.</param>
+ /// <param name="image">An image representing the <see cref="IDocumentPeekResult"/>.</param>
+ /// <param name="filePath">The fully qualified file path identifying the document where the result is located.</param>
+ /// <param name="startLine">Line number of the result location's start position.</param>
+ /// <param name="startIndex">Character index of the result location's start position.</param>
+ /// <param name="endLine">Line number of the result location's end position.</param>
+ /// <param name="endIndex">Character index of the result location's end position.</param>
+ /// <param name="idStartLine">Line number of the result's identifying span's start position (e.g a position of method's name token).</param>
+ /// <param name="idStartIndex">Character index of the result's identifying span's start position (e.g a position of method's name token).</param>
+ /// <param name="idEndLine">Line number of the result's identifying span's end position.</param>
+ /// <param name="idEndIndex">Character index of the result's identifying span's end position.</param>
+ /// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
+ IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageMoniker image, string filePath,
+ int startLine, int startIndex, int endLine, int endIndex,
+ int idStartLine, int idStartIndex, int idEndLine, int idEndIndex);
+
+ /// <summary>
+ /// Creates an instance of <see cref="IPeekResult"/> that is based on a location in a document.
+ /// </summary>
+ /// <param name="displayInfo">Defines properties used for displaying this result to the user.</param>
+ /// <param name="image">An image representing the <see cref="IDocumentPeekResult"/>.</param>
+ /// <param name="filePath">The fully qualified file path identifying the document where the result is located.</param>
+ /// <param name="startLine">Line number of the result location's start position.</param>
+ /// <param name="startIndex">Character index of the result location's start position.</param>
+ /// <param name="endLine">Line number of the result location's end position.</param>
+ /// <param name="endIndex">Character index of the result location's end position.</param>
+ /// <param name="idStartLine">Line number of the result's identifying span's start position (e.g a position of method's name token).</param>
+ /// <param name="idStartIndex">Character index of the result's identifying span's start position (e.g a position of method's name token).</param>
+ /// <param name="idEndLine">Line number of the result's identifying span's end position.</param>
+ /// <param name="idEndIndex">Character index of the result's identifying span's end position.</param>
+ /// <param name="isReadOnly">Defines whether this result is read-only.</param>
+ /// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
+ IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageMoniker image, string filePath,
+ int startLine, int startIndex, int endLine, int endIndex,
+ int idStartLine, int idStartIndex, int idEndLine, int idEndIndex,
+ bool isReadOnly);
+
+ /// <summary>
+ /// Creates an instance of <see cref="IPeekResult"/> that is based on a location in a document.
+ /// </summary>
+ /// <param name="displayInfo">Defines properties used for displaying this result to the user.</param>
+ /// <param name="image">An image representing the <see cref="IDocumentPeekResult"/>.</param>
+ /// <param name="filePath">The fully qualified file path identifying the document where the result is located.</param>
+ /// <param name="startLine">Line number of the result location's start position.</param>
+ /// <param name="startIndex">Character index of the result location's start position.</param>
+ /// <param name="endLine">Line number of the result location's end position.</param>
+ /// <param name="endIndex">Character index of the result location's end position.</param>
+ /// <param name="idStartLine">Line number of the result's identifying span's start position (e.g a position of method's name token).</param>
+ /// <param name="idStartIndex">Character index of the result's identifying span's start position (e.g a position of method's name token).</param>
+ /// <param name="idEndLine">Line number of the result's identifying span's end position.</param>
+ /// <param name="idEndIndex">Character index of the result's identifying span's end position.</param>
+ /// <param name="isReadOnly">Defines whether this result is read-only.</param>
+ /// <param name="editorDestination">A Guid representing the editor the <see cref="IDocumentPeekResult"/> should navigate to.</param>
+ /// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
+ IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageMoniker image, string filePath,
+ int startLine, int startIndex, int endLine, int endIndex,
+ int idStartLine, int idStartIndex, int idEndLine, int idEndIndex,
+ bool isReadOnly, Guid editorDestination);
+
+ /// <summary>
+ /// Creates an instance of <see cref="IPeekResult"/> that is based on a location in a document.
+ /// </summary>
+ /// <param name="displayInfo">Defines properties used for displaying this result to the user.</param>
+ /// <param name="image">An image representing the <see cref="IDocumentPeekResult"/>.</param>
+ /// <param name="filePath">The fully qualified file path identifying the document where the result is located.</param>
+ /// <param name="startLine">Line number of the result location's start position.</param>
+ /// <param name="startIndex">Character index of the result location's start position.</param>
+ /// <param name="endLine">Line number of the result location's end position.</param>
+ /// <param name="endIndex">Character index of the result location's end position.</param>
+ /// <param name="idStartLine">Line number of the result's identifying span's start position (e.g a position of method's name token).</param>
+ /// <param name="idStartIndex">Character index of the result's identifying span's start position (e.g a position of method's name token).</param>
+ /// <param name="idEndLine">Line number of the result's identifying span's end position.</param>
+ /// <param name="idEndIndex">Character index of the result's identifying span's end position.</param>
+ /// <param name="isReadOnly">Defines whether this result is read-only.</param>
+ /// <param name="editorDestination">A Guid representing the editor the <see cref="IDocumentPeekResult"/> should navigate to.</param>
+ /// <param name="postNavigationCallback">Pass in a callback function to the <see cref="IPeekResult"/>.<seealso cref="IPeekResult.PostNavigationCallback"/></param>
+ /// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
+ IDocumentPeekResult Create(IPeekResultDisplayInfo2 displayInfo, ImageMoniker image, string filePath,
+ int startLine, int startIndex, int endLine, int endIndex,
+ int idStartLine, int idStartIndex, int idEndLine, int idEndIndex,
+ bool isReadOnly, Guid editorDestination, Action<IPeekResult, object, object> postNavigationCallback);
+
+ /// <summary>
+ /// Creates an instance of <see cref="IPeekResult"/> that is based on a location in a document.
+ /// </summary>
+ /// <param name="displayInfo">Defines properties used for displaying this result to the user.</param>
+ /// <param name="filePath">The fully qualified file path identifying the document where the result is located.</param>
+ /// <param name="eoiSpan">Span of the entity of interest as a character offset from the start of the buffer.</param>
+ /// <param name="idPosition">Position of the identifying position as a character offset from the start of the buffer.</param>
+ /// <param name="isReadOnly">Defines whether this result is read-only.</param>
+ /// <returns>A valid instance of the <see cref="IDocumentPeekResult"/>.</returns>
+ IDocumentPeekResult Create(IPeekResultDisplayInfo displayInfo, string filePath,
+ Span eoiSpan,
+ int idPosition,
+ bool isReadOnly);
+
+ /// <summary>
+ /// Creates an instance of <see cref="IPeekResult"/> that is not based on a location in a document, but can
+ /// be browsed externally, for example a metadata class that can only be browsed in Object Browser.
+ /// </summary>
+ /// <param name="displayInfo">Defines properties used for displaying this result to the user.</param>
+ /// <param name="browseAction">An action to browse the result externally (outside of Peek).</param>
+ /// <returns>A valid instance of the <see cref="IExternallyBrowsablePeekResult"/>.</returns>
+ IExternallyBrowsablePeekResult Create(IPeekResultDisplayInfo displayInfo, Action browseAction);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultPresentation.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultPresentation.cs
new file mode 100644
index 0000000..a21b2bc
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultPresentation.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Windows;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines WPF visual representation of an <see cref="IPeekResult"/>.
+ /// </summary>
+ /// <remarks>
+ /// A visual representation of an <see cref="IDocumentPeekResult"/> for example is
+ /// a WPF control of the IWpfTextViewHost containing an <see cref="ITextView"/>
+ /// with an open document.
+ /// </remarks>
+ public interface IPeekResultPresentation : IDisposable
+ {
+ /// <summary>
+ /// Tries to open another <see cref="IPeekResult"/> while keeping the same presentation.
+ /// For example document result presentation might check if <paramref name="otherResult"/>
+ /// represents a result in the same document and would reuse already open document.
+ /// </summary>
+ /// <param name="otherResult">Another result to be opened.</param>
+ ///<returns><c>true</c> if succeeded in opening <paramref name="otherResult"/>, <c>false</c> otherwise.</returns>
+ bool TryOpen(IPeekResult otherResult);
+
+ /// <summary>
+ /// Prepare to close the presentation.
+ /// </summary>
+ /// <returns>Returns <c>true</c> if the presentation is allowed to close; <c>false</c> otherwise.</returns>
+ /// <remarks>
+ /// <para>
+ /// This method is called with the presentation is explicitly being closed to give the user, if the presentation
+ /// corresponds to a modified document, the opportunity to save the document if desired.
+ /// </para>
+ /// <para>
+ /// If this method returns <c>true</c>, the caller must close the presentation (typically by dismissing the
+ /// containing peek session).
+ /// </para>
+ /// </remarks>
+ bool TryPrepareToClose();
+
+ /// <summary>
+ /// Creates WPF visual representation of the Peek result.
+ /// </summary>
+ /// <remarks>
+ /// An <see cref="IPeekResultPresentation"/> for an <see cref="IDocumentPeekResult"/> would
+ /// for example open document and return a WPF control of the IWpfTextViewHost.
+ /// </remarks>
+ /// <param name="session">The <see cref="IPeekSession"/> containing the Peek result.</param>
+ /// <param name="scrollState">The state that defines the desired scroll state of the result. May be null (in which case the default scroll state is used).</param>
+ /// <returns>A valid <see cref="UIElement"/> representing the Peek result.</returns>
+ object Create(IPeekSession session, IPeekResultScrollState scrollState);
+
+ /// <summary>
+ /// Scrolls open representation of the Peek result into view.
+ /// </summary>
+ /// <param name="scrollState">The state that defines the desired scroll state of the result. May be null (in which case the default scroll state is used).</param>
+ void ScrollIntoView(IPeekResultScrollState scrollState);
+
+ /// <summary>
+ /// Captures any information about the result prior to navigating to another frame (by using the peek navigation history
+ /// or doing a recursive peek).
+ /// </summary>
+ IPeekResultScrollState CaptureScrollState();
+
+ /// <summary>
+ /// Closes the represenation of the Peek result.
+ /// </summary>
+ /// <remarks>
+ /// An <see cref="IPeekResultPresentation"/> for an <see cref="IDocumentPeekResult"/> would
+ /// for example close the document in this method.
+ /// </remarks>
+ void Close();
+
+ /// <summary>
+ /// Raised when the content of the presentation needs to be recreated.
+ /// </summary>
+ event EventHandler<RecreateContentEventArgs> RecreateContent;
+
+ /// <summary>
+ /// Sets keyboard focus to the open representation of the Peek result.
+ /// </summary>
+ void SetKeyboardFocus();
+
+ /// <summary>
+ /// The ZoomLevel factor associated with the presentation.
+ /// </summary>
+ /// <remarks>
+ /// Represented as a percentage (100.0 == default).
+ /// </remarks>
+ double ZoomLevel { get; set; }
+
+ /// <summary>
+ /// Gets a value indicating whether or not this presentation is dirty.
+ /// </summary>
+ bool IsDirty { get; }
+
+ /// <summary>
+ /// Raised when <see cref="IsDirty"/> changes.
+ /// </summary>
+ event EventHandler IsDirtyChanged;
+
+ /// <summary>
+ /// Gets a value indicating whether or not this presentation is read-only.
+ /// </summary>
+ bool IsReadOnly { get; }
+
+ /// <summary>
+ /// Raised when <see cref="IsReadOnly"/> changes.
+ /// </summary>
+ event EventHandler IsReadOnlyChanged;
+
+ /// <summary>
+ /// Can this presentation be saved?
+ /// </summary>
+ /// <param name="defaultPath">Location the presentation will be saved to by default (will be null if returning false).</param>
+ bool CanSave(out string defaultPath);
+
+ /// <summary>
+ /// Save the current version of this presentation.
+ /// </summary>
+ /// <param name="saveAs">If true, ask the user for a save location.</param>
+ /// <returns>true if the save succeeded.</returns>
+ bool TrySave(bool saveAs);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultPresenter.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultPresenter.cs
new file mode 100644
index 0000000..73542fa
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultPresenter.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines <see cref="IPeekResult"/> presenter, which can create WPF visual representation of a Peek result.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// Each specific <see cref="IPeekResult"/> implementation needs an <see cref="IPeekResultPresenter"/> that
+ /// can create a visual representation of the result to be shown inside the Peek control. The Peek service exports
+ /// default <see cref="IPeekResultPresenter"/>s for known <see cref="IPeekResult"/> implementations such as
+ /// <see cref="IDocumentPeekResult"/> and <see cref="IExternallyBrowsablePeekResult"/>. When a content type specific
+ /// Peek provider provides a custom <see cref="IPeekResult"/> implementation it should also export an
+ /// <see cref="IPeekResultPresenter"/> that can create its visual representation. It is also possible to override
+ /// existing <see cref="IPeekResultPresenter"/> using the Order attribute.
+ /// </para>
+ /// <para>
+ /// This is a MEF component part, and should be exported with the following attributes:
+ /// [Export(typeof(IPeekResultPresenter))]
+ /// [Name("presenter name")]
+ /// [Order()]
+ /// Name attribute is required and Order attribute is optional.
+ /// </para>
+ /// </remarks>
+ public interface IPeekResultPresenter
+ {
+ /// <summary>
+ /// Creates <see cref="IPeekResultPresentation"/> instance for the given <see cref="IPeekResult"/>.
+ /// </summary>
+ /// <param name="result">The Peek result for which to create a visual representation.</param>
+ /// <returns>A valid <see cref="IPeekResultPresentation"/> instance or null if none could be created by this presenter.</returns>
+ IPeekResultPresentation TryCreatePeekResultPresentation(IPeekResult result);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultQuery.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultQuery.cs
new file mode 100644
index 0000000..04b8572
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultQuery.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an asynchronous query for <see cref="IPeekResult"/>s.
+ /// </summary>
+ public interface IPeekResultQuery
+ {
+ /// <summary>
+ /// An observable collection of <see cref="IPeekResult"/>s for the given query.
+ /// </summary>
+ ReadOnlyObservableCollection<IPeekResult> Results { get; }
+
+ /// <summary>
+ /// Starts the query.
+ /// </summary>
+ void Start();
+
+ /// <summary>
+ /// Cancels the query.
+ /// </summary>
+ void Cancel();
+
+ /// <summary>
+ /// Raised when the query is successfully completed.
+ /// </summary>
+ event EventHandler Completed;
+
+ /// <summary>
+ /// Raised when the query failed.
+ /// </summary>
+ event EventHandler<ExceptionEventArgs> Failed;
+
+ /// <summary>
+ /// Raised when the query progress has changed.
+ /// </summary>
+ event ProgressChangedEventHandler ProgressChanged;
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultScrollState.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultScrollState.cs
new file mode 100644
index 0000000..0136371
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultScrollState.cs
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Class that captures the state of some result displayed in Peek.
+ /// </summary>
+ public interface IPeekResultScrollState : IDisposable
+ {
+ /// <summary>
+ /// Restore the presentation to the captured state.
+ /// </summary>
+ /// <param name="presentation">Result Presentation to scroll.</param>
+ /// <remarks>
+ /// <paramref name="presentation"/> will always be the presentation
+ /// that created this via presentation.CaptureScrollState().</remarks>
+ void RestoreScrollState(IPeekResultPresentation presentation);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekResultSource.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultSource.cs
new file mode 100644
index 0000000..9fec12b
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekResultSource.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System.Threading;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an object instance that can be queried for supported relationships
+ /// and results for a particular relationship.
+ /// </summary>
+ /// <remarks>
+ /// Content-type specific Peek providers implement this interface to provide results of
+ /// querying <see cref="IPeekableItem"/> instances.
+ /// </remarks>
+ public interface IPeekResultSource
+ {
+#pragma warning disable CA1068 // CancellationToken parameters must come last
+ /// <summary>
+ /// Populates the collection of <see cref="IPeekResult"/>s for the given relationship.
+ /// </summary>
+ /// <param name="relationshipName">The case insenitive name of the relationship to be queried for results.</param>
+ /// <param name="resultCollection">Represents a collection of <see cref="IPeekResult"/>s to be populated.</param>
+ /// <param name="cancellationToken">The cancellation token used by the caller to cancel the operation.</param>
+ /// <param name="callback">The <see cref="IFindPeekResultsCallback"/> instance used to report progress and failures.</param>
+ void FindResults(string relationshipName, IPeekResultCollection resultCollection, CancellationToken cancellationToken,
+ IFindPeekResultsCallback callback);
+#pragma warning restore CA1068 // CancellationToken parameters must come last
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekSession.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekSession.cs
new file mode 100644
index 0000000..7fe7632
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekSession.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Collections.ObjectModel;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a Peek session, which is a type of IntelliSense session.
+ /// </summary>
+ /// <remarks><see cref="IPeekSession"/> instances are created and managed by the <see cref="IPeekBroker"/> service.</remarks>
+ public interface IPeekSession : IIntellisenseSession
+ {
+ /// <summary>
+ /// Gets the collection of <see cref="IPeekableItem"/> objects.
+ /// </summary>
+ ReadOnlyObservableCollection<IPeekableItem> PeekableItems { get; }
+
+ /// <summary>
+ /// Case insensitive name of the relationship to which this session pertains.
+ /// </summary>
+ string RelationshipName { get; }
+
+ /// <summary>
+ /// Starts asynchronous query for <see cref="IPeekResult"/>s for the given relationship on the given <see cref="IPeekableItem"/>.
+ /// </summary>
+ /// <param name="peekableItem">A <see cref="IPeekableItem"/> to be queried for results.</param>
+ /// <param name="relationshipName">The case insenitive name of the relationship.</param>
+ /// <returns>The <see cref="IPeekResultQuery"/> instance representing the results and state of the query.</returns>
+ IPeekResultQuery QueryPeekResults(IPeekableItem peekableItem, string relationshipName);
+
+ /// <summary>
+ /// Starts the nested Peek session, queries <see cref="IPeekableItemSource"/>s
+ /// for <see cref="IPeekableItem"/>s and raises <see cref="NestedPeekTriggered"/> event on success.
+ /// </summary>
+ /// <param name="nestedSession">The nested Peek session.</param>
+ void TriggerNestedPeekSession(IPeekSession nestedSession);
+
+ /// <summary>
+ /// Occurs when nested Peek command is triggered. In a typical case this event occurs
+ /// when Peek command is invoked on a text view that represents one of Peek results
+ /// pertaining to this Peek session.
+ /// </summary>
+ event EventHandler<NestedPeekTriggeredEventArgs> NestedPeekTriggered;
+
+ /// <summary>
+ /// Gets the <see cref="PeekSessionCreationOptions"/> that was used to create this Peek session.
+ /// </summary>
+ PeekSessionCreationOptions CreationOptions { get; }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekableItem.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekableItem.cs
new file mode 100644
index 0000000..be5a3d5
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekableItem.cs
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents an object (for instance a symbol in a document) that can be a source of a <see cref="IPeekSession"/>.
+ /// </summary>
+ /// <remarks>
+ /// Content-type specific Peek providers define concrete <see cref="IPeekableItem"/> implementations holding onto
+ /// all the context they need to provide <see cref="IPeekResult"/>s for the item referenced at the
+ /// <see cref="IPeekSession"/>'s trigger point and relationship.
+ /// When an <see cref="IPeekSession"/> is triggered, <see cref="IPeekableItemSource"/>s matching the document's
+ /// content type will be called in order (defined by the content type specificity and Order attributes) to analyze
+ /// the <see cref="IPeekSession"/>'s trigger point and relationship.
+ /// If an <see cref="IPeekableItemSource"/> recognizes the trigger point as a location of an item the provider can provide
+ /// <see cref="IPeekResult"/>s for the relationship, it creates its concrete <see cref="IPeekableItem"/> instance
+ /// capturing all the necessary context and adds it to the <see cref="IPeekSession"/>. Then the Peek provider will
+ /// be called to provide <see cref="IPeekResult"/>s given this <see cref="IPeekableItem"/> instance.
+ /// </remarks>
+ public interface IPeekableItem
+ {
+ /// <summary>
+ /// Defines the localized string used for displaying this item to the user.
+ /// </summary>
+ string DisplayName { get; }
+
+ /// <summary>
+ /// Gets an enumeration of all relationships supported by this <see cref="IPeekableItem"/> instance.
+ /// </summary>
+ IEnumerable<IPeekRelationship> Relationships { get; }
+
+ /// <summary>
+ /// Gets or creates an <see cref="IPeekResultSource"/> instance representing a source of results of querying this
+ /// <see cref="IPeekableItem"/> for the given relationship.
+ /// </summary>
+ /// <param name="relationshipName">The case insenitive name of the relationship to be queried for results.</param>
+ /// <returns>A valid <see cref="IPeekResultSource"/> instance or null if this <see cref="IPeekableItem"/> instance
+ /// can not provide results for the given relationship.</returns>
+ IPeekResultSource GetOrCreateResultSource(string relationshipName);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekableItemSource.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekableItemSource.cs
new file mode 100644
index 0000000..bdf0c0d
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekableItemSource.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides <see cref="IPeekableItem"/>s for a given content type.
+ /// </summary>
+ /// <remarks>Peek providers implement <see cref="IPeekableItemSource"/> interface and provide instances via exported
+ /// <see cref="IPeekableItemSourceProvider"/> MEF component part.</remarks>
+ public interface IPeekableItemSource : IDisposable
+ {
+ /// <summary>
+ /// Determines which <see cref="IPeekableItem"/>s should be part of the specified <see cref="IPeekSession"/>.
+ /// </summary>
+ /// <param name="session">The session for which to compute <see cref="IPeekableItem"/>s.</param>
+ /// <param name="peekableItems">The list of <see cref="IPeekableItem"/>s to add to the session.</param>
+ /// <remarks>
+ /// Each applicable <see cref="IPeekableItemSource"/> instance will be called in order when
+ /// recalculating an <see cref="IPeekSession"/>. <see cref="IPeekableItem"/>s can be added to the session by adding
+ /// them to the <paramref name="peekableItems"/> collection passed in as a parameter. In addition, by removing items
+ /// from the collection, a source may filter <see cref="IPeekableItem"/>s provided by
+ /// <see cref="IPeekableItemSource"/>s earlier in the calculation chain.
+ /// </remarks>
+ void AugmentPeekSession(IPeekSession session, IList<IPeekableItem> peekableItems);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/IPeekableItemSourceProvider.cs b/src/Editor/Language/Def/Intellisense/Peek/IPeekableItemSourceProvider.cs
new file mode 100644
index 0000000..7fa3284
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/IPeekableItemSourceProvider.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides <see cref="IPeekableItem"/> source for a text buffer.
+ /// </summary>
+ /// <remarks>
+ /// Peek providers implement and export <see cref="IPeekableItemSourceProvider"/> for the
+ /// content type they are interested to provide <see cref="IPeekableItem"/>s for.
+ /// This is a MEF component, and should be exported with the following attribute:
+ /// [Export(typeof(IPeekableItemSourceProvider))]
+ /// You must provide the ContentType and Name attributes. The Order, SupportsStandaloneFiles and SupportsPeekRelationshipAttribute
+ /// attributes are optional.
+ /// The default value of the SupportsStandaloneFiles attribute is false so if not specified the provider will be considered
+ /// not supporting standalone files.
+ /// </remarks>
+ public interface IPeekableItemSourceProvider
+ {
+ /// <summary>
+ /// Creates a <see cref="IPeekableItem"/> provider for the given text buffer.
+ /// </summary>
+ /// <param name="textBuffer">The text buffer to create a provider for.</param>
+ /// <returns>A valid <see cref="IPeekableItemSource"/> instance, or null if none could be created.</returns>
+ IPeekableItemSource TryCreatePeekableItemSource(ITextBuffer textBuffer);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/NestedPeekTriggeredEventArgs.cs b/src/Editor/Language/Def/Intellisense/Peek/NestedPeekTriggeredEventArgs.cs
new file mode 100644
index 0000000..523763c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/NestedPeekTriggeredEventArgs.cs
@@ -0,0 +1,53 @@
+using Microsoft.VisualStudio.Text;
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides information about nested Peek invocation.
+ /// </summary>
+ public class NestedPeekTriggeredEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Case insensitive name of the relationship that was used to invoke nested Peek.
+ /// </summary>
+ public string RelationshipName { get; private set; }
+
+ /// <summary>
+ /// Gets the collection of <see cref="IPeekableItem"/> objects.
+ /// </summary>
+ public IEnumerable<IPeekableItem> PeekableItems { get; private set; }
+
+ /// <summary>
+ /// Gets the <see cref="ITrackingPoint"/> at which nested Peek was invoked.
+ /// </summary>
+ public ITrackingPoint TrackingPoint { get; private set; }
+
+ /// <summary>
+ /// Creates new instance of the <see cref="NestedPeekTriggeredEventArgs"/>.
+ /// </summary>
+ /// <param name="relationshipName">Case insensitive name of the relationship that was used to invoke nested Peek.</param>
+ /// <param name="peekableItems">The list of the <see cref="IPeekableItem"/> objects that can provide results of the
+ /// nested Peek invocation.</param>
+ public NestedPeekTriggeredEventArgs(string relationshipName, ITrackingPoint trackingPoint, IEnumerable<IPeekableItem> peekableItems)
+ {
+ if (string.IsNullOrWhiteSpace(relationshipName))
+ {
+ throw new ArgumentException("cannot be null or whitespace", nameof(relationshipName));
+ }
+ if (peekableItems == null)
+ {
+ throw new ArgumentNullException(nameof(peekableItems));
+ }
+ if (trackingPoint == null)
+ {
+ throw new ArgumentNullException(nameof(trackingPoint));
+ }
+
+ RelationshipName = relationshipName;
+ PeekableItems = peekableItems;
+ TrackingPoint = trackingPoint;
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/PeekResizeEventArgs.cs b/src/Editor/Language/Def/Intellisense/Peek/PeekResizeEventArgs.cs
new file mode 100644
index 0000000..097a9f2
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/PeekResizeEventArgs.cs
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using Microsoft.VisualStudio.Text.Editor;
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Contains information describing how a user has resized the Peek control.
+ /// </summary>
+ public class PeekResizeEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Constructs a new instance of <see cref="PeekResizeEventArgs"/> with the current height of the Peek control
+ /// both in pixels and as a percentage of the containing <see cref="ITextView"/>."
+ /// </summary>
+ /// <param name="newHeightAbsolute">The height of the Peek control in pixels.</param>
+ /// <param name="newHeightProportion">The height of the Peek control as a proportion of the containing
+ /// <see cref="ITextView"/>. Valid values are between 0 and 1.</param>
+ public PeekResizeEventArgs(double newHeightAbsolute, double newHeightProportion) : base()
+ {
+ NewHeightAbsolute = newHeightAbsolute;
+ NewHeightProportion = newHeightProportion;
+ }
+
+ /// <summary>
+ /// Gets the height of the Peek control in pixels.
+ /// </summary>
+ public double NewHeightAbsolute { get; private set; }
+
+ /// <summary>
+ /// Gets the height of the Peek control as a proportion of the containing <see cref="ITextView"/>.
+ /// Values returned should fall into the range between 0 and 1.
+ /// </summary>
+ public double NewHeightProportion { get; private set; }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/Peek/PeekResultDisplayInfo.cs b/src/Editor/Language/Def/Intellisense/Peek/PeekResultDisplayInfo.cs
new file mode 100644
index 0000000..2d98930
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/PeekResultDisplayInfo.cs
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Windows;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+#pragma warning disable CA1063 // Implement IDisposable Correctly
+ /// <summary>
+ /// Defines elements of <see cref="IPeekResult"/> display information.
+ /// </summary>
+ public class PeekResultDisplayInfo : IPeekResultDisplayInfo
+#pragma warning restore CA1063 // Implement IDisposable Correctly
+ {
+ /// <summary>
+ /// Defines the localized label used for displaying this result to the user.
+ /// This value will be used to represent <see cref="IPeekResult"/> in the Peek control's result list.
+ /// </summary>
+ public string Label { get; private set; }
+
+ /// <summary>
+ /// Defines the localized label tooltip used for displaying this result to the user.
+ /// </summary>
+ /// <remarks>
+ /// Supported content types are strings and <see cref="UIElement" /> instances.
+ /// </remarks>
+ public object LabelTooltip { get; private set; }
+
+ /// <summary>
+ /// Defines the localized title used for displaying this result to the user.
+ /// </summary>
+ public string Title { get; private set; }
+
+ /// <summary>
+ /// Defines the localized title tooltip used for displaying this result to the user.
+ /// </summary>
+ /// // <remarks>
+ /// Supported content types are strings and <see cref="UIElement" /> instances.
+ /// </remarks>
+ public object TitleTooltip { get; private set; }
+
+ /// <summary>
+ /// Creates new instance of the <see cref="PeekResultDisplayInfo"/> class.
+ /// </summary>
+ public PeekResultDisplayInfo(string label, object labelTooltip, string title, string titleTooltip)
+ {
+ if (string.IsNullOrWhiteSpace(label))
+ {
+ throw new ArgumentException(nameof(label) + " cannot be null or white space");
+ }
+ if (string.IsNullOrWhiteSpace(title))
+ {
+ throw new ArgumentException(nameof(title) + " cannot be null or white space");
+ }
+
+ this.Label = label;
+ this.LabelTooltip = labelTooltip;
+ this.Title = title;
+ this.TitleTooltip = titleTooltip;
+ }
+
+#pragma warning disable CA1063 // Implement IDisposable Correctly
+ /// <summary>
+ /// Disposes the <see cref="PeekResultDisplayInfo"/> instance.
+ /// </summary>
+ public void Dispose()
+#pragma warning restore CA1063 // Implement IDisposable Correctly
+ {
+ GC.SuppressFinalize(this);
+ // Nothing to dispose.
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/PeekResultDisplayInfo2.cs b/src/Editor/Language/Def/Intellisense/Peek/PeekResultDisplayInfo2.cs
new file mode 100644
index 0000000..38e88cd
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/PeekResultDisplayInfo2.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ public class PeekResultDisplayInfo2 : PeekResultDisplayInfo, IPeekResultDisplayInfo2
+ {
+ /// <summary>
+ /// Defines the first character's index of the "interesting" token in the label.
+ /// For instance, if peek references was triggered on a method,
+ /// this would be the first character's index in the label that contains the method
+ /// name.
+ /// </summary>
+ /// <remarks>
+ /// This index is bound to <see cref="IPeekResultDisplayInfo.Label"/>.
+ /// It has nothing to do with the span of text that initialized peek.
+ /// </remarks>
+ public int StartIndexOfTokenInLabel { get; set; }
+
+ /// <summary>
+ /// Defines the length of the "interesting" token in the label.
+ /// For instance, if peek references was triggered on a method,
+ /// this would be the length of the method name.
+ /// </summary>
+ /// <remarks>
+ /// This length is bound to <see cref="IPeekResultDisplayInfo.Label"/>.
+ /// It has nothing to do with the span of text that initialized peek.
+ /// </remarks>
+ public int LengthOfTokenInLabel { get; set; }
+
+ /// <summary>
+ /// Creates new instance of the <see cref="PeekResultDisplayInfo2"/> class.
+ /// </summary>
+ public PeekResultDisplayInfo2(string label, object labelTooltip, string title, string titleTooltip, int startIndexOfTokenInLabel, int lengthOfTokenInLabel) :
+ base(label, labelTooltip, title, titleTooltip)
+ {
+ if (startIndexOfTokenInLabel < 0 || startIndexOfTokenInLabel >= label.Length)
+ {
+ throw new ArgumentOutOfRangeException(nameof(startIndexOfTokenInLabel));
+ }
+ if (lengthOfTokenInLabel < 0 || startIndexOfTokenInLabel + lengthOfTokenInLabel > label.Length)
+ {
+ throw new ArgumentOutOfRangeException(nameof(lengthOfTokenInLabel));
+ }
+
+ StartIndexOfTokenInLabel = startIndexOfTokenInLabel;
+ LengthOfTokenInLabel = lengthOfTokenInLabel;
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/PeekSessionCreationOptions.cs b/src/Editor/Language/Def/Intellisense/Peek/PeekSessionCreationOptions.cs
new file mode 100644
index 0000000..9e31ab8
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/PeekSessionCreationOptions.cs
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a set of parameters that control <see cref="IPeekSession" /> creation.
+ /// </summary>
+ public class PeekSessionCreationOptions
+ {
+ /// <summary>
+ /// This constructor produces <see cref="PeekSessionCreationOptions" /> that will create a Peek session
+ /// using the default sizing behavior.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> over which to trigger a Peek session.</param>
+ /// <param name="triggerPoint">
+ /// The point in the text buffer at which a Peek session is requested. If set to <value>null</value> the
+ /// current carat position is assumed.
+ /// </param>
+ /// <param name="defaultHeight">The default height of the Peek control.</param>
+ /// <param name="relationshipName">The name of the requested relationship to be explored by a Peek session.</param>
+ /// <param name="allowUserResize">Specifies whether the Peek control resizers should be enabled.</param>
+ /// <param name="resizeListener">A callback object that will be notified when the user resizes the Peek control.</param>
+ /// <param name="shouldFocusOnLoad">Specifies whether the Peek control should get focus when it is first loaded.</param>
+ public PeekSessionCreationOptions(
+ ITextView textView,
+ string relationshipName,
+ ITrackingPoint triggerPoint = null,
+ double? defaultHeight = null,
+ bool allowUserResize = true,
+ IPeekResizeListener resizeListener = null,
+ bool shouldFocusOnLoad = true
+ )
+ {
+ if (textView == null)
+ {
+ throw new ArgumentNullException(nameof(textView));
+ }
+
+ if (string.IsNullOrWhiteSpace(relationshipName))
+ {
+ throw new ArgumentNullException(nameof(relationshipName));
+ }
+
+ this.TextView = textView;
+
+ if (triggerPoint == null)
+ {
+ SnapshotPoint caretPosition = textView.Caret.Position.BufferPosition;
+ this.TriggerPoint = caretPosition.Snapshot.CreateTrackingPoint(caretPosition, PointTrackingMode.Negative);
+ }
+ else
+ {
+ this.TriggerPoint = triggerPoint;
+ }
+
+ this.RelationshipName = relationshipName;
+ this.DefaultHeight = defaultHeight;
+ this.AllowUserResize = allowUserResize;
+ this.ResizeListener = resizeListener;
+ this.ShouldFocusOnLoad = shouldFocusOnLoad;
+ }
+
+ /// <summary>
+ /// The <see cref="ITextView"/> over which to create a Peek session.
+ /// </summary>
+ public ITextView TextView { get; private set; }
+
+ /// <summary>
+ /// The point in the text buffer at which a Peek session is requested.
+ /// </summary>
+ public ITrackingPoint TriggerPoint { get; private set; }
+
+ /// <summary>
+ /// The name of the requested relationship to be explored by a Peek session.
+ /// </summary>
+ public string RelationshipName { get; private set; }
+
+ /// <summary>
+ /// The default height, in pixels, for the Peek control. This height
+ /// will be overridden by presentations which implement <see cref="IDesiredHeightProvider"/>. If this
+ /// is <value>null</value> then the Peek control will attempt to guess an ideal height as a
+ /// percentage of the view instead of an absolute pixel height.
+ /// </summary>
+ public double? DefaultHeight { get; private set; }
+
+ /// <summary>
+ /// Indicates whether the top and bottom resizers on the Peek control should be enabled.
+ /// </summary>
+ public bool AllowUserResize { get; private set; }
+
+ /// <summary>
+ /// If set, this contains an object that will be notified when the user resizes the Peek control.
+ /// </summary>
+ public IPeekResizeListener ResizeListener { get; private set; }
+
+ /// <summary>
+ /// Indicates whether or not the Peek control should get the user's focus when it is first loaded.
+ /// </summary>
+ public bool ShouldFocusOnLoad { get; private set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/PredefinedPeekRelationships.cs b/src/Editor/Language/Def/Intellisense/Peek/PredefinedPeekRelationships.cs
new file mode 100644
index 0000000..9404a87
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/PredefinedPeekRelationships.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System.Diagnostics.CodeAnalysis;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Predefined Peek relationships.
+ /// </summary>
+ public static class PredefinedPeekRelationships
+ {
+ /// <summary>
+ /// A relationship describing a connection between an <see cref="IPeekableItem"/> and its definition.
+ /// </summary>
+ [SuppressMessage("Microsoft.Security", "CA2104", Justification = "Read only type")]
+ public static readonly IPeekRelationship Definitions = new DefinitionRelationship();
+
+ private class DefinitionRelationship : IPeekRelationship
+ {
+ public string Name
+ {
+ get { return "IsDefinedBy"; }
+ }
+
+ public string DisplayName
+ {
+ get { return "Is Defined By"; }
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/RecreateContentEventArgs.cs b/src/Editor/Language/Def/Intellisense/Peek/RecreateContentEventArgs.cs
new file mode 100644
index 0000000..9dac8de
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/RecreateContentEventArgs.cs
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides information about a request to recreate a content of <see cref="IPeekResultPresentation"/>.
+ /// </summary>
+ public class RecreateContentEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Gets whether the Peek result's content presented by <see cref="IPeekResultPresentation"/> was deleted.
+ /// </summary>
+ public bool IsResultContentDeleted { get; private set; }
+
+ /// <summary>
+ /// Creates new instance of the <see cref="RecreateContentEventArgs"/> class.
+ /// </summary>
+ /// <param name="isResultContentDeleted">Indicates whether the Peek result's content presented by <see cref="IPeekResultPresentation"/> was deleted.</param>
+ public RecreateContentEventArgs(bool isResultContentDeleted = false)
+ {
+ IsResultContentDeleted = isResultContentDeleted;
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/SupportsPeekRelationshipAttribute.cs b/src/Editor/Language/Def/Intellisense/Peek/SupportsPeekRelationshipAttribute.cs
new file mode 100644
index 0000000..09613de
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/SupportsPeekRelationshipAttribute.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ using System;
+ using Microsoft.VisualStudio.Utilities;
+
+ /// <summary>
+ /// Use this attribute to specify that an <see cref="IPeekableItemSourceProvider"/> supports a specific <see cref="IPeekRelationship"/>.
+ /// </summary>
+ public sealed class SupportsPeekRelationshipAttribute : MultipleBaseMetadataAttribute
+ {
+ /// <summary>
+ /// Construct a new instance of the attribute.
+ /// </summary>
+ /// <param name="relationshipName">The name of the relationship that we want to mark as supported.</param>
+ /// <exception cref="ArgumentNullException"><paramref name="relationshipName"/> is null or empty.</exception>
+ public SupportsPeekRelationshipAttribute(string relationshipName)
+ {
+ if (string.IsNullOrEmpty(relationshipName))
+ {
+ throw new ArgumentException("cannot be null or whitespace", nameof(relationshipName));
+ }
+
+ this.SupportedRelationships = relationshipName;
+ }
+
+ /// <summary>
+ /// The supported relationship
+ /// </summary>
+ public string SupportedRelationships
+ {
+ get; private set;
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Peek/SupportsStandaloneFilesAttribute.cs b/src/Editor/Language/Def/Intellisense/Peek/SupportsStandaloneFilesAttribute.cs
new file mode 100644
index 0000000..a6bbde2
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Peek/SupportsStandaloneFilesAttribute.cs
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.ComponentModel.Composition;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Indicates that an <see cref="IPeekableItemSourceProvider"/> supports standalone (not part of a project) files.
+ /// The default value is false so the absense of this attribute on an <see cref="IPeekableItemSourceProvider"/> means
+ /// it doesn't support standalone files.
+ /// </summary>
+ [MetadataAttribute]
+ [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
+ public sealed class SupportsStandaloneFilesAttribute: Attribute
+ {
+ /// <summary>
+ /// Gets whether an <see cref="IPeekableItemSourceProvider"/> supports standalone (not part of a project) files.
+ /// </summary>
+ public bool SupportsStandaloneFiles { get; private set; }
+
+ /// <summary>
+ /// Creates new insatnce of the <see cref="SupportsStandaloneFilesAttribute"/> class.
+ /// </summary>
+ /// <param name="supportsStandaloneFiles">Sets whether an <see cref="IPeekableItemSourceProvider"/> supports
+ /// standalone (not part of a project) files.</param>
+ public SupportsStandaloneFilesAttribute(bool supportsStandaloneFiles)
+ {
+ this.SupportsStandaloneFiles = supportsStandaloneFiles;
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/QuerySuggestedActionCompletionStatus.cs b/src/Editor/Language/Def/Intellisense/QuerySuggestedActionCompletionStatus.cs
new file mode 100644
index 0000000..1762c7f
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/QuerySuggestedActionCompletionStatus.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+#pragma warning disable CA1717 // Only FlagsAttribute enums should have plural names
+ /// <summary>
+ /// Represents the completion status of querying LightBulb providers for suggested actions.
+ /// </summary>
+ public enum QuerySuggestedActionCompletionStatus
+#pragma warning restore CA1717 // Only FlagsAttribute enums should have plural names
+ {
+ /// <summary>
+ /// Querying LightBulb providers for suggested actions completed successfully.
+ /// </summary>
+ Completed,
+
+ /// <summary>
+ /// Querying LightBulb providers for suggested actions was cancelled.
+ /// </summary>
+ Canceled
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/SelectedSignatureChangedEventArgs.cs b/src/Editor/Language/Def/Intellisense/SelectedSignatureChangedEventArgs.cs
new file mode 100644
index 0000000..d3f8382
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/SelectedSignatureChangedEventArgs.cs
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides information about selected signature changes in signature help IntelliSense sessions.
+ /// </summary>
+ public class SelectedSignatureChangedEventArgs : EventArgs
+ {
+ private ISignature _prevSelectedSignature;
+ private ISignature _newSelectedSignature;
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="SelectedSignatureChangedEventArgs"/>.
+ /// </summary>
+ /// <param name="previousSelectedSignature">The signature that was previously selected.</param>
+ /// <param name="newSelectedSignature">The signature that is currently selected.</param>
+ public SelectedSignatureChangedEventArgs(ISignature previousSelectedSignature, ISignature newSelectedSignature)
+ {
+ _prevSelectedSignature = previousSelectedSignature;
+ _newSelectedSignature = newSelectedSignature;
+ }
+
+ /// <summary>
+ /// Gets the signature that was previously selected.
+ /// </summary>
+ public ISignature PreviousSelectedSignature
+ {
+ get { return _prevSelectedSignature; }
+ }
+
+ /// <summary>
+ /// Gets the signature that is currently selected.
+ /// </summary>
+ public ISignature NewSelectedSignature
+ {
+ get { return _newSelectedSignature; }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/SignatureHelpPresenterStyle.cs b/src/Editor/Language/Def/Intellisense/SignatureHelpPresenterStyle.cs
new file mode 100644
index 0000000..e2f2bd7
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/SignatureHelpPresenterStyle.cs
@@ -0,0 +1,76 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System.Windows.Media;
+using System.Windows.Media.TextFormatting;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ ///<summary>
+ /// Defines a set of properties that will be used to style the default signature help presenter.
+ ///</summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attributes:
+ /// [Export(typeof(SignatureHelpPresenterStyle))]
+ /// [ContentType]
+ /// [Name]
+ /// [Order]
+ /// All exports of this component part should be ordered after the "default" signature help presenter style. At a minimum,
+ /// this means adding [Order(After="default")] to the export metadata.
+ /// </remarks>
+ public class SignatureHelpPresenterStyle
+ {
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the foreground of the signature help presenter.
+ /// </summary>
+ public virtual Brush ForegroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the borders in the signature help presenter.
+ /// </summary>
+ public virtual Brush BorderBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the background of the signature help presenter.
+ /// </summary>
+ public virtual Brush BackgroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a string that identifies the appearance category for the <see cref="ITextView"/>s displayed in the default
+ /// signature help presenter.
+ /// </summary>
+ /// <remarks>
+ /// Manipulating this value will change the classification format map used in the translation of classification types to
+ /// classification formats in the signature <see cref="ITextView"/>.
+ /// </remarks>
+ public virtual string SignatureAppearanceCategory { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to format the text of up/down signature spinner.
+ /// </summary>
+ public virtual TextRunProperties UpDownSignatureTextRunProperties { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to format the text of the signature documentation.
+ /// </summary>
+ public virtual TextRunProperties SignatureDocumentationTextRunProperties { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to format the text of the current parameter name.
+ /// </summary>
+ public virtual TextRunProperties CurrentParameterNameTextRunProperties { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to format the text of the current parameter documentation.
+ /// </summary>
+ public virtual TextRunProperties CurrentParameterDocumentationTextRunProperties { get; protected set; }
+
+ /// <summary>
+ /// Gets a value determining whether or not gradients should be used in the presentation of a
+ /// <see cref="ISignatureHelpSession"/>.
+ /// </summary>
+ public virtual bool? AreGradientsAllowed { get; protected set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/StandardGlyphGroup.cs b/src/Editor/Language/Def/Intellisense/StandardGlyphGroup.cs
new file mode 100644
index 0000000..0acea01
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/StandardGlyphGroup.cs
@@ -0,0 +1,392 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Describes the different types of glyphs that can be displayed in the default completion tool implementation.
+ /// </summary>
+ public enum StandardGlyphGroup
+ {
+ /// <summary>
+ /// Describes symbols for classes.
+ /// </summary>
+ GlyphGroupClass = 0,
+
+ /// <summary>
+ /// Describes symbols for constants.
+ /// </summary>
+ GlyphGroupConstant = 6,
+
+ /// <summary>
+ /// Describes symbols for delegates.
+ /// </summary>
+ GlyphGroupDelegate = 12,
+
+ /// <summary>
+ /// Describes symbols for enumerations.
+ /// </summary>
+ GlyphGroupEnum = 18,
+
+ /// <summary>
+ /// Describes symbols for enumeration members.
+ /// </summary>
+ GlyphGroupEnumMember = 24,
+
+ /// <summary>
+ /// Describes symbols for events.
+ /// </summary>
+ GlyphGroupEvent = 30,
+
+ /// <summary>
+ /// Describes symbols for exceptions.
+ /// </summary>
+ GlyphGroupException = 36,
+
+ /// <summary>
+ /// Describes symbols for fields.
+ /// </summary>
+ GlyphGroupField = 42,
+
+ /// <summary>
+ /// Describes symbols for interfaces.
+ /// </summary>
+ GlyphGroupInterface = 48,
+
+ /// <summary>
+ /// Describes symbols for macros.
+ /// </summary>
+ GlyphGroupMacro = 54,
+
+ /// <summary>
+ /// Describes symbols for maps.
+ /// </summary>
+ GlyphGroupMap = 60,
+
+ /// <summary>
+ /// Describes symbols for map items.
+ /// </summary>
+ GlyphGroupMapItem = 66,
+
+ /// <summary>
+ /// Describes symbols for methods.
+ /// </summary>
+ GlyphGroupMethod = 72,
+
+ /// <summary>
+ /// Describes symbols for overloads.
+ /// </summary>
+ GlyphGroupOverload = 78,
+
+ /// <summary>
+ /// Describes symbols for modules.
+ /// </summary>
+ GlyphGroupModule = 84,
+
+ /// <summary>
+ /// Describes symbols for namespaces.
+ /// </summary>
+ GlyphGroupNamespace = 90,
+
+ /// <summary>
+ /// Describes symbols for operators.
+ /// </summary>
+ GlyphGroupOperator = 96,
+
+ /// <summary>
+ /// Describes symbols for properties.
+ /// </summary>
+ GlyphGroupProperty = 102,
+
+ /// <summary>
+ /// Describes symbols for structs.
+ /// </summary>
+ GlyphGroupStruct = 108,
+
+ /// <summary>
+ /// Describes symbols for templates.
+ /// </summary>
+ GlyphGroupTemplate = 114,
+
+ /// <summary>
+ /// Describes symbols for typedefs.
+ /// </summary>
+ GlyphGroupTypedef = 120,
+
+ /// <summary>
+ /// Describes symbols for types.
+ /// </summary>
+ GlyphGroupType = 126,
+
+ /// <summary>
+ /// Describes symbols for unions.
+ /// </summary>
+ GlyphGroupUnion = 132,
+
+ /// <summary>
+ /// Describes symbols for variables.
+ /// </summary>
+ GlyphGroupVariable = 138,
+
+ /// <summary>
+ /// Describes symbols for value types.
+ /// </summary>
+ GlyphGroupValueType = 144,
+
+ /// <summary>
+ /// Describes intrinsic symbols.
+ /// </summary>
+ GlyphGroupIntrinsic = 150,
+
+ /// <summary>
+ /// Describes symbols for J# methods.
+ /// </summary>
+ GlyphGroupJSharpMethod = 156,
+
+ /// <summary>
+ /// Describes symbols for J# fields.
+ /// </summary>
+ GlyphGroupJSharpField = 162,
+
+ /// <summary>
+ /// Describes symbols for J# classes.
+ /// </summary>
+ GlyphGroupJSharpClass = 168,
+
+ /// <summary>
+ /// Describes symbols for J# namespaces.
+ /// </summary>
+ GlyphGroupJSharpNamespace = 174,
+
+ /// <summary>
+ /// Describes symbols for J# interfaces.
+ /// </summary>
+ GlyphGroupJSharpInterface = 180,
+
+ /// <summary>
+ /// Describes symbols for errors.
+ /// </summary>
+ GlyphGroupError = 186,
+
+ /// <summary>
+ /// Describes symbols for BSC files.
+ /// </summary>
+ GlyphBscFile = 191,
+
+ /// <summary>
+ /// Describes symbols for assemblies.
+ /// </summary>
+ GlyphAssembly = 192,
+
+ /// <summary>
+ /// Describes symbols for libraries.
+ /// </summary>
+ GlyphLibrary = 193,
+
+ /// <summary>
+ /// Describes symbols for VB projects.
+ /// </summary>
+ GlyphVBProject = 194,
+
+ /// <summary>
+ /// Describes symbols for C# projects.
+ /// </summary>
+ GlyphCoolProject = 196,
+
+ /// <summary>
+ /// Describes symbols for C++ projects.
+ /// </summary>
+ GlyphCppProject = 199,
+
+ /// <summary>
+ /// Describes symbols for dialog identifiers.
+ /// </summary>
+ GlyphDialogId = 200,
+
+ /// <summary>
+ /// Describes symbols for open folders.
+ /// </summary>
+ GlyphOpenFolder = 201,
+
+ /// <summary>
+ /// Describes symbols for closed folders.
+ /// </summary>
+ GlyphClosedFolder = 202,
+
+ /// <summary>
+ /// Describes arrow symbols.
+ /// </summary>
+ GlyphArrow = 203,
+
+ /// <summary>
+ /// Describes symbols for C# files.
+ /// </summary>
+ GlyphCSharpFile = 204,
+
+ /// <summary>
+ /// Describes symbols for C# expansions.
+ /// </summary>
+ GlyphCSharpExpansion = 205,
+
+ /// <summary>
+ /// Describes symbols for keywords.
+ /// </summary>
+ GlyphKeyword = 206,
+
+ /// <summary>
+ /// Describes symbols for information.
+ /// </summary>
+ GlyphInformation = 207,
+
+ /// <summary>
+ /// Describes symbols for references.
+ /// </summary>
+ GlyphReference = 208,
+
+ /// <summary>
+ /// Describes symbols for recursion.
+ /// </summary>
+ GlyphRecursion = 209,
+
+ /// <summary>
+ /// Describes symbols for XML items.
+ /// </summary>
+ GlyphXmlItem = 210,
+
+ /// <summary>
+ /// Describes symbols for J# projects.
+ /// </summary>
+ GlyphJSharpProject = 211,
+
+ /// <summary>
+ /// Describes symbols for J# documents.
+ /// </summary>
+ GlyphJSharpDocument = 212,
+
+ /// <summary>
+ /// Describes symbols for forwarded types.
+ /// </summary>
+ GlyphForwardType = 213,
+
+ /// <summary>
+ /// Describes symbols for callers graphs.
+ /// </summary>
+ GlyphCallersGraph = 214,
+
+ /// <summary>
+ /// Describes symbols for call graphs.
+ /// </summary>
+ GlyphCallGraph = 215,
+
+ /// <summary>
+ /// Describes symbols for build warnings.
+ /// </summary>
+ GlyphWarning = 216,
+
+ /// <summary>
+ /// Describes symbols for something that may be a reference.
+ /// </summary>
+ GlyphMaybeReference = 217,
+
+ /// <summary>
+ /// Describes symbols for something that may be a caller.
+ /// </summary>
+ GlyphMaybeCaller = 218,
+
+ /// <summary>
+ /// Describes symbols for something that may be a call.
+ /// </summary>
+ GlyphMaybeCall = 219,
+
+ /// <summary>
+ /// Describes symbols for extension methods.
+ /// </summary>
+ GlyphExtensionMethod = 220,
+
+ /// <summary>
+ /// Describes symbols for internal extension methods.
+ /// </summary>
+ GlyphExtensionMethodInternal = 221,
+
+ /// <summary>
+ /// Describes symbols for friend extension methods.
+ /// </summary>
+ GlyphExtensionMethodFriend = 222,
+
+ /// <summary>
+ /// Describes symbols for protected extension methods.
+ /// </summary>
+ GlyphExtensionMethodProtected = 223,
+
+ /// <summary>
+ /// Describes symbols for private extension methods.
+ /// </summary>
+ GlyphExtensionMethodPrivate = 224,
+
+ /// <summary>
+ /// Describes symbols for extension method shortcuts.
+ /// </summary>
+ GlyphExtensionMethodShortcut = 225,
+
+ /// <summary>
+ /// Describes symbols for XML attributes.
+ /// </summary>
+ GlyphXmlAttribute = 226,
+
+ /// <summary>
+ /// Describes symbols for child XML elements.
+ /// </summary>
+ GlyphXmlChild = 227,
+
+ /// <summary>
+ /// Describes symbols for descendant XML elements.
+ /// </summary>
+ GlyphXmlDescendant = 228,
+
+ /// <summary>
+ /// Describes symbols for XML namespaces.
+ /// </summary>
+ GlyphXmlNamespace = 229,
+
+ /// <summary>
+ /// Describes symbols with a question mark for XML attributes.
+ /// </summary>
+ GlyphXmlAttributeQuestion = 230,
+
+ /// <summary>
+ /// Describes symbols with a check mark for XML attributes.
+ /// </summary>
+ GlyphXmlAttributeCheck = 231,
+
+ /// <summary>
+ /// Describes symbols with a question mark for XML child elements.
+ /// </summary>
+ GlyphXmlChildQuestion = 232,
+
+ /// <summary>
+ /// Describes symbols with a check mark for XML child elements.
+ /// </summary>
+ GlyphXmlChildCheck = 233,
+
+ /// <summary>
+ /// Describes symbols with a question mark for XML descendant elements.
+ /// </summary>
+ GlyphXmlDescendantQuestion = 234,
+
+ /// <summary>
+ /// Describes symbols with a check mark for XML descendant elements.
+ /// </summary>
+ GlyphXmlDescendantCheck = 235,
+
+ /// <summary>
+ /// Describes symbols for completion warnings.
+ /// </summary>
+ GlyphCompletionWarning = 236,
+
+ /// <summary>
+ /// Describes symbols for unknown types.
+ /// </summary>
+ GlyphGroupUnknown = 237
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/StandardGlyphItem.cs b/src/Editor/Language/Def/Intellisense/StandardGlyphItem.cs
new file mode 100644
index 0000000..0a15195
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/StandardGlyphItem.cs
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Describes icons or glyphs that are used in statement completion.
+ /// </summary>
+ public enum StandardGlyphItem
+ {
+ /// <summary>
+ /// Describes a public symbol.
+ /// </summary>
+ GlyphItemPublic,
+
+ /// <summary>
+ /// Describes an internal symbol.
+ /// </summary>
+ GlyphItemInternal,
+
+ /// <summary>
+ /// Describes a friend symbol.
+ /// </summary>
+ GlyphItemFriend,
+
+ /// <summary>
+ /// Describes a protected symbol.
+ /// </summary>
+ GlyphItemProtected,
+
+ /// <summary>
+ /// Describes a private symbol.
+ /// </summary>
+ GlyphItemPrivate,
+
+ /// <summary>
+ /// Describes a shortcut symbol.
+ /// </summary>
+ GlyphItemShortcut,
+
+ /// <summary>
+ /// Describes a symbol that has all (or none) of the standard attributes.
+ /// </summary>
+ TotalGlyphItems
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction.cs
new file mode 100644
index 0000000..4e84126
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction.cs
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using Microsoft.VisualStudio.Imaging.Interop;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// A possible action suggested to be performed. Examples of such suggested
+ /// actions include quick fixes for syntax errors, suggestions aimed on improving
+ /// code quality or refactorings.
+ /// Suggested actions are provided by <see cref="ISuggestedActionsSource"/> instances
+ /// and represented by a LightBulb presenter as menu items in a LightBulb dropdown menu.
+ /// </summary>
+ [CLSCompliant(false)]
+ public interface ISuggestedAction : IDisposable, ITelemetryIdProvider<Guid>
+ {
+ /// <summary>
+ /// Gets whether this action has nested suggested action sets.
+ /// </summary>
+ /// <remarks>This property is expected to be fast so if calculating the return value is not trivial it's recommended to
+ /// just return <c>true</c> and delay evaluating real list of nested actions until
+ /// <see cref="GetActionSetsAsync(CancellationToken)"/> method is called. In other words, the scenario of <see cref="HasActionSets"/>
+ /// returning <c>true</c> and <see cref="GetActionSetsAsync(CancellationToken)"/> returning null or empty list is supported.
+ /// On the other hand, if this property returns <c>false</c>, <see cref="GetActionSetsAsync(CancellationToken)"/> method
+ /// will not be called.</remarks>
+ bool HasActionSets { get; }
+
+ /// <summary>
+ /// Gets a list of nested sets of suggested actions.
+ /// </summary>
+ /// <returns>A task whose result is either a list of <see cref="SuggestedActionSet"/>s representing nested suggested actions,
+ /// or null if this <see cref="ISuggestedAction"/> instance has no nested suggested actions.</returns>
+ Task<IEnumerable<SuggestedActionSet>> GetActionSetsAsync(CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the localized text representing the suggested action.
+ /// </summary>
+ /// <remarks>This property should never be null.</remarks>
+ string DisplayText { get; }
+
+ /// <summary>
+ /// Gets an optional icon representing the suggested action or null if this suggested
+ /// action doesn't have an icon.
+ /// </summary>
+ ImageMoniker IconMoniker { get; }
+
+ /// <summary>
+ /// Gets the text to be used as the automation name for the icon when it's displayed.
+ /// </summary>
+ /// <remarks>For accessibility reasons this property should not be null if the icon is specified.</remarks>
+ string IconAutomationText { get; }
+
+ /// <summary>
+ /// Gets the text describing an input gesture that will apply the suggested action.
+ /// </summary>
+ string InputGestureText { get; }
+
+ /// <summary>
+ /// Gets whether this suggested action can provide a preview via <see cref="GetPreviewAsync(CancellationToken)"/> method call.
+ /// </summary>
+ /// <remarks>This property is expected to be fast so if calculating the return value is not trivial it's recommended to
+ /// just return <c>true</c> and delay evaluating whether a preview can be provided until
+ /// <see cref="GetPreviewAsync(CancellationToken)"/> method is called. In other words, the scenario of <see cref="HasPreview"/>
+ /// returning <c>true</c> and <see cref="GetPreviewAsync(CancellationToken)"/> returning null is supported.
+ /// On the other hand, if this property returns <c>false</c>, <see cref="GetPreviewAsync(CancellationToken)"/> method
+ /// will not be called.</remarks>
+ bool HasPreview { get; }
+
+ /// <summary>
+ /// Gets an object visually representing a preview of the suggested action.
+ /// </summary>
+ /// <param name="cancellationToken">A cancellation token that allows to cancel preview creation.</param>
+ /// <remarks>
+ /// <para>The only currently supported type of preview object is <see cref="UIElement" />.</para>
+ /// <para>By default preview panel gets highlighted when focused by setting background color to
+ /// <see cref="LightBulbPresenterStyle.PreviewFocusBackgroundBrush"/>. When providing a preview object make sure
+ /// it doesn't set different background for the whole preview content, otherwise it's recommended that preview
+ /// object indicates focused state using <see cref="LightBulbPresenterStyle.PreviewFocusBackgroundBrush"/> color.</para>
+ /// </remarks>
+ /// <returns>A task whose result is an object visually representing a preview of the suggested action, or null if no preview can be provided.</returns>
+ Task<object> GetPreviewAsync(CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Invokes the suggested action.
+ /// </summary>
+ /// <param name="cancellationToken">A cancellation token that allows cancel of action invocation.</param>
+ void Invoke(CancellationToken cancellationToken);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction2.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction2.cs
new file mode 100644
index 0000000..42e312c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedAction2.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Extends <see cref="ISuggestedAction"/> by providing support for <see cref="DisplayTextSuffix"/> property.
+ /// </summary>
+ [CLSCompliant(false)]
+ public interface ISuggestedAction2 : ISuggestedAction
+ {
+ /// <summary>
+ /// Gets the localized text representing a suffix to be added to the <see cref="ISuggestedAction.DisplayText"/>.
+ /// </summary>
+ string DisplayTextSuffix { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategory.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategory.cs
new file mode 100644
index 0000000..9a870d5
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategory.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ public interface ISuggestedActionCategory
+ {
+ /// <summary>
+ /// The unique name of the <see cref="ISuggestedActionCategory"/>.
+ /// </summary>
+ /// <value>This name must be unique, and must not be null.</value>
+ /// <remarks>Comparisons performed on this name are case-insensitive.</remarks>
+ string CategoryName { get; }
+
+ /// <summary>
+ /// The localized display name of the <see cref="ISuggestedActionCategory"/>.
+ /// </summary>
+ string DisplayName { get; }
+
+ /// <summary>
+ /// Returns <c>true</c> if this <see cref="ISuggestedActionCategory"/>
+ /// derives from the category specified by <paramref name="category"/>.
+ /// </summary>
+ /// <param name="category">The name of the base category.</param>
+ /// <returns><c>true</c> if this category derives from the one specified by <paramref name="category"/>, otherwise <c>false</c>.</returns>
+ bool IsOfCategory(string category);
+
+ /// <summary>
+ /// The set of all categories from which the current <see cref="ISuggestedActionCategory"></see> is derived.
+ /// </summary>
+ /// <value>This value is never null, though it may be an empty set.</value>
+ IEnumerable<ISuggestedActionCategory> BaseCategories { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategoryRegistryService.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategoryRegistryService.cs
new file mode 100644
index 0000000..7ba94a3
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategoryRegistryService.cs
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// The service that maintains the collection of suggested action categories.
+ /// </summary>
+ /// <remarks>This is a MEF component part, and should be exported with the following attribute:
+ /// [Export(typeof(ISuggestedActionCategoryRegistryService))]
+ /// </remarks>
+ public interface ISuggestedActionCategoryRegistryService
+ {
+ /// <summary>
+ /// Gets the <see cref="ISuggestedActionCategory"></see> object with the specified <paramref name="categoryName"/>.
+ /// </summary>
+ /// <param name="categoryName">The name of the category. Name comparisons are case-insensitive.</param>
+ /// <returns>The category, or null if no category is found.</returns>
+ ISuggestedActionCategory GetCategory(string categoryName);
+
+ /// <summary>
+ /// Gets an enumeration of all categories, including the "unknown" category.
+ /// </summary>
+ IEnumerable<ISuggestedActionCategory> Categories { get; }
+
+ /// <summary>
+ /// Creates a new <see cref="ISuggestedActionCategorySet"/> containing given categories.
+ /// </summary>
+ /// <param name="categories">A list of categories to be included into the set.</param>
+ /// <returns>An instance of <see cref="ISuggestedActionCategorySet"/> containing given categories.</returns>
+ ISuggestedActionCategorySet CreateSuggestedActionCategorySet(IEnumerable<string> categories);
+
+ /// <summary>
+ /// Creates a new <see cref="ISuggestedActionCategorySet"/> containing given categories.
+ /// </summary>
+ /// <param name="categories">A list of categories to be included into the set.</param>
+ /// <returns>An instance of <see cref="ISuggestedActionCategorySet"/> containing given categories.</returns>
+ ISuggestedActionCategorySet CreateSuggestedActionCategorySet(params string[] categories);
+
+ /// <summary>
+ /// A predefined <see cref="ISuggestedActionCategorySet"/> containing any category.
+ /// </summary>
+ ISuggestedActionCategorySet Any { get; }
+
+ /// <summary>
+ /// A predefined <see cref="ISuggestedActionCategorySet"/> containing code fixes category.
+ /// </summary>
+ ISuggestedActionCategorySet AllCodeFixes { get; }
+
+ /// <summary>
+ /// A predefined <see cref="ISuggestedActionCategorySet"/> containing all refactorings category.
+ /// </summary>
+ ISuggestedActionCategorySet AllRefactorings { get; }
+
+ /// <summary>
+ /// A predefined <see cref="ISuggestedActionCategorySet"/> containing all code fixes and refactorings category.
+ /// </summary>
+ ISuggestedActionCategorySet AllCodeFixesAndRefactorings { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategoryRegistryService2.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategoryRegistryService2.cs
new file mode 100644
index 0000000..5edd521
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategoryRegistryService2.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ using System;
+ using System.Collections.Generic;
+ using Microsoft.VisualStudio.Utilities;
+
+ /// <summary>
+ /// The service that maintains the collection of suggested action categories.
+ /// </summary>
+ /// <remarks>This is a MEF component part, and should be exported with the following attribute:
+ /// [Export(typeof(ISuggestedActionCategoryRegistryService2))]
+ /// </remarks>
+ [CLSCompliant(false)]
+ public interface ISuggestedActionCategoryRegistryService2 : ISuggestedActionCategoryRegistryService
+ {
+ /// <summary>
+ /// Accepts an <see cref="ISuggestedActionCategorySet"/> of <see cref="ISuggestedActionCategory"/>s and
+ /// sorts them in order from highest to lowest precedence.
+ /// </summary>
+ /// <remarks>
+ /// Precedence is defined by <see cref="OrderAttribute"/>s present on <see cref="SuggestedActionCategoryDefinition"/>s.
+ /// </remarks>
+ /// <param name="categorySet">A set of categories to sort.</param>
+ /// <returns>An enumerable of sorted categories.</returns>
+ IEnumerable<ISuggestedActionCategory> OrderCategoriesByPrecedence(ISuggestedActionCategorySet categorySet);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategorySet.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategorySet.cs
new file mode 100644
index 0000000..d5be4ad
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionCategorySet.cs
@@ -0,0 +1,20 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+#pragma warning disable CA1710 // Identifiers should have correct suffix
+ /// <summary>
+ /// Represents a set of suggested action category names.
+ /// </summary>
+ public interface ISuggestedActionCategorySet : IEnumerable<string>
+#pragma warning restore CA1710 // Identifiers should have correct suffix
+ {
+ /// <summary>
+ /// Determines whether the given suggested action category is a member of the set.
+ /// </summary>
+ bool Contains(string categoryName);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionWithFlavors.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionWithFlavors.cs
new file mode 100644
index 0000000..84902f9
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionWithFlavors.cs
@@ -0,0 +1,16 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// A suggested action that contains nested set of suggested actions
+ /// representing flavors of their parent action.
+ /// </summary>
+ [CLSCompliant(false)]
+ public interface ISuggestedActionWithFlavors : ISuggestedAction
+ {
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSource.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSource.cs
new file mode 100644
index 0000000..6d7853d
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSource.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a provider of suggested actions for a span of text in a <see cref="ITextBuffer" />.
+ /// <see cref="ISuggestedActionsSource"/> instances are created by <see cref="ISuggestedActionsSourceProvider"/>
+ /// MEF components matching text buffer's content type.
+ /// </summary>
+ [CLSCompliant(false)]
+ public interface ISuggestedActionsSource : IDisposable, ITelemetryIdProvider<Guid>
+ {
+ /// <summary>
+ /// Raised when a list of available suggested actions have changed.
+ /// </summary>
+ event EventHandler<EventArgs> SuggestedActionsChanged;
+
+ /// <summary>
+ /// Synchronously returns a list of suggested actions for a given span of text.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="range">A span of text in the <see cref="ITextBuffer" /> over which to return suggested actions.</param>
+ /// <param name="cancellationToken">A cancellation token that allows to cancel getting list of suggested actions.</param>
+ /// <returns>A list of suggested actions or null if no actions can be suggested for a given span of text in the <see cref="ITextBuffer" /></returns>
+ IEnumerable<SuggestedActionSet> GetSuggestedActions(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Asynchronously indicates whether this provider can provide any suggested actions for a given span of text in the <see cref="ITextBuffer" />.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="range">A span of text in the <see cref="ITextBuffer" /> over which to check for suggested actions.</param>
+ /// <param name="cancellationToken">A cancellation token that allows to cancel checking for suggested actions.</param>
+ /// <returns>A <see cref="Task"/> instance that when completed returns true if any suggested
+ /// actions can be provided or false otherwise.</returns>
+ Task<bool> HasSuggestedActionsAsync(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSource2.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSource2.cs
new file mode 100644
index 0000000..d97e24c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSource2.cs
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ using System;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using Microsoft.VisualStudio.Text;
+
+ /// <summary>
+ /// Represents a provider of suggested actions for a span of text in a <see cref="ITextBuffer" />.
+ /// <see cref="ISuggestedActionsSource"/> instances are created by <see cref="ISuggestedActionsSourceProvider"/>
+ /// MEF components matching text buffer's content type.
+ /// </summary>
+ [CLSCompliant(false)]
+ public interface ISuggestedActionsSource2 : ISuggestedActionsSource
+ {
+ /// <summary>
+ /// Gets a <see cref="ISuggestedActionCategorySet"/> which are known to have <see cref="ISuggestedAction"/>s
+ /// which are applicable to the span of text defined by <paramref name="range"/>.
+ /// </summary>
+ /// <param name="requestedActionCategories">A set of suggested action categories requested.</param>
+ /// <param name="range">A span of text in the <see cref="ITextBuffer" /> over which to return suggested actions.</param>
+ /// <param name="cancellationToken">A cancellation token that allows to cancel getting list of suggested actions.</param>
+ /// <returns>
+ /// A <see cref="ISuggestedActionCategorySet"/> containing the set of categories with actions applicable to <paramref name="range"/>.
+ /// Implementers are encouraged to use the predefined sets on <see cref="ISuggestedActionCategoryRegistryService"/>.
+ /// </returns>
+ /// <remarks>
+ /// Usage of this method supersedes
+ /// <see cref="ISuggestedActionsSource.HasSuggestedActionsAsync(ISuggestedActionCategorySet, SnapshotSpan, CancellationToken)"/>.
+ /// Implementers must return this same set of categories from
+ /// <see cref="ISuggestedActionsSource.GetSuggestedActions(ISuggestedActionCategorySet, SnapshotSpan, CancellationToken)"/>,
+ /// mapping each category to an ISuggestedActionSet containing all of the actions for that category.
+ /// </remarks>
+ Task<ISuggestedActionCategorySet> GetSuggestedActionCategoriesAsync(
+ ISuggestedActionCategorySet requestedActionCategories,
+ SnapshotSpan range,
+ CancellationToken cancellationToken);
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSourceProvider.cs b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSourceProvider.cs
new file mode 100644
index 0000000..8190a34
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/ISuggestedActionsSourceProvider.cs
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a provider of a suggested actions source.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following attribute:
+ /// [Export(typeof(ISuggestedActionsSourceProvider))]
+ /// [Order]
+ /// [Name]
+ /// [ContentType]
+ /// You must specify the ContentType so that the source provider creates sources for buffers of content types that it
+ /// recognizes, and Order to specify the order in which the sources are called.
+ /// </remarks>
+ [CLSCompliant(false)]
+ public interface ISuggestedActionsSourceProvider
+ {
+ /// <summary>
+ /// Creates suggested actions source for a given text buffer.
+ /// </summary>
+ /// <param name="textView">The text view for which to create a suggested actions source.</param>
+ /// <param name="textBuffer">The text buffer for which to create a suggested actions source.</param>
+ /// <returns>The <see cref="ISuggestedActionsSource"/>, or null if no suggested actions source could be created.</returns>
+ ISuggestedActionsSource CreateSuggestedActionsSource(ITextView textView, ITextBuffer textBuffer);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/PredefinedSuggestedActionCategoryNames.cs b/src/Editor/Language/Def/Intellisense/Suggestions/PredefinedSuggestedActionCategoryNames.cs
new file mode 100644
index 0000000..be8155c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/PredefinedSuggestedActionCategoryNames.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a set of predefined suggested action category names.
+ /// </summary>
+ public static class PredefinedSuggestedActionCategoryNames
+ {
+ /// <summary>
+ /// A root category that include any suggested action.
+ /// </summary>
+ public const string Any = "Any";
+
+ /// <summary>
+ /// A category of suggested actions aimed to fix code issues.
+ /// </summary>
+ public const string CodeFix = "CodeFix";
+
+ /// <summary>
+ /// A category of suggested actions aimed to fix errors.
+ /// </summary>
+ public const string ErrorFix = "ErrorFix";
+
+ /// <summary>
+ /// A category of suggested actions aimed to fix style violations.
+ /// </summary>
+ public const string StyleFix = "StyleFix";
+
+ /// <summary>
+ /// A category of suggested actions aimed to suggest a code refactoring.
+ /// </summary>
+ public const string Refactoring = "Refactoring";
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryDefinition.cs b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryDefinition.cs
new file mode 100644
index 0000000..832620c
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryDefinition.cs
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Defines a suggested action category.
+ /// </summary>
+ /// <remarks>
+ /// Because you cannot subclass this type, you should use the [Export] attribute with no type.
+ /// </remarks>
+ /// <code>
+ /// internal sealed class Components
+ /// {
+ /// [Export]
+ /// [Name(PredefinedSuggestedActionCategoryNames.ErrorFix)] // required
+ /// [BaseDefinition(PredefinedSuggestedActionCategoryNames.CodeFix)] // zero or more BaseDefinitions are allowed
+ /// [Order] // indicates precedence of this category
+ /// private SuggestedActionCategoryDefinition errorFixSuggestedActionCategoryDefinition;
+ ///
+ /// { other components }
+ /// }
+ /// </code>
+ public sealed class SuggestedActionCategoryDefinition
+ {
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryToIconDefinition.cs b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryToIconDefinition.cs
new file mode 100644
index 0000000..4c65723
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionCategoryToIconDefinition.cs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ using System;
+ using Microsoft.VisualStudio.Imaging.Interop;
+
+ /// <summary>
+ /// Associates a LightBulb control icon for a suggested action category.
+ /// </summary>
+ /// <remarks>
+ /// <see cref="SuggestedActionCategoryToIconDefinition"/>s are associations between
+ /// <see cref="SuggestedActionCategoryDefinition"/>s and <see cref="ImageMoniker"/>s
+ /// that define an icon for a particular <see cref="ISuggestedActionCategory"/>. Icons
+ /// are inheritable and icons defined for base categories will be displayed for their
+ /// children as well, unless the child defines its own icon. Icon definitions are joined
+ /// with category definitions on the Name attribute. The category's precedence determines
+ /// which category's icon is displayed in the LightBulb control.
+ /// </remarks>
+ /// <code>
+ /// internal sealed class Components
+ /// {
+ /// [Export]
+ /// [Name("New Category Definition")]
+ /// private SuggestedActionCategoryToIconDefinition anySuggestedActionCategoryToIconDefinition
+ /// = new SuggestedActionCategoryToIconDefinition(KnownMonikers.IntellisenseLightBulb);
+ /// }
+ /// </code>
+ [CLSCompliant(false)]
+ public sealed class SuggestedActionCategoryToIconDefinition
+ {
+ /// <summary>
+ /// Creates a new instance with the specified <see cref="ImageMoniker"/>.
+ /// </summary>
+ /// <remarks>
+ /// When a LightBulb session is created, the highest precedence category
+ /// based upon MEF Ordering of the <see cref="SuggestedActionCategoryDefinition"/>s
+ /// with applicable <see cref="ISuggestedAction2"/>s will have its icon displayed in
+ /// the LightBulb control.
+ /// </remarks>
+ /// <param name="imageMoniker">The <see cref="ImageMoniker"/> of the icon to display.</param>
+ public SuggestedActionCategoryToIconDefinition(ImageMoniker imageMoniker)
+ {
+ this.ImageMoniker = imageMoniker;
+ }
+
+ /// <summary>
+ /// Gets the <see cref="ImageMoniker"/> to associate with the named <see cref="ISuggestedActionCategory"/>.
+ /// </summary>
+ public ImageMoniker ImageMoniker { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionSet.cs b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionSet.cs
new file mode 100644
index 0000000..d508b7d
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionSet.cs
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a list of suggested actions that are all applicable to a span of text in a <see cref="ITextBuffer" />.
+ /// Global suggested actions are not applicable to any particular span of text.
+ /// </summary>
+ [CLSCompliant(false)]
+ public class SuggestedActionSet
+ {
+ /// <summary>
+ /// A list of suggested actions.
+ /// </summary>
+ public IEnumerable<ISuggestedAction> Actions { get; private set; }
+
+ /// <summary>
+ /// Gets the applicability span for this list of suggested actions.
+ /// </summary>
+ /// <remarks>
+ /// The applicability span is the span of text in the <see cref="ITextBuffer" /> to which this
+ /// a list of suggested actions pertains, if any.
+ /// </remarks>
+ public Span? ApplicableToSpan { get; private set; }
+
+ /// <summary>
+ /// Gets the <see cref="SuggestedActionSetPriority"/> value of this list of suggested actions.
+ /// </summary>
+ public SuggestedActionSetPriority Priority { get; private set; }
+
+ /// <summary>
+ /// Gets the title for this list of suggested actions.
+ /// </summary>
+ public object Title { get; private set; }
+
+ /// <summary>
+ /// The name of the <see cref="ISuggestedActionCategory"/> which this set of actions belongs to.
+ /// </summary>
+ /// <remarks>
+ /// It is recommended to use the category names from <see cref="PredefinedSuggestedActionCategoryNames"/>.
+ /// If no category is provided, a set is assumed to be <see cref="PredefinedSuggestedActionCategoryNames.Any"/>
+ /// </remarks>
+ public string CategoryName { get; }
+
+ /// <summary>
+ /// Creates a new instance of the <see cref="SuggestedActionSet"/> for given list
+ /// of suggested actions and optionally an applicable span of text.
+ /// </summary>
+ /// <param name="actions">A list of suggested actions.</param>
+ /// <param name="priority">The <see cref="SuggestedActionSetPriority"/> value of this list of suggested actions</param>
+ /// <param name="applicableToSpan">The applicability span for this list of suggested actions.</param>
+ [Obsolete("Use fully specified constructor instead")]
+ public SuggestedActionSet(IEnumerable<ISuggestedAction> actions,
+ SuggestedActionSetPriority priority = SuggestedActionSetPriority.None,
+ Span? applicableToSpan = null) : this(actions, title: null, priority: priority, applicableToSpan: applicableToSpan)
+ { }
+
+ /// <summary>
+ /// Creates a new instance of the <see cref="SuggestedActionSet"/> for given list
+ /// of suggested actions with a header and optionally an applicable span of text.
+ /// </summary>
+ /// <param name="actions">A list of suggested actions.</param>
+ /// <param name="title">The title for this list of suggested actions.</param>
+ /// <param name="priority">The <see cref="SuggestedActionSetPriority"/> value of this list of suggested actions</param>
+ /// <param name="applicableToSpan">The applicability span for this list of suggested actions.</param>
+ [Obsolete("Use fully specified constructor instead")]
+ public SuggestedActionSet(IEnumerable<ISuggestedAction> actions, object title,
+ SuggestedActionSetPriority priority = SuggestedActionSetPriority.None,
+ Span? applicableToSpan = null) : this(null, actions, title, priority, applicableToSpan)
+ {
+ }
+
+ /// <summary>
+ /// Creates a new instance of the <see cref="SuggestedActionSet"/> for given list
+ /// of suggested actions with a header and optionally an applicable span of text.
+ /// </summary>
+ /// <param name="categoryName">
+ /// The name of the <see cref="ISuggestedActionCategory"/> to which all of these actions belong.
+ /// </param>
+ /// <param name="actions">A list of suggested actions.</param>
+ /// <param name="title">The title for this list of suggested actions.</param>
+ /// <param name="priority">The <see cref="SuggestedActionSetPriority"/> value of this list of suggested actions</param>
+ /// <param name="applicableToSpan">The applicability span for this list of suggested actions.</param>
+ public SuggestedActionSet(
+ string categoryName,
+ IEnumerable<ISuggestedAction> actions,
+ object title = null,
+ SuggestedActionSetPriority priority = SuggestedActionSetPriority.None,
+ Span? applicableToSpan = null)
+ {
+ if (actions == null)
+ {
+ throw new ArgumentNullException(nameof(actions));
+ }
+
+ this.CategoryName = categoryName ?? PredefinedSuggestedActionCategoryNames.Any;
+ this.Actions = actions.ToArray();
+ this.Priority = priority;
+ this.ApplicableToSpan = applicableToSpan;
+ this.Title = title;
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionSetPriority.cs b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionSetPriority.cs
new file mode 100644
index 0000000..e1b8a42
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/Suggestions/SuggestedActionSetPriority.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents a priority of <see cref="SuggestedActionSet"/>, that is used to order suggestions when
+ /// presenting them to a user.
+ /// </summary>
+ public enum SuggestedActionSetPriority
+ {
+ /// <summary>
+ /// No particular priority.
+ /// </summary>
+ None = 0,
+
+ /// <summary>
+ /// Low priority suggestion.
+ /// </summary>
+ Low = 1,
+
+ /// <summary>
+ /// Medium priority suggestion.
+ /// </summary>
+ Medium = 2,
+
+ /// <summary>
+ /// High priority suggestion.
+ /// </summary>
+ High = 3
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/UIElementType.cs b/src/Editor/Language/Def/Intellisense/UIElementType.cs
new file mode 100644
index 0000000..ebc403a
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/UIElementType.cs
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Describes types of UIElements to be provided via <see cref="IUIElementProvider&lt;T,V&gt;"/>.
+ /// </summary>
+ public enum UIElementType
+ {
+ /// <summary>
+ /// Small UIElement representing the object in question.
+ /// </summary>
+ /// <remarks>Small UIElements will most likely be placed in a list alongside other small UIElements.</remarks>
+ Small,
+
+ /// <summary>
+ /// Large UIElement representing the object in question.
+ /// </summary>
+ /// <remarks>
+ /// Large UIElements will most likely be displayed on their own and should present detailed information about the object in
+ /// question.
+ /// </remarks>
+ Large,
+
+ /// <summary>
+ /// UIElement to be hosted in a tooltip representing the object in question.
+ /// </summary>
+ Tooltip
+ }
+}
diff --git a/src/Editor/Language/Def/Intellisense/ValueChangedEventArgs.cs b/src/Editor/Language/Def/Intellisense/ValueChangedEventArgs.cs
new file mode 100644
index 0000000..4a81dd5
--- /dev/null
+++ b/src/Editor/Language/Def/Intellisense/ValueChangedEventArgs.cs
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) Microsoft Corporation. All rights reserved.
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Provides information about value changes of all kinds.
+ /// </summary>
+ /// <typeparam name="TValue">The type of the value.</typeparam>
+ public class ValueChangedEventArgs<TValue> : EventArgs
+ {
+ private TValue _oldValue;
+ private TValue _newValue;
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="ValueChangedEventArgs&lt;T&gt;"/> with the new and old values of a property.
+ /// </summary>
+ /// <param name="oldValue">The old value.</param>
+ /// <param name="newValue">The new value.</param>
+ public ValueChangedEventArgs(TValue oldValue, TValue newValue)
+ {
+ _oldValue = oldValue;
+ _newValue = newValue;
+ }
+
+ /// <summary>
+ /// Gets the old value.
+ /// </summary>
+ public TValue OldValue
+ { get { return _oldValue; } }
+
+ /// <summary>
+ /// Gets the new value.
+ /// </summary>
+ public TValue NewValue
+ { get { return _newValue; } }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/AssemblyInfo.cs b/src/Editor/Language/Def/Language/AssemblyInfo.cs
new file mode 100644
index 0000000..cb9fc3b
--- /dev/null
+++ b/src/Editor/Language/Def/Language/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.IntegrationTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.UnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+
+// Bug #512117: Remove compatibility shims for 2nd gen. Quick Info APIs.
+// MS.VS.Text.Internal has references to WPF, so, we'll stash our cross plat 'internal' interfaces directly
+// in the Language assembly and make them internal with internals visible only to our trusted VS assemblies.
+// When the compat shims are removed, we can probably get rid of these.
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Platform.VSEditor, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Editor.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.CodeLens.Service, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Cocoa.View.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+
+// InternalsVisibleTo for VS for Mac implementation assembly:
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Implementation, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e57febc1f220077550a65e338d3d15d7cbd189cf4f62f7c3829dcb2f8441a6c40631d172e3deb4dc0bb7237b44ec9daeb9bd7d72c3d64c4f52b968795443cb58bc341583c29440345b8c35f72f6a31aecb2903376136f8fc35779bb422eb643f8668fa6605c697bff927e3bb10745328ff878bd1b7e42bbcb839f04baa8460bd")]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+#pragma warning disable 618
+[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/Data/AggregatedCompletionContext.cs b/src/Editor/Language/Def/Language/AsyncCompletion/Data/AggregatedCompletionContext.cs
new file mode 100644
index 0000000..1c8cf99
--- /dev/null
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/Data/AggregatedCompletionContext.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.Immutable;
+using System.Diagnostics;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
+{
+ /// <summary>
+ /// This type is used to fetch completion data from available <see cref="IAsyncCompletionSource"/>s
+ /// without sorting, filtering and displaying the results in the GUI.
+ /// </summary>
+ [DebuggerDisplay("{CompletionContext.Items.Length} items")]
+ public sealed class AggregatedCompletionContext
+ {
+ /// <summary>
+ /// Aggregate <see cref="CompletionContext"/>
+ /// </summary>
+ public CompletionContext CompletionContext { get; }
+
+ /// <summary>
+ /// <see cref="IAsyncCompletionSession"/> which interacted with <see cref="IAsyncCompletionSource"/>s.
+ /// This session can not be retrieved from <see cref="IAsyncCompletionBroker"/>.
+ /// This session does not have full capability, and its purpose is to provide data in <see cref="IAsyncCompletionSource.GetDescriptionAsync(IAsyncCompletionSession, CompletionItem, System.Threading.CancellationToken)"/>.
+ /// This session must be dismissed when client no longer needs it.
+ /// </summary>
+ public IAsyncCompletionSession InertSession { get; }
+
+ /// <summary>
+ /// Creates <see cref="AggregatedCompletionContext"/> which carries data aggregated from
+ /// <see cref="CompletionContext"/>s returned by the <see cref="IAsyncCompletionSource"/>s.
+ /// This object also has a reference to the <see cref="IAsyncCompletionSession"/> which queried the <see cref="IAsyncCompletionSource"/>s.
+ /// </summary>
+ /// <param name="completionContext">Aggregate <see cref="CompletionContext"/></param>
+ /// <param name="inertSession"><see cref="IAsyncCompletionSession"/> which interacted with <see cref="IAsyncCompletionSource"/>s.</param>
+ public AggregatedCompletionContext(CompletionContext completionContext, IAsyncCompletionSession inertSession)
+ {
+ CompletionContext = completionContext ?? throw new ArgumentNullException(nameof(completionContext));
+ InertSession = inertSession ?? throw new ArgumentNullException(nameof(inertSession));
+ }
+
+ /// <summary>
+ /// Creates empty <see cref="AggregatedCompletionContext"/>
+ /// </summary>
+ private AggregatedCompletionContext()
+ {
+ CompletionContext = CompletionContext.Empty;
+ InertSession = null;
+ }
+
+ /// <summary>
+ /// Empty headless completion context, used when obtaining completion data was unsuccessful.
+ /// </summary>
+ public static AggregatedCompletionContext Empty { get; } = new AggregatedCompletionContext();
+ }
+}
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionContext.cs b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionContext.cs
index d098d3a..aa5d181 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionContext.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionContext.cs
@@ -40,7 +40,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// Constructs <see cref="CompletionContext"/> with specified <see cref="CompletionItem"/>s,
/// with recommendation to not use suggestion mode and to use use regular selection.
/// </summary>
- /// <param name="items">Available completion items. If none are available, use <code>CompletionContext.Default</code></param>
+ /// <param name="items">Available completion items. If none are available, use <c>CompletionContext.Default</c></param>
public CompletionContext(ImmutableArray<CompletionItem> items)
: this(items, suggestionItemOptions: null, selectionHint: InitialSelectionHint.RegularSelection)
{
@@ -51,7 +51,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// with recommendation to use suggestion mode and to use regular selection.
/// </summary>
/// <param name="items">Available completion items</param>
- /// <param name="suggestionItemOptions">Suggestion item options, or null to not use suggestion mode. Default is <code>null</code></param>
+ /// <param name="suggestionItemOptions">Suggestion item options, or null to not use suggestion mode. Default is <c>null</c></param>
public CompletionContext(
ImmutableArray<CompletionItem> items,
SuggestionItemOptions suggestionItemOptions)
@@ -64,8 +64,8 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// with recommendation to use suggestion mode item and to use a specific selection mode.
/// </summary>
/// <param name="items">Available completion items</param>
- /// <param name="suggestionItemOptions">Suggestion mode options, or null to not use suggestion mode. Default is <code>null</code></param>
- /// <param name="selectionHint">Recommended selection mode. Suggestion mode automatically sets soft selection Default is <code>InitialSelectionHint.RegularSelection</code></param>
+ /// <param name="suggestionItemOptions">Suggestion mode options, or null to not use suggestion mode. Default is <c>null</c></param>
+ /// <param name="selectionHint">Recommended selection mode. Suggestion mode automatically sets soft selection Default is <c>InitialSelectionHint.RegularSelection</c></param>
public CompletionContext(
ImmutableArray<CompletionItem> items,
SuggestionItemOptions suggestionItemOptions,
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionFilter.cs b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionFilter.cs
index b9e2e1c..9486259 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionFilter.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionFilter.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using System.Diagnostics;
using Microsoft.VisualStudio.Text.Adornments;
@@ -12,10 +13,12 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// using the same filter button must use the same reference to the instance of <see cref="CompletionFilter"/>.
/// </remarks>
/// <example>
+ /// <code>
/// static CompletionFilter MyFilter = new CompletionFilter("My items", "m", MyItemsImageElement);
+ /// </code>
/// </example>
[DebuggerDisplay("{DisplayText}")]
- public sealed class CompletionFilter
+ public sealed class CompletionFilter : INotifyPropertyChanged
{
/// <summary>
/// Localized name of this filter.
@@ -53,5 +56,15 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
AccessKey = accessKey;
Image = image;
}
+
+ #region INotifyPropertyChanged members
+
+ // The properties of this class don't change,
+ // we're just implementing INotifyPropertyChanged to prevent WPF leaking memory.
+ #pragma warning disable CS0067
+ public event PropertyChangedEventHandler PropertyChanged;
+ #pragma warning restore CS0067
+
+ #endregion
}
}
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionItem.cs b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionItem.cs
index 6168457..4bbf5e7 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionItem.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionItem.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Immutable;
+using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using Microsoft.VisualStudio.Core.Imaging;
@@ -13,7 +14,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// to be displayed in the completion UI. This class implements <see cref="IPropertyOwner"/>
/// </summary>
[DebuggerDisplay("{DisplayText}")]
- public sealed class CompletionItem : IPropertyOwner
+ public sealed class CompletionItem : IPropertyOwner, INotifyPropertyChanged
{
/// <summary>
/// Text used in the UI
@@ -87,7 +88,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// </summary>
/// <param name="displayText">Text to use in the UI, when sorting, filtering and completing</param>
/// <param name="source">Reference to <see cref="IAsyncCompletionSource"/> that created this item</param>
- /// <param name="icon">Image displayed in the UI. Default is <code>default(ImageElement)</code></param>
+ /// <param name="icon">Image displayed in the UI. Default is <c>default(ImageElement)</c></param>
public CompletionItem(string displayText, IAsyncCompletionSource source, ImageElement icon)
: this(displayText, insertText: displayText, sortText: displayText, filterText: displayText,
source: source, filters: ImmutableArray<CompletionFilter>.Empty, icon: icon,
@@ -102,7 +103,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// <param name="displayText">Text to use in the UI, when sorting, filtering and completing</param>
/// <param name="source">Reference to <see cref="IAsyncCompletionSource"/> that created this item</param>
/// <param name="icon">Image displayed in the UI</param>
- /// <param name="filters"><see cref="ImmutableArray"/> of references to <see cref="CompletionFilter"/>s applicable to this item. Default is <code>ImmutableArray<CompletionFilter>.Empty</code></param>
+ /// <param name="filters"><see cref="ImmutableArray"/> of references to <see cref="CompletionFilter"/>s applicable to this item. Default is <c>ImmutableArray<CompletionFilter>.Empty</c></param>
public CompletionItem(string displayText, IAsyncCompletionSource source, ImageElement icon, ImmutableArray<CompletionFilter> filters)
: this(displayText, insertText: displayText, sortText: displayText, filterText: displayText,
source: source, filters: filters, icon: icon,
@@ -118,7 +119,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// <param name="source">Reference to <see cref="IAsyncCompletionSource"/> that created this item</param>
/// <param name="icon">Image displayed in the UI</param>
/// <param name="filters"><see cref="ImmutableArray"/> of references to <see cref="CompletionFilter"/>s applicable to this item</param>
- /// <param name="suffix">Additional text to display in the UI. Default is <code>string.Empty</code></param>
+ /// <param name="suffix">Additional text to display in the UI. Default is <c>string.Empty</c></param>
public CompletionItem(string displayText, IAsyncCompletionSource source, ImageElement icon, ImmutableArray<CompletionFilter> filters, string suffix)
: this(displayText, insertText: displayText, sortText: displayText, filterText: displayText,
source: source, filters: filters, icon: icon,
@@ -131,13 +132,13 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// </summary>
/// <param name="displayText">Text used in the UI</param>
/// <param name="source">Reference to <see cref="IAsyncCompletionSource"/> that created this item</param>
- /// <param name="icon">Image displayed in the UI. Default is <code>default(ImageElement)</code></param>
- /// <param name="filters"><see cref="ImmutableArray"/> of references to <see cref="CompletionFilter"/>s applicable to this item. Default is <code>ImmutableArray<CompletionFilter>.Empty</code></param>
- /// <param name="suffix">Additional text to display in the UI. Default is <code>string.Empty</code></param>
+ /// <param name="icon">Image displayed in the UI. Default is <c>default(ImageElement)</c></param>
+ /// <param name="filters"><see cref="ImmutableArray"/> of references to <see cref="CompletionFilter"/>s applicable to this item. Default is <c>ImmutableArray<CompletionFilter>.Empty</c></param>
+ /// <param name="suffix">Additional text to display in the UI. Default is <c>string.Empty</c></param>
/// <param name="insertText">Text inserted when completing this item. Default is <see cref="displayText"/></param>
/// <param name="sortText">Text used by <see cref="IAsyncCompletionItemManager"/> when sorting against other items. Default is <see cref="displayText"/></param>
/// <param name="filterText">Text used by <see cref="IAsyncCompletionItemManager"/> when matching against the applicable span. Default is <see cref="displayText"/></param>
- /// <param name="attributeIcons">Additional images to display in the UI. Default is <code>ImmutableArray<ImageElement>.Empty</code></param>
+ /// <param name="attributeIcons">Additional images to display in the UI. Default is <c>ImmutableArray<ImageElement>.Empty</c></param>
public CompletionItem(string displayText, IAsyncCompletionSource source, ImageElement icon, ImmutableArray<CompletionFilter> filters,
string suffix, string insertText, string sortText, string filterText, ImmutableArray<ImageElement> attributeIcons)
{
@@ -165,5 +166,15 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
}
public override string ToString() => DisplayText;
+
+ #region INotifyPropertyChanged members
+
+ // The properties of this class don't change,
+ // we're just implementing INotifyPropertyChanged to prevent WPF leaking memory.
+ #pragma warning disable CS0067
+ public event PropertyChangedEventHandler PropertyChanged;
+ #pragma warning restore CS0067
+
+ #endregion
}
}
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionPresentationViewModel.cs b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionPresentationViewModel.cs
index 96baa4f..25b5343 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionPresentationViewModel.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionPresentationViewModel.cs
@@ -63,10 +63,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// <param name="filters">Completion filters with their available and selected state</param>
/// <param name="selectedItemIndex">Controls which item is selected. Use -1 in suggestion mode</param>
/// <param name="applicableToSpan">Span pertinent to the completion session</param>
- /// <param name="useSoftSelection">Controls whether selected item should be soft selected. Default is <code>false</code></param>
- /// <param name="displaySuggestionItem">Controls whether suggestion mode item is visible. Default is <code>false</code></param>
- /// <param name="selectSuggestionItem">Controls whether suggestion mode item is selected. Default is <code>false</code></param>
- /// <param name="suggestionItem">Suggestion mode item to display. Default is <code>null</code></param>
+ /// <param name="useSoftSelection">Controls whether selected item should be soft selected. Default is <c>false</c></param>
+ /// <param name="displaySuggestionItem">Controls whether suggestion mode item is visible. Default is <c>false</c></param>
+ /// <param name="selectSuggestionItem">Controls whether suggestion mode item is selected. Default is <c>false</c></param>
+ /// <param name="suggestionItem">Suggestion mode item to display. Default is <c>null</c></param>
/// <param name="suggestionItemOptions">How to present the suggestion mode item. This is required because completion may be in suggestion mode even if there is no explicit suggestion mode item</param>
public CompletionPresentationViewModel(
ImmutableArray<CompletionItemWithHighlight> items,
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionStartData.cs b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionStartData.cs
index b9c6766..1b66383 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionStartData.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/Data/CompletionStartData.cs
@@ -26,7 +26,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// <summary>
/// <param name="applicableToSpan"> Proposed location where completion will take place.
- /// Return <code>default</code> if this <see cref="IAsyncCompletionSource"/> is not capable of providing location,
+ /// Return <c>default</c> if this <see cref="IAsyncCompletionSource"/> is not capable of providing location,
/// or completion is invalid for location in question.</param>
/// </summary>
public SnapshotSpan ApplicableToSpan { get; }
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/Data/FilteredCompletionModel.cs b/src/Editor/Language/Def/Language/AsyncCompletion/Data/FilteredCompletionModel.cs
index 07f76d1..ed73c68 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/Data/FilteredCompletionModel.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/Data/FilteredCompletionModel.cs
@@ -69,7 +69,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
/// <param name="selectedItemIndex">Recommended item index to select. -1 selects suggestion item.</param>
/// <param name="filters">Completion filters with their availability and selection state. Default is empty array.</param>
/// <param name="selectionHint">Allows <see cref="IAsyncCompletionItemManager"/> to influence the selection mode. Default is <see cref="UpdateSelectionHint.NoChange" /></param>
- /// <param name="uniqueItem">Provides <see cref="CompletionItem"/> to commit using "commit if unique" command despite displaying more than one item. Default is <code>null</code></param>
+ /// <param name="uniqueItem">Provides <see cref="CompletionItem"/> to commit using "commit if unique" command despite displaying more than one item. Default is <c>null</c></param>
public FilteredCompletionModel(
ImmutableArray<CompletionItemWithHighlight> items,
int selectedItemIndex,
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionBroker.cs b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionBroker.cs
index 8970a3d..4c3cf0c 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionBroker.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionBroker.cs
@@ -1,5 +1,6 @@
using System;
using System.Threading;
+using System.Threading.Tasks;
using Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
@@ -16,8 +17,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
/// This is a MEF component and may be imported by another MEF component:
/// </remarks>
/// <example>
+ /// <code>
/// [Import]
/// IAsyncCompletionBroker CompletionBroker;
+ /// </code>
/// </example>
public interface IAsyncCompletionBroker
{
@@ -32,12 +35,21 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
/// <summary>
/// Returns whether there are any completion item sources available for given <see cref="IContentType"/>.
- /// This method should be called prior to calling <see cref="TriggerCompletion(ITextView, CompletionTrigger, SnapshotPoint, CancellationToken)"/> to avoid traversal of the buffer graph.
+ /// In practice, availability of completion item sources also depends on the text view roles. See <see cref="IsCompletionSupported(IContentType, ITextViewRoleSet)"/>.
/// </summary>
- /// <param name="textView"><see cref="ITextView"/> to check for available completion source exports</param>
+ /// <param name="contentType"><see cref="IContentType"/> to check for available completion source exports</param>
bool IsCompletionSupported(IContentType contentType);
/// <summary>
+ /// Returns whether there are any completion item sources available for given <see cref="IContentType"/> and <see cref="ITextViewRoleSet"/>.
+ /// This method should be called prior to calling <see cref="TriggerCompletion(ITextView, CompletionTrigger, SnapshotPoint, CancellationToken)"/>
+ /// to avoid traversal of the buffer graph in cases where completion would be unavailable.
+ /// </summary>
+ /// <param name="contentType"><see cref="IContentType"/> to check for available completion source exports</param>
+ /// <param name="roles"><see cref="ITextView"/>'s <see cref="ITextViewRoleSet"/> which filters available completion source exports</param>
+ bool IsCompletionSupported(IContentType contentType, ITextViewRoleSet roles);
+
+ /// <summary>
/// Returns <see cref="IAsyncCompletionSession"/> if there is one active in a given <see cref="ITextView"/>, or null if not.
/// </summary>
/// <remarks>
@@ -50,6 +62,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
/// <summary>
/// Activates completion and returns <see cref="IAsyncCompletionSession"/>.
/// If completion was already active, returns the existing session without changing it.
+ /// Returns null when <paramref name="token"/> is canceled, there are no participating <see cref="IAsyncCompletionSource"/>s or completion is not applicable at the given <paramref name="triggerLocation"/>.
/// Must be invoked on UI thread.
/// This does not cause the completion popup to appear.
/// To compute available icons and display the UI, call <see cref="IAsyncCompletionSession.OpenOrUpdate(CompletionTrigger, SnapshotPoint, CancellationToken)"/>.
@@ -58,7 +71,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
/// <param name="textView">View that hosts completion and relevant buffers</param>
/// <param name="trigger">What causes this completion, potentially including character typed by the user and snapshot before the text edit.</param>
/// <param name="triggerLocation">Location of completion on the view's data buffer: <see cref="ITextView.TextBuffer"/>. Used to pick relevant <see cref="IAsyncCompletionSource"/>s and <see cref="IAsyncCompletionItemManager"/></param>
- /// <param name="token">Cancellation token that may interrupt this operation, despire running on the UI thread</param>
+ /// <param name="token">Cancellation token that may interrupt this operation, despite running on the UI thread</param>
/// <returns>
/// Returns existing <see cref="IAsyncCompletionSession"/> if one already exists
/// Returns null if the completion feature is disabled or if there are no applicable completion providers. Invoke <see cref="IsCompletionSupported(IContentType)"/> prior to invoking this method to perform this check more efficiently.
@@ -68,6 +81,22 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
IAsyncCompletionSession TriggerCompletion(ITextView textView, CompletionTrigger trigger, SnapshotPoint triggerLocation, CancellationToken token);
/// <summary>
+ /// Requests <see cref="CompletionContext"/>s from applicable <see cref="IAsyncCompletionSource"/>s and aggregates them.
+ /// Does not trigger completion, does not raise events, does not open the completion GUI.
+ /// The <see cref="IAsyncCompletionSession"/> which interacted with <see cref="IAsyncCompletionSource"/>s
+ /// is returned as <see cref="AggregatedCompletionContext.InertSession"/> and does not have full capabilities of <see cref="IAsyncCompletionSession"/>.
+ ///
+ /// This method can be invoked from any thread, but it briefly switches to UI thread.
+ /// Returns <see cref="CompletionContext.Empty"/> when <paramref name="token"/> is canceled.
+ /// </summary>
+ /// <param name="textView">View that hosts completion and relevant buffers</param>
+ /// <param name="trigger">What caused completion</param>
+ /// <param name="triggerLocation">Location of completion on the view's data buffer: <see cref="ITextView.TextBuffer"/>. Used to pick relevant <see cref="IAsyncCompletionSource"/>s</param>
+ /// <param name="token">Cancellation token that may interrupt this operation</param>
+ /// <returns><see cref="AggregatedCompletionContext"/> which contains <see cref="IAsyncCompletionSession"/> which interacted with <see cref="IAsyncCompletionSource"/>s and the aggregate <see cref="CompletionContext"/></returns>
+ Task<AggregatedCompletionContext> GetAggregatedCompletionContextAsync(ITextView textView, CompletionTrigger trigger, SnapshotPoint triggerLocation, CancellationToken token);
+
+ /// <summary>
/// Raised on UI thread when new <see cref="IAsyncCompletionSession"/> is triggered.
/// </summary>
event EventHandler<CompletionTriggeredEventArgs> CompletionTriggered;
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionCommitManagerProvider.cs b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionCommitManagerProvider.cs
index b235e38..0f95da7 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionCommitManagerProvider.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionCommitManagerProvider.cs
@@ -16,12 +16,14 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
/// Only one <see cref="IAsyncCompletionItemManager"/> is used in a given view.
/// </remarks>
/// <example>
+ /// <code>
/// [Export(typeof(IAsyncCompletionCommitManagerProvider))]
/// [Name(nameof(MyCompletionCommitManagerProvider))]
/// [ContentType("text")]
/// [TextViewRoles(PredefinedTextViewRoles.Editable)]
/// [Order(Before = "OtherCompletionCommitManager")]
/// public class MyCompletionCommitManagerProvider : IAsyncCompletionCommitManagerProvider
+ /// </code>
/// </example>
public interface IAsyncCompletionCommitManagerProvider
{
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionItemManagerProvider.cs b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionItemManagerProvider.cs
index 8becc26..e8d6db4 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionItemManagerProvider.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionItemManagerProvider.cs
@@ -14,12 +14,14 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
/// Only one <see cref="IAsyncCompletionItemManager"/> is used in a given view.
/// </remarks>
/// <example>
+ /// <code>
/// [Export(typeof(IAsyncCompletionItemManagerProvider))]
/// [Name(nameof(MyCompletionItemManagerProvider))]
/// [ContentType("text")]
/// [TextViewRoles(PredefinedTextViewRoles.Editable)]
/// [Order(Before = "OtherCompletionItemManager")]
/// public class MyCompletionItemManagerProvider : IAsyncCompletionItemManagerProvider
+ /// </code>
/// </example>
public interface IAsyncCompletionItemManagerProvider
{
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSource.cs b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSource.cs
index 8917952..8db4447 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSource.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSource.cs
@@ -52,7 +52,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
/// </summary>
/// <remarks>
/// If a language service does not wish to participate in completion, it should try to provide a valid <see cref="CompletionStartData.ApplicableToSpan"/>
- /// and set <see cref="CompletionStartData.Participation"/> to <code>false</code>.
+ /// and set <see cref="CompletionStartData.Participation"/> to <c>false</c>.
/// This will enable other extensions to provide completion in syntactically appropriate location.
/// </remarks>
/// <param name="trigger">What causes the completion, including the character typed and reference to <see cref="ITextView.TextSnapshot"/> prior to triggering the completion</param>
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSourceProvider.cs b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSourceProvider.cs
index 0e850e1..5bc888a 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSourceProvider.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/IAsyncCompletionSourceProvider.cs
@@ -5,9 +5,6 @@ using Microsoft.VisualStudio.Text.Editor;
namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
{
/// <summary>
- /// Provides instances of <see cref="IAsyncCompletionSource"/> which filters and sorts available <see cref="CompletionItem"/>s given the current state of the editor.
- /// </summary>
- /// <summary>
/// Provides instances of <see cref="IAsyncCompletionSource"/> which provides <see cref="CompletionItem"/>s
/// and other information relevant to the completion feature at a specific <see cref="SnapshotPoint"/>
/// </summary>
@@ -18,11 +15,13 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
/// matches content type of any buffer in the completion's trigger location.
/// </remarks>
/// <example>
+ /// <code>
/// [Export(typeof(IAsyncCompletionSourceProvider))]
/// [Name(nameof(MyCompletionSource))]
/// [ContentType("text")]
/// [TextViewRoles(PredefinedTextViewRoles.Editable)]
/// public class MyCompletionSource : IAsyncCompletionSource
+ /// </code>
/// </example>
public interface IAsyncCompletionSourceProvider
{
diff --git a/src/Editor/Language/Def/Language/AsyncCompletion/ICompletionPresenterProvider.cs b/src/Editor/Language/Def/Language/AsyncCompletion/ICompletionPresenterProvider.cs
index 719251a..9a0764d 100644
--- a/src/Editor/Language/Def/Language/AsyncCompletion/ICompletionPresenterProvider.cs
+++ b/src/Editor/Language/Def/Language/AsyncCompletion/ICompletionPresenterProvider.cs
@@ -14,12 +14,14 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
/// Only one <see cref="ICompletionPresenterProvider"/> is used in a given view.
/// </remarks>
/// <example>
+ /// <code>
/// [Export(typeof(ICompletionPresenterProvider))]
/// [Name(nameof(MyCompletionPresenterProvider))]
/// [ContentType("any")]
/// [TextViewRoles(PredefinedTextViewRoles.Editable)]
/// [Order(Before = KnownCompletionNames.DefaultCompletionPresenter)]
/// public class MyCompletionPresenterProvider : ICompletionPresenterProvider
+ /// </code>
/// </example>
public interface ICompletionPresenterProvider
{
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/CodeCleanUpExecutionContext.cs b/src/Editor/Language/Def/Language/CodeCleanup/CodeCleanUpExecutionContext.cs
new file mode 100644
index 0000000..1657dd9
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/CodeCleanUpExecutionContext.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ internal class CodeCleanUpExecutionContext : ICodeCleanUpExecutionContext
+ {
+ public CodeCleanUpExecutionContext(IUIThreadOperationContext operationContext, FixIdContainer EnabledFixIds)
+ {
+ Requires.NotNull(operationContext, nameof(operationContext));
+ Requires.NotNull(EnabledFixIds, nameof(EnabledFixIds));
+ this.OperationContext = operationContext;
+ this.EnabledFixIds = EnabledFixIds;
+
+ }
+
+ public IUIThreadOperationContext OperationContext { get; }
+
+ public FixIdContainer EnabledFixIds { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/ConfigurationKeyAttribute.cs b/src/Editor/Language/Def/Language/CodeCleanup/ConfigurationKeyAttribute.cs
new file mode 100644
index 0000000..9b7ff47
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/ConfigurationKeyAttribute.cs
@@ -0,0 +1,29 @@
+using System;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Associates a configuration key with a fixer code part.
+ /// </summary>
+ public sealed class ConfigurationKeyAttribute : SingletonBaseMetadataAttribute
+ {
+ /// <summary>
+ /// Constructs a new instance of the attribute.
+ /// </summary>
+ /// <param name="configurationKey">Fixer configuration key</param>
+ /// <exception cref="ArgumentNullException"><paramref name="configurationKey"/> is null.</exception>
+ /// <exception cref="ArgumentException"><paramref name="configurationKey"/> is an empty string.</exception>
+ public ConfigurationKeyAttribute(string configurationKey)
+ {
+ Requires.NotNullOrWhiteSpace(configurationKey, nameof(configurationKey));
+ this.ConfigurationKey = configurationKey;
+ }
+
+ /// <summary>
+ /// The configuration key
+ /// </summary>
+ public string ConfigurationKey { get; }
+ }
+}
+
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/FixIdAttribute.cs b/src/Editor/Language/Def/Language/CodeCleanup/FixIdAttribute.cs
new file mode 100644
index 0000000..a6f02f5
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/FixIdAttribute.cs
@@ -0,0 +1,29 @@
+using System;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Associates an identifying code with a fixer code part.
+ /// </summary>
+ public sealed class FixIdAttribute : SingletonBaseMetadataAttribute
+ {
+ /// <summary>
+ /// Constructs a new instance of the attribute.
+ /// </summary>
+ /// <param name="fixId">The fix id</param>
+ /// <exception cref="ArgumentNullException"><paramref name="fixId"/> is null.</exception>
+ /// <exception cref="ArgumentException"><paramref name="fixId"/> is an empty string.</exception>
+ public FixIdAttribute(string fixId)
+ {
+ Requires.NotNullOrWhiteSpace(fixId, nameof(fixId));
+ this.FixId = fixId;
+ }
+
+ /// <summary>
+ /// The fixer Id
+ /// </summary>
+ public string FixId { get; }
+ }
+}
+
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/FixIdContainer.cs b/src/Editor/Language/Def/Language/CodeCleanup/FixIdContainer.cs
new file mode 100644
index 0000000..ee054d7
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/FixIdContainer.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Language.CodeCleanUp;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ public sealed class FixIdContainer
+ {
+ private readonly IReadOnlyCollection<IFixInformation> fixes;
+
+ public FixIdContainer(IReadOnlyCollection<IFixInformation> fixes)
+ {
+ Requires.NotNull(fixes, nameof(fixes));
+ this.fixes = fixes;
+ }
+
+ public IReadOnlyCollection<IFixInformation> Fixes => fixes;
+
+ /// <summary>
+ /// Is the fix id enabled
+ /// </summary>
+ public bool IsFixIdEnabled(string fixid)
+ {
+ return fixes.Any((s) => string.Equals(s.FixerId, fixid, StringComparison.OrdinalIgnoreCase));
+ }
+
+ /// <summary>
+ /// Is the fix id enabled based on the path to a file
+ /// </summary>
+ public bool IsFixIdEnabled(string path, string fixid)
+ {
+ Requires.NotNullOrWhiteSpace(path, nameof(path));
+ return this.IsFixIdEnabled(fixid);
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/FixIdDefinition.cs b/src/Editor/Language/Def/Language/CodeCleanup/FixIdDefinition.cs
new file mode 100644
index 0000000..c7aafed
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/FixIdDefinition.cs
@@ -0,0 +1,16 @@
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Defines a definition for a fix id
+ /// </summary>
+ /// <code>
+ ///
+ /// [Export]
+ /// [FixId("ABC123"] (required)
+ /// [ConfigurationKey("cs_configurationKey")] (required)
+ /// [HelpLink("https://www.microsoft.com")] (optional)
+ /// [LocalizedName] (required)
+ /// </code>
+ public sealed class FixIdDefinition
+ { }
+}
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/HelpLinkAttrbute.cs b/src/Editor/Language/Def/Language/CodeCleanup/HelpLinkAttrbute.cs
new file mode 100644
index 0000000..9e8abfe
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/HelpLinkAttrbute.cs
@@ -0,0 +1,29 @@
+using System;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Associates an help URI with a fixer code part.
+ /// </summary>
+ public sealed class HelpLinkAttribute : SingletonBaseMetadataAttribute
+ {
+ /// <summary>
+ /// Constructs a new instance of the attribute.
+ /// </summary>
+ /// <param name="helpLink">The fixer help uri</param>
+ /// <exception cref="ArgumentNullException"><paramref name="helpLink"/> is null.</exception>
+ /// <exception cref="ArgumentException"><paramref name="helpLink"/> is an empty string.</exception>
+ public HelpLinkAttribute(string helpLink)
+ {
+ Requires.NotNullOrWhiteSpace(helpLink, nameof(helpLink));
+ this.HelpLink = helpLink;
+ }
+
+ /// <summary>
+ /// The fixer help link
+ /// </summary>
+ public string HelpLink { get; }
+ }
+}
+
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpExecutionContext.cs b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpExecutionContext.cs
new file mode 100644
index 0000000..8414bbb
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpExecutionContext.cs
@@ -0,0 +1,21 @@
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Represents an execution context for fixers setup by the command handling system
+ /// </summary>
+ public interface ICodeCleanUpExecutionContext
+ {
+ /// <summary>
+ /// Gets a context of executing potentially long running operation on the UI thread, which
+ /// enables shared two way cancellability and wait indication
+ /// </summary>
+ IUIThreadOperationContext OperationContext { get; }
+
+ /// <summary>
+ /// Gets fix identifiers which are enabled
+ /// </summary>
+ FixIdContainer EnabledFixIds { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpFixerRegistrationService.cs b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpFixerRegistrationService.cs
new file mode 100644
index 0000000..5590c37
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpFixerRegistrationService.cs
@@ -0,0 +1,40 @@
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Service to register, unregister, and enumerate available code clean up fixers.
+ /// The methods and properties on this class are thread safe.
+ ///
+ /// This MEF component should be imported as
+ /// [Import]
+ /// private ICodeCleanUpFixerRegistrationService FixerRegistrationService;
+ /// </summary>
+ public interface ICodeCleanUpFixerRegistrationService
+ {
+ /// <summary>
+ /// Register a fixer provider which can participate in code cleanup.
+ /// If the same instance of the provider is registered again only one instance will be kept
+ /// Fixer providers should be registered when the language service or extension is initialzed
+ /// </summary>
+ /// <param name="fixerInstance">Instance which will be called to invoke the fixer</param>
+ bool TryRegisterFixerProvider(ICodeCleanUpFixerProvider fixerProvider);
+
+ /// <summary>
+ /// Unregister a fixer provider
+ /// Fixer providers should be unregistered when the language service or extension is disposed
+ /// </summary>
+ /// <param name="fixerInstance">Instance to un-register</param>
+ bool TryUnRegisterFixerProvider(ICodeCleanUpFixerProvider fixerProvider);
+
+ /// <summary>
+ /// Gets a snapshot of the current set of registered fixer providers
+ /// </summary>
+ IReadOnlyCollection<ICodeCleanUpFixerProvider> RegisteredFixerProviders { get; }
+
+ /// <summary>
+ /// Gets the set of all enabled fix ids
+ /// </summary>
+ FixIdContainer EnabledFixIds { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpScope.cs b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpScope.cs
new file mode 100644
index 0000000..4f04d2e
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanUpScope.cs
@@ -0,0 +1,12 @@
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Context to indicate to code clean up fixers what they need to fix.
+ /// The concrete implementations will have the specific context such as a file, or IVSHierarchy available
+ /// </summary>
+ public interface ICodeCleanUpScope
+ {
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanupFixer.cs b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanupFixer.cs
new file mode 100644
index 0000000..7bd0ec8
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanupFixer.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Fixer that can fix issues to clean up code
+ /// </summary>
+ public interface ICodeCleanUpFixer
+ {
+ /// <summary>
+ /// Fix issues in the files identified by the scope
+ /// </summary>
+ /// <param name="scope">Context to fix issues within</param>
+ /// <param name="cancellationToken">Cancellation token</param>
+ /// <returns>bool if the fixer succeeded false otherwise</returns>
+ Task<bool> FixAsync(ICodeCleanUpScope scope, ICodeCleanUpExecutionContext context, CancellationToken cancellationToken);
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanupFixerProvider.cs b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanupFixerProvider.cs
new file mode 100644
index 0000000..3d3bb1d
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/ICodeCleanupFixerProvider.cs
@@ -0,0 +1,22 @@
+using System.Collections.Generic;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ public interface ICodeCleanUpFixerProvider
+ {
+ /// <summary>
+ /// Create or return fixers which are able to handle contexts which are not
+ /// represented by a content type. For example IVsHierarchy and ItemId
+ /// </summary>
+ /// <returns>A set of fixers or empty</returns>
+ IReadOnlyCollection<ICodeCleanUpFixer> GetFixers();
+
+ /// <summary>
+ /// Create or return fixer instances which are able to operate on the passed in content type
+ /// </summary>
+ /// <param name="contentType">Content type fixer can operate on</param>
+ /// <returns>A set of fixers of empty</returns>
+ IReadOnlyCollection<ICodeCleanUpFixer> GetFixers(IContentType contentType);
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/IFixInformation.cs b/src/Editor/Language/Def/Language/CodeCleanup/IFixInformation.cs
new file mode 100644
index 0000000..66190cb
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/IFixInformation.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ public interface IFixInformation
+ {
+ /// <summary>
+ /// Fixer Id for example "IDE001"
+ /// </summary>
+ string FixerId { get; }
+
+ /// <summary>
+ /// Key for use in the .editorconfig file
+ /// </summary>
+ string ConfigurationKey { get; }
+
+ /// <summary>
+ /// Optional help link to provide more information about the fixer code
+ /// </summary>
+ string HelpLink { get; }
+
+ /// <summary>
+ /// Localized display name
+ /// </summary>
+ string LocalizedDisplayName { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeCleanup/TextBufferCodeCleanupScope.cs b/src/Editor/Language/Def/Language/CodeCleanup/TextBufferCodeCleanupScope.cs
new file mode 100644
index 0000000..02ba404
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeCleanup/TextBufferCodeCleanupScope.cs
@@ -0,0 +1,22 @@
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Context for a text buffer
+ /// </summary>
+ public class TextBufferCodeCleanUpScope : ICodeCleanUpScope
+ {
+ public TextBufferCodeCleanUpScope(ITextBuffer subjectBuffer)
+ {
+ Requires.NotNull(subjectBuffer, nameof(subjectBuffer));
+ this.SubjectBuffer = subjectBuffer;
+ }
+
+ /// <summary>
+ /// Gets the text buffer to apply code clean up change to.
+ /// Note, this is a live buffer rather than a snapshot.
+ /// </summary>
+ public ITextBuffer SubjectBuffer { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeElementKinds.cs b/src/Editor/Language/Def/Language/CodeElementKinds.cs
new file mode 100644
index 0000000..2f1a3de
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeElementKinds.cs
@@ -0,0 +1,110 @@
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Represents the kind of code elements in a document.
+ /// </summary>
+ [Flags]
+ public enum CodeElementKinds
+ {
+ // enumeration values arranged in this way:
+ // bit 31 - bit 16: reserved for expansion
+ // bit 15 - bit 12: type containers
+ // bit 11 - bit 8 : types
+ // bit 7 - bit 0 : type members
+
+ /// <summary>
+ /// Unspecified kind.
+ /// </summary>
+ Unspecified = 0,
+ /// <summary>
+ /// Invalid kind.
+ /// </summary>
+ Invalid = -1,
+
+ /// <summary>
+ /// Kind is a type container.
+ /// </summary>
+ /// <remarks>
+ /// A type container can be any of <see cref="File"/>, <see cref="Module"/>, <see cref="Package"/>, or <see cref="Namespace"/>.
+ /// Code should use one of the concrete values if needed.
+ /// </remarks>
+ Container = 0xf000,
+ /// <summary>
+ /// Kind is a file.
+ /// </summary>
+ File = 0x8000,
+ /// <summary>
+ /// Kind is a module.
+ /// </summary>
+ Module = 0x4000,
+ /// <summary>
+ /// Kind is a package.
+ /// </summary>
+ Package = 0x2000,
+ /// <summary>
+ /// Kind is a namespace.
+ /// </summary>
+ Namespace = 0x1000,
+
+ /// <summary>
+ /// Kind is a type (<see cref="Class"/>, <see cref="Interface"/>, <see cref="Struct"/>, or <see cref="Enum"/>).
+ /// </summary>
+ Type = 0x0f00,
+ /// <summary>
+ /// Kind is a class.
+ /// </summary>
+ Class = 0x0800,
+ /// <summary>
+ /// Kind is an interface.
+ /// </summary>
+ Interface = 0x0400,
+ /// <summary>
+ /// Kind is a struct.
+ /// </summary>
+ Struct = 0x0200,
+ /// <summary>
+ /// Kind is an enum.
+ /// </summary>
+ Enum = 0x0100,
+
+ /// <summary>
+ /// Kind is a type member.
+ /// </summary>
+ /// <remarks>
+ /// A <see cref="Member"/> kind can be any of
+ /// <see cref="Method"/>
+ /// <see cref="Property"/>
+ /// <see cref="Event"/>
+ /// <see cref="Field"/>
+ /// <see cref="Constructor"/>
+ /// <see cref="Function"/>
+ /// </remarks>
+ Member = 0x00ff,
+ /// <summary>
+ /// Kind is a method.
+ /// </summary>
+ Method = 0x0080,
+ /// <summary>
+ /// Kind is a property.
+ /// </summary>
+ Property = 0x0040,
+ /// <summary>
+ /// Kind is an event.
+ /// </summary>
+ Event = 0x0020,
+ /// <summary>
+ /// Kind is a field.
+ /// </summary>
+ Field = 0x0010,
+ /// <summary>
+ /// Kind is a constructor.
+ /// </summary>
+ Constructor = 0x0008,
+ /// <summary>
+ /// Kind is a function.
+ /// </summary>
+ Function = 0x0004,
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/ICodeLensCallbackListener.cs b/src/Editor/Language/Def/Language/CodeLens/ICodeLensCallbackListener.cs
new file mode 100644
index 0000000..d12b462
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/ICodeLensCallbackListener.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Language.CodeLens
+{
+ /// <summary>
+ /// Represents an object in VS process that listens and responds to callback from CodeLens OOP extensions.
+ /// The remote CodeLens extension calls back to VS through <see cref="StreamJsonRpc.JsonRpc"/>
+ /// which can be obtained from <see cref="Remoting.ICodeLensCallbackService"/>.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part loaded in to VS process and exported by CodeLens data point provider extenders.
+ /// </remarks>
+ /// <example>
+ /// The implementer of this interface should make sure that the implementation has the callback method
+ /// that exactly matches the target name passed to the <see cref="StreamJsonRpc.JsonRpc.InvokeAsync"/>
+ /// in order to receive the callback originated by the InvokeAsync call.
+ ///
+ /// For example, the remote CodeLens extension originates a callback with JSON-RPC method "MyCallbackListener.Callback":
+ ///
+ /// <code>
+ /// [Import]
+ /// ICodeLensCallbackService callbackService;
+ /// ...
+ /// // Get the JsonRpc for the data point
+ /// var jsonRpc = callbackService.GetCallbackJsonRpc(dataPoint);
+ /// // Invoke the callback
+ /// var result = await jsonRpc.InvokeAsync<MyDataType>("MyCallbackListener.Callback", argument);
+ /// </code>
+ ///
+ /// The <see cref="ICodeLensCallbackListener"/> implementation that has the following <see cref="StreamJsonRpc.JsonRpcMethodAttribute"/>
+ /// will receive the callback:
+ ///
+ /// <code>
+ /// [Export(typeof(ICodeLensCallbackListener))]
+ /// public sealed class CodeLensCallbackListener : ICodeLensCallbackListener
+ /// {
+ /// [JsonRpcMethod("MyCallbackListener.Callback")]
+ /// public async Task<MyDataType> OnCallbackAsync(object argument)
+ /// {
+ /// ...
+ /// MyDataType result = await CalculateResult(argument);
+ /// return result;
+ /// }
+ /// }
+ /// </code>
+ /// </example>
+ public interface ICodeLensCallbackListener
+ {
+ // intentionally no method defined for this interface.
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/ICodeLensDescriptor.cs b/src/Editor/Language/Def/Language/CodeLens/ICodeLensDescriptor.cs
new file mode 100644
index 0000000..641e69f
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/ICodeLensDescriptor.cs
@@ -0,0 +1,42 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using Microsoft.VisualStudio.Language.Intellisense;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.CodeLens
+{
+ /// <summary>
+ /// Represents an object describing a code element at the location where an <see cref="ICodeLensTag"/> will be created.
+ /// </summary>
+ public interface ICodeLensDescriptor
+ {
+ /// <summary>
+ /// The absolute file path of the document in which the descriptor is created.
+ /// </summary>
+ string FilePath { get; }
+
+ /// <summary>
+ /// The containing project of the document. Can be <see cref="Guid.Empty"/>
+ /// if the document is a solution's miscellaneous file, or if it does not need to be specified.
+ /// </summary>
+ Guid ProjectGuid { get; }
+
+ /// <summary>
+ /// A short description of the element for which this descriptor is created.
+ /// </summary>
+ string ElementDescription { get; }
+
+ /// <summary>
+ /// The <see cref="Span"/> of the element.
+ /// </summary>
+ Span? ApplicableSpan { get; }
+
+ /// <summary>
+ /// The <see cref="CodeElementKinds"/> of the element.
+ /// </summary>
+ CodeElementKinds Kind { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/ICodeLensTag.cs b/src/Editor/Language/Def/Language/CodeLens/ICodeLensTag.cs
new file mode 100644
index 0000000..b3a3aff
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/ICodeLensTag.cs
@@ -0,0 +1,25 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using Microsoft.VisualStudio.Text.Tagging;
+
+namespace Microsoft.VisualStudio.Language.CodeLens
+{
+ /// <summary>
+ /// An <see cref="ITag"/> indicating the place where CodeLens indicators should be created.
+ /// </summary>
+ public interface ICodeLensTag : ITag
+ {
+ /// <summary>
+ /// The descriptor for this tag.
+ /// </summary>
+ ICodeLensDescriptor Descriptor { get; }
+
+ /// <summary>
+ /// Raised when this tag has been disconnected and is no longer used as part of the editor.
+ /// </summary>
+ event EventHandler Disconnected;
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/CodeLensServiceProtocolNames.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/CodeLensServiceProtocolNames.cs
new file mode 100644
index 0000000..56e4d76
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/CodeLensServiceProtocolNames.cs
@@ -0,0 +1,68 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Defines the names of the protocols for CodeLens ServiceHub service.
+ /// </summary>
+ internal sealed class CodeLensServiceProtocolNames
+ {
+ /// <summary>
+ /// The name of the default SeviceHub service.
+ /// </summary>
+ public const string CodeLensServiceName = "CodeLens";
+
+ /// <summary>
+ /// Protocol for getting CodeLens providers hosted by the service.
+ /// </summary>
+ /// <remarks>
+ /// Protocol params and return:
+ /// params: none
+ /// return: <see cref="CodeLensDataPointProviderDescriptor"/>
+ /// </remarks>
+ public const string GetCodeLensProviders = @"codeLens/getProviders";
+
+ /// <summary>
+ /// Protocol for querying a CodeLens provider if it supports to create a data point.
+ /// </summary>
+ /// Protocol params and return:
+ /// params: <see cref="CodeLensDescriptor"/> and the provider name.
+ /// return: a boolean indicating whether the provider supports to create a data point.
+ /// <remarks>
+ /// </remarks>
+ public const string CanCreateDataPoint = @"codeLens/canCreateDataPoint";
+
+ /// <summary>
+ /// Protocol for retrieving data from a CodeLens data point.
+ /// </summary>
+ /// <remarks>
+ /// Protocol params and return:
+ /// params: <see cref="CodeLensDescriptor"/> and the provider name.
+ /// return: <see cref="CodeLensDataPointDescriptor"/>
+ /// </remarks>
+ public const string GetCodeLensData = @"codeLens/getData";
+
+ /// <summary>
+ /// Protocol for retrieving details of a CodeLens data point.
+ /// </summary>
+ /// <remarks>
+ /// Protocol params and return:
+ /// params: <see cref="CodeLensDescriptor"/> and the provider name.
+ /// return: <see cref="CodeLensDetailsDescriptor"/>
+ /// </remarks>
+ public const string GetCodeLensDetail = @"codeLens/getDetail";
+
+ /// <summary>
+ /// A protocol that the service can use to notify the CodeLens infrastructure
+ /// that the remote CodeLens data in the data point source has been invalidated.
+ /// </summary>
+ /// <remarks>
+ /// Protocol params and return:
+ /// params: <see cref="CodeLensDescriptor"/> and the provider name
+ /// return: none.
+ /// </remarks>
+ public const string NotifyInvalidation = @"codeLens/invalidate";
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDataPointDescriptor.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDataPointDescriptor.cs
new file mode 100644
index 0000000..f5ceab3
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDataPointDescriptor.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Core.Imaging;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Represents a descriptor for a CodeLens data point.
+ /// </summary>
+ /// <remarks>
+ /// This type is used for the object representing a data point returned from the remote data point provider.
+ /// </remarks>
+ public sealed class CodeLensDataPointDescriptor
+ {
+ /// <summary>
+ /// The description text that displays in the UI indicator of the data point.
+ /// </summary>
+ public string Description { get; set; }
+
+ /// <summary>
+ /// The tooltip text for the UI indicator of the data point.
+ /// </summary>
+ public string TooltipText { get; set; }
+
+ /// <summary>
+ /// The image content of the data point.
+ /// </summary>
+ public ImageId? ImageId { get; set; }
+
+ /// <summary>
+ /// The integer content of the data point.
+ /// </summary>
+ public int? IntValue { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDataPointProviderDescriptor.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDataPointProviderDescriptor.cs
new file mode 100644
index 0000000..7e810ba
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDataPointProviderDescriptor.cs
@@ -0,0 +1,54 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Represents a data model describing <see cref="IAsyncCodeLensDataPointProvider"/>s.
+ /// </summary>
+ /// <remarks>
+ /// When requested, the remote CodeLens service returns an object of <see cref="CodeLensDataPointProviderDescriptor"/> for each provider it hosts.
+ /// </remarks>
+ public sealed class CodeLensDataPointProviderDescriptor
+ {
+ /// <summary>
+ /// The uniquely-identifying name of the data point provider.
+ /// </summary>
+ public string ProviderUniqueId { get; set; }
+
+ /// <summary>
+ /// The localized name of the data point provider.
+ /// </summary>
+ public string LocalizedName { get; set; }
+
+ /// <summary>
+ /// List of supported content types.
+ /// </summary>
+ public IEnumerable<string> ContentTypes { get; set; }
+
+ /// <summary>
+ /// An <see cref="int" /> value indicating the order of the indicator.
+ /// Lower value indicators will come first in the default ordering in indicator adornments in editor.
+ /// </summary>
+ public int Priority { get; set; } = int.MaxValue;
+
+ /// <summary>
+ /// Determines if the provider is visible in the tool's option setting.
+ /// </summary>
+ public bool OptionUserVisible { get; set; } = true;
+
+ /// <summary>
+ /// Determines if the provider can be modified in the tool's option setting.
+ /// </summary>
+ public bool OptionUserModifiable { get; set; } = true;
+
+ /// <summary>
+ /// What template to use for presenting the detail in the detail popup.
+ /// Defaults to use a GridView to present detail data.
+ /// </summary>
+ public string DetailsTemplateName { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDescriptor.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDescriptor.cs
new file mode 100644
index 0000000..2550610
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDescriptor.cs
@@ -0,0 +1,44 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using Microsoft.VisualStudio.Language.Intellisense;
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Represents a data model describing the code element in a document on which CodeLens data point indicators would be requested.
+ /// </summary>
+ public sealed class CodeLensDescriptor
+ {
+ /// <summary>
+ /// Full path to the document on which data points are requested.
+ /// </summary>
+ public string FilePath { get; set; }
+
+ /// <summary>
+ /// A <see cref="Guid"/> identifying the project to which the document belongs.
+ /// </summary>
+ public Guid ProjectGuid { get; set; }
+
+ /// <summary>
+ /// A text description for the code element with which a data point is associated.
+ /// </summary>
+ /// <remarks>
+ /// Language services use this property to pass the text of the code element to data points.
+ /// </remarks>
+ public string ElementDescription { get; set; }
+
+ /// <summary>
+ /// A <see cref="Span"/> identifying the place of the code element with which a data point is associated.
+ /// </summary>
+ public Span? ApplicableToSpan { get; set; }
+
+ /// <summary>
+ /// The <see cref="CodeElementKinds"/> of the code element with which a data point is associated.
+ /// </summary>
+ public CodeElementKinds Kind { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailEntryCommand.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailEntryCommand.cs
new file mode 100644
index 0000000..7cd2cb5
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailEntryCommand.cs
@@ -0,0 +1,38 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Represents a navigation command invokable from the details pane.
+ /// </summary>
+ /// <remarks>
+ /// A command can only have either the <see cref="CommandName"/> or
+ /// the pair of <see cref="CommandSet"/> and <see cref="CommandId"/>,
+ /// depending on the platform on which the code runs:
+ /// <list type="bullet">
+ /// <item>On Windows, the <see cref="CommandSet"/> and <see cref="CommandId"/> pair is used.</item>
+ /// <item>On Mac, the <see cref="CommandName"/> is used.</item>
+ /// </list>
+ /// </remarks>
+ public sealed class CodeLensDetailEntryCommand
+ {
+ /// <summary>
+ /// The command name.
+ /// </summary>
+ public string CommandName { get; set; }
+
+ /// <summary>
+ /// The command group <see cref="Guid"/>.
+ /// </summary>
+ public Guid? CommandSet { get; set; }
+
+ /// <summary>
+ /// The command Id.
+ /// </summary>
+ public int? CommandId { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailEntryFieldDescriptor.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailEntryFieldDescriptor.cs
new file mode 100644
index 0000000..e1d221a
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailEntryFieldDescriptor.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Core.Imaging;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Defines a field of a <see cref="CodeLensDetailEntryDescriptor"/>.
+ /// </summary>
+ public sealed class CodeLensDetailEntryField
+ {
+ /// <summary>
+ /// The text string content of the field.
+ /// </summary>
+ public string Text { get; set; }
+
+ /// <summary>
+ /// The image content of the field.
+ /// </summary>
+ public ImageId? ImageId { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailHeaderDescriptor.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailHeaderDescriptor.cs
new file mode 100644
index 0000000..d7c027c
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailHeaderDescriptor.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Defines a header object for <see cref="CodeLensDetailsDescriptor"/>.
+ /// </summary>
+ public sealed class CodeLensDetailHeaderDescriptor
+ {
+ /// <summary>
+ /// The header's unique name.
+ /// </summary>
+ public string UniqueName { get; set; }
+
+ /// <summary>
+ /// The localized name of the header when displayed.
+ /// </summary>
+ public string DisplayName { get; set; }
+
+ /// <summary>
+ /// The desired width of this header when displayed in the detail popup.
+ /// </summary>
+ /// <remarks>
+ /// If <see cref="Width"/> &lt;= 1.0, this value is used as a multifier
+ /// for the percentage of remaining width in the grid view, excluding all fixed width columns,
+ /// should be allocated to this column. A value of 1.0 means 100% of remaining width is allocated to this column.
+ /// </remarks>
+ public double Width { get; set; }
+
+ /// <summary>
+ /// Indicates whether this column should display in the grid view.
+ /// </summary>
+ public bool IsVisible { get; set; } = true;
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailPaneCommand.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailPaneCommand.cs
new file mode 100644
index 0000000..a459a72
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailPaneCommand.cs
@@ -0,0 +1,31 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Collections.Generic;
+using Newtonsoft.Json;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Represents a navigation command in the detail pane.
+ /// </summary>
+ public sealed class CodeLensDetailPaneCommand
+ {
+ /// <summary>
+ /// The command text displayed in the pane.
+ /// </summary>
+ public string CommandDisplayName { get; set; }
+
+ /// <summary>
+ /// The navigation command.
+ /// </summary>
+ public CodeLensDetailEntryCommand CommandId { get; set; }
+
+ /// <summary>
+ /// The command arguments.
+ /// </summary>
+ [JsonProperty(ItemTypeNameHandling = TypeNameHandling.Auto)]
+ public IEnumerable<object> CommandArgs { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailsDescriptor.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailsDescriptor.cs
new file mode 100644
index 0000000..a55b0e1
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailsDescriptor.cs
@@ -0,0 +1,34 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Represents a descriptor for the detail of a data point.
+ /// </summary>
+ /// <remarks>
+ /// When <see cref="IAsyncCodeLensDataPoint.GetDetailsAsync"/> is called,
+ /// the data point returns a <see cref="CodeLensDetailsDescriptor"/> object providing the data point details
+ /// that will be presented in the details popup.
+ /// </remarks>
+ public sealed class CodeLensDetailsDescriptor
+ {
+ /// <summary>
+ /// Defines the headers of the detail list.
+ /// </summary>
+ public IEnumerable<CodeLensDetailHeaderDescriptor> Headers { get; set; }
+
+ /// <summary>
+ /// Defines rows (entries) of the detail list.
+ /// </summary>
+ public IEnumerable<CodeLensDetailEntryDescriptor> Entries { get; set; }
+
+ /// <summary>
+ /// Defines the additional navigation commands in the details pane
+ /// </summary>
+ public IEnumerable<CodeLensDetailPaneCommand> PaneNavigationCommands { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailsEntryDescriptor.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailsEntryDescriptor.cs
new file mode 100644
index 0000000..c6a08f5
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/CodeLensDetailsEntryDescriptor.cs
@@ -0,0 +1,40 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Collections.Generic;
+using Newtonsoft.Json;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Defines a row entry in <see cref="CodeLensDetailsDescriptor"/>.
+ /// </summary>
+ public sealed class CodeLensDetailEntryDescriptor
+ {
+ /// <summary>
+ /// A list of field values in the entry.
+ /// </summary>
+ /// <remarks>
+ /// The order of <see cref="Fields"/> in an entry must be the same as the order of <see cref="CodeLensDetailsDescriptor.Headers"/>
+ /// in the <see cref="CodeLensDetailsDescriptor"/>.
+ /// </remarks>
+ public IEnumerable<CodeLensDetailEntryField> Fields { get; set; }
+
+ /// <summary>
+ /// Tooltip for the entry.
+ /// </summary>
+ public string Tooltip { get; set; }
+
+ /// <summary>
+ /// Navigation command associated with the entry.
+ /// </summary>
+ public CodeLensDetailEntryCommand NavigationCommand { get; set; }
+
+ /// <summary>
+ /// Arguments for the navigation command.
+ /// </summary>
+ [JsonProperty(ItemTypeNameHandling = TypeNameHandling.Auto)]
+ public IEnumerable<object> NavigationCommandArgs { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/PredefinedCodeLensDetailFieldNames.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/PredefinedCodeLensDetailFieldNames.cs
new file mode 100644
index 0000000..921e831
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/PredefinedCodeLensDetailFieldNames.cs
@@ -0,0 +1,54 @@
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ public static class ReferenceEntryFieldNames
+ {
+ /// <summary>
+ /// Name for file path field. Expect a string value.
+ /// </summary>
+ public const string FilePath = "filePath";
+ /// <summary>
+ /// Name for line number field. Expect an integer value and this is 0-indexed
+ /// </summary>
+ public const string LineNumber = "lineNumber";
+ /// <summary>
+ /// Name for colunm number field. Expect an integer value and this is 0-indexed.
+ /// </summary>
+ public const string ColumnNumber = "columnNumber";
+ /// <summary>
+ /// Name for the reference text field. Expect a string value.
+ /// </summary>
+ public const string ReferenceText = "referenceText";
+ /// <summary>
+ /// Name for the field of reference start position in the reference text. Expect an integer value.
+ /// </summary>
+ public const string ReferenceStart = "referenceStart";
+ /// <summary>
+ /// Name for the field of reference end position in the reference text. Expect an integer value.
+ /// </summary>
+ public const string ReferenceEnd = "referenceEnd";
+ /// <summary>
+ /// Name for the field of reference long description. This usually is the reference site with fully qualified reference name. Expect a string value.
+ /// </summary>
+ public const string ReferenceLongDescription = "referenceLongDescription";
+ /// <summary>
+ /// Name for the field of reference image. Expect a value of ImageId (or null if no image associated with this reference).
+ /// </summary>
+ public const string ReferenceImageId = "referenceImageId";
+ /// <summary>
+ /// Name for the field of the second line before reference text. Expect a string value.
+ /// </summary>
+ public const string TextBeforeReference2 = "textBeforeReference2";
+ /// <summary>
+ /// Name for the field of the first line before reference text. Expect a string value.
+ /// </summary>
+ public const string TextBeforeReference1 = "textBeforeReference1";
+ /// <summary>
+ /// Name for the field of the first line after reference text. Expect a string value.
+ /// </summary>
+ public const string TextAfterReference1 = "textAfterReference1";
+ /// <summary>
+ /// Name of the field of the second line after reference text. Expect a string value.
+ /// </summary>
+ public const string TextAfterReference2 = "textAfterReference2";
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/ReferenceDetailEntryDescriptor.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/ReferenceDetailEntryDescriptor.cs
new file mode 100644
index 0000000..62bb7fd
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DataModels/ReferenceDetailEntryDescriptor.cs
@@ -0,0 +1,70 @@
+using Microsoft.VisualStudio.Core.Imaging;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Defines a descriptor representing a reference entry detail for reference indicators.
+ /// </summary>
+ public sealed class ReferenceDetailEntryDescriptor
+ {
+ /// <summary>
+ /// The full path of the source file where the reference is found.
+ /// </summary>
+ public string FilePath { get; set; }
+
+ /// <summary>
+ /// The line number of the reference.
+ /// </summary>
+ public int LineNumber { get; set; }
+
+ /// <summary>
+ /// The column number of the reference.
+ /// </summary>
+ public int ColumnNumber { get; set; }
+
+ /// <summary>
+ /// The content of the line of code where the symbol is referenced.
+ /// </summary>
+ public string ReferenceText { get; set; }
+
+ /// <summary>
+ /// The start position of the reference in the <see cref="ReferenceText"/>.
+ /// </summary>
+ public int ReferenceStart { get; set; }
+
+ /// <summary>
+ /// The end position of the reference in the <see cref="ReferenceText"/>.
+ /// </summary>
+ public int ReferenceEnd { get; set; }
+
+ /// <summary>
+ /// The fully qualified name of the referenced symbol.
+ /// </summary>
+ public string ReferenceLongDescription { get; set; } // or use FullyQualifiedSymbolName?
+
+ /// <summary>
+ /// The <see cref="ImageId"/> representing the type of the referenced symbol.
+ /// </summary>
+ public ImageId? ReferenceImageId { get; set; }
+
+ /// <summary>
+ /// The content of the second line of code before the reference line.
+ /// </summary>
+ public string TextBeforeReference2 { get; set; }
+
+ /// <summary>
+ /// The content of the first line of code before the reference line.
+ /// </summary>
+ public string TextBeforeReference1 { get; set; }
+
+ /// <summary>
+ /// The content of the first line of code after the reference line.
+ /// </summary>
+ public string TextAfterReference1 { get; set; }
+
+ /// <summary>
+ /// The content of the second line of code after the reference line.
+ /// </summary>
+ public string TextAfterReference2 { get; set; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/DetailsTemplateNameAttribute.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/DetailsTemplateNameAttribute.cs
new file mode 100644
index 0000000..e733b44
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/DetailsTemplateNameAttribute.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// A MEF attribute specifying a template for presenting details of data points from a <see cref="IAsyncCodeLensDataPointProvider"/>.
+ /// </summary>
+ public sealed class DetailsTemplateNameAttribute : SingletonBaseMetadataAttribute
+ {
+ /// <summary>
+ /// Initializes a new instance of <see cref="DetailsTemplateNameAttribute"/>.
+ /// </summary>
+ public DetailsTemplateNameAttribute(string detailsTemplateName)
+ {
+ this.DetailsTemplateName = detailsTemplateName;
+ }
+
+ /// <summary>
+ /// The name of the template for presenting the data point's details.
+ /// </summary>
+ public string DetailsTemplateName { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/IAsyncCodeLensDataPoint.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/IAsyncCodeLensDataPoint.cs
new file mode 100644
index 0000000..7955253
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/IAsyncCodeLensDataPoint.cs
@@ -0,0 +1,43 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Threading;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Represents an async CodeLens data point.
+ /// </summary>
+ public interface IAsyncCodeLensDataPoint
+ {
+ /// <summary>
+ /// Raised when the data point is invalidated.
+ /// </summary>
+ event AsyncEventHandler InvalidatedAsync;
+
+ /// <summary>
+ /// The <see cref="CodeLensDescriptor"/> object that uniquely identifies the data point.
+ /// </summary>
+ CodeLensDescriptor Descriptor { get; }
+
+ /// <summary>
+ /// Gets lens data from the data point.
+ /// </summary>
+ /// <returns>
+ /// A <see cref="CodeLensDataPointDescriptor"/> object representing the lens data from the data point.
+ /// </returns>
+ Task<CodeLensDataPointDescriptor> GetDataAsync(CancellationToken token);
+
+ /// <summary>
+ /// Gets lens details from the data point.
+ /// </summary>
+ /// <returns>
+ /// A <see cref="CodeLensDetailEntryDescriptor"/> object representing the lens details of the data point.
+ /// </returns>
+ Task<CodeLensDetailsDescriptor> GetDetailsAsync(CancellationToken token);
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/IAsyncCodeLensDataPointProvider.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/IAsyncCodeLensDataPointProvider.cs
new file mode 100644
index 0000000..3fa541f
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/IAsyncCodeLensDataPointProvider.cs
@@ -0,0 +1,52 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Represents a provider which creates <see cref="IAsyncCodeLensDataPoint"/> instances from
+ /// an <see cref="CodeLensDescriptor"/>.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with the following metadata:
+ /// <code>
+ /// [Export(typeof(IAsyncCodeLensDataPointProvider))]
+ /// [Name("nameOfTheProvider")]
+ /// [ContentType("csharp")]
+ /// </code>
+ ///
+ /// The following metadata are optional:
+ /// <code>
+ /// <see cref="PriorityAttribute"/>
+ /// <see cref="LocalizedNameAttribute"/>
+ /// <see cref="OptionUserVisibleAttribute"/>
+ /// <see cref="OptionUserModifiableAttribute"/>
+ /// <see cref="DetailsTemplateNameAttribute"/>
+ /// </code>
+ /// </remarks>
+ public interface IAsyncCodeLensDataPointProvider
+ {
+ /// <summary>
+ /// Determines if this provider can create an <see cref="IAsyncCodeLensDataPoint"/> for the specified <see cref="CodeLensDescriptor"/>.
+ /// </summary>
+ /// <param name="descriptor">The descriptor to check.</param>
+ /// <returns>
+ /// <c>true</c> if a data point can be created from the descriptor; <c>false</c> otherwise.
+ /// </returns>
+ Task<bool> CanCreateDataPointAsync(CodeLensDescriptor descriptor, CancellationToken token);
+
+ /// <summary>
+ /// Creates an <see cref="IAsyncCodeLensDataPoint"/>, on request, from a given descriptor.
+ /// </summary>
+ /// <param name="descriptor">The descriptor to use.</param>
+ /// <returns>
+ /// An <see cref="IAsyncCodeLensDataPoint"/> created from the descriptor.
+ /// </returns>
+ Task<IAsyncCodeLensDataPoint> CreateDataPointAsync(CodeLensDescriptor descriptor, CancellationToken token);
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/ICodeLensCallbackService.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/ICodeLensCallbackService.cs
new file mode 100644
index 0000000..b67e791
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/ICodeLensCallbackService.cs
@@ -0,0 +1,65 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using StreamJsonRpc;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ /// <summary>
+ /// Represents a service provided by the CodeLens service infrastructure to allow CodeLens extensions to call back to VS.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part provided by the CodeLens service infrastructure, and can be imported by CodeLens extensions.
+ /// Example:
+ ///
+ /// <code>
+ /// [Import(typeof(ICodeLensCallbackService))]
+ /// private ICodeLensCallbackService callbackService;
+ /// </code>
+ /// </remarks>
+ [CLSCompliant(false)]
+ public interface ICodeLensCallbackService
+ {
+ /// <summary>
+ /// Gets a <see cref="JsonRpc"/> on which the <paramref name="dataPointProvider"/> can originate a callback to VS process.
+ /// </summary>
+ /// <param name="dataPointProvider">
+ /// The <see cref="IAsyncCodeLensDataPointProvider"/> which the <see cref="JsonRpc"/> is associated with.
+ /// </param>
+ /// <returns>The <see cref="JsonRpc"/> that can be used to call back to VS process.</returns>
+ /// <remarks>
+ /// CodeLens extensions can use the <see cref="JsonRpc"/> returned from this method to invoke a callback to VS process
+ /// using one of the JsonRpc.InvokeAsync overloads. The VS in-proc <see cref="ICodeLensCallbackListener"/>
+ /// that has a method whose name or JsonRpcMethodAttribute exactly matches the target name passed to the
+ /// callback invocation will receive the callback and can respond to the callback request with a result.
+ ///
+ /// Refer to JsonRpcMethodAttribute and JsonRpc.InvokeAsync for more detail.
+ /// </remarks>
+ /// <example>
+ /// See <see cref="ICodeLensCallbackListener"/> for a callback example.
+ /// </example>
+ JsonRpc GetCallbackJsonRpc(IAsyncCodeLensDataPointProvider dataPointProvider);
+
+ /// <summary>
+ /// Gets a <see cref="JsonRpc"/> on which the <paramref name="dataPoint"/> can originate a callback to VS process.
+ /// </summary>
+ /// <param name="dataPoint">
+ /// The <see cref="IAsyncCodeLensDataPoint"/> which the <see cref="JsonRpc"/> is associated with.
+ /// </param>
+ /// <returns>The <see cref="JsonRpc"/> that can be used to call back to VS process.</returns>
+ /// <remarks>
+ /// CodeLens extensions can use the <see cref="JsonRpc"/> returned from this method to invoke a callback to VS process
+ /// using one of the JsonRpc.InvokeAsync overloads. The VS in-proc <see cref="ICodeLensCallbackListener"/>
+ /// that has a method whose name or JsonRpcMethodAttribute exactly matches the target name passed to the
+ /// callback invocation will receive the callback and can respond to the callback request with a result.
+ ///
+ /// Refer to JsonRpcMethodAttribute and JsonRpc.InvokeAsync for more detail.
+ /// </remarks>
+ /// <example>
+ /// See <see cref="ICodeLensCallbackListener"/> for a callback example.
+ /// </example>
+ JsonRpc GetCallbackJsonRpc(IAsyncCodeLensDataPoint dataPoint);
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/CodeLensAggregateJsonConverter.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/CodeLensAggregateJsonConverter.cs
new file mode 100644
index 0000000..27cc574
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/CodeLensAggregateJsonConverter.cs
@@ -0,0 +1,146 @@
+using System;
+using System.Collections.Immutable;
+using System.Diagnostics;
+using Microsoft.VisualStudio.Core.Imaging;
+using Microsoft.VisualStudio.Text;
+using Newtonsoft.Json;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ internal partial class CodeLensAggregateJsonConverter : JsonConverter
+ {
+ public static readonly CodeLensAggregateJsonConverter Instance = new CodeLensAggregateJsonConverter();
+
+ private readonly ImmutableDictionary<Type, JsonConverter> map;
+
+ private CodeLensAggregateJsonConverter()
+ {
+ this.map = CreateConverterMap();
+ }
+
+ public override bool CanConvert(Type objectType)
+ => this.map.ContainsKey(objectType);
+
+ public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
+ => this.map[objectType].ReadJson(reader, objectType, existingValue, serializer);
+
+ public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
+ => this.map[value.GetType()].WriteJson(writer, value, serializer);
+
+ partial void AppendJsonConverters(ImmutableDictionary<Type, JsonConverter>.Builder builder);
+
+ private ImmutableDictionary<Type, JsonConverter> CreateConverterMap()
+ {
+ var builder = ImmutableDictionary.CreateBuilder<Type, JsonConverter>();
+
+ Add(builder, new SpanJsonConverter());
+ Add(builder, new NullableJsonConverter<Span>());
+ Add(builder, new ImageIdJsonConverter());
+ Add(builder, new NullableJsonConverter<ImageId>());
+
+ AppendJsonConverters(builder);
+
+ return builder.ToImmutable();
+ }
+
+ private static void Add<T>(
+ ImmutableDictionary<Type, JsonConverter>.Builder builder,
+ BaseJsonConverter<T> converter)
+ {
+ builder.Add(typeof(T), converter);
+ }
+
+ private abstract class BaseJsonConverter<T> : JsonConverter
+ {
+ public sealed override bool CanConvert(Type objectType)
+ => typeof(T) == objectType;
+
+ public sealed override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
+ => ReadValue(reader, serializer);
+
+ public sealed override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
+ => WriteValue(writer, (T)value, serializer);
+
+ protected abstract T ReadValue(JsonReader reader, JsonSerializer serializer);
+ protected abstract void WriteValue(JsonWriter writer, T value, JsonSerializer serializer);
+
+ protected static U ReadProperty<U>(JsonReader reader, JsonSerializer serializer)
+ {
+ // read property
+ Assumes.True(reader.Read());
+ Assumes.True(reader.TokenType == JsonToken.PropertyName);
+
+ Assumes.True(reader.Read());
+ return serializer.Deserialize<U>(reader);
+ }
+
+ protected static U ReadProperty<U>(JsonReader reader)
+ {
+ // read property
+ Assumes.True(reader.Read());
+ Assumes.True(reader.TokenType == JsonToken.PropertyName);
+
+ Assumes.True(reader.Read());
+ return (U)reader.Value;
+ }
+
+ protected static U? ReadNullableProperty<U>(JsonReader reader) where U : struct
+ {
+ // read property
+ Assumes.True(reader.Read());
+ Assumes.True(reader.TokenType == JsonToken.PropertyName);
+
+ Assumes.True(reader.Read());
+ if (reader.TokenType == JsonToken.Null)
+ {
+ return default(U?);
+ }
+ else
+ {
+ return (U)reader.Value;
+ }
+ }
+
+ protected static U? ReadNullableProperty<U>(JsonReader reader, JsonSerializer serializer) where U : struct
+ {
+ // read property
+ Assumes.True(reader.Read());
+ Assumes.True(reader.TokenType == JsonToken.PropertyName);
+
+ Assumes.True(reader.Read());
+ if (reader.TokenType == JsonToken.Null)
+ {
+ return default(U?);
+ }
+ else
+ {
+ return serializer.Deserialize<U>(reader);
+ }
+ }
+ }
+
+ private sealed class NullableJsonConverter<U> : BaseJsonConverter<U?> where U : struct
+ {
+ protected override U? ReadValue(JsonReader reader, JsonSerializer serializer)
+ {
+ if (reader.TokenType == JsonToken.Null)
+ return default(U?);
+
+ return serializer.Deserialize<U>(reader);
+ }
+
+ protected override void WriteValue(JsonWriter writer, U? value, JsonSerializer serializer)
+ {
+ Debug.Assert(value.HasValue);
+ if (value.HasValue)
+ {
+ serializer.Serialize(writer, value.Value);
+ }
+ else
+ {
+ writer.WriteNull();
+ }
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/ImageIdJsonConverter.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/ImageIdJsonConverter.cs
new file mode 100644
index 0000000..fc84273
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/ImageIdJsonConverter.cs
@@ -0,0 +1,35 @@
+using System;
+using Microsoft.VisualStudio.Core.Imaging;
+using Newtonsoft.Json;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ internal partial class CodeLensAggregateJsonConverter : JsonConverter
+ {
+ private sealed class ImageIdJsonConverter : BaseJsonConverter<ImageId>
+ {
+ protected override ImageId ReadValue(JsonReader reader, JsonSerializer serializer)
+ {
+ Assumes.True(reader.TokenType == JsonToken.StartObject);
+
+ var guid = ReadProperty<Guid>(reader, serializer);
+ var id = ReadProperty<long>(reader);
+
+ Assumes.True(reader.Read());
+ Assumes.True(reader.TokenType == JsonToken.EndObject);
+
+ return new ImageId(guid, (int)id);
+ }
+
+ protected override void WriteValue(JsonWriter writer, ImageId value, JsonSerializer serializer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName(nameof(ImageId.Guid));
+ writer.WriteValue(value.Guid);
+ writer.WritePropertyName(nameof(ImageId.Id));
+ writer.WriteValue(value.Id);
+ writer.WriteEndObject();
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/SpanJsonConverter.cs b/src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/SpanJsonConverter.cs
new file mode 100644
index 0000000..c0dd767
--- /dev/null
+++ b/src/Editor/Language/Def/Language/CodeLens/Remoting/JsonConverters/SpanJsonConverter.cs
@@ -0,0 +1,35 @@
+using Microsoft.VisualStudio.Text;
+using Newtonsoft.Json;
+
+namespace Microsoft.VisualStudio.Language.CodeLens.Remoting
+{
+ internal partial class CodeLensAggregateJsonConverter : JsonConverter
+ {
+ private sealed class SpanJsonConverter : BaseJsonConverter<Span>
+ {
+ protected override Span ReadValue(JsonReader reader, JsonSerializer serializer)
+ {
+ Assumes.True(reader.TokenType == JsonToken.StartObject);
+
+ // all integer is long
+ var start = ReadProperty<long>(reader);
+ var length = ReadProperty<long>(reader);
+
+ Assumes.True(reader.Read());
+ Assumes.True(reader.TokenType == JsonToken.EndObject);
+
+ return new Span((int)start, (int)length);
+ }
+
+ protected override void WriteValue(JsonWriter writer, Span span, JsonSerializer serializer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName(nameof(Span.Start));
+ writer.WriteValue(span.Start);
+ writer.WritePropertyName(nameof(Span.Length));
+ writer.WriteValue(span.Length);
+ writer.WriteEndObject();
+ }
+ }
+ }
+}
diff --git a/src/Editor/Language/Def/Language/LanguageDef.csproj b/src/Editor/Language/Def/Language/LanguageDef.csproj
new file mode 100644
index 0000000..a5e916c
--- /dev/null
+++ b/src/Editor/Language/Def/Language/LanguageDef.csproj
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Language</AssemblyName>
+ <RootNamespace>Microsoft.VisualStudio.Language.Intellisense</RootNamespace>
+ <PushToPublicFeed>true</PushToPublicFeed>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="StreamJsonRpc" />
+ <PackageReference Include="System.Collections.Immutable" />
+ <PackageReference Include="Newtonsoft.Json" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\..\Text\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\..\Text\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\..\Text\Def\TextUI\TextUI.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Language/Def/Language/QuickInfo/IAsyncQuickInfoSession2.cs b/src/Editor/Language/Def/Language/QuickInfo/IAsyncQuickInfoSession2.cs
new file mode 100644
index 0000000..86f42e5
--- /dev/null
+++ b/src/Editor/Language/Def/Language/QuickInfo/IAsyncQuickInfoSession2.cs
@@ -0,0 +1,14 @@
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ /// <summary>
+ /// Tracks state of a visible or calculating Quick Info session.
+ /// </summary>
+ public interface IAsyncQuickInfoSession2 : IAsyncQuickInfoSession
+ {
+ /// <summary>
+ /// Check if mouse is over the Quick Info tip, to prevent triggering a new session for
+ /// a span that appears below the tip.
+ /// </summary>
+ bool IsMouseOverAggregated { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/StandardClassification/AssemblyInfo.cs b/src/Editor/Language/Def/StandardClassification/AssemblyInfo.cs
new file mode 100644
index 0000000..abd3a24
--- /dev/null
+++ b/src/Editor/Language/Def/StandardClassification/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Runtime.Versioning;
+using System.Security.Permissions;
+
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+
+[assembly: ComponentGuarantees(ComponentGuaranteesOptions.Stable)]
+
+
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Language/Def/StandardClassification/IStandardClassificationService.cs b/src/Editor/Language/Def/StandardClassification/IStandardClassificationService.cs
new file mode 100644
index 0000000..476de2a
--- /dev/null
+++ b/src/Editor/Language/Def/StandardClassification/IStandardClassificationService.cs
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.StandardClassification
+{
+ using Microsoft.VisualStudio.Text.Classification;
+
+ /// <summary>
+ /// Provides access to standard classifications.
+ /// </summary>
+ /// <remarks>This is a MEF Component, and should be imported with the following attribute:
+ /// [Import(typeof(IStandardClassificationService))]
+ /// </remarks>
+ public interface IStandardClassificationService
+ {
+ /// <summary>
+ /// Gets a classification type representing a natural language.
+ /// </summary>
+ IClassificationType NaturalLanguage { get; }
+
+ /// <summary>
+ /// Gets a classification type representing a formal language.
+ /// </summary>
+ IClassificationType FormalLanguage { get; }
+
+ /// <summary>
+ /// Gets a classification type representing comments in a formal language.
+ /// </summary>
+ IClassificationType Comment { get; }
+
+ /// <summary>
+ /// Gets a classification type representing identifiers in a formal language.
+ /// </summary>
+ IClassificationType Identifier { get; }
+
+ /// <summary>
+ /// Gets a classification type representing keywords in a formal language.
+ /// </summary>
+ IClassificationType Keyword { get; }
+
+ /// <summary>
+ /// Gets a classification type representing whitespace in a formal language.
+ /// </summary>
+ IClassificationType WhiteSpace { get; }
+
+ /// <summary>
+ /// Gets a classification type representing whitespace in a formal language.
+ /// </summary>
+ IClassificationType Operator { get; }
+
+ /// <summary>
+ /// Gets a classification type representing literals in a formal language.
+ /// </summary>
+ IClassificationType Literal { get; }
+
+ /// <summary>
+ /// Gets a classification type representing numerical literals which derives from the literal classification type in a formal language.
+ /// </summary>
+ IClassificationType NumberLiteral { get; }
+
+ /// <summary>
+ /// Gets a classification type representing string literals which derives from the literal classification type in a formal language.
+ /// </summary>
+ IClassificationType StringLiteral { get; }
+
+ /// <summary>
+ /// Gets a classification type representing character literals which derives from the literal classification type in a formal language.
+ /// </summary>
+ IClassificationType CharacterLiteral { get; }
+
+ /// <summary>
+ /// Gets a classification type representing anything in a formal language.
+ /// </summary>
+ IClassificationType Other { get; }
+
+ /// <summary>
+ /// Gets a classification type representing blocks excluded by the preprocessor or other means in a formal language.
+ /// </summary>
+ IClassificationType ExcludedCode { get; }
+
+ /// <summary>
+ /// Gets a classification type representing preprocessor keywords in a formal language.
+ /// </summary>
+ IClassificationType PreprocessorKeyword { get; }
+
+ /// <summary>
+ /// Gets a classification type representing the definition of a symbol in a formal language.
+ /// </summary>
+ IClassificationType SymbolDefinition { get; }
+
+ /// <summary>
+ /// Gets a classification type representing the reference to a symbol in a formal language.
+ /// </summary>
+ IClassificationType SymbolReference { get; }
+ }
+}
diff --git a/src/Editor/Language/Def/StandardClassification/LanguagePriority.cs b/src/Editor/Language/Def/StandardClassification/LanguagePriority.cs
new file mode 100644
index 0000000..bd0a865
--- /dev/null
+++ b/src/Editor/Language/Def/StandardClassification/LanguagePriority.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.StandardClassification
+{
+ /// <summary>
+ /// Represents the built-in priorities for language classifications.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// The set of default classification types and format definitions provided by the <see cref="IStandardClassificationService"/> define
+ /// natural language and formal language classification types. These classification types act as classification types upon which other
+ /// classification types are based.
+ /// </para>
+ /// <para>
+ /// Formal language classifications have higher priority than natural language classification types (and by definition all derivatives of
+ /// formal language classifications have higher priority than derivatives of the natural language classification types).
+ /// </para>
+ /// <para>
+ /// Both the formal and natural language classification types fall between the Priority.Default and Priority.High
+ /// generic priorities.
+ /// </para>
+ /// </remarks>
+ public static class LanguagePriority
+ {
+ /// <summary>
+ /// Priority for the natural language classification definitions.
+ /// </summary>
+ public const string NaturalLanguage = "Natural Language Priority";
+
+ /// <summary>
+ /// Priority for the formal language classificaiton definitions.
+ /// </summary>
+ public const string FormalLanguage = "Formal Language Priority";
+ }
+}
diff --git a/src/Editor/Language/Def/StandardClassification/PredefinedClassificationTypeNames.cs b/src/Editor/Language/Def/StandardClassification/PredefinedClassificationTypeNames.cs
new file mode 100644
index 0000000..f48c652
--- /dev/null
+++ b/src/Editor/Language/Def/StandardClassification/PredefinedClassificationTypeNames.cs
@@ -0,0 +1,162 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Language.StandardClassification
+{
+ /// <summary>
+ /// Defines a list of predefined classification type names.
+ /// </summary>
+ /// <remarks>
+ /// The classification type names defined herein are used by the <see cref="IStandardClassificationService"/> to create the set of pre-existing classification types.
+ /// </remarks>
+ public static class PredefinedClassificationTypeNames
+ {
+ /// <summary>
+ /// Name of the classification type representing the background color of Peek adornements.
+ /// </summary>
+ public const string PeekBackground = "peek background";
+
+ /// <summary>
+ /// Name of the classification type representing the background color of Peek adornments when they do not have keyboard focus.
+ /// </summary>
+ public const string PeekBackgroundUnfocused = "peek background unfocused";
+
+ /// <summary>
+ /// Name of the classification type representing the border color when Peek is focused.
+ /// </summary>
+ public const string PeekFocusedBorder = "peek focused border";
+
+ /// <summary>
+ /// Name of the classification type representing the color of a history dot in Peek when it is currently selected.
+ /// </summary>
+ public const string PeekHistorySelected = "peek history selected";
+
+ /// <summary>
+ /// Name of the classification type representing the color of a history dot in Peek when the mouse is currently over it.
+ /// </summary>
+ public const string PeekHistoryHovered = "peek history hovered";
+
+ /// <summary>
+ /// Name of the classification type representing the foreground color of peek error pages. This should match ToolWindowText color by default.
+ /// </summary>
+ public const string PeekLabelText = "peek label text";
+
+ /// <summary>
+ /// Name of the classification type representing the background color of peek highlights.
+ /// </summary>
+ public const string PeekHighlightedText = "peek highlighted text";
+
+ /// <summary>
+ /// Name of the classification type representing the background color of peek highlights when the peek window is not currently focused.
+ /// </summary>
+ public const string PeekHighlightedTextUnfocused = "peek highlighted text unfocused";
+
+ /// <summary>
+ /// Name of the classification type representing comments.
+ /// </summary>
+ public const string Comment = "comment";
+
+ /// <summary>
+ /// Name of the classification type representing identifiers. In C# for instance, these would be variable names.
+ /// </summary>
+ public const string Identifier = "identifier";
+
+ /// <summary>
+ /// Name of the classification type representing keywords. In C# for instance, foreach would be a keyword.
+ /// </summary>
+ public const string Keyword = "keyword";
+
+ /// <summary>
+ /// Name of the classification type representing white space.
+ /// </summary>
+ public const string WhiteSpace = "whitespace";
+
+ /// <summary>
+ /// Name of the classification type representing operators. In C# for instance, + would be an operator.
+ /// </summary>
+ public const string Operator = "operator";
+
+ /// <summary>
+ /// Name of the classification type representing literals.
+ /// </summary>
+ public const string Literal = "literal";
+
+ /// <summary>
+ /// Name of the classification type representing markup attributes. Markup attributes are attributes in markup languages,
+ /// such as HTML, XML, and YAML.
+ /// </summary>
+ public const string MarkupAttribute = "markup attribute";
+
+ /// <summary>
+ /// Name of the classification type representing markup attribute values. Markup attribute values are values
+ /// of attributes in markup languages, such as HTML, XML, and YAML.
+ /// </summary>
+ public const string MarkupAttributeValue = "markup attribute value";
+
+ /// <summary>
+ /// Name of the classification type representing markup nodes. Markup nodes are nodes in markup languages,
+ /// such as HTML, XML, and YAML.
+ /// </summary>
+ public const string MarkupNode = "markup node";
+
+#pragma warning disable CA1720 // Identifier contains type name
+ /// <summary>
+ /// Name of the classification type representing strings.
+ /// </summary>
+ public const string String = "string";
+#pragma warning restore CA1720 // Identifier contains type name
+
+ /// <summary>
+ /// Name of the classification type representing types.
+ /// </summary>
+ public const string Type = "type";
+
+ /// <summary>
+ /// Name of the classification type representing characters.
+ /// </summary>
+ public const string Character = "character";
+
+ /// <summary>
+ /// Name of the classification type representing numbers.
+ /// </summary>
+ public const string Number = "number";
+
+ /// <summary>
+ /// Name of the classification type representing all other types of classifications.
+ /// </summary>
+ public const string Other = "other";
+
+ /// <summary>
+ /// Name of the classification type representing items that are excluded via a preprocessor macro or other means.
+ /// </summary>
+ public const string ExcludedCode = "excluded code";
+
+ /// <summary>
+ /// Name of the classification type representing preprocessor keywords.
+ /// </summary>
+ public const string PreprocessorKeyword = "preprocessor keyword";
+
+ /// <summary>
+ /// Name of the classification type representing definition of symbols.
+ /// </summary>
+ public const string SymbolDefinition = "symbol definition";
+
+ /// <summary>
+ /// Name of the classification type representing symbol references.
+ /// </summary>
+ public const string SymbolReference = "symbol reference";
+
+ /// <summary>
+ /// Name of the classification type representing a natural language classification. This classification type is intended to be used
+ /// as a base classification type for other classification types belonging to a set of natural language classifications.
+ /// </summary>
+ public const string NaturalLanguage = "natural language";
+
+ /// <summary>
+ /// Name of the classification type representing a formal language. This classification type is intended to be used as a base
+ /// classification type for all classification types belonging to a set of formal langauge classifications. For example literals
+ /// and keywords.
+ /// </summary>
+ public const string FormalLanguage = "formal language";
+ }
+}
diff --git a/src/Editor/Language/Def/StandardClassification/StandardClassification.csproj b/src/Editor/Language/Def/StandardClassification/StandardClassification.csproj
new file mode 100644
index 0000000..15ed88c
--- /dev/null
+++ b/src/Editor/Language/Def/StandardClassification/StandardClassification.csproj
@@ -0,0 +1,16 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Language.StandardClassification</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <PushToPublicFeed>true</PushToPublicFeed>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Text\Def\TextLogic\TextLogic.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Language/Impl/Language/AssemblyInfo.cs b/src/Editor/Language/Impl/Language/AssemblyInfo.cs
new file mode 100644
index 0000000..6770d66
--- /dev/null
+++ b/src/Editor/Language/Impl/Language/AssemblyInfo.cs
@@ -0,0 +1,22 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo ("Microsoft.VisualStudio.Language.Intellisense.UnitTests, PublicKey=" + ThisAssembly.PublicKey )]
+[assembly: InternalsVisibleTo ("Microsoft.VisualStudio.Language.Intellisense.IntegrationTests, PublicKey=" + ThisAssembly.PublicKey )]
+[assembly: InternalsVisibleTo ("Microsoft.VisualStudio.Language.Intellisense.UnitTestHelper, PublicKey=" + ThisAssembly.PublicKey )]
+[assembly: InternalsVisibleTo ("Microsoft.VisualStudio.Language.Intellisense.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo ("Microsoft.VisualStudio.Language.Intellisense.CompletionIntegrationTests, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionBroker.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionBroker.cs
index cad8d36..798f68a 100644
--- a/src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionBroker.cs
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionBroker.cs
@@ -4,6 +4,7 @@ using System.Collections.Immutable;
using System.ComponentModel.Composition;
using System.Linq;
using System.Threading;
+using System.Threading.Tasks;
using Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
@@ -68,8 +69,14 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
private bool firstRun = true; // used only for diagnostics
private bool _firstInvocationReported; // used for "time to code"
+ private object telemetryCreationLock = new object();
private StableContentTypeComparer _contentTypeComparer;
- private Dictionary<IContentType, bool> _providerAvailabilityByContentType = new Dictionary<IContentType, bool>();
+ private Dictionary<CompletionAvailabilityCacheKey, bool> _providerAvailabilityCache = new Dictionary<CompletionAvailabilityCacheKey, bool>();
+
+ /// <summary>
+ /// Allow language to override which snapshot we use for mapping, to support completion in incorrectly built text views (Roslyn's DebuggerTextView)
+ /// </summary>
+ private const string RootSnapshotPropertyName = "CompletionRoot";
public event EventHandler<CompletionTriggeredEventArgs> CompletionTriggered;
@@ -80,26 +87,28 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
return textView.Properties.ContainsProperty(typeof(IAsyncCompletionSession));
}
- public bool IsCompletionSupported(IContentType contentType)
- {
- // This will call HasCompletionProviders among doing other checks
- return CompletionAvailability.IsAvailable(contentType);
- }
+ public bool IsCompletionSupported(IContentType contentType) => CompletionAvailability.IsAvailable(contentType, roles: null); // This will call HasCompletionProviders among doing other checks
+
+ public bool IsCompletionSupported(IContentType contentType, ITextViewRoleSet textViewRoleSet) => CompletionAvailability.IsAvailable(contentType, textViewRoleSet); // This will call HasCompletionProviders among doing other checks
/// <summary>
/// Returns whether there exist any <see cref="IAsyncCompletionSourceProvider"/>
/// for the provided <see cref="IContentType"/> or any of its base content types.
/// Since MEF parts don't change on runtime, the answer is cached per <see cref="IContentType"/> for faster retrieval.
/// </summary>
- internal bool HasCompletionProviders(IContentType contentType)
+ internal bool HasCompletionProviders(IContentType contentType, ITextViewRoleSet roles = null)
{
+ var key = new CompletionAvailabilityCacheKey(contentType, roles);
+
// Use cache if available
- if (_providerAvailabilityByContentType.TryGetValue(contentType, out bool featureIsAvailable))
+ if (_providerAvailabilityCache.TryGetValue(key, out bool featureIsAvailable))
return featureIsAvailable;
- featureIsAvailable = UnorderedCompletionSourceProviders.Any(n => n.Metadata.ContentTypes.Any(ct => contentType.IsOfType(ct)));
+ featureIsAvailable = UnorderedCompletionSourceProviders.Any(n =>
+ n.Metadata.ContentTypes.Any(ct => contentType.IsOfType(ct))
+ && (n.Metadata.TextViewRoles == null || roles == null || roles.ContainsAny(n.Metadata.TextViewRoles)));
- _providerAvailabilityByContentType[contentType] = featureIsAvailable;
+ _providerAvailabilityCache[key] = featureIsAvailable;
return featureIsAvailable;
}
@@ -124,7 +133,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
// If it succeeds, we will map triggerLocation to available buffers to discover MEF parts.
// This is expensive but projected languages require it to discover parts in all available buffers.
// To avoid doing this work, call IsCompletionSupported with appropriate IContentType prior to calling TriggerCompletion
- if (!CompletionAvailability.IsAvailable(textView, contentTypeToCheckBlacklist: triggerLocation.Snapshot.ContentType))
+ if (!CompletionAvailability.IsCurrentlyAvailable(textView, contentTypeToCheckBlacklist: triggerLocation.Snapshot.ContentType))
+ return null;
+
+ if (textView.IsClosed)
return null;
if (!JoinableTaskContext.IsOnMainThread)
@@ -133,35 +145,124 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
var telemetryHost = GetOrCreateTelemetry(textView);
var telemetry = new CompletionSessionTelemetry(telemetryHost);
- GetCommitManagersAndChars(textView.BufferGraph, textView.Roles, textView, triggerLocation, GetCommitManagerProviders, telemetry,
- out var managersWithBuffers, out var potentialCommitChars);
+ var rootSnapshot = GetRootSnapshot(textView);
+
+ if (token.IsCancellationRequested || textView.IsClosed)
+ return null;
- GetCompletionSources(textView.TextBuffer, textView.Roles, textView, textView.BufferGraph, trigger, triggerLocation, GetItemSourceProviders, telemetry, token,
+ GetCompletionSources(triggerLocation, GetItemSourceProviders, rootSnapshot, textView, textView.BufferGraph, trigger, telemetry, token,
out var sourcesWithLocations, out var applicableToSpan);
+ if (token.IsCancellationRequested || textView.IsClosed)
+ return null;
+
// No source declared an appropriate ApplicableToSpan
if (applicableToSpan == default)
return null;
+
// No source wishes to participate
if (!sourcesWithLocations.Any())
return null;
-
+
+ // Some of our extensions need to initialize the source providers before they initialize commit manager providers.
+ // Therefore, it is important to invoke GetCommitManagerProviders after invoking GetItemSourceProviders.
+ GetCommitManagersAndChars(triggerLocation, GetCommitManagerProviders, rootSnapshot, textView, telemetry,
+ out var managersWithBuffers, out var potentialCommitChars);
+
if (_contentTypeComparer == null)
_contentTypeComparer = new StableContentTypeComparer(ContentTypeRegistryService);
- var itemManager = GetItemManager(textView.BufferGraph, textView.Roles, textView, triggerLocation, GetItemManagerProviders, _contentTypeComparer);
- var presenterProvider = GetPresenterProvider(textView.BufferGraph, textView.Roles, triggerLocation, GetPresenters, _contentTypeComparer);
+ var itemManager = GetItemManager(triggerLocation, GetItemManagerProviders, rootSnapshot, textView, _contentTypeComparer);
+ var presenterProvider = GetPresenterProvider(triggerLocation, GetPresenters, rootSnapshot, textView.Roles, _contentTypeComparer);
+
+ if (token.IsCancellationRequested || textView.IsClosed)
+ return null;
session = new AsyncCompletionSession(applicableToSpan, potentialCommitChars, JoinableTaskContext, presenterProvider, sourcesWithLocations, managersWithBuffers, itemManager, this, textView, telemetry, GuardedOperations);
textView.Properties.AddProperty(typeof(IAsyncCompletionSession), session);
- textView.Closed += TextView_Closed;
+ textView.Closed += DismissSessionOnViewClosed;
EmulateLegacyCompletionTelemetry(textView);
GuardedOperations.RaiseEvent(this, CompletionTriggered, new CompletionTriggeredEventArgs(session, textView));
return session;
}
+ public async Task<AggregatedCompletionContext> GetAggregatedCompletionContextAsync(ITextView textView, CompletionTrigger trigger, SnapshotPoint triggerLocation, CancellationToken token)
+ {
+ if (token.IsCancellationRequested || textView.IsClosed)
+ return AggregatedCompletionContext.Empty;
+
+ var telemetryHost = GetOrCreateTelemetry(textView);
+ var telemetry = new CompletionSessionTelemetry(telemetryHost, headless: true);
+
+ // ----- GetCompletionSources and GetRootSnapshot need to be run on the UI thread:
+ await JoinableTaskContext.Factory.SwitchToMainThreadAsync();
+
+ if (token.IsCancellationRequested || textView.IsClosed)
+ return AggregatedCompletionContext.Empty;
+
+ var rootSnapshot = GetRootSnapshot(textView);
+
+ GetCompletionSources(triggerLocation, GetItemSourceProviders, rootSnapshot, textView, textView.BufferGraph, trigger, telemetry, token,
+ out var sourcesWithLocations, out var applicableToSpan);
+
+ // ----- Go back to background thread to continue processing
+ await TaskScheduler.Default;
+
+ if (token.IsCancellationRequested || textView.IsClosed)
+ return AggregatedCompletionContext.Empty;
+
+ // No source declared an appropriate ApplicableToSpan
+ if (applicableToSpan == default)
+ return AggregatedCompletionContext.Empty;
+
+ // No source wishes to participate
+ if (!sourcesWithLocations.Any())
+ return null;
+
+ var aggregatingSession = AsyncCompletionSession.CreateAggregatingSession(applicableToSpan, JoinableTaskContext, sourcesWithLocations, this, textView, telemetry, GuardedOperations);
+
+ var completionData = await aggregatingSession.ConnectToCompletionSources(trigger, triggerLocation, rootSnapshot, token).ConfigureAwait(true);
+
+ if (completionData.IsCanceled)
+ return AggregatedCompletionContext.Empty;
+
+ var aggregateCompletionContext = new CompletionContext(
+ completionData.InitialCompletionItems,
+ completionData.RequestedSuggestionItemOptions,
+ completionData.InitialSelectionHint);
+ return new AggregatedCompletionContext(aggregateCompletionContext, aggregatingSession);
+ }
+
+ /// <summary>
+ /// Gets the root snapshot which we use to locate all buffers available at a given location
+ /// Normally, <see cref="ITextView.TextSnapshot"/> is appropriate to use.
+ ///
+ /// However, in Roslyn Debugger scenario, the text view is built in an uncoventional way,
+ /// such that the TextView's TextSnapshot corresponds to what should be in middle of the buffer graph.
+ /// To work around this, we ask Roslyn to provide the true root in the property bag
+ /// so that we can correctly perform mapping. To retire this method, we need Roslyn
+ /// to refactor the debugger text view and the immediate window to use correct projection.
+ ///
+ /// Note that the <see cref="ITextView.VisualSnapshot"/> (usually the same as <see cref="IBufferGraph.TopBuffer"/>)
+ /// is inappropriate, because it might be an elision buffer. If we map down from the elision buffer,
+ /// we may locate incorrect points around elided text.
+ ///
+ /// /// Note that the root snapshot cannot be use to realize the <see cref="IAsyncCompletionSession.ApplicableToSpan"/>,
+ /// which is always defined on the <see cref="ITextView.TextSnapshot"/>
+ /// </summary>
+ /// <param name="textView">TextView which will host completion</param>
+ /// <returns><see cref="ITextSnapshot"/> appropriate to map down to locate buffers.</returns>
+ internal static ITextSnapshot GetRootSnapshot(ITextView textView)
+ {
+ if (textView.Properties.TryGetProperty(RootSnapshotPropertyName, out ITextBuffer rootBuffer))
+ {
+ return rootBuffer.CurrentSnapshot;
+ }
+ return textView.TextSnapshot;
+ }
+
#endregion
#region Internal communication with AsyncCompletionSession
@@ -174,6 +275,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
#pragma warning disable CA1822 // Member does not access instance data and can be marked as static
internal void ForgetSession(IAsyncCompletionSession session)
{
+ session.TextView.Closed -= DismissSessionOnViewClosed;
session.TextView.Properties.RemoveProperty(typeof(IAsyncCompletionSession));
}
#pragma warning restore CA1822
@@ -183,17 +285,16 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
#region MEF part helper methods
private void GetCommitManagersAndChars(
- IBufferGraph bufferGraph,
- ITextViewRoleSet roles,
- ITextView textViewForGetOrCreate, /* This name conveys that we're using ITextView only to init the MEF part. this is subject to change. */
SnapshotPoint triggerLocation,
Func<IContentType, ITextViewRoleSet, IReadOnlyList<Lazy<IAsyncCompletionCommitManagerProvider, IOrderableContentTypeAndOptionalTextViewRoleMetadata>>> getImports,
+ ITextSnapshot rootSnapshot,
+ ITextView textView,
CompletionSessionTelemetry telemetry,
out IList<(IAsyncCompletionCommitManager, ITextBuffer)> managersWithBuffers,
out ImmutableArray<char> potentialCommitChars)
{
var commitManagersWithData = MetadataUtilities<IAsyncCompletionCommitManagerProvider, IOrderableContentTypeAndOptionalTextViewRoleMetadata>
- .GetBuffersAndImports(bufferGraph, roles, triggerLocation, getImports);
+ .GetBuffersAndImports(triggerLocation, rootSnapshot, textView.Roles, getImports);
var potentialCommitCharsBuilder = ImmutableArray.CreateBuilder<char>();
managersWithBuffers = new List<(IAsyncCompletionCommitManager, ITextBuffer)>(1);
@@ -203,7 +304,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
var managerProvider = GuardedOperations.InstantiateExtension(this, import);
var manager = GuardedOperations.CallExtensionPoint(
errorSource: managerProvider,
- call: () => managerProvider.GetOrCreate(textViewForGetOrCreate),
+ call: () => managerProvider.GetOrCreate(textView),
valueOnThrow: null);
if (manager == null)
@@ -224,26 +325,25 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
}
private void GetCompletionSources(
- ITextBuffer editBuffer,
- ITextViewRoleSet roles,
- ITextView textViewForGetOrCreate, /* This name conveys that we're supposed to use ITextView only to init the MEF part. this is subject to change. */
- IBufferGraph bufferGraph,
- CompletionTrigger trigger,
SnapshotPoint triggerLocation,
Func<IContentType, ITextViewRoleSet, IReadOnlyList<Lazy<IAsyncCompletionSourceProvider, IOrderableContentTypeAndOptionalTextViewRoleMetadata>>> getImports,
+ ITextSnapshot rootSnapshot,
+ ITextView textView,
+ IBufferGraph bufferGraph,
+ CompletionTrigger trigger,
CompletionSessionTelemetry telemetry,
CancellationToken token,
out List<(IAsyncCompletionSource Source, SnapshotPoint Point)> sourcesWithLocations,
out SnapshotSpan applicableToSpan)
{
var sourcesWithData = MetadataUtilities<IAsyncCompletionSourceProvider, IOrderableContentTypeAndOptionalTextViewRoleMetadata>
- .GetBuffersAndImports(bufferGraph, roles, triggerLocation, getImports);
+ .GetBuffersAndImports(triggerLocation, rootSnapshot, textView.Roles, getImports);
var applicableToSpanBuilder = default(SnapshotSpan);
bool applicableToSpanExists = false;
bool anySourceParticipates = false;
bool anySourceExclusive = false;
- var sourcesWithLocationsBuider = new List<(IAsyncCompletionSource, SnapshotPoint, CompletionParticipation)>(sourcesWithData.Count());
+ var sourcesWithLocationsBuilder = new List<(IAsyncCompletionSource, SnapshotPoint, CompletionParticipation)>();
foreach (var (buffer, point, import) in sourcesWithData)
{
@@ -252,56 +352,75 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
var sourceProvider = GuardedOperations.InstantiateExtension(this, import);
var source = GuardedOperations.CallExtensionPoint(
errorSource: sourceProvider,
- call: () => sourceProvider.GetOrCreate(textViewForGetOrCreate),
+ call: () => sourceProvider.GetOrCreate(textView),
valueOnThrow: null);
if (source == null)
+ {
+ telemetry.UiStopwatch.Stop();
+ telemetry.RecordObtainingSourceSpan(source, telemetry.UiStopwatch.ElapsedMilliseconds);
continue;
+ }
- GuardedOperations.CallExtensionPoint(
+ // Iterate through all sources and add them to collection
+ var startData = GuardedOperations.CallExtensionPoint(
errorSource: source,
- call: () =>
- {
- // Iterate through all sources and add them to collection
- CompletionStartData startData;
- startData = source.InitializeCompletion(trigger, point, token);
-
- if (!applicableToSpanExists && startData.ApplicableToSpan != default)
- {
- applicableToSpanExists = true;
- applicableToSpanBuilder = startData.ApplicableToSpan;
- }
- if (startData.Participation == CompletionParticipation.ProvidesItems)
- {
- anySourceParticipates = true;
- }
- else if (startData.Participation == CompletionParticipation.ExclusivelyProvidesItems)
- {
- anySourceParticipates = true;
- anySourceExclusive = true;
- }
- sourcesWithLocationsBuider.Add((source, point, startData.Participation));
- });
+ call: () => source.InitializeCompletion(trigger, point, token),
+ valueOnThrow: CompletionStartData.DoesNotParticipateInCompletion);
telemetry.UiStopwatch.Stop();
telemetry.RecordObtainingSourceSpan(source, telemetry.UiStopwatch.ElapsedMilliseconds);
+
+ if (!applicableToSpanExists && startData.ApplicableToSpan != default)
+ {
+ applicableToSpanExists = true;
+ applicableToSpanBuilder = startData.ApplicableToSpan;
+ }
+ if (startData.Participation == CompletionParticipation.ProvidesItems)
+ {
+ anySourceParticipates = true;
+ }
+ else if (startData.Participation == CompletionParticipation.ExclusivelyProvidesItems)
+ {
+ anySourceParticipates = true;
+ anySourceExclusive = true;
+ }
+ sourcesWithLocationsBuilder.Add((source, point, startData.Participation));
}
- // Map the applicable to span to the view's edit buffer and use it for completion,
+ // Map the applicable to span to the view's text snapshot and use it for completion,
if (applicableToSpanExists)
{
- var mappingSpan = bufferGraph.CreateMappingSpan(applicableToSpanBuilder, SpanTrackingMode.EdgeInclusive);
- applicableToSpanBuilder = mappingSpan.GetSpans(editBuffer)[0];
+ if (rootSnapshot == textView.TextSnapshot)
+ {
+ // Typical case; ApplicableToSpan is always defined on TextView.TextBuffer, so we will map up
+ var mappingSpan = bufferGraph.CreateMappingSpan(applicableToSpanBuilder, SpanTrackingMode.EdgeInclusive);
+ var spans = mappingSpan.GetSpans(textView.TextSnapshot);
+
+ if (spans.Count == 0)
+ throw new InvalidOperationException("Completion expects the Applicable To Span to be mappable to the view's TextBuffer.");
+ applicableToSpanBuilder = spans[0];
+ }
+ else
+ {
+ // Edge case; in Roslyn's DebuggerTextView, TextView.TextSnapshot is below the root snapshot
+ // ApplicableToSpan is always defined on textView's TextBuffer, so we will to map down
+ var spans = MappingHelper.MapDownToBufferNoTrack(applicableToSpanBuilder, textView.TextBuffer);
+
+ if (spans.Count == 0)
+ throw new InvalidOperationException("Completion expects the Applicable To Span to be mappable to the view's TextBuffer.");
+ applicableToSpanBuilder = spans[0];
+ }
}
// Copying temporary values because we can't access out&ref params in lambdas
if (anySourceExclusive)
{
- sourcesWithLocations = sourcesWithLocationsBuider.Where(n => n.Item3 == CompletionParticipation.ExclusivelyProvidesItems).Select(n => (n.Item1, n.Item2)).ToList();
+ sourcesWithLocations = sourcesWithLocationsBuilder.Where(n => n.Item3 == CompletionParticipation.ExclusivelyProvidesItems).Select(n => (n.Item1, n.Item2)).ToList();
}
else if (anySourceParticipates)
{
- sourcesWithLocations = sourcesWithLocationsBuider.Where(n => n.Item3 == CompletionParticipation.ProvidesItems).Select(n => (n.Item1, n.Item2)).ToList();
+ sourcesWithLocations = sourcesWithLocationsBuilder.Where(n => n.Item3 == CompletionParticipation.ProvidesItems).Select(n => (n.Item1, n.Item2)).ToList();
}
else
{
@@ -311,35 +430,34 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
}
private IAsyncCompletionItemManager GetItemManager(
- IBufferGraph bufferGraph,
- ITextViewRoleSet textViewRoles,
- ITextView textViewForGetOrCreate, /* This name conveys that we're using ITextView only to init the MEF part. this is subject to change. */
SnapshotPoint triggerLocation,
Func<IContentType, ITextViewRoleSet, IReadOnlyList<Lazy<IAsyncCompletionItemManagerProvider, IOrderableContentTypeAndOptionalTextViewRoleMetadata>>> getImports,
+ ITextSnapshot rootSnapshot,
+ ITextView textView,
StableContentTypeComparer contentTypeComparer
)
{
var itemManagerProvidersWithData = MetadataUtilities<IAsyncCompletionItemManagerProvider, IOrderableContentTypeAndOptionalTextViewRoleMetadata>
- .GetOrderedBuffersAndImports(bufferGraph, textViewRoles, triggerLocation, getImports, contentTypeComparer);
+ .GetOrderedBuffersAndImports(triggerLocation, rootSnapshot, textView.Roles, getImports, contentTypeComparer);
if (!itemManagerProvidersWithData.Any())
{
- // This should never happen because we provide a default and IsCompletionFeatureAvailable would have returned false
- throw new InvalidOperationException("No completion services not found. Completion will be unavailable.");
+ // This should never happen because we provide a default for "text" content type. Does content type not derive from "text"?
+ throw new InvalidOperationException("No IAsyncCompletionItemManager found. Completion will be unavailable.");
}
var bestItemManagerProvider = GuardedOperations.InstantiateExtension(this, itemManagerProvidersWithData.First().import);
- return GuardedOperations.CallExtensionPoint(bestItemManagerProvider, () => bestItemManagerProvider.GetOrCreate(textViewForGetOrCreate), null);
+ return GuardedOperations.CallExtensionPoint(bestItemManagerProvider, () => bestItemManagerProvider.GetOrCreate(textView), null);
}
private ICompletionPresenterProvider GetPresenterProvider(
- IBufferGraph bufferGraph,
- ITextViewRoleSet textViewRoles,
SnapshotPoint triggerLocation,
Func<IContentType, ITextViewRoleSet, IReadOnlyList<Lazy<ICompletionPresenterProvider, IOrderableContentTypeAndOptionalTextViewRoleMetadata>>> getImports,
+ ITextSnapshot rootSnapshot,
+ ITextViewRoleSet textViewRoles,
StableContentTypeComparer contentTypeComparer)
{
var presenterProvidersWithData = MetadataUtilities<ICompletionPresenterProvider, IOrderableContentTypeAndOptionalTextViewRoleMetadata>
- .GetOrderedBuffersAndImports(bufferGraph, textViewRoles, triggerLocation, getImports, contentTypeComparer);
+ .GetOrderedBuffersAndImports(triggerLocation, rootSnapshot, textViewRoles, getImports, contentTypeComparer);
ICompletionPresenterProvider presenterProvider = null;
if (presenterProvidersWithData.Any())
presenterProvider = GuardedOperations.InstantiateExtension(this, presenterProvidersWithData.First().import);
@@ -379,15 +497,22 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
private CompletionTelemetryHost GetOrCreateTelemetry(ITextView textView)
{
- if (textView.Properties.TryGetProperty(typeof(CompletionTelemetryHost), out CompletionTelemetryHost telemetry))
+ if (textView.Properties.TryGetProperty(typeof(CompletionTelemetryHost), out CompletionTelemetryHost existingTelemetry))
{
- return telemetry;
+ return existingTelemetry;
}
else
{
- var newTelemetry = new CompletionTelemetryHost(Logger, this);
- textView.Properties.AddProperty(typeof(CompletionTelemetryHost), newTelemetry);
- return newTelemetry;
+ lock (telemetryCreationLock)
+ {
+ if (!textView.Properties.TryGetProperty(typeof(CompletionTelemetryHost), out CompletionTelemetryHost telemetry))
+ {
+ telemetry = new CompletionTelemetryHost(Logger, this, textView.TextBuffer.ContentType.DisplayName);
+ textView.Properties.AddProperty(typeof(CompletionTelemetryHost), telemetry);
+ textView.Closed += SendTelemetryOnViewClosed;
+ }
+ return telemetry;
+ }
}
}
@@ -432,11 +557,17 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
#endregion
- private void TextView_Closed(object sender, EventArgs e)
+ private void DismissSessionOnViewClosed(object sender, EventArgs e)
{
var view = (ITextView)sender;
- view.Closed -= TextView_Closed;
+ view.Closed -= DismissSessionOnViewClosed;
GetSession(view)?.Dismiss();
+ }
+
+ private void SendTelemetryOnViewClosed(object sender, EventArgs e)
+ {
+ var view = (ITextView)sender;
+ view.Closed -= SendTelemetryOnViewClosed;
try
{
SendTelemetry(view);
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionSession.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionSession.cs
index 6f147af..639f821 100644
--- a/src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionSession.cs
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/AsyncCompletionSession.cs
@@ -91,6 +91,11 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
private readonly CompletionSessionTelemetry _telemetry;
/// <summary>
+ /// Records noteworthy event which led to committing or dismissing
+ /// </summary>
+ CompletionSessionState _finalSessionState;
+
+ /// <summary>
/// Self imposed maximum delay for commits due to user double-clicking completion item in the UI
/// </summary>
private static readonly TimeSpan MaxCommitDelayWhenClicked = TimeSpan.FromSeconds(1);
@@ -108,7 +113,6 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
public event EventHandler<CompletionItemEventArgs> ItemCommitted;
public event EventHandler Dismissed;
public event EventHandler<ComputedCompletionItemsEventArgs> ItemsUpdated;
- public event EventHandler ReceivedCompletionContext;
public ITextView TextView => _textView;
@@ -117,10 +121,17 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
public PropertyCollection Properties { get; }
- public AsyncCompletionSession(SnapshotSpan initialApplicableToSpan, ImmutableArray<char> potentialCommitChars,
- JoinableTaskContext joinableTaskContext, ICompletionPresenterProvider presenterProvider,
- IList<(IAsyncCompletionSource, SnapshotPoint)> completionSources, IList<(IAsyncCompletionCommitManager, ITextBuffer)> commitManagers,
- IAsyncCompletionItemManager completionService, AsyncCompletionBroker broker, ITextView textView, CompletionSessionTelemetry telemetry,
+ public AsyncCompletionSession(
+ SnapshotSpan initialApplicableToSpan,
+ ImmutableArray<char> potentialCommitChars,
+ JoinableTaskContext joinableTaskContext,
+ ICompletionPresenterProvider presenterProvider,
+ IList<(IAsyncCompletionSource, SnapshotPoint)> completionSources,
+ IList<(IAsyncCompletionCommitManager, ITextBuffer)> commitManagers,
+ IAsyncCompletionItemManager completionService,
+ AsyncCompletionBroker broker,
+ ITextView textView,
+ CompletionSessionTelemetry telemetry,
IGuardedOperations guardedOperations)
{
_potentialCommitChars = potentialCommitChars;
@@ -137,24 +148,75 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
PageStepSize = presenterProvider?.Options.ResultsPerPage ?? 1;
_textView.Caret.PositionChanged += OnCaretPositionChanged;
Properties = new PropertyCollection();
+ _telemetry.E2EStopwatch.Start();
+ }
+
+ /// <summary>
+ /// Creates a minimal instance of <see cref="AsyncCompletionSession"/> which is capable of
+ /// holding properties and communicating with <see cref="IAsyncCompletionSource"/>s.
+ /// This session must be dismissed when no longer needed.
+ /// </summary>
+ internal static AsyncCompletionSession CreateAggregatingSession(
+ SnapshotSpan applicableToSpan,
+ JoinableTaskContext joinableTaskContext,
+ List<(IAsyncCompletionSource Source, SnapshotPoint Point)> completionSources,
+ AsyncCompletionBroker broker,
+ ITextView textView,
+ CompletionSessionTelemetry telemetry,
+ IGuardedOperations guardedOperations)
+ {
+ return new AsyncCompletionSession(
+ applicableToSpan,
+ default,
+ joinableTaskContext,
+ default,
+ completionSources,
+ default,
+ default,
+ broker,
+ textView,
+ telemetry,
+ guardedOperations);
}
bool IAsyncCompletionSession.ShouldCommit(char typedChar, SnapshotPoint triggerLocation, CancellationToken token)
{
+ if (IsDismissed)
+ return false;
if (!JoinableTaskContext.IsOnMainThread)
throw new InvalidOperationException($"This method must be callled on the UI thread.");
-
if (!_potentialCommitChars.Contains(typedChar))
return false;
- var mappingPoint = _textView.BufferGraph.CreateMappingPoint(triggerLocation, PointTrackingMode.Negative);
- return _commitManagers
- .Select(n => (n.Item1, mappingPoint.GetPoint(n.Item2, PositionAffinity.Predecessor)))
- .Where(n => n.Item2.HasValue)
- .Any(n => _guardedOperations.CallExtensionPoint(
- errorSource: n.Item1,
- call: () => n.Item1.ShouldCommitCompletion(this, n.Item2.Value, typedChar, token),
- valueOnThrow: false));
+ var rootSnapshot = AsyncCompletionBroker.GetRootSnapshot(TextView);
+ var points = MappingHelper.GetPointsAtLocation(triggerLocation, rootSnapshot);
+ for (int i = 0; i < _commitManagers.Count; i++)
+ {
+ var commitManager = _commitManagers[i].Item1;
+
+ // Among current SnapshotPoints, pick the one which matches the commit manager's buffer
+ SnapshotPoint relevantPoint = default;
+ var pointsEnumerator = points.GetEnumerator();
+ while (pointsEnumerator.MoveNext())
+ {
+ if (pointsEnumerator.Current.Snapshot.TextBuffer == _commitManagers[i].Item2)
+ {
+ relevantPoint = pointsEnumerator.Current;
+ break;
+ }
+ }
+ if (relevantPoint == default)
+ continue;
+
+ var shouldCommit = _guardedOperations.CallExtensionPoint(
+ errorSource: commitManager,
+ call: () => commitManager.ShouldCommitCompletion(this, relevantPoint, typedChar, token),
+ valueOnThrow: false);
+
+ if (shouldCommit)
+ return true;
+ }
+ return false;
}
bool IAsyncCompletionSession.CommitIfUnique(CancellationToken token)
@@ -180,6 +242,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
}
else if (lastModel.UniqueItem != null)
{
+ _finalSessionState = CompletionSessionState.CommittedThroughCompleteWord;
var behavior = CommitItem(default, lastModel.UniqueItem, ApplicableToSpan, token);
if (behavior == CommitBehavior.CancelCommit)
{
@@ -194,6 +257,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
}
else if (!lastModel.PresentedItems.IsDefaultOrEmpty && lastModel.PresentedItems.Length == 1)
{
+ _finalSessionState = CompletionSessionState.CommittedThroughCompleteWord;
var behavior = CommitItem(default, lastModel.PresentedItems[0].CompletionItem, ApplicableToSpan, token);
if (behavior == CommitBehavior.CancelCommit)
{
@@ -225,10 +289,11 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
// We are in either low latency mode or suggestion mode
// user did not press tab, and we don't have results yet
// => dismiss
- if (_computation.RecentModel == default
+ if ((_computation.RecentModel == default || _computation.RecentModel.Uninitialized)
&& (CompletionUtilities.GetSuggestionModeOption(_textView) || CompletionUtilities.GetNonBlockingCompletionOption(_textView))
&& !(typedChar.Equals(default) || typedChar.Equals('\t')))
{
+ _finalSessionState = CompletionSessionState.DismissedDueToNonBlockingMode;
((IAsyncCompletionSession)this).Dismiss();
return CommitBehavior.RaiseFurtherReturnKeyAndTabKeyCommandHandlers;
}
@@ -251,17 +316,29 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (lastModel == null)
{
+ // Typically, we return default model when the token is canceled.
+ // To provide accurate telemetry, check the tokens
+ if (token.IsCancellationRequested || _computationCancellation.IsCancellationRequested)
+ {
+ _finalSessionState = CompletionSessionState.DismissedDueToCancellation;
+ }
((IAsyncCompletionSession)this).Dismiss();
return CommitBehavior.None;
}
else if (lastModel.Uninitialized)
{
((IAsyncCompletionSession)this).Dismiss();
- return CommitBehavior.None;
+ return CommitBehavior.RaiseFurtherReturnKeyAndTabKeyCommandHandlers;
}
- else if (lastModel.UseSoftSelection && !(typedChar.Equals(default) || typedChar.Equals('\t')) )
+ else if (lastModel.UseSoftSelection
+ && !(typedChar.Equals(default)
+ || typedChar.Equals('\t')
+ || TypedCharShouldNotDismissInSoftSelection(typedChar)))
{
- // In soft selection mode, user commits explicitly (click, tab, e.g. not tied to a text change). Otherwise, we dismiss the session
+ // In soft selection mode, allow commit under the following circumstances:
+ // 1. User commits explicitly (click, tab)
+ // 2. User typed a character which is excluded from list of potential commit characters in the given session
+ // Otherwise, dismiss the session
((IAsyncCompletionSession)this).Dismiss();
return CommitBehavior.RaiseFurtherReturnKeyAndTabKeyCommandHandlers;
}
@@ -273,6 +350,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
else if (lastModel.SelectSuggestionItem)
{
// Commit the suggestion mode item
+ _finalSessionState = CompletionSessionState.CommittedSuggestionItem;
return CommitItem(typedChar, lastModel.SuggestionItem, ApplicableToSpan, token);
}
else if (lastModel.PresentedItems.IsDefaultOrEmpty)
@@ -284,6 +362,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
else
{
// Regular commit
+ _finalSessionState = CompletionSessionState.Committed;
return CommitItem(typedChar, lastModel.PresentedItems[lastModel.SelectedIndex].CompletionItem, ApplicableToSpan, token);
}
}
@@ -322,14 +401,20 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
managerWhoCommitted = commitManager.Item1;
break;
}
+ if (token.IsCancellationRequested)
+ {
+ break;
+ }
}
- if (!commitHandled)
+ if (!commitHandled && !token.IsCancellationRequested)
{
// Fallback if item is still not committed.
InsertIntoBuffer(_textView, applicableToSpan, itemToCommit.InsertText);
}
_telemetry.UiStopwatch.Stop();
+ _telemetry.E2EStopwatch.Stop();
+
_guardedOperations.RaiseEvent(this, ItemCommitted, new CompletionItemEventArgs(itemToCommit));
_telemetry.RecordCommitted(_telemetry.UiStopwatch.ElapsedMilliseconds, managerWhoCommitted);
@@ -356,6 +441,17 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
bufferEdit.Apply();
}
+ private bool TypedCharShouldNotDismissInSoftSelection(char typedChar)
+ {
+ if (typedChar == default)
+ return false;
+ if (Properties.TryGetProperty<ImmutableArray<char>>("ExcludedCommitCharacters", out var excludedChars))
+ {
+ return excludedChars.Contains(typedChar);
+ }
+ return false;
+ }
+
public void Dismiss()
{
if (IsDismissed)
@@ -363,10 +459,19 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
IsDismissed = true;
_broker.ForgetSession(this);
- _guardedOperations.RaiseEvent(this, Dismissed);
_textView.Caret.PositionChanged -= OnCaretPositionChanged;
_computationCancellation.Cancel();
+ // This method may be invoked on any thread. We promised extenders we will raise Dismissed event on UI thread.
+ if (Dismissed != null)
+ {
+ JoinableTaskContext.Factory.Run(async () =>
+ {
+ await JoinableTaskContext.Factory.SwitchToMainThreadAsync();
+ _guardedOperations.RaiseEvent(this, Dismissed);
+ });
+ }
+
if (_gui != null)
{
var copyOfGui = _gui;
@@ -385,10 +490,14 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
_telemetry.RecordClosing(_telemetry.UiStopwatch.ElapsedMilliseconds);
await Task.Yield();
- _telemetry.Save(_completionItemManager, _presenterProvider);
+ _telemetry.Save(_completionItemManager, _presenterProvider, _finalSessionState);
});
_gui = null;
}
+ else
+ {
+ _telemetry.Save(_completionItemManager, _presenterProvider, _finalSessionState);
+ }
}
void IAsyncCompletionSession.OpenOrUpdate(CompletionTrigger trigger, SnapshotPoint triggerLocation, CancellationToken commandToken)
@@ -399,20 +508,9 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (!JoinableTaskContext.IsOnMainThread)
throw new InvalidOperationException($"This method must be callled on the UI thread.");
+ var rootSnapshot = AsyncCompletionBroker.GetRootSnapshot(TextView);
commandToken.Register(_computationCancellation.Cancel);
- var rootSnapshot = TextView.TextSnapshot;
- if (TextView.Properties.ContainsProperty("CompletionRoot"))
- {
- // In certain scenarios, TextView.TextSnapshot is not the appropriate snapshot to use.
- // For example, in the watch window (C# debugger), TextView.TextSnapshot corresponds to the single line for the expression.
- // Roslyn uses the property bag to indicate the correct snapshot to use.
- if (TextView.Properties.TryGetProperty("CompletionRoot", out ITextBuffer rootBuffer))
- {
- rootSnapshot = rootBuffer.CurrentSnapshot;
- }
- }
-
_canChangeApplicableToSpan = false; // Don't allow changing the ApplicableToSpan from now on.
if (_computation == null)
@@ -467,21 +565,41 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
public void SelectDown()
{
+ if (_computation.RecentModel == default || _computation.RecentModel.Uninitialized)
+ {
+ // https://github.com/dotnet/roslyn/issues/31131 Dismiss completion so that up and down gestures are not blocked
+ Dismiss();
+ }
_computation.Enqueue((model, token) => UpdateSelectedItem(model, +1, token), updateUi: true);
}
public void SelectPageDown()
{
+ if (_computation.RecentModel == default || _computation.RecentModel.Uninitialized)
+ {
+ // https://github.com/dotnet/roslyn/issues/31131 Dismiss completion so that up and down gestures are not blocked
+ Dismiss();
+ }
_computation.Enqueue((model, token) => UpdateSelectedItem(model, +PageStepSize, token), updateUi: true);
}
public void SelectUp()
{
+ if (_computation.RecentModel == default || _computation.RecentModel.Uninitialized)
+ {
+ // https://github.com/dotnet/roslyn/issues/31131 Dismiss completion so that up and down gestures are not blocked
+ Dismiss();
+ }
_computation.Enqueue((model, token) => UpdateSelectedItem(model, -1, token), updateUi: true);
}
public void SelectPageUp()
{
+ if (_computation.RecentModel == default || _computation.RecentModel.Uninitialized)
+ {
+ // https://github.com/dotnet/roslyn/issues/31131 Dismiss completion so that up and down gestures are not blocked
+ Dismiss();
+ }
_computation.Enqueue((model, token) => UpdateSelectedItem(model, -PageStepSize, token), updateUi: true);
}
@@ -527,6 +645,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (_computation == null)
return;
var expiringTokenSource = new CancellationTokenSource(MaxCommitDelayWhenClicked);
+ _finalSessionState = CompletionSessionState.CommittedThroughClick;
CommitItem(default, args.Item, ApplicableToSpan, expiringTokenSource.Token);
}
catch (Exception ex)
@@ -543,6 +662,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
private void OnGuiClosed(object sender, CompletionClosedEventArgs args)
{
+ _finalSessionState = CompletionSessionState.DismissedThroughUI;
Dismiss();
}
@@ -602,6 +722,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
_gui.Open(this, new CompletionPresentationViewModel(model.PresentedItems, model.Filters,
model.SelectedIndex, ApplicableToSpan, model.UseSoftSelection, model.DisplaySuggestionItem,
model.SelectSuggestionItem, model.SuggestionItem, SuggestionItemOptions));
+ _telemetry.E2EStopwatch.Stop();
});
}
}
@@ -618,41 +739,43 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
}
/// <summary>
- /// Creates a new model and populates it with initial data
+ /// Gets <see cref="CompletionContext"/> from available <see cref="IAsyncCompletionSource"/>s
/// </summary>
- private async Task<CompletionModel> GetInitialModel(CompletionTrigger trigger, SnapshotPoint triggerLocation, ITextSnapshot rootSnapshot, CancellationToken token)
+ /// <returns>Aggregate data built from all received <see cref="CompletionContext"/>s</returns>
+ internal async Task<CompletionSourceConnectionResult>ConnectToCompletionSources(CompletionTrigger trigger, SnapshotPoint triggerLocation, ITextSnapshot rootSnapshot, CancellationToken token)
{
bool sourceUsesSuggestionMode = false;
SuggestionItemOptions requestedSuggestionItemOptions = null;
InitialSelectionHint initialSelectionHint = InitialSelectionHint.RegularSelection;
var initialItemsBuilder = ImmutableArray.CreateBuilder<CompletionItem>();
+ // We use rootSnapshot to obtain buffers that participate in comple
+ var points = MappingHelper.GetPointsAtLocation(triggerLocation, rootSnapshot);
+
for (int i = 0; i < _completionSources.Count; i++)
{
- var index = i; // Capture i, since it will change during the async call
+ var sourceAndLocation = _completionSources[i]; // Capture the source, since `i` will change during the async call
_telemetry.ComputationStopwatch.Restart();
var context = await _guardedOperations.CallExtensionPointAsync(
- errorSource: _completionSources[index].Source,
+ errorSource: sourceAndLocation.Source,
asyncCall: () =>
{
- var mappingPoint = MappingPointSnapshot.Create(
- root: rootSnapshot,
- anchor: triggerLocation,
- trackingMode: PointTrackingMode.Positive,
- graph: TextView.BufferGraph);
-
- var triggerLocationOnSubjectBuffer = mappingPoint.GetPoint(_completionSources[index].Point.Snapshot.TextBuffer, PositionAffinity.Predecessor);
+ // from the set of points I got above, get the point which matches the buffer
+ var mappedPoint = points.FirstOrDefault(n => n.Snapshot.TextBuffer == sourceAndLocation.Point.Snapshot.TextBuffer);
+ if (mappedPoint == default)
+ return Task.FromResult(CompletionContext.Empty);
- if (!triggerLocationOnSubjectBuffer.HasValue)
- return null;
- return _completionSources[index].Source.GetCompletionContextAsync(this, trigger, triggerLocationOnSubjectBuffer.Value, ApplicableToSpan.GetSpan(triggerLocation.Snapshot), token);
+ // Don't use rootSnapshot: ApplicableToSpan is defined on the triggerLocation's snapshot
+ return sourceAndLocation.Source.GetCompletionContextAsync(this, trigger, mappedPoint, ApplicableToSpan.GetSpan(triggerLocation.Snapshot), token);
},
valueOnThrow: null
).ConfigureAwait(true);
_telemetry.ComputationStopwatch.Stop();
- _telemetry.RecordObtainingSourceContext(_completionSources[index].Source, _telemetry.ComputationStopwatch.ElapsedMilliseconds);
+ _telemetry.RecordObtainingSourceContext(sourceAndLocation.Source, _telemetry.ComputationStopwatch.ElapsedMilliseconds);
+ if (token.IsCancellationRequested)
+ return CompletionSourceConnectionResult.Canceled;
if (context == null)
continue;
@@ -668,49 +791,59 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (requestedSuggestionItemOptions == null && context.SuggestionItemOptions != null)
requestedSuggestionItemOptions = context.SuggestionItemOptions;
}
+ return new CompletionSourceConnectionResult(sourceUsesSuggestionMode, requestedSuggestionItemOptions, initialSelectionHint, initialItemsBuilder.ToImmutable());
+ }
+
+ /// <summary>
+ /// Creates a new model and populates it with initial data
+ /// </summary>
+ private async Task<CompletionModel> GetInitialModel(CompletionTrigger trigger, SnapshotPoint triggerLocation, ITextSnapshot rootSnapshot, CancellationToken token)
+ {
+ var completionData = await ConnectToCompletionSources(trigger, triggerLocation, rootSnapshot, token).ConfigureAwait(true);
// Do not continue without items
- if (initialItemsBuilder.Count == 0)
+ if (completionData.IsCanceled)
+ {
+ return default;
+ }
+ else if (completionData.InitialCompletionItems.IsDefaultOrEmpty)
{
return CompletionModel.GetUninitializedModel(triggerLocation.Snapshot);
}
- ReceivedCompletionContext?.Invoke(this, EventArgs.Empty);
// If no source provided suggestion item options, provide default options for suggestion mode
- SuggestionItemOptions = requestedSuggestionItemOptions ?? DefaultSuggestionModeOptions;
+ SuggestionItemOptions = completionData.RequestedSuggestionItemOptions ?? DefaultSuggestionModeOptions;
// Store the data that won't change throughout the session
InitialTrigger = trigger;
SuggestionModeCompletionItemSource = new SuggestionModeCompletionItemSource(SuggestionItemOptions);
- var initialCompletionItems = initialItemsBuilder.ToImmutable();
-
- var availableFilters = initialCompletionItems
+ var availableFilters = completionData.InitialCompletionItems
.SelectMany(n => n.Filters)
.Distinct()
.Select(n => new CompletionFilterWithState(n, true))
.ToImmutableArray();
var viewUsesSuggestionMode = CompletionUtilities.GetSuggestionModeOption(_textView);
- var useSuggestionMode = sourceUsesSuggestionMode || viewUsesSuggestionMode;
+ var useSuggestionMode = completionData.SourceUsesSuggestionMode || viewUsesSuggestionMode;
// Select suggestion item only if source explicity provided it. This means that debugger view or ctrl+alt+space won't select the suggestion item.
- var selectSuggestionItem = sourceUsesSuggestionMode;
+ var selectSuggestionItem = completionData.SourceUsesSuggestionMode;
// Use soft selection if suggestion item is present, unless source selects that item. Also, use soft selection if source wants to.
- var useSoftSelection = useSuggestionMode && !selectSuggestionItem || initialSelectionHint == InitialSelectionHint.SoftSelection;
+ var useSoftSelection = useSuggestionMode && !selectSuggestionItem || completionData.InitialSelectionHint == InitialSelectionHint.SoftSelection;
_telemetry.ComputationStopwatch.Restart();
var sortedList = await _guardedOperations.CallExtensionPointAsync(
errorSource: _completionItemManager,
asyncCall: () => _completionItemManager.SortCompletionListAsync(
session: this,
- data: new AsyncCompletionSessionInitialDataSnapshot(initialCompletionItems, triggerLocation.Snapshot, InitialTrigger),
+ data: new AsyncCompletionSessionInitialDataSnapshot(completionData.InitialCompletionItems, triggerLocation.Snapshot, InitialTrigger),
token: token),
- valueOnThrow: initialCompletionItems).ConfigureAwait(true);
+ valueOnThrow: completionData.InitialCompletionItems).ConfigureAwait(true);
_telemetry.ComputationStopwatch.Stop();
- _telemetry.RecordProcessing(_telemetry.ComputationStopwatch.ElapsedMilliseconds, initialCompletionItems.Length);
+ _telemetry.RecordProcessing(_telemetry.ComputationStopwatch.ElapsedMilliseconds, completionData.InitialCompletionItems.Length);
_telemetry.RecordKeystroke();
- return new CompletionModel(initialCompletionItems, sortedList, triggerLocation.Snapshot,
+ return new CompletionModel(completionData.InitialCompletionItems, sortedList, triggerLocation.Snapshot,
availableFilters, useSoftSelection, useSuggestionMode, selectSuggestionItem, suggestionItem: null);
}
@@ -720,11 +853,11 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
private void HandleCaretPositionChanged(CaretPosition caretPosition)
{
var currentTaskId = _lastFilteringTaskId;
- _computation?.Enqueue((model, token) => UpdateCaretPosition(model, caretPosition, currentTaskId, token), updateUi: true);
+ _computation?.Enqueue((model, token) => UpdateCaretPosition(model, caretPosition, token), updateUi: true);
}
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
- private async Task<CompletionModel> UpdateCaretPosition(CompletionModel model, CaretPosition caretPosition, int taskId, CancellationToken token)
+ private async Task<CompletionModel> UpdateCaretPosition(CompletionModel model, CaretPosition caretPosition, CancellationToken token)
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
{
if (token.IsCancellationRequested || model == null)
@@ -737,6 +870,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (!ApplicableToSpan.GetSpan(caretSnapshot).IntersectsWith(new SnapshotSpan(immediateCaretPosition, 0)))
{
// Caret is outside of the applicable to span
+ _finalSessionState = CompletionSessionState.DismissedDueToCaretLeaving;
Dismiss();
}
else if (immediateCaretPosition == immediateSpanStart && !_inCaretLocationFallback)
@@ -745,18 +879,12 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
_selectionModeBeforeCaretLocationFallback = model.UseSoftSelection;
updatedModel = model.WithSoftSelection(true);
_inCaretLocationFallback = true;
-
- if (taskId == _lastFilteringTaskId)
- RaiseCompletionItemsComputedEvent(updatedModel);
}
else if (immediateCaretPosition != immediateSpanStart && _inCaretLocationFallback)
{
// Caret is within the applicable to span; leave the special soft selection mode
updatedModel = model.WithSoftSelection(_selectionModeBeforeCaretLocationFallback);
_inCaretLocationFallback = false;
-
- if (taskId == _lastFilteringTaskId)
- RaiseCompletionItemsComputedEvent(updatedModel);
}
return updatedModel;
}
@@ -785,9 +913,8 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (token.IsCancellationRequested || model == null)
return default;
- var instantaneousSnapshot = updateLocation.Snapshot;
-
// Dismiss if we are outside of the applicable span
+ var instantaneousSnapshot = updateLocation.Snapshot;
var currentlyApplicableToSpan = ApplicableToSpan.GetSpan(instantaneousSnapshot);
if (updateLocation < currentlyApplicableToSpan.Start
|| updateLocation > currentlyApplicableToSpan.End)
@@ -800,6 +927,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
&& model.ApplicableToSpanWasEmpty
&& (trigger.Reason == CompletionTriggerReason.Deletion || trigger.Reason == CompletionTriggerReason.Backspace))
{
+ _finalSessionState = CompletionSessionState.DismissedDueToBackspace;
((IAsyncCompletionSession)this).Dismiss();
return model;
}
@@ -809,6 +937,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (_inCaretLocationFallback)
{
// If user was previously at the beginning of the span, this backspace will dismiss completion
+ _finalSessionState = CompletionSessionState.DismissedDueToBackspace;
((IAsyncCompletionSession)this).Dismiss();
return model;
}
@@ -832,11 +961,18 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
{
// Attempt to get new completion items
model = await GetInitialModel(trigger, updateLocation, rootSnapshot, token).ConfigureAwait(true);
+ if (model == default) // This happens when computation has been cancelled
+ {
+ _finalSessionState = CompletionSessionState.DismissedDueToCancellation;
+ ((IAsyncCompletionSession)this).Dismiss();
+ return model;
+ }
}
// If we still have no items, dismiss, unless there is another task queued (because user has typed).
if (model.Uninitialized)
{
+ _finalSessionState = CompletionSessionState.DismissedUninitialized;
var dismissed = await TryDismissSafely(thisId).ConfigureAwait(true);
return model;
}
@@ -864,6 +1000,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
// Error cases are handled by logging them above and dismissing the session.
if (filteredCompletion == null)
{
+ _finalSessionState = CompletionSessionState.DismissedDuringFiltering;
((IAsyncCompletionSession)this).Dismiss();
return model;
}
@@ -872,7 +1009,8 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (filteredCompletion.SelectedItemIndex == -1 && !model.DisplaySuggestionItem)
{
_guardedOperations.HandleException(errorSource: _completionItemManager,
- e: new InvalidOperationException($"{nameof(IAsyncCompletionItemManager)} recommends selecting suggestion item when there is no suggestion item."));
+ e: new InvalidOperationException($"{nameof(IAsyncCompletionItemManager)} recommended selecting suggestion item when there is no suggestion item."));
+ _finalSessionState = CompletionSessionState.DismissedDuringFiltering;
((IAsyncCompletionSession)this).Dismiss();
return model;
}
@@ -981,14 +1119,12 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
var enteredText = currentlyApplicableToSpan.GetText();
var suggestionItem = new CompletionItem(enteredText, SuggestionModeCompletionItemSource);
- var updatedModel = model.WithSnapshotItemsAndFilters(updateLocation.Snapshot, returnedItems, filteredCompletion.UniqueItem, suggestionItem, filteredCompletion.Filters);
- RaiseCompletionItemsComputedEvent(updatedModel);
- return updatedModel;
+ return model.WithSnapshotItemsAndFilters(updateLocation.Snapshot, returnedItems, filteredCompletion.UniqueItem, suggestionItem, filteredCompletion.Filters);
}
/// <summary>
/// Dismisses this <see cref="AsyncCompletionSession"/> only if called from the last task.
- /// If there are any extra tasks, this method will return <code>false</code>
+ /// If there are any extra tasks, this method will return <c>false</c>
/// </summary>
/// <param name="currentTaskId"></param>
/// <returns></returns>
@@ -1047,9 +1183,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
return model;
}
- var updatedModel = model.WithFilters(filteredCompletion.Filters).WithPresentedItems(filteredCompletion.Items, filteredCompletion.SelectedItemIndex);
- RaiseCompletionItemsComputedEvent(updatedModel);
- return updatedModel;
+ return model.WithFilters(filteredCompletion.Filters).WithPresentedItems(filteredCompletion.Items, filteredCompletion.SelectedItemIndex);
}
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
@@ -1079,24 +1213,34 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (offset > 0) // Scrolling down. Stop at last index and don't wrap around.
{
- if (currentIndex == lastIndex)
- return model.WithSoftSelection(false); // Don't wrap around, but ensure that this item is fully selected
+ if (model.UseSoftSelection && currentIndex > -1)
+ {
+ return model.WithSoftSelection(false); // Switch from soft selection to full selection
+ }
+ else if (currentIndex == lastIndex)
+ {
+ return model; // Don't wrap around
+ }
var newIndex = currentIndex + offset;
return model.WithSelectedIndex(Math.Min(newIndex, lastIndex));
}
else // Scrolling up. Stop at first index and don't wrap around.
{
+ if (model.UseSoftSelection && currentIndex > -1)
+ {
+ return model.WithSoftSelection(false); // Switch from soft selection to full selection
+ }
if (currentIndex < FirstIndex) // Suggestion mode item is selected.
{
- return model.WithSoftSelection(false); // Don't wrap around, but ensure that this item is fully selected
+ return model; // Don't wrap around
}
else if (currentIndex == FirstIndex) // The first item is selected.
{
if (model.DisplaySuggestionItem) // If there is a suggestion, select it.
return model.WithSuggestionItemSelected();
else
- return model.WithSoftSelection(false); // Don't wrap around, but ensure that this item is fully selected
+ return model; // Don't wrap around
}
var newIndex = currentIndex + offset;
return model.WithSelectedIndex(Math.Max(newIndex, FirstIndex));
@@ -1115,9 +1259,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
_telemetry.RecordScrolling();
if (suggestionItemSelected)
{
- var updatedModel = model.WithSuggestionItemSelected();
- RaiseCompletionItemsComputedEvent(updatedModel);
- return updatedModel;
+ return model.WithSuggestionItemSelected();
}
else
{
@@ -1125,9 +1267,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
{
if (model.PresentedItems[i].CompletionItem == selectedItem)
{
- var updatedModel = model.WithSelectedIndex(i);
- RaiseCompletionItemsComputedEvent(updatedModel);
- return updatedModel;
+ return model.WithSelectedIndex(i);
}
}
// This item is not in the model
@@ -1135,13 +1275,25 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
}
}
- private void RaiseCompletionItemsComputedEvent(CompletionModel model)
+ void IModelComputationCallbackHandler<CompletionModel>.ComputationFinished(CompletionModel model)
{
if (ItemsUpdated == null)
return;
ThreadPool.QueueUserWorkItem(new WaitCallback(RaiseCompletionItemsComputedEventOnBackground), model);
}
+ void IModelComputationCallbackHandler<CompletionModel>.DismissDueToCancellation()
+ {
+ _finalSessionState = CompletionSessionState.DismissedDueToCancellation;
+ Dismiss();
+ }
+
+ void IModelComputationCallbackHandler<CompletionModel>.DismissDueToError()
+ {
+ _finalSessionState = CompletionSessionState.DismissedDueToUnhandledError;
+ Dismiss();
+ }
+
private void RaiseCompletionItemsComputedEventOnBackground(object parameter)
{
if (IsDismissed)
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionAvailabilityCacheKey.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionAvailabilityCacheKey.cs
new file mode 100644
index 0000000..4132053
--- /dev/null
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionAvailabilityCacheKey.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Text.Editor;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implementation
+{
+ struct CompletionAvailabilityCacheKey : IEquatable<CompletionAvailabilityCacheKey>
+ {
+ public IContentType ContentType { get; }
+ public ITextViewRoleSet Roles { get; }
+
+ public CompletionAvailabilityCacheKey(IContentType contentType, ITextViewRoleSet roles)
+ {
+ ContentType = contentType;
+ Roles = roles;
+ }
+
+ bool IEquatable<CompletionAvailabilityCacheKey>.Equals(CompletionAvailabilityCacheKey other) =>
+ ContentType.Equals(other.ContentType) && (Roles == null || Roles.Equals(other.Roles));
+
+ public override bool Equals(object other) =>
+ (other is CompletionAvailabilityCacheKey otherKey) ? ((IEquatable<CompletionAvailabilityCacheKey>)this).Equals(otherKey) : false;
+
+ public static bool operator ==(CompletionAvailabilityCacheKey left, CompletionAvailabilityCacheKey right) => left.Equals(right);
+
+ public static bool operator !=(CompletionAvailabilityCacheKey left, CompletionAvailabilityCacheKey right) => !(left == right);
+
+ public override int GetHashCode() => (ContentType, Roles).GetHashCode();
+ }
+}
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionAvailabilityUtility.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionAvailabilityUtility.cs
index a46c0b6..6d1cc36 100644
--- a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionAvailabilityUtility.cs
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionAvailabilityUtility.cs
@@ -27,10 +27,14 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
[Import]
private AsyncCompletionBroker Broker; // We're using internal method to check if relevant MEF parts exist.
+ [Import]
+ private IEditorOptionsFactoryService EditorOptionsFactory;
+
// Black list by content type
private const string CompletionFlightName = "CompletionAPI";
private const string RoslynLanguagesContentType = "Roslyn Languages";
private const string RazorContentType = "Razor";
+ private const string LanguageServerContentType = "code-languageserver-preview";
private bool _treatmentFlightDataInitialized;
// Quick access data:
@@ -38,66 +42,44 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
private IFeatureCookie _globalCompletionCookie;
private IFeatureCookie GlobalCompletionCookie =>
_globalCompletionCookie
- ?? (_globalCompletionCookie = FeatureServiceFactory.GlobalFeatureService.GetCookie(PredefinedEditorFeatureNames.Completion));
-
- /// <summary>
- /// Returns whether completion is available for the given <see cref="IContentType" />.
- /// </summary>
- /// <returns>true if experiment is enabled, feature is enabled in the global scope, and broker has providers that match the supplied <see cref="IContentType" /></returns>
- internal bool IsAvailable(IContentType contentType)
- {
- if (!GlobalCompletionCookie.IsEnabled)
- return false;
-
- if (!Broker.HasCompletionProviders(contentType))
- return false;
-
- // Roslyn and Razor providers exist in the MEF cache, but Roslyn is not ready for public rollout yet.
- // However, We do want other languages (e.g. AXML, EditorConfig) to work with Async Completion API
- // We will remove this check once Roslyn fully embraces Async Completion API.
- if (!IsExperimentEnabled() && (contentType.IsOfType(RoslynLanguagesContentType) || contentType.IsOfType(RazorContentType)))
- return false;
-
- return true;
- }
+ ?? (_globalCompletionCookie = FeatureServiceFactory.GlobalFeatureService.GetCookie(PredefinedEditorFeatureNames.AsyncCompletion));
/// <summary>
- /// Returns whether completion is available for the given <see cref="IContentType"/> in the given <see cref="ITextView" />.
+ /// Returns whether completion is available for the given <see cref="IContentType"/> and <see cref="ITextViewRoleSet" />.
/// </summary>
/// <returns>true if experiment is enabled, feature is enabled in the <see cref="ITextView" />'s scope, and broker has providers that match the supplied <see cref="IContentType" /></returns>
- internal bool IsAvailable(IContentType contentType, ITextView textView)
+ internal bool IsAvailable(IContentType contentType, ITextViewRoleSet roles)
{
- if (!Broker.HasCompletionProviders(contentType))
+ if (!GlobalCompletionCookie.IsEnabled)
return false;
- var featureService = FeatureServiceFactory.GetOrCreate(textView);
- if (!featureService.IsEnabled(PredefinedEditorFeatureNames.Completion))
+ if (!Broker.HasCompletionProviders(contentType, roles))
return false;
// Roslyn and Razor providers exist in the MEF cache, but Roslyn is not ready for public rollout yet.
// However, We do want other languages (e.g. AXML, EditorConfig) to work with Async Completion API
// We will remove this check once Roslyn fully embraces Async Completion API.
- if (!IsExperimentEnabled() && (contentType.IsOfType(RoslynLanguagesContentType) || contentType.IsOfType(RazorContentType)))
+ if (!IsExperimentEnabled() && !contentType.IsOfType(LanguageServerContentType) && (contentType.IsOfType(RoslynLanguagesContentType) || contentType.IsOfType(RazorContentType)))
return false;
return true;
}
/// <summary>
- /// Returns whether completion is available in the given <see cref="ITextView" />.
+ /// Returns whether completion feature is available in the given <see cref="ITextView" />.
/// Note: the second parameter <see cref="IContentType"/> is to be removed in dev16 when the experiment ends.
/// </summary>
/// <returns>true if experiment is enabled and feature is enabled in <see cref="ITextView"/>'s scope</returns>
- internal bool IsAvailable(ITextView textView, IContentType contentTypeToCheckBlacklist)
+ internal bool IsCurrentlyAvailable(ITextView textView, IContentType contentTypeToCheckBlacklist)
{
var featureService = FeatureServiceFactory.GetOrCreate(textView);
- if (!featureService.IsEnabled(PredefinedEditorFeatureNames.Completion))
+ if (!featureService.IsEnabled(PredefinedEditorFeatureNames.AsyncCompletion))
return false;
// Roslyn and Razor providers exist in the MEF cache, but Roslyn is not ready for public rollout yet.
// However, We do want other languages (e.g. AXML, EditorConfig) to work with Async Completion API
// We will remove this check once Roslyn fully embraces Async Completion API.
- if (!IsExperimentEnabled() && (contentTypeToCheckBlacklist.IsOfType(RoslynLanguagesContentType) || contentTypeToCheckBlacklist.IsOfType(RazorContentType)))
+ if (!IsExperimentEnabled() && !contentTypeToCheckBlacklist.IsOfType(LanguageServerContentType) && (contentTypeToCheckBlacklist.IsOfType(RoslynLanguagesContentType) || contentTypeToCheckBlacklist.IsOfType(RazorContentType)))
return false;
return true;
@@ -105,12 +87,29 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
private bool IsExperimentEnabled()
{
- if (_treatmentFlightDataInitialized)
+ int userSetting = 0;
+ if (EditorOptionsFactory.GlobalOptions.IsOptionDefined(UseAsyncCompletionOptionDefinition.OptionName, localScopeOnly: false))
+ {
+ userSetting = EditorOptionsFactory.GlobalOptions.GetOptionValue<int>(UseAsyncCompletionOptionDefinition.OptionName);
+ }
+
+ if (userSetting == 1)
+ {
+ return true;
+ }
+ else if (userSetting == -1)
+ {
+ return false;
+ }
+ else
+ {
+ if (_treatmentFlightDataInitialized)
+ return _treatmentFlightEnabled;
+
+ _treatmentFlightEnabled = ExperimentationService.IsCachedFlightEnabled(CompletionFlightName);
+ _treatmentFlightDataInitialized = true;
return _treatmentFlightEnabled;
-
- _treatmentFlightEnabled = ExperimentationService.IsCachedFlightEnabled(CompletionFlightName);
- _treatmentFlightDataInitialized = true;
- return _treatmentFlightEnabled;
+ }
}
}
}
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionCommandHandlers.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionCommandHandlers.cs
index 27b58b4..19a582f 100644
--- a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionCommandHandlers.cs
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionCommandHandlers.cs
@@ -4,6 +4,7 @@ using Microsoft.VisualStudio.Commanding;
using Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
+using Microsoft.VisualStudio.Text.Editor.Commanding;
using Microsoft.VisualStudio.Text.Editor.Commanding.Commands;
using Microsoft.VisualStudio.Text.Operations;
using Microsoft.VisualStudio.Text.Utilities;
@@ -20,6 +21,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
[TextViewRole(PredefinedTextViewRoles.Interactive)]
[Export(typeof(ICommandHandler))]
internal sealed class CompletionCommandHandler :
+ ICommandHandler<AutomaticLineEnderCommandArgs>,
IChainedCommandHandler<BackspaceKeyCommandArgs>,
IDynamicCommandHandler<BackspaceKeyCommandArgs>,
ICommandHandler<CommitUniqueCompletionListItemCommandArgs>,
@@ -65,13 +67,15 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
string INamed.DisplayName => CommonImplementation.Strings.CompletionCommandHandlerName;
+ private string chainedCommandIsBeingHandled = nameof(chainedCommandIsBeingHandled);
+
/// <summary>
/// Helper method that returns command state for commands
/// which are available as long as the completion feature is available.
/// </summary>
private CommandState GetCommandStateIfCompletionIsAvailable(IContentType contentType, ITextView textView)
{
- return CompletionAvailability.IsAvailable(contentType, textView)
+ return CompletionAvailability.IsAvailable(contentType, textView.Roles)
? CommandState.Available
: CommandState.Unspecified;
}
@@ -95,7 +99,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
/// </summary>
private CommandState GetCommandStateIfCompletionIsActiveOrAvailable(IContentType contentType, ITextView textView)
{
- return Broker.IsCompletionActive(textView) || CompletionAvailability.IsAvailable(contentType, textView)
+ return Broker.IsCompletionActive(textView) || CompletionAvailability.IsAvailable(contentType, textView.Roles)
? CommandState.Available
: CommandState.Unspecified;
}
@@ -106,12 +110,41 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
/// </summary>
private CommandState GetCommandStateForSuggestionModeToggle(IContentType contentType, ITextView textView)
{
- var isAvailable = CompletionAvailability.IsAvailable(contentType, textView);
+ var isAvailable = CompletionAvailability.IsAvailable(contentType, textView.Roles);
var isChecked = CompletionUtilities.GetSuggestionModeOption(textView);
return new CommandState(isAvailable, isChecked);
}
/// <summary>
+ /// This helper method encapsulates a pattern we use within <see cref="IChainedCommandHandler{T}"/>
+ /// for executing completion logic in <paramref name="commandHandler"/>.
+ ///
+ /// The pattern accomplishes two objectives:
+ /// 1. Don't run completion logic if completion is not available for given <paramref name="args"/>.
+ /// 2. Run completion logic only once. The commanding system chains the handlers for all applicable buffers, but we are acting only once.
+ /// It is ok to run completion logic only once, because it works on any buffer and performs its own mapping to available subject buffers.
+ /// </summary>
+ private void RunOnceIfAvailable<T>(T args, Action nextCommandHandler, Action commandHandler) where T : EditorCommandArgs
+ {
+ if (args.TextView.Properties.ContainsProperty(chainedCommandIsBeingHandled)
+ || !GetCommandStateIfCompletionIsAvailable(args.SubjectBuffer.ContentType, args.TextView).IsAvailable)
+ {
+ nextCommandHandler();
+ return;
+ }
+
+ try
+ {
+ args.TextView.Properties.AddProperty(chainedCommandIsBeingHandled, true);
+ commandHandler();
+ }
+ finally
+ {
+ args.TextView.Properties.RemoveProperty(chainedCommandIsBeingHandled);
+ }
+ }
+
+ /// <summary>
/// Realizes the virtual space and updates session's applicable to span.
/// We invoke this method after the session has triggered, because we don't want to act if there would be no completion.
/// </summary>
@@ -139,31 +172,52 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
// ----- Command handlers:
+ CommandState ICommandHandler<AutomaticLineEnderCommandArgs>.GetCommandState(AutomaticLineEnderCommandArgs args)
+ => GetCommandStateIfCompletionIsAvailable(args.SubjectBuffer.ContentType, args.TextView);
+
+ bool ICommandHandler<AutomaticLineEnderCommandArgs>.ExecuteCommand(AutomaticLineEnderCommandArgs args, CommandExecutionContext executionContext)
+ {
+ if (!GetCommandStateIfCompletionIsAvailable(args.SubjectBuffer.ContentType, args.TextView).IsAvailable)
+ return false;
+
+ var session = Broker.GetSession(args.TextView);
+ if (session != null)
+ {
+ session.Commit(default, executionContext.OperationContext.UserCancellationToken);
+ session.Dismiss();
+ // Don't mark this command as handled, so that we can automatically end the line
+ }
+ return false;
+ }
+
CommandState IChainedCommandHandler<BackspaceKeyCommandArgs>.GetCommandState(BackspaceKeyCommandArgs args, Func<CommandState> nextCommandHandler)
=> nextCommandHandler();
bool IDynamicCommandHandler<BackspaceKeyCommandArgs>.CanExecuteCommand(BackspaceKeyCommandArgs args)
- => Broker.IsCompletionActive(args.TextView) || Broker.IsCompletionSupported(args.SubjectBuffer.ContentType);
+ => Broker.IsCompletionActive(args.TextView) || Broker.IsCompletionSupported(args.SubjectBuffer.ContentType, args.TextView.Roles);
void IChainedCommandHandler<BackspaceKeyCommandArgs>.ExecuteCommand(BackspaceKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
{
- var snapshotBeforeEdit = args.TextView.TextSnapshot;
- // Execute other commands in the chain to see the change in the buffer.
- nextCommandHandler();
+ RunOnceIfAvailable(args, nextCommandHandler, () =>
+ {
+ var snapshotBeforeEdit = args.TextView.TextSnapshot;
+ // Execute other commands in the chain to see the change in the buffer.
+ nextCommandHandler();
- var session = Broker.GetSession(args.TextView);
- var location = args.TextView.Caret.Position.BufferPosition;
- var trigger = new CompletionTrigger(CompletionTriggerReason.Backspace, snapshotBeforeEdit);
+ var session = Broker.GetSession(args.TextView);
+ var location = args.TextView.Caret.Position.BufferPosition;
+ var trigger = new CompletionTrigger(CompletionTriggerReason.Backspace, snapshotBeforeEdit);
- if (session != null)
- {
- session.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
- }
- else
- {
- var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
- newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
- }
+ if (session != null)
+ {
+ session.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ }
+ else
+ {
+ var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
+ newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ }
+ });
}
CommandState ICommandHandler<EscapeKeyCommandArgs>.GetCommandState(EscapeKeyCommandArgs args)
@@ -266,27 +320,30 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
=> nextCommandHandler();
bool IDynamicCommandHandler<DeleteKeyCommandArgs>.CanExecuteCommand(DeleteKeyCommandArgs args)
- => Broker.IsCompletionActive(args.TextView) || Broker.IsCompletionSupported(args.SubjectBuffer.ContentType);
+ => Broker.IsCompletionActive(args.TextView) || Broker.IsCompletionSupported(args.SubjectBuffer.ContentType, args.TextView.Roles);
void IChainedCommandHandler<DeleteKeyCommandArgs>.ExecuteCommand(DeleteKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
{
- var snapshotBeforeEdit = args.TextView.TextSnapshot;
- // Execute other commands in the chain to see the change in the buffer.
- nextCommandHandler();
+ RunOnceIfAvailable(args, nextCommandHandler, () =>
+ {
+ var snapshotBeforeEdit = args.TextView.TextSnapshot;
+ // Execute other commands in the chain to see the change in the buffer.
+ nextCommandHandler();
- var session = Broker.GetSession(args.TextView);
- var location = args.TextView.Caret.Position.BufferPosition;
- var trigger = new CompletionTrigger(CompletionTriggerReason.Deletion, snapshotBeforeEdit);
+ var session = Broker.GetSession(args.TextView);
+ var location = args.TextView.Caret.Position.BufferPosition;
+ var trigger = new CompletionTrigger(CompletionTriggerReason.Deletion, snapshotBeforeEdit);
- if (session != null)
- {
- session.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
- }
- else
- {
- var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
- newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
- }
+ if (session != null)
+ {
+ session.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ }
+ else
+ {
+ var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
+ newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ }
+ });
}
CommandState ICommandHandler<WordDeleteToEndCommandArgs>.GetCommandState(WordDeleteToEndCommandArgs args)
@@ -375,173 +432,167 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
bool IDynamicCommandHandler<ReturnKeyCommandArgs>.CanExecuteCommand(ReturnKeyCommandArgs args)
- => Broker.IsCompletionActive(args.TextView) || Broker.IsCompletionSupported(args.SubjectBuffer.ContentType);
+ => Broker.IsCompletionActive(args.TextView) || Broker.IsCompletionSupported(args.SubjectBuffer.ContentType, args.TextView.Roles);
void IChainedCommandHandler<ReturnKeyCommandArgs>.ExecuteCommand(ReturnKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
{
- if (!GetCommandStateIfCompletionIsAvailable(args.SubjectBuffer.ContentType, args.TextView).IsAvailable)
+ RunOnceIfAvailable(args, nextCommandHandler, () =>
{
- // In IChainedCommandHandler, we have to explicitly call the next command handler
- nextCommandHandler();
- return;
- }
- char typedChar = '\n';
+ char typedChar = '\n';
- var session = Broker.GetSession(args.TextView);
- if (session != null)
- {
- var commitBehavior = session.Commit(typedChar, executionContext.OperationContext.UserCancellationToken);
- session.Dismiss();
-
- // Mark this command as handled (return true),
- // unless extender set the RaiseFurtherCommandHandlers flag - with exception of the debugger text view
- if ((commitBehavior & CommitBehavior.RaiseFurtherReturnKeyAndTabKeyCommandHandlers) == 0
- || CompletionUtilities.IsDebuggerTextView(args.TextView))
- return;
- }
+ var session = Broker.GetSession(args.TextView);
+ if (session != null)
+ {
+ var commitBehavior = session.Commit(typedChar, executionContext.OperationContext.UserCancellationToken);
+ session.Dismiss();
+
+ // Mark this command as handled (don't call command handlers further down the chain)
+ // in debugger text views
+ // when RaiseFurtherReturnKeyAndTabKeyCommandHandlers is unset
+ if ((commitBehavior & CommitBehavior.RaiseFurtherReturnKeyAndTabKeyCommandHandlers) == 0
+ || CompletionUtilities.IsDebuggerTextView(args.TextView)
+ || CompletionUtilities.IsImmediateTextView(args.TextView))
+ return;
+ }
- var snapshotBeforeEdit = args.TextView.TextSnapshot;
- nextCommandHandler();
+ var snapshotBeforeEdit = args.TextView.TextSnapshot;
+ nextCommandHandler();
- // Buffer has changed. Update it for when we try to trigger new session.
- var location = args.TextView.Caret.Position.BufferPosition;
+ // Buffer has changed. Update it for when we try to trigger new session.
+ var location = args.TextView.Caret.Position.BufferPosition;
- var trigger = new CompletionTrigger(CompletionTriggerReason.Insertion, snapshotBeforeEdit, typedChar);
- var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
- if (newSession is IAsyncCompletionSessionOperations sessionInternal)
- {
- RealizeVirtualSpaceUpdateApplicableToSpan(sessionInternal, args.TextView);
- }
- location = args.TextView.Caret.Position.BufferPosition; // Buffer may have changed. Update the location.
- newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ var trigger = new CompletionTrigger(CompletionTriggerReason.Insertion, snapshotBeforeEdit, typedChar);
+ var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
+ if (newSession is IAsyncCompletionSessionOperations sessionInternal)
+ {
+ RealizeVirtualSpaceUpdateApplicableToSpan(sessionInternal, args.TextView);
+ }
+ location = args.TextView.Caret.Position.BufferPosition; // Buffer may have changed. Update the location.
+ newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ });
}
CommandState IChainedCommandHandler<TabKeyCommandArgs>.GetCommandState(TabKeyCommandArgs args, Func<CommandState> nextCommandHandler)
=> nextCommandHandler();
bool IDynamicCommandHandler<TabKeyCommandArgs>.CanExecuteCommand(TabKeyCommandArgs args)
- => Broker.IsCompletionActive(args.TextView) || Broker.IsCompletionSupported(args.SubjectBuffer.ContentType);
+ => Broker.IsCompletionActive(args.TextView) || Broker.IsCompletionSupported(args.SubjectBuffer.ContentType, args.TextView.Roles);
void IChainedCommandHandler<TabKeyCommandArgs>.ExecuteCommand(TabKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
{
- if (!GetCommandStateIfCompletionIsAvailable(args.SubjectBuffer.ContentType, args.TextView).IsAvailable)
- {
- // In IChainedCommandHandler, we have to explicitly call the next command handler
- nextCommandHandler();
- return;
- }
- char typedChar = '\t';
-
- var session = Broker.GetSession(args.TextView);
- if (session != null)
+ RunOnceIfAvailable(args, nextCommandHandler, () =>
{
- var commitBehavior = session.Commit(typedChar, executionContext.OperationContext.UserCancellationToken);
- session.Dismiss();
+ char typedChar = '\t';
- // Mark this command as handled (return true),
- // unless extender set the RaiseFurtherCommandHandlers flag - with exception of the debugger text view
- if ((commitBehavior & CommitBehavior.RaiseFurtherReturnKeyAndTabKeyCommandHandlers) == 0
- || CompletionUtilities.IsDebuggerTextView(args.TextView))
- return;
- }
- var snapshotBeforeEdit = args.TextView.TextSnapshot;
- nextCommandHandler();
+ var session = Broker.GetSession(args.TextView);
+ if (session != null)
+ {
+ var commitBehavior = session.Commit(typedChar, executionContext.OperationContext.UserCancellationToken);
+ session.Dismiss();
+
+ // Mark this command as handled (don't call command handlers further down the chain)
+ // in debugger text views
+ // when RaiseFurtherReturnKeyAndTabKeyCommandHandlers is unset
+ if ((commitBehavior & CommitBehavior.RaiseFurtherReturnKeyAndTabKeyCommandHandlers) == 0
+ || CompletionUtilities.IsDebuggerTextView(args.TextView)
+ || CompletionUtilities.IsImmediateTextView(args.TextView))
+ return;
+ }
+ var snapshotBeforeEdit = args.TextView.TextSnapshot;
+ nextCommandHandler();
- // Buffer has changed. Update it for when we try to trigger new session.
- var location = args.TextView.Caret.Position.BufferPosition;
+ // Buffer has changed. Update it for when we try to trigger new session.
+ var location = args.TextView.Caret.Position.BufferPosition;
- var trigger = new CompletionTrigger(CompletionTriggerReason.Insertion, snapshotBeforeEdit, typedChar);
- var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
- newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ var trigger = new CompletionTrigger(CompletionTriggerReason.Insertion, snapshotBeforeEdit, typedChar);
+ var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
+ newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ });
}
CommandState IChainedCommandHandler<TypeCharCommandArgs>.GetCommandState(TypeCharCommandArgs args, Func<CommandState> nextCommandHandler)
=> nextCommandHandler();
bool IDynamicCommandHandler<TypeCharCommandArgs>.CanExecuteCommand(TypeCharCommandArgs args)
- => CompletionAvailability.IsAvailable(args.SubjectBuffer.ContentType, args.TextView);
+ => CompletionAvailability.IsAvailable(args.SubjectBuffer.ContentType, args.TextView.Roles);
void IChainedCommandHandler<TypeCharCommandArgs>.ExecuteCommand(TypeCharCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
{
- if (!GetCommandStateIfCompletionIsAvailable(args.SubjectBuffer.ContentType, args.TextView).IsAvailable)
- {
- // In IChainedCommandHandler, we have to explicitly call the next command handler
- nextCommandHandler();
- return;
- }
-
- var view = args.TextView;
- var location = view.Caret.Position.BufferPosition;
- var initialTextSnapshot = args.SubjectBuffer.CurrentSnapshot;
-
- // Note regarding undo: When completion and brace completion happen together, completion should be first on the undo stack.
- // Effectively, we want to first undo the completion, leaving brace completion intact. Second undo should undo brace completion.
- // To achieve this, we create a transaction in which we commit and reapply brace completion (via nextCommandHandler).
- // Please read "Note regarding undo" comments in this method that explain the implementation choices.
- // Hopefully an upcoming upgrade of the undo mechanism will allow us to undo out of order and vastly simplify this method.
-
- // Note regarding undo: In a corner case of typing closing brace over existing closing brace,
- // Roslyn brace completion does not perform an edit. It moves the caret outside of session's applicable span,
- // which dismisses the session. Put the session in a state where it will not dismiss when caret leaves the applicable span.
- var sessionToCommit = Broker.GetSession(args.TextView);
- if (sessionToCommit != null)
+ RunOnceIfAvailable(args, nextCommandHandler, () =>
{
- ((AsyncCompletionSession)sessionToCommit).IgnoreCaretMovement(ignore: true);
- }
-
- var snapshotBeforeEdit = args.TextView.TextSnapshot;
- // Execute other commands in the chain to see the change in the buffer. This includes brace completion.
- // Note regarding undo: This will be 2nd in the undo stack
- nextCommandHandler();
+ var view = args.TextView;
+ var location = view.Caret.Position.BufferPosition;
+ var initialTextSnapshot = args.SubjectBuffer.CurrentSnapshot;
+
+ // Note regarding undo: When completion and brace completion happen together, completion should be first on the undo stack.
+ // Effectively, we want to first undo the completion, leaving brace completion intact. Second undo should undo brace completion.
+ // To achieve this, we create a transaction in which we commit and reapply brace completion (via nextCommandHandler).
+ // Please read "Note regarding undo" comments in this method that explain the implementation choices.
+ // Hopefully an upcoming upgrade of the undo mechanism will allow us to undo out of order and vastly simplify this method.
+
+ // Note regarding undo: In a corner case of typing closing brace over existing closing brace,
+ // Roslyn brace completion does not perform an edit. It moves the caret outside of session's applicable span,
+ // which dismisses the session. Put the session in a state where it will not dismiss when caret leaves the applicable span.
+ var sessionToCommit = Broker.GetSession(args.TextView);
+ if (sessionToCommit != null)
+ {
+ ((AsyncCompletionSession)sessionToCommit).IgnoreCaretMovement(ignore: true);
+ }
- // if on different version than initialTextSnapshot, we will NOT rollback and we will NOT replay the nextCommandHandler
- // DP to figure out why ShouldCommit returns false or Commit doesn't do anything
- var braceCompletionSpecialHandling = args.SubjectBuffer.CurrentSnapshot.Version == initialTextSnapshot.Version;
+ var snapshotBeforeEdit = args.TextView.TextSnapshot;
+ // Execute other commands in the chain to see the change in the buffer. This includes brace completion.
+ // Note regarding undo: This will be 2nd in the undo stack
+ nextCommandHandler();
- // Pass location from before calling nextCommandHandler
- // so that extenders get the same view of the buffer in both ShouldCommit and Commit
- if (sessionToCommit?.ShouldCommit(args.TypedChar, location, executionContext.OperationContext.UserCancellationToken) == true)
- {
- // Buffer has changed, update the snapshot
- location = view.Caret.Position.BufferPosition;
+ // if on different version than initialTextSnapshot, we will NOT rollback and we will NOT replay the nextCommandHandler
+ // DP to figure out why ShouldCommit returns false or Commit doesn't do anything
+ var braceCompletionSpecialHandling = args.SubjectBuffer.CurrentSnapshot.Version == initialTextSnapshot.Version;
- // Note regarding undo: this transaction will be 1st in the undo stack
- using (var undoTransaction = new CaretPreservingEditTransaction("Completion", view, UndoHistoryRegistry, EditorOperationsFactoryService))
+ // Pass location from before calling nextCommandHandler
+ // so that extenders get the same view of the buffer in both ShouldCommit and Commit
+ if (sessionToCommit?.ShouldCommit(args.TypedChar, location, executionContext.OperationContext.UserCancellationToken) == true)
{
- if (!braceCompletionSpecialHandling)
- UndoUtilities.RollbackToBeforeTypeChar(initialTextSnapshot, args.SubjectBuffer);
- // Now the buffer doesn't have the commit character nor the matching brace, if any
+ // Buffer has changed, update the snapshot
+ location = view.Caret.Position.BufferPosition;
+
+ // Note regarding undo: this transaction will be 1st in the undo stack
+ using (var undoTransaction = new CaretPreservingEditTransaction("Completion", view, UndoHistoryRegistry, EditorOperationsFactoryService))
+ {
+ if (!braceCompletionSpecialHandling)
+ UndoUtilities.RollbackToBeforeTypeChar(initialTextSnapshot, args.SubjectBuffer);
+ // Now the buffer doesn't have the commit character nor the matching brace, if any
- var commitBehavior = sessionToCommit.Commit(args.TypedChar, executionContext.OperationContext.UserCancellationToken);
+ var commitBehavior = sessionToCommit.Commit(args.TypedChar, executionContext.OperationContext.UserCancellationToken);
- if (!braceCompletionSpecialHandling && (commitBehavior & CommitBehavior.SuppressFurtherTypeCharCommandHandlers) == 0)
- nextCommandHandler(); // Replay the key, so that we get brace completion.
+ if (!braceCompletionSpecialHandling && (commitBehavior & CommitBehavior.SuppressFurtherTypeCharCommandHandlers) == 0)
+ nextCommandHandler(); // Replay the key, so that we get brace completion.
- // Complete the transaction before stopping it.
- undoTransaction.Complete();
+ // Complete the transaction before stopping it.
+ undoTransaction.Complete();
+ }
}
- }
- // Restore the default state where session dismisses when caret is outside of the applicable span.
- if (sessionToCommit != null)
- {
- ((AsyncCompletionSession)sessionToCommit).IgnoreCaretMovement(ignore: false);
- }
+ // Restore the default state where session dismisses when caret is outside of the applicable span.
+ if (sessionToCommit != null)
+ {
+ ((AsyncCompletionSession)sessionToCommit).IgnoreCaretMovement(ignore: false);
+ }
- // Buffer might have changed. Update it for when we try to trigger new session.
- location = view.Caret.Position.BufferPosition;
+ // Buffer might have changed. Update it for when we try to trigger new session.
+ location = view.Caret.Position.BufferPosition;
- var trigger = new CompletionTrigger(CompletionTriggerReason.Insertion, snapshotBeforeEdit, args.TypedChar);
- var session = Broker.GetSession(args.TextView);
- if (session != null)
- {
- session.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
- }
- else
- {
- var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
- newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
- }
+ var trigger = new CompletionTrigger(CompletionTriggerReason.Insertion, snapshotBeforeEdit, args.TypedChar);
+ var session = Broker.GetSession(args.TextView);
+ if (session != null)
+ {
+ session.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ }
+ else
+ {
+ var newSession = Broker.TriggerCompletion(args.TextView, trigger, location, executionContext.OperationContext.UserCancellationToken);
+ newSession?.OpenOrUpdate(trigger, location, executionContext.OperationContext.UserCancellationToken);
+ }
+ });
}
CommandState ICommandHandler<DownKeyCommandArgs>.GetCommandState(DownKeyCommandArgs args)
@@ -552,7 +603,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (Broker.GetSession(args.TextView) is AsyncCompletionSession session) // we are accessing an internal method
{
session.SelectDown();
- return true;
+
+ // Command is handled if completion still exists.
+ // Up\Down\PgUp\PgDown dismiss completion If it hasn't computed items, in which case we allow Editor to handle the command.
+ return !session.IsDismissed;
}
return false;
}
@@ -565,7 +619,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (Broker.GetSession(args.TextView) is AsyncCompletionSession session) // we are accessing an internal method
{
session.SelectPageDown();
- return true;
+
+ // Command is handled if completion still exists.
+ // Up\Down\PgUp\PgDown dismiss completion If it hasn't computed items, in which case we allow Editor to handle the command.
+ return !session.IsDismissed;
}
return false;
}
@@ -578,7 +635,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (Broker.GetSession(args.TextView) is AsyncCompletionSession session) // we are accessing an internal method
{
session.SelectPageUp();
- return true;
+
+ // Command is handled if completion still exists.
+ // Up\Down\PgUp\PgDown dismiss completion If it hasn't computed items, in which case we allow Editor to handle the command.
+ return !session.IsDismissed;
}
return false;
}
@@ -591,7 +651,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
if (Broker.GetSession(args.TextView) is AsyncCompletionSession session) // we are accessing an internal method
{
session.SelectUp();
- return true;
+
+ // Command is handled if completion still exists.
+ // Up\Down\PgUp\PgDown dismiss completion If it hasn't computed items, in which case we allow Editor to handle the command.
+ return !session.IsDismissed;
}
return false;
}
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionSourceConnectionResult.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionSourceConnectionResult.cs
new file mode 100644
index 0000000..2869bea
--- /dev/null
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionSourceConnectionResult.cs
@@ -0,0 +1,30 @@
+using System.Collections.Immutable;
+using Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data;
+
+namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implementation
+{
+ internal struct CompletionSourceConnectionResult
+ {
+ internal bool SourceUsesSuggestionMode { get; set; }
+ internal SuggestionItemOptions RequestedSuggestionItemOptions { get; set; }
+ internal InitialSelectionHint InitialSelectionHint { get; set; }
+ internal ImmutableArray<CompletionItem> InitialCompletionItems { get; set; }
+ internal bool IsCanceled { get; set; }
+
+ internal CompletionSourceConnectionResult(bool sourceUsesSuggestionMode,
+ SuggestionItemOptions requestedSuggestionItemOptions,
+ InitialSelectionHint initialSelectionHint,
+ ImmutableArray<CompletionItem> initialCompletionItems,
+ bool isCanceled = false)
+ {
+ SourceUsesSuggestionMode = sourceUsesSuggestionMode;
+ RequestedSuggestionItemOptions = requestedSuggestionItemOptions;
+ InitialSelectionHint = initialSelectionHint;
+ InitialCompletionItems = initialCompletionItems;
+ IsCanceled = isCanceled;
+ }
+
+ internal static CompletionSourceConnectionResult Canceled
+ => new CompletionSourceConnectionResult(default, default, default, default, isCanceled: true);
+ }
+}
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionTelemetry.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionTelemetry.cs
index 7faaa25..6818dd6 100644
--- a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionTelemetry.cs
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionTelemetry.cs
@@ -25,6 +25,11 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
/// </summary>
internal Stopwatch UiStopwatch { get; } = new Stopwatch();
+ /// <summary>
+ /// Tracks time spent between triggering session and displaying UI or committing the item, whichever is sooner.
+ /// </summary>
+ internal Stopwatch E2EStopwatch { get; } = new Stopwatch();
+
// Names of parts that participated in completion
internal string ItemManagerName { get; private set; }
internal string PresenterProviderName { get; private set; }
@@ -58,15 +63,23 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
// The following work is a mix of "Get Context" and "Processing" and blocks UI thread
internal long BlockingComputationDuration { get; private set; }
+ // Additional data for the E2E telemetry
+ public CompletionSessionState CompletionState { get; private set; }
+
// Additional parameters related to work done by IAsyncCompletionItemManager
internal bool UserEverScrolled { get; private set; }
internal bool UserEverSetFilters { get; private set; }
internal int FinalItemCount { get; private set; }
internal int NumberOfKeystrokes { get; private set; }
- public CompletionSessionTelemetry(CompletionTelemetryHost telemetryHost)
+ // Additional parameters related to headless operation
+ internal bool Headless { get; private set; }
+ private const string HeadlessCallNamePrefix = "HEADLESS ";
+
+ public CompletionSessionTelemetry(CompletionTelemetryHost telemetryHost, bool headless = false)
{
_telemetryHost = telemetryHost;
+ Headless = headless;
}
internal void RecordProcessing(long duration, int itemCount)
@@ -120,10 +133,12 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
internal void Save(
IAsyncCompletionItemManager itemManager,
- ICompletionPresenterProvider presenterProvider)
+ ICompletionPresenterProvider presenterProvider,
+ CompletionSessionState state)
{
ItemManagerName = CompletionTelemetryHost.GetItemManagerName(itemManager);
PresenterProviderName = CompletionTelemetryHost.GetPresenterProviderName(presenterProvider);
+ CompletionState = state;
_telemetryHost.Add(this);
}
@@ -136,12 +151,16 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
internal void RecordObtainingSourceSpan(IAsyncCompletionSource source, long elapsedMilliseconds)
{
var name = CompletionTelemetryHost.GetSourceName(source);
+ if (Headless)
+ name = HeadlessCallNamePrefix + name;
ItemSourceSetupDuration[name] = elapsedMilliseconds;
}
internal void RecordObtainingSourceContext(IAsyncCompletionSource source, long elapsedMilliseconds)
{
var name = CompletionTelemetryHost.GetSourceName(source);
+ if (Headless)
+ name = HeadlessCallNamePrefix + name;
ItemSourceGetContextDuration[name] = elapsedMilliseconds;
}
@@ -216,18 +235,49 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
internal long MaxClosingTime;
}
+ private class AggregateE2EData
+ {
+ internal int Committed;
+ internal int CommittedThroughClick;
+ internal int CommittedThroughCompleteWord;
+ internal int CommittedSuggestionItem;
+ internal int Dismissed;
+ internal int DismissedDueToBackspace;
+ internal int DismissedDueToCancellation;
+ internal int DismissedDueToCaretLeaving;
+ internal int DismissedDuringFiltering;
+ internal int DismissedDueToNonBlockingMode;
+ internal int DismissedDueToUnhandledError;
+ internal int DismissedThroughUI;
+ internal int DismissedUninitialized;
+
+ internal int HistogramBucket25;
+ internal int HistogramBucket50;
+ internal int HistogramBucket100;
+ internal int HistogramBucket250;
+ internal int HistogramBucket500;
+ internal int HistogramBucket1000;
+ internal int HistogramBucket2000;
+ internal int HistogramBucketLast;
+ internal int HistogramBucketCanceled;
+ internal int HistogramBucketInvalid;
+ }
+
Dictionary<string, AggregateCommitManagerData> CommitManagerData = new Dictionary<string, AggregateCommitManagerData>();
Dictionary<string, AggregateItemManagerData> ItemManagerData = new Dictionary<string, AggregateItemManagerData>();
Dictionary<string, AggregatePresenterData> PresenterData = new Dictionary<string, AggregatePresenterData>();
Dictionary<string, AggregateSourceData> SourceData = new Dictionary<string, AggregateSourceData>();
+ AggregateE2EData E2EData = new AggregateE2EData();
private readonly ILoggingServiceInternal _logger;
private readonly AsyncCompletionBroker _broker;
+ private readonly string _textViewContentType;
- public CompletionTelemetryHost(ILoggingServiceInternal logger, AsyncCompletionBroker broker)
+ public CompletionTelemetryHost(ILoggingServiceInternal logger, AsyncCompletionBroker broker, string textViewContentType)
{
_logger = logger;
_broker = broker;
+ _textViewContentType = textViewContentType;
}
internal static string GetSourceName(IAsyncCompletionSource source) => source?.GetType().ToString() ?? string.Empty;
@@ -248,6 +298,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
AddItemManagerData(telemetry, ItemManagerData);
AddCommitManagerData(telemetry, CommitManagerData);
AddPresenterData(telemetry, PresenterData);
+ AddE2EData(telemetry, E2EData);
}
/// <summary>
@@ -329,6 +380,35 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
(PresenterMaxClosing, data.Value.MaxClosingTime)
);
}
+
+ _logger.PostEvent(TelemetryEventType.Operation,
+ E2EEventName,
+ TelemetryResult.Success,
+ (E2EContentType, _textViewContentType),
+ (E2EBucket25, E2EData.HistogramBucket25),
+ (E2EBucket50, E2EData.HistogramBucket50),
+ (E2EBucket100, E2EData.HistogramBucket100),
+ (E2EBucket250, E2EData.HistogramBucket250),
+ (E2EBucket500, E2EData.HistogramBucket500),
+ (E2EBucket1000, E2EData.HistogramBucket1000),
+ (E2EBucket2000, E2EData.HistogramBucket2000),
+ (E2EBucketLast, E2EData.HistogramBucketLast),
+ (E2EBucketCanceled, E2EData.HistogramBucketCanceled),
+ (E2EBucketInvalid, E2EData.HistogramBucketInvalid),
+ (E2ECommittedStandard, E2EData.Committed),
+ (E2ECommittedClick, E2EData.CommittedThroughClick),
+ (E2ECommittedCompleteWord, E2EData.CommittedThroughCompleteWord),
+ (E2ECommittedSuggestionItem, E2EData.CommittedSuggestionItem),
+ (E2EDismissedStandard, E2EData.Dismissed),
+ (E2EDismissedBackspace, E2EData.DismissedDueToBackspace),
+ (E2EDismissedCancellation, E2EData.DismissedDueToCancellation),
+ (E2EDismissedCaretLeaving, E2EData.DismissedDueToCaretLeaving),
+ (E2EDismissedFiltering, E2EData.DismissedDuringFiltering),
+ (E2EDismissedNonBlocking, E2EData.DismissedDueToNonBlockingMode),
+ (E2EDismissedUnhandledError, E2EData.DismissedDueToUnhandledError),
+ (E2EDismissedUI, E2EData.DismissedThroughUI),
+ (E2EDismissedUninitialized, E2EData.DismissedUninitialized)
+ );
}
/// <summary>
@@ -442,6 +522,79 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
aggregatePresenterData.MaxClosingTime = Math.Max(aggregatePresenterData.MaxClosingTime, telemetry.ClosingDuration);
}
+ private static void AddE2EData(CompletionSessionTelemetry telemetry, AggregateE2EData e2eData)
+ {
+ switch (telemetry.CompletionState)
+ {
+ case CompletionSessionState.Committed:
+ e2eData.Committed++;
+ break;
+ case CompletionSessionState.CommittedSuggestionItem:
+ e2eData.CommittedSuggestionItem++;
+ break;
+ case CompletionSessionState.CommittedThroughClick:
+ e2eData.CommittedThroughClick++;
+ break;
+ case CompletionSessionState.CommittedThroughCompleteWord:
+ e2eData.CommittedThroughCompleteWord++;
+ break;
+ case CompletionSessionState.DismissedDueToBackspace:
+ e2eData.DismissedDueToBackspace++;
+ break;
+ case CompletionSessionState.DismissedDueToCancellation:
+ e2eData.DismissedDueToCancellation++;
+ break;
+ case CompletionSessionState.DismissedDueToCaretLeaving:
+ e2eData.DismissedDueToCaretLeaving++;
+ break;
+ case CompletionSessionState.DismissedDuringFiltering:
+ e2eData.DismissedDuringFiltering++;
+ break;
+ case CompletionSessionState.DismissedDueToNonBlockingMode:
+ e2eData.DismissedDueToNonBlockingMode++;
+ break;
+ case CompletionSessionState.DismissedDueToUnhandledError:
+ e2eData.DismissedDueToUnhandledError++;
+ break;
+ case CompletionSessionState.DismissedThroughUI:
+ e2eData.DismissedThroughUI++;
+ break;
+ case CompletionSessionState.DismissedUninitialized:
+ e2eData.DismissedUninitialized++;
+ break;
+ default:
+ e2eData.Dismissed++;
+ break;
+ }
+
+ if (telemetry.CompletionState == CompletionSessionState.DismissedDueToCancellation)
+ {
+ e2eData.HistogramBucketCanceled++;
+ }
+ else
+ {
+ var E2eDuration = telemetry.E2EStopwatch.ElapsedMilliseconds;
+ if (E2eDuration == 0)
+ e2eData.HistogramBucketInvalid++;
+ else if (E2eDuration <= 25)
+ e2eData.HistogramBucket25++;
+ else if (E2eDuration <= 50)
+ e2eData.HistogramBucket50++;
+ else if (E2eDuration <= 100)
+ e2eData.HistogramBucket100++;
+ else if (E2eDuration <= 250)
+ e2eData.HistogramBucket250++;
+ else if (E2eDuration <= 500)
+ e2eData.HistogramBucket500++;
+ else if (E2eDuration <= 1000)
+ e2eData.HistogramBucket1000++;
+ else if (E2eDuration <= 2000)
+ e2eData.HistogramBucket2000++;
+ else
+ e2eData.HistogramBucketLast++;
+ }
+ }
+
// Property and event names
internal const string PresenterEventName = "VS/Editor/Completion/PresenterData";
internal const string PresenterName = "Property.Presenter.Name";
@@ -474,5 +627,91 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
internal const string SourceAverageGetContextDuration = "Property.Source.GetContextDuration";
internal const string SourceAverageSetupDuration = "Property.Source.SetupDuration";
internal const string SourceMaxSetupDuration = "Property.Source.MaxSetupDuration";
+
+ internal const string E2EEventName = "VS/Editor/Completion/E2EData";
+ internal const string E2EContentType = "Property.E2E.ContentType";
+ internal const string E2EBucket25 = "Property.E2E.Bucket.25";
+ internal const string E2EBucket50 = "Property.E2E.Bucket.50";
+ internal const string E2EBucket100 = "Property.E2E.Bucket.100";
+ internal const string E2EBucket250 = "Property.E2E.Bucket.250";
+ internal const string E2EBucket500 = "Property.E2E.Bucket.500";
+ internal const string E2EBucket1000 = "Property.E2E.Bucket.1000";
+ internal const string E2EBucket2000 = "Property.E2E.Bucket.2000";
+ internal const string E2EBucketLast = "Property.E2E.Bucket.Last";
+ internal const string E2EBucketCanceled = "Property.E2E.Bucket.Canceled";
+ internal const string E2EBucketInvalid = "Property.E2E.Bucket.Invalid";
+ internal const string E2ECommittedStandard = "Property.E2E.Committed.Standard";
+ internal const string E2ECommittedClick = "Property.E2E.Committed.ThroughClick";
+ internal const string E2ECommittedCompleteWord = "Property.E2E.Committed.CompleteWord";
+ internal const string E2ECommittedSuggestionItem = "Property.E2E.Committed.SuggestionItem";
+ internal const string E2EDismissedStandard = "Property.E2E.Dismissed.Standard";
+ internal const string E2EDismissedBackspace = "Property.E2E.Dismissed.Backspace";
+ internal const string E2EDismissedCancellation = "Property.E2E.Dismissed.Cancellation";
+ internal const string E2EDismissedCaretLeaving = "Property.E2E.Dismissed.CaretLeaving";
+ internal const string E2EDismissedFiltering = "Property.E2E.Dismissed.Filtering";
+ internal const string E2EDismissedNonBlocking = "Property.E2E.Dismissed.NonBlocking";
+ internal const string E2EDismissedUnhandledError = "Property.E2E.Dismissed.UnhandledError";
+ internal const string E2EDismissedUI = "Property.E2E.Dismissed.UI";
+ internal const string E2EDismissedUninitialized = "Property.E2E.Dismissed.Uninitialized";
+ }
+
+ /// <summary>
+ /// Represents state of the session at the end of its life.
+ /// It is set during the operation of the session and published when session dismisses.
+ /// </summary>
+ internal enum CompletionSessionState
+ {
+ /// <summary>
+ /// Nothing significant has happened
+ /// </summary>
+ Default,
+ /// <summary>
+ /// Session committed through typing, enter, tab or programmatically
+ /// </summary>
+ Committed,
+ /// <summary>
+ /// Session committed by double clicking the UI
+ /// </summary>
+ CommittedThroughClick,
+ /// <summary>
+ /// Session committed through complete word gesture (Ctrl+Space)
+ /// </summary>
+ CommittedThroughCompleteWord,
+ /// <summary>
+ /// Session committed when typing suggestion item
+ /// </summary>
+ CommittedSuggestionItem,
+ /// <summary>
+ /// Session dismissed because user erased its contents
+ /// </summary>
+ DismissedDueToBackspace,
+ /// <summary>
+ /// Session dismissed because user moved caret outside of the applicable to span
+ /// </summary>
+ DismissedDueToCaretLeaving,
+ /// <summary>
+ /// Session dismissed because a cancellation token was canceled
+ /// </summary>
+ DismissedDueToCancellation,
+ /// <summary>
+ /// Session dismissed because there was an issue filtering
+ /// </summary>
+ DismissedDuringFiltering,
+ /// <summary>
+ /// Session dismissed because computation has not finished before attempt to commit.
+ /// </summary>
+ DismissedDueToNonBlockingMode,
+ /// <summary>
+ /// Session dismissed because an error brought down the computation
+ /// </summary>
+ DismissedDueToUnhandledError,
+ /// <summary>
+ /// Session dismissed because UI closed, likely by losing focus
+ /// </summary>
+ DismissedThroughUI,
+ /// <summary>
+ /// Session dismissed because it never received completion data
+ /// </summary>
+ DismissedUninitialized,
}
}
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionUtilities.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionUtilities.cs
index bf95dfe..ceea5ec 100644
--- a/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionUtilities.cs
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/CompletionUtilities.cs
@@ -29,11 +29,20 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
/// <summary>
/// Returns whether the <see cref="ITextView"/> is furnished by the debugger,
/// e.g. it is a view in the breakpoint settings window or watch window.
+ /// We use this to pick an appropriate option with suggestion mode setting.
/// </summary>
/// <param name="textView">View to examine</param>
/// <returns>True if the view has "DEBUGVIEW" text view role.</returns>
internal static bool IsDebuggerTextView(ITextView textView) => textView.Roles.Contains("DEBUGVIEW");
+ /// <summary>
+ /// Returns whether the <see cref="ITextView"/> is in immediate window.
+ /// We use this to make the view temporarily writable during commit (it is typically read-only).
+ /// </summary>
+ /// <param name="textView">View to examine</param>
+ /// <returns>True if the view has "COMMANDVIEW" text view role.</returns>
+ internal static bool IsImmediateTextView(ITextView textView) => textView.Roles.Contains("COMMANDVIEW");
+
static readonly EditorOptionKey<bool> NonBlockingCompletionOptionKey = new EditorOptionKey<bool>(PredefinedCompletionNames.NonBlockingCompletionOptionName);
static readonly EditorOptionKey<bool> SuggestionModeOptionKey = new EditorOptionKey<bool>(PredefinedCompletionNames.SuggestionModeInCompletionOptionName);
static readonly EditorOptionKey<bool> SuggestionModeInDebuggerCompletionOptionKey = new EditorOptionKey<bool>(PredefinedCompletionNames.SuggestionModeInDebuggerCompletionOptionName);
@@ -77,10 +86,12 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
internal static bool GetSuggestionModeOption(ITextView textView)
{
var options = textView.Options.GlobalOptions;
- var optionKey = IsDebuggerTextView(textView) ? SuggestionModeInDebuggerCompletionOptionKey : SuggestionModeOptionKey;
+ var useDebuggerViewOption = IsDebuggerTextView(textView) || IsImmediateTextView(textView);
+ var optionKey = useDebuggerViewOption ? SuggestionModeInDebuggerCompletionOptionKey : SuggestionModeOptionKey;
+
if (!(options.IsOptionDefined(optionKey, localScopeOnly: false)))
{
- var defaultValue = IsDebuggerTextView(textView) ? UseSuggestionModeInDebuggerCompletionDefaultValue : UseSuggestionModeDefaultValue;
+ var defaultValue = useDebuggerViewOption ? UseSuggestionModeInDebuggerCompletionDefaultValue : UseSuggestionModeDefaultValue;
options.SetOptionValue(optionKey, defaultValue);
}
return options.GetOptionValue(optionKey);
@@ -89,7 +100,8 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
internal static void SetSuggestionModeOption(ITextView textView, bool value)
{
var options = textView.Options.GlobalOptions;
- var optionKey = IsDebuggerTextView(textView) ? SuggestionModeInDebuggerCompletionOptionKey : SuggestionModeOptionKey;
+ var useDebuggerViewOption = IsDebuggerTextView(textView) || IsImmediateTextView(textView);
+ var optionKey = useDebuggerViewOption ? SuggestionModeInDebuggerCompletionOptionKey : SuggestionModeOptionKey;
options.SetOptionValue(optionKey, value);
}
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/IModelComputationCallbackHandler.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/IModelComputationCallbackHandler.cs
index a271ca1..6f4b929 100644
--- a/src/Editor/Language/Impl/Language/AsyncCompletion/IModelComputationCallbackHandler.cs
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/IModelComputationCallbackHandler.cs
@@ -6,6 +6,8 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
internal interface IModelComputationCallbackHandler<TModel>
{
Task UpdateUI(TModel model, CancellationToken token);
- void Dismiss();
+ void DismissDueToCancellation();
+ void DismissDueToError();
+ void ComputationFinished(TModel transformedModel);
}
}
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/MetadataUtilities.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/MetadataUtilities.cs
index 39c7e7e..00a2a2f 100644
--- a/src/Editor/Language/Impl/Language/AsyncCompletion/MetadataUtilities.cs
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/MetadataUtilities.cs
@@ -4,7 +4,7 @@ using System.Collections.Immutable;
using System.Linq;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
-using Microsoft.VisualStudio.Text.Projection;
+using Microsoft.VisualStudio.Text.Utilities;
using Microsoft.VisualStudio.Utilities;
namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implementation
@@ -20,9 +20,9 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
/// Must be invoked on UI thread.
/// </summary>
internal static IEnumerable<(ITextBuffer buffer, SnapshotPoint point, Lazy<T, TMetadata> import)> GetOrderedBuffersAndImports(
- IBufferGraph bufferGraph,
- ITextViewRoleSet roles,
SnapshotPoint location,
+ ITextSnapshot rootSnapshot,
+ ITextViewRoleSet roles,
Func<IContentType, ITextViewRoleSet, IReadOnlyList<Lazy<T, TMetadata>>> getImports,
IComparer<IEnumerable<string>> contentTypeComparer)
{
@@ -54,7 +54,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
// list of (buffer, handler) pairs: (projection buffer, projection handler), (C# buffer, C# handler),
// (projection buffer, any handler).
- var mappedPointsEnumeration = GetPointsOnAvailableBuffers(bufferGraph, location);
+ var mappedPointsEnumeration = MappingHelper.GetPointsAtLocation(location, rootSnapshot);
if (!mappedPointsEnumeration.Any())
yield break;
@@ -121,41 +121,39 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
}
/// <summary>
- /// A simpler method that returns all imports with declared content type that matches content type of subject buffers available at the given location.
- /// Must be invoked on UI thread.
+ /// A simpler method which finds points at all buffers available at the given location,
+ /// filters them to use only one point per buffer,
+ /// finds imports that match the buffers' content type
+ /// and returns these imports along with relevant points.
/// </summary>
+ /// <param name="location">Location where we look for points on other buffers</param>
+ /// <param name="rootSnapshot">Top snapshot from which we map down to other snapshots. Typicall the same snapshot as <paramref name="location"/></param>
+ /// <param name="roles"><see cref="ITextViewRoleSet"/> to filter extensions</param>
+ /// <param name="getImports">Function which returns imports applicable for given <paramref name="roles"/> and content type at the mapped points</param>
+ /// <returns></returns>
internal static IEnumerable<(ITextBuffer buffer, SnapshotPoint point, Lazy<T, TMetadata> import)> GetBuffersAndImports(
- IBufferGraph bufferGraph,
- ITextViewRoleSet roles,
SnapshotPoint location,
+ ITextSnapshot rootSnapshot,
+ ITextViewRoleSet roles,
Func<IContentType, ITextViewRoleSet, IReadOnlyList<Lazy<T, TMetadata>>> getImports)
{
- var mappedPointsEnumeration = GetPointsOnAvailableBuffers(bufferGraph, location);
- if (!mappedPointsEnumeration.Any())
- yield break;
-
- var buffers = mappedPointsEnumeration.Select(n => n.Snapshot.TextBuffer).ToImmutableArray();
- var mappedPoints = mappedPointsEnumeration.ToImmutableArray();
-
- // An array of per-buffer buckets, each containing cached list of matching imports,
- // ordered by [Order] and content type specificity
- for (int i = 0; i < buffers.Length; i++)
+ var visitedBuffers = ArrayBuilder<ITextBuffer>.GetInstance();
+ try
{
- foreach (var import in getImports(buffers[i].ContentType, roles))
- yield return (buffers[i], mappedPoints[i], import);
+ foreach (var mappedPoint in MappingHelper.GetPointsAtLocation(location, rootSnapshot))
+ {
+ var buffer = mappedPoint.Snapshot.TextBuffer;
+ if (visitedBuffers.Contains(buffer))
+ continue;
+ visitedBuffers.Add(buffer);
+ foreach (var import in getImports(buffer.ContentType, roles))
+ yield return (buffer, mappedPoint, import);
+ }
+ }
+ finally
+ {
+ visitedBuffers.Free();
}
- }
-
- /// <summary>
- /// Maps given <see cref="SnapshotPoint"/> to <see cref="SnapshotPoint"/>s on buffers available at this location.
- /// Must be invoked on UI thread.
- /// </summary>
- private static IEnumerable<SnapshotPoint> GetPointsOnAvailableBuffers(IBufferGraph bufferGraph, SnapshotPoint location)
- {
- var mappingPoint = bufferGraph.CreateMappingPoint(location, PointTrackingMode.Negative);
- var buffers = bufferGraph.GetTextBuffers(b => mappingPoint.GetPoint(b, PositionAffinity.Predecessor) != null);
- var pointsInBuffers = buffers.Select(b => mappingPoint.GetPoint(b, PositionAffinity.Predecessor).Value);
- return pointsInBuffers;
}
}
}
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/ModelComputation.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/ModelComputation.cs
index 67dbacb..f95a621 100644
--- a/src/Editor/Language/Impl/Language/AsyncCompletion/ModelComputation.cs
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/ModelComputation.cs
@@ -91,24 +91,33 @@ namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implement
var transformedModel = await transformation(previousModel, _token).ConfigureAwait(true);
RecentModel = transformedModel;
- // TODO: update UI even if updateUi is false but it wasn't updated yet.
- if (_lastJoinableTask == currentTask && updateUi)
+ // TODO: Consider updating UI even if updateUi is false but it wasn't updated yet.
+ if (_lastJoinableTask == currentTask && !_token.IsCancellationRequested && !_terminated)
{
- // update UI because we're the latest task
- if (!_uiCancellation.IsCancellationRequested)
+ _callbacks.ComputationFinished(transformedModel);
+
+ if (updateUi && !_uiCancellation.IsCancellationRequested)
_callbacks.UpdateUI(transformedModel, _uiCancellation.Token).Forget();
}
return transformedModel;
}
+ catch (Exception ex) when (ex is OperationCanceledException || ex is ThreadAbortException)
+ {
+ // Disallow enqueuing more tasks
+ _terminated = true;
+ // Close completion
+ _callbacks.DismissDueToCancellation();
+ // Return a task that has not faulted
+ return default(TModel);
+ }
catch (Exception ex)
{
// Disallow enqueuing more tasks
_terminated = true;
// Log the issue
- if (!(ex is ThreadAbortException))
- _guardedOperations.HandleException(this, ex);
+ _guardedOperations.HandleException(this, ex);
// Close completion
- _callbacks.Dismiss();
+ _callbacks.DismissDueToError();
// Return a task that has not faulted
return default(TModel);
}
diff --git a/src/Editor/Language/Impl/Language/AsyncCompletion/UseAsyncCompletionOptionDefinition.cs b/src/Editor/Language/Impl/Language/AsyncCompletion/UseAsyncCompletionOptionDefinition.cs
new file mode 100644
index 0000000..5f648c7
--- /dev/null
+++ b/src/Editor/Language/Impl/Language/AsyncCompletion/UseAsyncCompletionOptionDefinition.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Text.Editor;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Implementation
+{
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(OptionName)]
+ internal class UseAsyncCompletionOptionDefinition : EditorOptionDefinition
+ {
+ public const string OptionName = "UseAsyncCompletion";
+
+ /// <summary>
+ /// The meaning of this option definition's values:
+ /// -1 - user disabled async completion
+ /// 0 - no changes from the user; check the experimentation service for whether to use async completion
+ /// 1 - user enabled async completion
+ /// </summary>
+ public override object DefaultValue => 0;
+
+ public override Type ValueType => typeof(int);
+
+ public override string Name => OptionName;
+ }
+}
diff --git a/src/Editor/Language/Impl/Language/CodeCleanup/CodeCleanupFixerRegistrationService.cs b/src/Editor/Language/Impl/Language/CodeCleanup/CodeCleanupFixerRegistrationService.cs
new file mode 100644
index 0000000..d98ac91
--- /dev/null
+++ b/src/Editor/Language/Impl/Language/CodeCleanup/CodeCleanupFixerRegistrationService.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.Immutable;
+using System.ComponentModel.Composition;
+using System.Linq;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Fixer registration service. This contains a set of fixers exported by components which
+ /// are called during one click code clean up
+ /// </summary>
+ [Export(typeof(ICodeCleanUpFixerRegistrationService))]
+ public class CodeCleanUpFixerRegistrationService : ICodeCleanUpFixerRegistrationService
+ {
+ private ImmutableHashSet<ICodeCleanUpFixerProvider> registeredFixerProviders = ImmutableHashSet.Create<ICodeCleanUpFixerProvider>();
+
+ /// <summary>
+ /// Fixer identifiers enabled by the client appliication
+ /// </summary>
+ private FixIdContainer enabledFixerIds;
+
+ /// <inheritdoc/>
+ public IReadOnlyCollection<ICodeCleanUpFixerProvider> RegisteredFixerProviders => registeredFixerProviders;
+
+ /// <summary>
+ /// Set of fixer identitifers exported by fixers indicating which fixes they can process
+ /// </summary>
+ [ImportMany]
+ private readonly List<Lazy<FixIdDefinition, IFixIdDefinitionMetadata>> fixerCodeDefinitions;
+
+ /// <inheritdoc/>
+ public FixIdContainer EnabledFixIds
+ {
+ get
+ {
+ if (this.enabledFixerIds == null)
+ {
+ var codes = this.fixerCodeDefinitions.Select<Lazy<FixIdDefinition, IFixIdDefinitionMetadata>, IFixInformation>((definition) => new FixerCodeInfo(definition));
+ this.enabledFixerIds = new FixIdContainer(codes.Any() ? codes.ToImmutableList() : ImmutableList<IFixInformation>.Empty);
+ }
+
+ return this.enabledFixerIds;
+ }
+ }
+
+ /// <inheritdoc/>
+ public bool TryRegisterFixerProvider(ICodeCleanUpFixerProvider fixerProvider)
+ {
+ Requires.NotNull(fixerProvider, nameof(fixerProvider));
+ return ImmutableInterlocked.Update(ref this.registeredFixerProviders,
+ (collection, item) => collection.Add(item),
+ fixerProvider);
+ }
+
+ /// <inheritdoc/>
+ public bool TryUnRegisterFixerProvider(ICodeCleanUpFixerProvider fixerProvider)
+ {
+ Requires.NotNull(fixerProvider, nameof(fixerProvider));
+
+ return ImmutableInterlocked.Update(ref this.registeredFixerProviders,
+ (collection, item) => collection.Remove(item),
+ fixerProvider);
+ }
+ }
+}
diff --git a/src/Editor/Language/Impl/Language/CodeCleanup/FixerCodeInfo.cs b/src/Editor/Language/Impl/Language/CodeCleanup/FixerCodeInfo.cs
new file mode 100644
index 0000000..03570c7
--- /dev/null
+++ b/src/Editor/Language/Impl/Language/CodeCleanup/FixerCodeInfo.cs
@@ -0,0 +1,44 @@
+using System;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Error code information that describes an errro code that can be fixed by one a code cleanup fixer
+ /// </summary>
+ internal sealed class FixerCodeInfo : IFixInformation
+ {
+ private readonly Lazy<FixIdDefinition, IFixIdDefinitionMetadata> fixerCode;
+
+ /// <summary>
+ /// Error code information
+ /// </summary>
+ public FixerCodeInfo(Lazy<FixIdDefinition, IFixIdDefinitionMetadata> fixerCode)
+ {
+ Requires.NotNull(fixerCode, nameof(fixerCode));
+ this.fixerCode = fixerCode;
+ }
+
+ /// <summary>
+ /// Fixer code, Example: IDE001
+ /// </summary>
+ public string FixerId => fixerCode.Metadata.FixId;
+
+ /// <summary>
+ /// Configuration name used for setting modification
+ /// Example:ConfigKeyName: CS_Remove_Unused_Usings
+ /// </summary>
+ public string ConfigurationKey => fixerCode.Metadata.ConfigurationKey;
+
+ /// <summary>
+ /// Help link to give user more information about the error code.
+ /// May be null
+ /// </summary>
+ public string HelpLink => fixerCode.Metadata.HelpLink;
+
+ /// <summary>
+ /// Gets the localized friendly name
+ /// </summary>
+ public string LocalizedDisplayName => fixerCode.Metadata.LocalizedName;
+ }
+}
diff --git a/src/Editor/Language/Impl/Language/CodeCleanup/IFixerCodeDefinitionMetadata.cs b/src/Editor/Language/Impl/Language/CodeCleanup/IFixerCodeDefinitionMetadata.cs
new file mode 100644
index 0000000..ad24140
--- /dev/null
+++ b/src/Editor/Language/Impl/Language/CodeCleanup/IFixerCodeDefinitionMetadata.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.VisualStudio.Language.CodeCleanUp
+{
+ /// <summary>
+ /// Represents MEF metadata view corresponding to the <see cref="FixIdDefinition"/>s.
+ /// </summary>
+ internal interface IFixIdDefinitionMetadata
+ {
+ /// <summary>
+ /// Fixer Id for example "IDE001"
+ /// </summary>
+ string FixId { get; }
+
+ /// <summary>
+ /// Key for use in the .editorconfig file
+ /// </summary>
+ string ConfigurationKey { get; }
+
+ /// <summary>
+ /// Optional help link to provide more information about the fixer code
+ /// </summary>
+ [DefaultValue(null)]
+ string HelpLink { get; }
+
+ /// <summary>
+ /// Localized display name
+ /// </summary>
+ string LocalizedName { get; }
+ }
+}
diff --git a/src/Editor/Language/Impl/Language/LanguageImpl.csproj b/src/Editor/Language/Impl/Language/LanguageImpl.csproj
new file mode 100644
index 0000000..d09d1ea
--- /dev/null
+++ b/src/Editor/Language/Impl/Language/LanguageImpl.csproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Language.Implementation</AssemblyName>
+ <RootNamespace>Microsoft.VisualStudio.Language.Intellisense.Implementation</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <NonShipping>true</NonShipping>
+ <IsPackable>false</IsPackable>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.VisualStudio.Threading" />
+ <PackageReference Include="System.Collections.Immutable" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Text\Util\TextUIUtil\TextUIUtil.csproj" />
+ <ProjectReference Include="..\..\Def\Language\LanguageDef.csproj" />
+ <ProjectReference Include="..\..\Util\LanguageUtil\LanguageUtil.csproj" />
+ <ProjectReference Include="..\..\..\Text\Util\TextDataUtil\TextDataUtil.csproj" />
+ <ProjectReference Include="..\..\..\Text\Def\TextUI\TextUI.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="Strings.Designer.cs">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="Strings.resx">
+ <Generator>PublicResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoPresentationSession.cs b/src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoPresentationSession.cs
index b159b8d..0178e21 100644
--- a/src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoPresentationSession.cs
+++ b/src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoPresentationSession.cs
@@ -16,7 +16,7 @@
using Microsoft.VisualStudio.Utilities;
internal sealed class AsyncQuickInfoPresentationSession : AsyncQuickInfoSession,
- IAsyncQuickInfoSession,
+ IAsyncQuickInfoSession2,
#pragma warning disable 618
ILegacyQuickInfoRecalculateSupport
#pragma warning restore 618
@@ -26,7 +26,16 @@
#region Reable/Writeable via UI Thread Only
- internal IToolTipPresenter uiThreadOnlyPresenter;
+ IToolTipPresenter uiThreadOnlyPresenter;
+ IToolTipPresenter2 uiThreadOnlyPresenterV2;
+ internal IToolTipPresenter UIThreadOnlyPresenter
+ {
+ get => uiThreadOnlyPresenter;
+ set {
+ uiThreadOnlyPresenter = value;
+ uiThreadOnlyPresenterV2 = value as IToolTipPresenter2;
+ }
+ }
#endregion
@@ -52,6 +61,9 @@
this.toolTipService = toolTipService ?? throw new ArgumentNullException(nameof(toolTipService));
}
+ public override bool IsMouseOverAggregated
+ => uiThreadOnlyPresenterV2 != null && uiThreadOnlyPresenterV2.IsMouseOverAggregated;
+
public override async Task DismissAsync()
{
// Ensure that we have the UI thread. To avoid races, the rest of this method must be sync.
@@ -61,13 +73,12 @@
if (currentState != QuickInfoSessionState.Dismissed)
{
// Dismiss presenter.
- var presenter = this.uiThreadOnlyPresenter;
+ var presenter = this.UIThreadOnlyPresenter;
if (presenter != null)
{
presenter.Dismissed -= this.OnDismissed;
- this.uiThreadOnlyPresenter.Dismiss();
-
- this.uiThreadOnlyPresenter = null;
+ UIThreadOnlyPresenter.Dismiss();
+ UIThreadOnlyPresenter = null;
}
}
@@ -118,14 +129,14 @@
keepOpenFunc: this.ContentRequestsKeepOpen);
// Create presenter if necessary.
- if (this.uiThreadOnlyPresenter == null)
+ if (UIThreadOnlyPresenter == null)
{
- this.uiThreadOnlyPresenter = this.toolTipService.CreatePresenter(this.TextView, parameters);
- this.uiThreadOnlyPresenter.Dismissed += this.OnDismissed;
+ UIThreadOnlyPresenter = this.toolTipService.CreatePresenter(this.TextView, parameters);
+ UIThreadOnlyPresenter.Dismissed += this.OnDismissed;
}
// Update presenter content.
- this.uiThreadOnlyPresenter.StartOrUpdate(this.ApplicableToSpan, this.Content);
+ UIThreadOnlyPresenter.StartOrUpdate(this.ApplicableToSpan, this.Content);
// Ensure that the presenter didn't dismiss the session.
if (this.State != QuickInfoSessionState.Dismissed)
diff --git a/src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoSession.cs b/src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoSession.cs
index 4e49ef0..3cfb0cf 100644
--- a/src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoSession.cs
+++ b/src/Editor/Language/Impl/Language/QuickInfo/AsyncQuickInfoSession.cs
@@ -109,6 +109,8 @@
}
}
+ public virtual bool IsMouseOverAggregated => false;
+
public virtual async Task DismissAsync()
{
// Ensure that we have the UI thread. To avoid races, the rest of this method must be sync.
@@ -401,6 +403,24 @@
}
}
+ // Scope the applicableToSpan down to just the current line to ensure that interactions
+ // with interactive controls such as lightbulb are not impeded by the tip appearing
+ // far away from the mouse.
+ if (newApplicableToSpan != null)
+ {
+ var currentSnapshot = newApplicableToSpan.TextBuffer.CurrentSnapshot;
+ var spanStart = newApplicableToSpan.GetStartPoint(currentSnapshot);
+ var spanEnd = newApplicableToSpan.GetEndPoint(currentSnapshot);
+ var triggerPointLine = this.triggerPoint.GetPoint(currentSnapshot).GetContainingLine();
+ var triggerPointLineExtent = triggerPointLine.Extent;
+ var newStart = Math.Max(triggerPointLineExtent.Start, spanStart);
+ var newEnd = Math.Min(triggerPointLineExtent.End, spanEnd);
+ if (newStart <= newEnd)
+ {
+ newApplicableToSpan = currentSnapshot.CreateTrackingSpan(Span.FromBounds(newStart, newEnd), SpanTrackingMode.EdgeInclusive);
+ }
+ }
+
Volatile.Write(ref this.applicableToSpan, newApplicableToSpan);
}
diff --git a/src/Editor/Language/Impl/Language/QuickInfo/QuickInfoController.cs b/src/Editor/Language/Impl/Language/QuickInfo/QuickInfoController.cs
index a6416f0..091d8f2 100644
--- a/src/Editor/Language/Impl/Language/QuickInfo/QuickInfoController.cs
+++ b/src/Editor/Language/Impl/Language/QuickInfo/QuickInfoController.cs
@@ -123,6 +123,11 @@
if (session != null)
{
+ if (session is IAsyncQuickInfoSession2 sessionV2 && sessionV2.IsMouseOverAggregated)
+ {
+ return true;
+ }
+
// First check that the point and applicable span are from the same subject buffer,
// and then that they intersect.
if ((session.ApplicableToSpan != null) &&
@@ -135,15 +140,12 @@
// If this session has an interactive content give it a chance to keep the session alive.
if (session.HasInteractiveContent)
{
- foreach (var content in session.Content)
+ foreach (var result in session.Content)
{
- foreach (var result in session.Content)
+ if (result is IInteractiveQuickInfoContent interactiveContent
+ && (interactiveContent.KeepQuickInfoOpen || interactiveContent.IsMouseOverAggregated))
{
- if (result is IInteractiveQuickInfoContent interactiveContent
- && (interactiveContent.KeepQuickInfoOpen || interactiveContent.IsMouseOverAggregated))
- {
- return true;
- }
+ return true;
}
}
}
diff --git a/src/Editor/Language/Impl/Language/QuickInfo/QuickInfoTextViewCreationListener.cs b/src/Editor/Language/Impl/Language/QuickInfo/QuickInfoTextViewCreationListener.cs
index 36dd27d..c387e97 100644
--- a/src/Editor/Language/Impl/Language/QuickInfo/QuickInfoTextViewCreationListener.cs
+++ b/src/Editor/Language/Impl/Language/QuickInfo/QuickInfoTextViewCreationListener.cs
@@ -6,9 +6,7 @@
using Microsoft.VisualStudio.Threading;
using Microsoft.VisualStudio.Utilities;
- // TODO: re-enable this as part of
- // https://devdiv.visualstudio.com/DevDiv/Xamarin%20VS%20for%20Mac/_workitems/edit/617427
- // [Export(typeof(ITextViewCreationListener))]
+ [Export(typeof(ITextViewCreationListener))]
[ContentType("any")]
[TextViewRole(PredefinedTextViewRoles.Editable)]
[TextViewRole(PredefinedTextViewRoles.EmbeddedPeekTextView)]
diff --git a/src/Editor/Language/Impl/Language/QuickInfo/SquiggleQuickInfoSourceProvider.cs b/src/Editor/Language/Impl/Language/QuickInfo/SquiggleQuickInfoSourceProvider.cs
index 6241274..668c037 100644
--- a/src/Editor/Language/Impl/Language/QuickInfo/SquiggleQuickInfoSourceProvider.cs
+++ b/src/Editor/Language/Impl/Language/QuickInfo/SquiggleQuickInfoSourceProvider.cs
@@ -6,9 +6,7 @@
using Microsoft.VisualStudio.Threading;
using Microsoft.VisualStudio.Utilities;
- // TODO: re-enable this as part of
- // https://devdiv.visualstudio.com/DevDiv/Xamarin%20VS%20for%20Mac/_workitems/edit/617427
- // [Export(typeof(IAsyncQuickInfoSourceProvider))]
+ [Export(typeof(IAsyncQuickInfoSourceProvider))]
[Name("squiggle")]
[Order]
[ContentType("any")]
diff --git a/src/Editor/Language/Impl/Language/Strings.Designer.cs b/src/Editor/Language/Impl/Language/Strings.Designer.cs
index ff61a5c..099fc00 100644
--- a/src/Editor/Language/Impl/Language/Strings.Designer.cs
+++ b/src/Editor/Language/Impl/Language/Strings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.Implementation {
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Language.Impl.Language.Strings", typeof(Strings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Language.Intellisense.Implementation.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Language/Impl/StandardClassification/StandardClassificationService.cs b/src/Editor/Language/Impl/StandardClassification/StandardClassificationService.cs
deleted file mode 100644
index 893ad2f..0000000
--- a/src/Editor/Language/Impl/StandardClassification/StandardClassificationService.cs
+++ /dev/null
@@ -1,335 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-//
-// This file contain implementations details that are subject to change without notice.
-// Use at your own risk.
-//
-namespace Microsoft.VisualStudio.Language.StandardClassification.Implementation
-{
- using Microsoft.VisualStudio.Text.Classification;
- using Microsoft.VisualStudio.Utilities;
- using System.ComponentModel.Composition;
-
- /// <summary>
- /// Helper service to get hold of standard classifications.
- /// </summary>
- [Export(typeof(IStandardClassificationService))]
- internal sealed class StandardClassificationService : IStandardClassificationService
- {
- // =========== Classification types ================
-
- [Export]
- [Name(PredefinedClassificationTypeNames.NaturalLanguage)]
- internal ClassificationTypeDefinition naturalLanguageClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition formalLanguageClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.Comment)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition commentClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.Identifier)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition identifierClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.Keyword)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition keywordClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.WhiteSpace)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition whitespaceClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.Operator)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition operatorClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.Literal)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition literalClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.MarkupAttribute)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition markupAttributeClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.MarkupAttributeValue)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition markupAttributeValueClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.MarkupNode)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition markupNodeClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.String)]
- [BaseDefinition(PredefinedClassificationTypeNames.Literal)]
- internal ClassificationTypeDefinition stringClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.Type)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition typeClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.Character)]
- [BaseDefinition(PredefinedClassificationTypeNames.Literal)]
- internal ClassificationTypeDefinition characterClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.Number)]
- [BaseDefinition(PredefinedClassificationTypeNames.Literal)]
- internal ClassificationTypeDefinition numberClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.Other)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition otherClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.ExcludedCode)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition excludedCodeClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.PreprocessorKeyword)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition preprocessorKeywordClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.SymbolDefinition)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition symbolDefinitionClassificationTypeDefinition;
-
- [Export]
- [Name(PredefinedClassificationTypeNames.SymbolReference)]
- [BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)]
- internal ClassificationTypeDefinition symbolReferenceClassificationTypeDefinition;
-
- [Import]
- internal IClassificationTypeRegistryService ClassificationTypeRegistry;
-
- #region IStandardClassificationService Members
-
- public IClassificationType CharacterLiteral
- {
- get
- {
- if (this.characterLiteral == null)
- {
- this.characterLiteral = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.Character);
- }
- return this.characterLiteral;
- }
- }
- IClassificationType characterLiteral;
-
- public IClassificationType Comment
- {
- get
- {
- if (this.comment == null)
- {
- this.comment = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.Comment);
- }
- return this.comment;
- }
- }
- IClassificationType comment;
-
- public IClassificationType FormalLanguage
- {
- get
- {
- if (this.formalLanguage == null)
- {
- this.formalLanguage = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.FormalLanguage);
- }
- return this.formalLanguage;
- }
- }
- IClassificationType formalLanguage;
-
- public IClassificationType Identifier
- {
- get
- {
- if (this.identifier == null)
- {
- this.identifier = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.Identifier);
- }
- return this.identifier;
- }
- }
- IClassificationType identifier;
-
- public IClassificationType Keyword
- {
- get
- {
- if (this.keyword == null)
- {
- this.keyword = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.Keyword);
- }
- return this.keyword;
- }
- }
- IClassificationType keyword;
-
- public IClassificationType Literal
- {
- get
- {
- if (this.literal == null)
- {
- this.literal = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.Literal);
- }
- return this.literal;
- }
- }
- IClassificationType literal;
-
- public IClassificationType NaturalLanguage
- {
- get
- {
- if (this.naturalLanguage == null)
- {
- this.naturalLanguage = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.NaturalLanguage);
- }
- return this.naturalLanguage;
- }
- }
- IClassificationType naturalLanguage;
-
- public IClassificationType NumberLiteral
- {
- get
- {
- if (this.numericalLiteral == null)
- {
- this.numericalLiteral = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.Number);
- }
- return this.numericalLiteral;
- }
- }
- IClassificationType numericalLiteral;
-
- public IClassificationType Operator
- {
- get
- {
- if (this.@operator == null)
- {
- this.@operator = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.Operator);
- }
- return this.@operator;
- }
- }
- IClassificationType @operator;
-
- public IClassificationType StringLiteral
- {
- get
- {
- if (this.stringLiteral == null)
- {
- this.stringLiteral = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.String);
- }
- return this.stringLiteral;
- }
- }
- IClassificationType stringLiteral;
-
- public IClassificationType WhiteSpace
- {
- get
- {
- if (this.whiteSpace == null)
- {
- this.whiteSpace = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.WhiteSpace);
- }
- return this.whiteSpace;
- }
- }
- IClassificationType whiteSpace;
-
- public IClassificationType Other
- {
- get
- {
- if (this.other == null)
- {
- this.other = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.Other);
- }
- return this.other;
- }
- }
- IClassificationType other;
-
- public IClassificationType PreprocessorKeyword
- {
- get
- {
- if (this.preprocessorKeyword == null)
- {
- this.preprocessorKeyword = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.PreprocessorKeyword);
- }
- return this.preprocessorKeyword;
- }
- }
- IClassificationType preprocessorKeyword;
-
- public IClassificationType ExcludedCode
- {
- get
- {
- if (this.excludedCode == null)
- {
- this.excludedCode = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.ExcludedCode);
- }
- return this.excludedCode;
- }
- }
- IClassificationType excludedCode;
-
- public IClassificationType SymbolDefinition
- {
- get
- {
- if (this.symbolDefinition == null)
- {
- this.symbolDefinition = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.SymbolDefinition);
- }
- return this.symbolDefinition;
- }
- }
- IClassificationType symbolDefinition;
-
- public IClassificationType SymbolReference
- {
- get
- {
- if (this.symbolReference == null)
- {
- this.symbolReference = ClassificationTypeRegistry.GetClassificationType(PredefinedClassificationTypeNames.SymbolReference);
- }
- return this.symbolReference;
- }
- }
- IClassificationType symbolReference;
-
- #endregion
- }
-}
diff --git a/src/Editor/Language/Util/Directory.Build.props b/src/Editor/Language/Util/Directory.Build.props
deleted file mode 100644
index 800fb86..0000000
--- a/src/Editor/Language/Util/Directory.Build.props
+++ /dev/null
@@ -1,8 +0,0 @@
-<Project>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" Condition="'$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))' != ''" />
-
- <PropertyGroup>
- <NonShipping>true</NonShipping>
- <IsPackable>false</IsPackable>
- </PropertyGroup>
-</Project>
diff --git a/src/Editor/Language/Util/LanguageUtil/AssemblyInfo.cs b/src/Editor/Language/Util/LanguageUtil/AssemblyInfo.cs
new file mode 100644
index 0000000..2f4ea70
--- /dev/null
+++ b/src/Editor/Language/Util/LanguageUtil/AssemblyInfo.cs
@@ -0,0 +1,21 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.UnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Cocoa.View.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Language/Util/LanguageUtil/LanguageUtil.csproj b/src/Editor/Language/Util/LanguageUtil/LanguageUtil.csproj
new file mode 100644
index 0000000..a77ded0
--- /dev/null
+++ b/src/Editor/Language/Util/LanguageUtil/LanguageUtil.csproj
@@ -0,0 +1,20 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Language.Utilities</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;618$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\..\Text\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\..\Text\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\..\Text\Util\TextDataUtil\TextDataUtil.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Microsoft.VisualStudio.Text.Implementation.csproj b/src/Editor/Microsoft.VisualStudio.Text.Implementation.csproj
deleted file mode 100644
index 789c98d..0000000
--- a/src/Editor/Microsoft.VisualStudio.Text.Implementation.csproj
+++ /dev/null
@@ -1,143 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net46</TargetFramework>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
- <DelaySign>false</DelaySign>
- <Version>15.2.5-pre</Version>
- <AssemblyVersion>15.0.0.0</AssemblyVersion>
- <NuGetVersionEditor>16.0.142-g25b7188c54</NuGetVersionEditor>
- <NuGetVersionLanguage>16.0.142-g25b7188c54</NuGetVersionLanguage>
- <LangVersion>latest</LangVersion>
- </PropertyGroup>
-
- <PropertyGroup>
- <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
- <PackageId>Microsoft.VisualStudio.Text.Implementation</PackageId>
- <Authors>Microsoft</Authors>
- <Owners>Microsoft</Owners>
- <Company>Microsoft</Company>
- <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
- <LicenseUrl>https://aka.ms/pexunj</LicenseUrl>
- <RequireLicenseAcceptance>false</RequireLicenseAcceptance>
- <Description>Microsoft® Visual Studio® Editor Platform</Description>
- <PackageLicenseUrl>https://github.com/Microsoft/vs-editor-api/blob/367d01a0b186f034178c5d5338c436e203eff8b4/LICENSE</PackageLicenseUrl>
- <PackageProjectUrl>https://github.com/Microsoft/vs-editor-api</PackageProjectUrl>
- <RepositoryUrl>https://github.com/Microsoft/vs-editor-api</RepositoryUrl>
- <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
- </PropertyGroup>
-
- <ItemGroup>
- <Compile Update="Core\Impl\ContentType\Strings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Strings.resx</DependentUpon>
- </Compile>
- <Compile Update="Language\Impl\Language\Strings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Strings.resx</DependentUpon>
- </Compile>
- <Compile Update="Text\Impl\TextModel\Strings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Strings.resx</DependentUpon>
- </Compile>
- <Compile Update="Text\Impl\TextBufferUndoManager\Strings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Strings.resx</DependentUpon>
- </Compile>
- <Compile Update="Text\Impl\ClassificationType\Strings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Strings.resx</DependentUpon>
- </Compile>
- <Compile Update="Text\Impl\EditorPrimitives\Strings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Strings.resx</DependentUpon>
- </Compile>
- <Compile Update="Text\Impl\EditorOperations\Strings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Strings.resx</DependentUpon>
- </Compile>
- <Compile Update="Text\Impl\Commanding\CommandingStrings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>CommandingStrings.resx</DependentUpon>
- </Compile>
- </ItemGroup>
-
- <ItemGroup>
- <EmbeddedResource Update="Core\Impl\ContentType\Strings.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Strings.Designer.cs</LastGenOutput>
- <CustomToolNamespace>Microsoft.VisualStudio.Utilities.Implementation</CustomToolNamespace>
- </EmbeddedResource>
- <EmbeddedResource Update="Language\Impl\Language\Strings.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Strings.Designer.cs</LastGenOutput>
- <CustomToolNamespace>Microsoft.VisualStudio.Language.Intellisense.Implementation</CustomToolNamespace>
- </EmbeddedResource>
- <EmbeddedResource Update="Text\Impl\TextModel\Strings.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Strings.Designer.cs</LastGenOutput>
- <CustomToolNamespace>Microsoft.VisualStudio.Text.Implementation</CustomToolNamespace>
- </EmbeddedResource>
- <EmbeddedResource Update="Text\Impl\ClassificationType\Strings.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Strings.Designer.cs</LastGenOutput>
- <CustomToolNamespace>Microsoft.VisualStudio.Text.Classification.Implementation.LookUp</CustomToolNamespace>
- </EmbeddedResource>
- <EmbeddedResource Update="Text\Impl\TextBufferUndoManager\Strings.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Strings.Designer.cs</LastGenOutput>
- <CustomToolNamespace>Microsoft.VisualStudio.Text.BufferUndoManager.Implementation</CustomToolNamespace>
- </EmbeddedResource>
- <EmbeddedResource Update="Text\Impl\EditorPrimitives\Strings.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Strings.Designer.cs</LastGenOutput>
- <CustomToolNamespace>Microsoft.VisualStudio.Text.EditorPrimitives.Implementation</CustomToolNamespace>
- </EmbeddedResource>
- <EmbeddedResource Update="Text\Impl\EditorOperations\Strings.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Strings.Designer.cs</LastGenOutput>
- <CustomToolNamespace>Microsoft.VisualStudio.Text.Operations.Implementation</CustomToolNamespace>
- </EmbeddedResource>
- <EmbeddedResource Update="Text\Impl\Commanding\CommandingStrings.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>CommandingStrings.Designer.cs</LastGenOutput>
- <CustomToolNamespace>Microsoft.VisualStudio.Text.Commanding.Implementation</CustomToolNamespace>
- </EmbeddedResource>
- </ItemGroup>
-
- <ItemGroup>
- <Compile Remove="Core\Def\**\*" />
- <Compile Remove="Language\Def\**\*" />
- <Compile Remove="Text\Def\Text*\**\*" />
- <Compile Remove="Text\Impl\BraceCompletion\**" />
- <EmbeddedResource Remove="Core\Def\**\*" />
- <EmbeddedResource Remove="Language\Def\**\*" />
- <EmbeddedResource Remove="Text\Def\Text*\**\*" />
- <EmbeddedResource Remove="Text\Impl\BraceCompletion\**" />
- <None Remove="Core\Def\**\*" />
- <None Remove="Language\Def\**\*" />
- <None Remove="Text\Def\Text*\**\*" />
- <None Remove="Text\Impl\BraceCompletion\**" />
- </ItemGroup>
-
- <ItemGroup>
- <PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
- <PackageReference Include="System.ValueTuple" Version="4.3.0" />
- <PackageReference Include="Microsoft.VisualStudio.CoreUtility" Version="$(NuGetVersionEditor)" />
- <PackageReference Include="Microsoft.VisualStudio.Language" Version="$(NuGetVersionLanguage)" />
- <PackageReference Include="Microsoft.VisualStudio.Language.StandardClassification" Version="$(NuGetVersionEditor)" />
- <PackageReference Include="Microsoft.VisualStudio.Text.Data" Version="$(NuGetVersionEditor)" />
- <PackageReference Include="Microsoft.VisualStudio.Text.Logic" Version="$(NuGetVersionEditor)" />
- <PackageReference Include="Microsoft.VisualStudio.Text.UI" Version="$(NuGetVersionEditor)" />
- </ItemGroup>
-
-</Project>
diff --git a/src/Editor/Text/Def/Extras/Extras.csproj b/src/Editor/Text/Def/Extras/Extras.csproj
new file mode 100644
index 0000000..01dd776
--- /dev/null
+++ b/src/Editor/Text/Def/Extras/Extras.csproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.Extras</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup Condition="$(UsePlatformEditorBinaries) != 'true'">
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ </ItemGroup>
+ <ItemGroup Condition="$(UsePlatformEditorBinaries) == 'true'">
+ <PackageReference Include="Microsoft.VisualStudio.Text.UI" Version="$(NuGetVersionVSEditor)" PrivateAssets="all" ExcludeAssets="runtime" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Def/Extras/Find/FindCommandArgs.cs b/src/Editor/Text/Def/Extras/Find/FindCommandArgs.cs
new file mode 100644
index 0000000..2bfe806
--- /dev/null
+++ b/src/Editor/Text/Def/Extras/Find/FindCommandArgs.cs
@@ -0,0 +1,84 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ public sealed class FindCommandArgs : EditorCommandArgs
+ {
+ public FindCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class FindNextCommandArgs : EditorCommandArgs
+ {
+ public FindNextCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class FindPreviousCommandArgs : EditorCommandArgs
+ {
+ public FindPreviousCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class ReplaceCommandArgs : EditorCommandArgs
+ {
+ public ReplaceCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class ReplaceNextCommandArgs : EditorCommandArgs
+ {
+ public ReplaceNextCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class ReplaceAllCommandArgs : EditorCommandArgs
+ {
+ public ReplaceAllCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class ToggleMatchCaseCommandArgs : EditorCommandArgs
+ {
+ public ToggleMatchCaseCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class ToggleMatchWholeWordCommandArgs : EditorCommandArgs
+ {
+ public ToggleMatchWholeWordCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class ToggleUseRegularExpressionsCommandArgs : EditorCommandArgs
+ {
+ public ToggleUseRegularExpressionsCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class HideFindCommandArgs : EditorCommandArgs
+ {
+ public HideFindCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class HideReplaceCommandArgs : EditorCommandArgs
+ {
+ public HideReplaceCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/Extras/Find/IFindPresenter.cs b/src/Editor/Text/Def/Extras/Find/IFindPresenter.cs
new file mode 100644
index 0000000..55e3a55
--- /dev/null
+++ b/src/Editor/Text/Def/Extras/Find/IFindPresenter.cs
@@ -0,0 +1,21 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+
+namespace Microsoft.VisualStudio.Text.Find
+{
+ /// <summary>
+ /// Encapsulates the Find/Replace UI that can be provided by an extension.
+ /// A presenter is per view, is associated with its underlying FindController
+ /// and is instantiated by the IFindPresenterFactory.
+ /// </summary>
+ public interface IFindPresenter
+ {
+ void ShowFind();
+ void ShowReplace();
+ void Hide();
+ bool IsVisible { get; }
+ bool IsFocused { get; }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/Extras/Find/IFindPresenterFactory.cs b/src/Editor/Text/Def/Extras/Find/IFindPresenterFactory.cs
new file mode 100644
index 0000000..2997be2
--- /dev/null
+++ b/src/Editor/Text/Def/Extras/Find/IFindPresenterFactory.cs
@@ -0,0 +1,19 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Text.Find
+{
+ /// <summary>
+ /// Instantiates a Find/Replace UI presenter for a given text view.
+ /// The factory is a singleton that is provided via a MEF [Export]
+ /// and can be consumed via a MEF [Import].
+ /// </summary>
+ public interface IFindPresenterFactory
+ {
+ IFindPresenter TryGetFindPresenter(ITextView textView);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/Extras/InfoBar/IInfoBarPresenter.cs b/src/Editor/Text/Def/Extras/InfoBar/IInfoBarPresenter.cs
new file mode 100644
index 0000000..b56232d
--- /dev/null
+++ b/src/Editor/Text/Def/Extras/InfoBar/IInfoBarPresenter.cs
@@ -0,0 +1,12 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ public interface IInfoBarPresenter
+ {
+ void Present(InfoBarViewModel viewModel);
+ void Dismiss(InfoBarViewModel viewModel);
+ void DismissAll();
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/Extras/InfoBar/IInfoBarPresenterFactory.cs b/src/Editor/Text/Def/Extras/InfoBar/IInfoBarPresenterFactory.cs
new file mode 100644
index 0000000..12df913
--- /dev/null
+++ b/src/Editor/Text/Def/Extras/InfoBar/IInfoBarPresenterFactory.cs
@@ -0,0 +1,10 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ public interface IInfoBarPresenterFactory
+ {
+ IInfoBarPresenter TryGetInfoBarPresenter(ITextView textView);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/Extras/InfoBar/InfoBarViewModel.cs b/src/Editor/Text/Def/Extras/InfoBar/InfoBarViewModel.cs
new file mode 100644
index 0000000..4913e40
--- /dev/null
+++ b/src/Editor/Text/Def/Extras/InfoBar/InfoBarViewModel.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ public readonly struct InfoBarAction
+ {
+ public string Title { get; }
+ public Action Handler { get; }
+ public bool IsDefault { get; }
+
+ public InfoBarAction(string title, Action handler, bool isDefault = false)
+ {
+ Title = title;
+ Handler = handler;
+ IsDefault = isDefault;
+ }
+
+ public void Invoke()
+ => Handler?.Invoke();
+ }
+
+ public sealed class InfoBarViewModel
+ {
+ public string PrimaryLabelText { get; }
+
+ public string SecondaryLabelText { get; }
+
+ public IReadOnlyList<InfoBarAction> Actions { get; }
+
+ public Action DismissedHandler { get; }
+
+ public InfoBarViewModel(
+ string primaryLabelText,
+ string secondaryLabelText,
+ IReadOnlyList<InfoBarAction> actions,
+ Action dismissedHandler = null)
+ {
+ PrimaryLabelText = primaryLabelText;
+ SecondaryLabelText = secondaryLabelText;
+ Actions = actions;
+ DismissedHandler = dismissedHandler;
+ }
+
+ public void InvokeDismissed()
+ => DismissedHandler?.Invoke();
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/Extras/PreviewEditorCommandArgs.cs b/src/Editor/Text/Def/Extras/PreviewEditorCommandArgs.cs
new file mode 100644
index 0000000..dcb173d
--- /dev/null
+++ b/src/Editor/Text/Def/Extras/PreviewEditorCommandArgs.cs
@@ -0,0 +1,23 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ public sealed class ProvideEditorFeedbackCommandArgs : EditorCommandArgs
+ {
+ public ProvideEditorFeedbackCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class DisableEditorPreviewCommandArgs : EditorCommandArgs
+ {
+ public DisableEditorPreviewCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+
+ public sealed class LearnAboutTheEditorCommandArgs : EditorCommandArgs
+ {
+ public LearnAboutTheEditorCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/Internal/AssemblyInfo.cs b/src/Editor/Text/Def/Internal/AssemblyInfo.cs
new file mode 100644
index 0000000..6105851
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/AssemblyInfo.cs
@@ -0,0 +1,45 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System.Reflection;
+using System.Runtime.ConstrainedExecution;
+using System.Runtime.CompilerServices;
+using System.Runtime.Versioning;
+using System.Windows;
+using Microsoft.VisualStudio.Language.Intellisense;
+using Microsoft.VisualStudio.Text.Classification;
+using Microsoft.VisualStudio.Text.Tagging;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Platform.VSEditor, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Editor.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.UnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.Test.Apex.VisualStudio, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+
+[assembly: ComponentGuarantees(ComponentGuaranteesOptions.None)]
+
+
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None,
+ ResourceDictionaryLocation.SourceAssembly)]
+
+// Peek types forwarded to Microsoft.VisualStudio.Language.Intellisense.dll
+[assembly: TypeForwardedTo(typeof(IFocusableIntellisensePresenter))]
+[assembly: TypeForwardedTo(typeof(IAccurateClassifier))]
+[assembly: TypeForwardedTo(typeof(IAccurateTagger<>))]
+[assembly: TypeForwardedTo(typeof(IAccurateTagAggregator<>))]
+[assembly: TypeForwardedTo(typeof(ITelemetryDiagnosticID<>))]
diff --git a/src/Editor/Text/Def/Internal/Internal.csproj b/src/Editor/Text/Def/Internal/Internal.csproj
new file mode 100644
index 0000000..b6eb419
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/Internal.csproj
@@ -0,0 +1,49 @@
+<Project>
+ <PropertyGroup>
+ <!-- workaround for https://github.com/NuGet/Home/issues/5894 -->
+ <OriginalProjectName>Internal</OriginalProjectName>
+ </PropertyGroup>
+ <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.Internal</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+
+ <!-- Assembly is inserted and shipped but not a VS SDK package. -->
+ <PushToPublicFeed>true</PushToPublicFeed>
+ <NonSDKPackage>true</NonSDKPackage>
+
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Page Remove="themes\**" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Runtime" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="System.Core" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.VisualStudio.ImageCatalog" />
+ <PackageReference Include="Microsoft.VisualStudio.Imaging" />
+ <PackageReference Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" />
+ <PackageReference Include="Microsoft.VisualStudio.Threading" />
+ <PackageReference Include="Microsoft.VisualStudio.Utilities" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\TextData\TextData.csproj" />
+ <ProjectReference Include="..\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\Def\TextUIWpf\TextUIWpf.csproj" />
+ <ProjectReference Include="..\..\..\Language\Def\Intellisense\IntellisenseDef.csproj" />
+ </ItemGroup>
+ <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Def/Internal/Language/CompletionPresenterStylePrivate.cs b/src/Editor/Text/Def/Internal/Language/CompletionPresenterStylePrivate.cs
new file mode 100644
index 0000000..e3ec699
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/Language/CompletionPresenterStylePrivate.cs
@@ -0,0 +1,41 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System.Windows.Media;
+using System.Windows.Media.TextFormatting;
+using Microsoft.VisualStudio.Language.Intellisense;
+
+namespace Microsoft.VisualStudio.Text.Internal.Language
+{
+ public class CompletionPresenterStylePrivate : CompletionPresenterStyle
+ {
+ /// <summary>
+ /// Gets a <see cref="Brush"/> that will be used to paint the border/separator between completion tabs.
+ /// </summary>
+ public virtual Brush TabItemSeparatorBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets a <see cref="TextRunProperties"/> that will be used to format the text of a completion tab item when it is
+ /// selected.
+ /// </summary>
+ public virtual TextRunProperties TabItemSelectedTextRunProperties { get; protected set; }
+ /// <summary>
+ /// Creates a modified image which is themed to match the target background color for the
+ /// completion UI. The icon may be modified to improve its appearance regardless of
+ /// whether or not the background is dark or light.
+ /// </summary>
+ /// <param name="sourceImage">The source image to theme.</param>
+ /// <param name="backgroundColor">The background color which the image
+ /// should be targeted to look good on.</param>
+ /// <returns>A derivative work of the original source image, or a reference
+ /// to the source image if theming is not supported or required.</returns>
+ public virtual ImageSource ThemeImage(ImageSource sourceImage, Color backgroundColor)
+ {
+ return sourceImage;
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/Language/IWaitContext.cs b/src/Editor/Text/Def/Internal/Language/IWaitContext.cs
new file mode 100644
index 0000000..b8c6c0a
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/Language/IWaitContext.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Threading;
+
+namespace Microsoft.VisualStudio.Language.Intellisense.Utilities
+{
+ public enum WaitIndicatorResult
+ {
+ Completed,
+ Canceled,
+ }
+
+ public interface IWaitContext : IDisposable
+ {
+ CancellationToken CancellationToken { get; }
+
+ bool AllowCancel { get; set; }
+ string Message { get; set; }
+
+ void UpdateProgress();
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/Language/IWaitIndicator.cs b/src/Editor/Text/Def/Internal/Language/IWaitIndicator.cs
new file mode 100644
index 0000000..9c16e5d
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/Language/IWaitIndicator.cs
@@ -0,0 +1,20 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense.Utilities
+{
+ public interface IWaitIndicator
+ {
+ /// <summary>
+ /// Schedule the action on the caller's thread and wait for the task to complete.
+ /// </summary>
+ WaitIndicatorResult Wait(string title, string message, bool allowCancel, Action<IWaitContext> action);
+ IWaitContext StartWait(string title, string message, bool allowCancel);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/Internal/Language/Intellisense/ICompletionSession2.cs b/src/Editor/Text/Def/Internal/Language/Intellisense/ICompletionSession2.cs
new file mode 100644
index 0000000..61710c8
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/Language/Intellisense/ICompletionSession2.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ public interface ICompletionSession2 : ICompletionSession
+ {
+ /// <summary>
+ /// Raised following a call to <see cref="IIntellisenseSession.Match"/>.
+ /// </summary>
+ event EventHandler Matched;
+
+ /// <summary>
+ /// Raised after <see cref="ICompletionSession.Filter()"/> was executed.
+ /// </summary>
+ event EventHandler Filtered;
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/Internal/Language/Intellisense/NativeMethods.cs b/src/Editor/Text/Def/Internal/Language/Intellisense/NativeMethods.cs
new file mode 100644
index 0000000..8fc87b0
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/Language/Intellisense/NativeMethods.cs
@@ -0,0 +1,81 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ [SuppressUnmanagedCodeSecurity]
+ internal static class NativeMethods
+ {
+ public const int MONITOR_DEFAULTTONEAREST = 0x00000002;
+
+ /// <summary>
+ /// Win32 WINDOWPOS struct
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential)]
+ public class WINDOWPOS
+ {
+ public IntPtr hwnd;
+ public IntPtr hwndInsertAfter;
+ public int x;
+ public int y;
+ public int cx;
+ public int cy;
+ public uint flags;
+ }
+
+ /// <summary>
+ /// A point structure to match the Win32 POINT
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential)]
+ public struct POINT
+ {
+ public int x;
+ public int y;
+ };
+
+ /// <summary>
+ /// A rect structure to match the Win32 RECT
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential)]
+ public struct RECT
+ {
+ public int left;
+ public int top;
+ public int right;
+ public int bottom;
+ };
+
+ /// <summary>
+ /// Win32 MONITORINFO Struct
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential)]
+ public struct MONITORINFO
+ {
+ public uint cbSize;
+ public RECT rcMonitor;
+ public RECT rcWork;
+ public int dwFlags;
+ };
+
+ [DllImport("user32.dll")]
+ internal static extern IntPtr MonitorFromPoint(POINT pt, int flags);
+
+ [DllImport("user32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool GetMonitorInfo(IntPtr hMonitor, ref MONITORINFO monitorInfo);
+
+ [DllImport("user32.dll")]
+ internal static extern IntPtr GetFocus();
+
+ [DllImport("user32.dll")]
+ internal static extern IntPtr SetFocus(IntPtr hwnd);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/Language/Intellisense/VisualTreeExtensions.cs b/src/Editor/Text/Def/Internal/Language/Intellisense/VisualTreeExtensions.cs
new file mode 100644
index 0000000..018033f
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/Language/Intellisense/VisualTreeExtensions.cs
@@ -0,0 +1,104 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Windows;
+using System.Windows.Media;
+
+namespace Microsoft.VisualStudio.Language.Intellisense
+{
+ public static class VisualTreeExtensions
+ {
+ /// <summary>
+ /// This uses the visual tree first, then diverts to the logical tree if the visual tree ends.
+ /// This is necessary for the TabControl, where using either the logical tree or visual tree
+ /// by themselves is insufficient.
+ /// </summary>
+ /// <param name="sourceElement">The object to begin searching from.</param>
+ /// <returns>The visual tree parent of the object, or the logical tree parent if
+ /// the visual tree parent is null, or null if the logical tree parent is null.</returns>
+ public static DependencyObject GetVisualOrLogicalParent(DependencyObject sourceElement)
+ {
+ throw new NotImplementedException();
+ }
+
+ /// <summary>
+ /// Helper method that finds the first ancestor of a given Type in the
+ /// logical or visual tree, or the object itself if it matches in type.
+ /// </summary>
+ /// <typeparam name="TAncestorType">The type of ancestor to find.</typeparam>
+ /// <typeparam name="TElementType">The base type of intermediate elements in the ancestor tree.</typeparam>
+ /// <param name="element">The object at which to begin searching.</param>
+ /// <returns>The object itself, if it matches in type, else the first ancestor of type T in the parent chain of obj,
+ /// or null if no ancestor is found.</returns>
+ /// <remarks>
+ /// The type of <paramref name="element"/> is Visual rather than DependencyObject in order to disambiguate this method
+ /// from Microsoft.VisualStudio.PlatformUI.Shell.ExtensionMethods.FindAncestor(ViewElement element). If you need
+ /// to find an ancestor of a non-Visual DependencyObject you should call
+ /// FindAncestor&lt;TAncestorType, DependencyObject&gt;(obj, GetVisualOrLogicalParent) directly.
+ /// </remarks>
+ public static TAncestorType FindAncestorOrSelf<TAncestorType, TElementType>(TElementType element, Func<TElementType, TElementType> parentEvaluator) where TAncestorType : DependencyObject
+ {
+ return element as TAncestorType ?? FindAncestor<TAncestorType, TElementType>(element, parentEvaluator);
+ }
+
+ /// <summary>
+ /// Helper method that finds the first ancestor in the logical or visual tree, or the object itself, that is accepted by the ancestor selector function.
+ /// </summary>
+ /// <param name="element">The object at which to begin searching.</param>
+ /// <param name="parentEvaluator">The method used to determine the parent of an element.</param>
+ /// <param name="ancestorSelector">The method used to select an ancestor of interest.</param>
+ /// <typeparam name="TElementType">The base type of intermediate elements in the ancestor tree.</typeparam>
+ /// <returns>The first ancestor in the parent chain of obj accepted by the the ancestor selector function, or null if no ancestor is found.</returns>
+ public static object FindAncestorOrSelf<TElementType>(TElementType element, Func<TElementType, TElementType> parentEvaluator, Func<TElementType, bool> ancestorSelector)
+ {
+ if (ancestorSelector(element))
+ return element;
+
+ return FindAncestor<TElementType>(element, parentEvaluator, ancestorSelector);
+ }
+
+ /// <summary>
+ /// Helper method that finds the first ancestor of a given Type in the
+ /// logical or visual tree.
+ /// </summary>
+ /// <typeparam name="TAncestorType">The type of ancestor to find.</typeparam>
+ /// <typeparam name="TElementType">The base type of intermediate elements in the ancestor tree.</typeparam>
+ /// <param name="element">The object at which to begin searching.</param>
+ /// <param name="parentEvaluator">The method used to determine the parent of an element.</param>
+ /// <returns>The first ancestor of type T in the parent chain of obj, or null
+ /// if no ancestor is found.</returns>
+ public static TAncestorType FindAncestor<TAncestorType, TElementType>(TElementType element, Func<TElementType, TElementType> parentEvaluator) where TAncestorType : class
+ {
+ return FindAncestor<TElementType>(element, parentEvaluator, ancestor => ancestor is TAncestorType) as TAncestorType;
+ }
+
+ /// <summary>
+ /// Helper method that finds the first ancestor in the logical or visual tree that is accepted by the ancestor selector function.
+ /// </summary>
+ /// <param name="element">The object at which to begin searching.</param>
+ /// <param name="parentEvaluator">The method used to determine the parent of an element.</param>
+ /// <param name="ancestorSelector">The method used to select an ancestor of interest.</param>
+ /// <typeparam name="TElementType">The base type of intermediate elements in the ancestor tree.</typeparam>
+ /// <returns>The first ancestor in the parent chain of obj accepted by the the ancestor selector function.</returns>
+ public static object FindAncestor<TElementType>(TElementType element, Func<TElementType, TElementType> parentEvaluator, Func<TElementType, bool> ancestorSelector)
+ {
+ TElementType parent = parentEvaluator(element);
+ while (parent != null)
+ {
+ if (ancestorSelector(parent))
+ {
+ return parent;
+ }
+
+ parent = parentEvaluator(parent);
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/Language/WaitHelper.cs b/src/Editor/Text/Def/Internal/Language/WaitHelper.cs
new file mode 100644
index 0000000..095f89b
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/Language/WaitHelper.cs
@@ -0,0 +1,48 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System.Threading;
+
+namespace Microsoft.VisualStudio.Language.Intellisense.Utilities
+{
+ public static class WaitHelper
+ {
+ public static IWaitContext Wait(IWaitIndicator waitIndicator, string title, string message)
+ {
+ if (waitIndicator == null)
+ {
+ return new WaitContext();
+ }
+ else
+ {
+ return waitIndicator.StartWait(title, message, allowCancel: true);
+ }
+ }
+
+ private class WaitContext : IWaitContext
+ {
+ public CancellationToken CancellationToken
+ {
+ get
+ {
+ return CancellationToken.None;
+ }
+ }
+
+ public bool AllowCancel { get; set; }
+ public string Message { get; set; }
+
+ public void UpdateProgress()
+ {
+ }
+
+ public void Dispose()
+ {
+ }
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TestContracts/ICodeLensAdornment_Test.cs b/src/Editor/Text/Def/Internal/TestContracts/ICodeLensAdornment_Test.cs
new file mode 100644
index 0000000..3a8a525
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TestContracts/ICodeLensAdornment_Test.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using Microsoft.VisualStudio.Text;
+
+namespace Microsoft.VisualStudio.Language.Intellisense.Test
+{
+ /// <summary>
+ /// Interface used by tests to interact with code sense adornment instances in the editor.
+ /// </summary>
+ public interface ICodeLensAdornment_Test
+ {
+ /// <summary>
+ /// Gets the ITrackingPoint at which the adornment was placed inside the editor.
+ /// </summary>
+ ITrackingPoint Point { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TestContracts/ICompletionSession_Test.cs b/src/Editor/Text/Def/Internal/TestContracts/ICompletionSession_Test.cs
new file mode 100644
index 0000000..da6f80f
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TestContracts/ICompletionSession_Test.cs
@@ -0,0 +1,20 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+namespace Microsoft.VisualStudio.Language.Intellisense.Test
+{
+ /// <summary>
+ /// Test contract for ICompletionSession.
+ /// </summary>
+ public interface ICompletionSession_Test
+ {
+ /// <summary>
+ /// Triggers the session match.
+ /// </summary>
+ void TriggerSessionMatch();
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TestContracts/IOverviewMarkMargin_Test.cs b/src/Editor/Text/Def/Internal/TestContracts/IOverviewMarkMargin_Test.cs
new file mode 100644
index 0000000..e4ae3e7
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TestContracts/IOverviewMarkMargin_Test.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System.Collections.Generic;
+using System;
+
+namespace Microsoft.VisualStudio.Text.OverviewMargin.Test
+{
+ /// <summary>
+ /// Test contract for the OverviewMarkMargin (use host.GetTextViewMargin(PredefinedMarginNames.OverviewMark) as IOverviewMarkMargin_Test).
+ /// </summary>
+ public interface IOverviewMarkMargin_Test
+ {
+ /// <summary>
+ /// Get a list of all marks being drawn by the margin.
+ /// </summary>
+ IList<Tuple<string, NormalizedSnapshotSpanCollection, int>> GetMarks();
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextData/IStructureSpanningTreeManager.cs b/src/Editor/Text/Def/Internal/TextData/IStructureSpanningTreeManager.cs
new file mode 100644
index 0000000..afe6de3
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextData/IStructureSpanningTreeManager.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+namespace Microsoft.VisualStudio.Text.Structure
+{
+ using System;
+ using System.Collections.Generic;
+ using Microsoft.VisualStudio.Text.Editor;
+ using Microsoft.VisualStudio.Text.UI.Adornments;
+
+ /// <summary>
+ /// Defines the interface for the <see cref="IStructureSpanningTreeManager"/> which
+ /// provides information about the structural hierarchy of code in an <see cref="ITextView"/>.
+ /// </summary>
+ /// <remarks>
+ /// You can obtain an instance of this class via the <see cref="IStructureSpanningTreeService"/>.
+ /// </remarks>
+ public interface IStructureSpanningTreeManager
+ {
+ /// <summary>
+ /// Event that indicates that <see cref="SpanningTreeSnapshot"/> has been updated,
+ /// and that any method calls on this service will now return more up to date results.
+ /// </summary>
+ event EventHandler SpanningTreeChanged;
+
+ /// <summary>
+ /// Gets an immutable instance of the most up to date current code structure.
+ /// </summary>
+ IStructureElement SpanningTreeSnapshot { get; }
+
+ /// <summary>
+ /// Gets an enumerable of <see cref="IStructureElement"/>s that encapsulate the given <see cref="SnapshotPoint"/>.
+ /// </summary>
+ /// <remarks>
+ /// This method is intended as a projection-aware means to obtain language-service provided
+ /// structural context for a location such as the caret position, or a structure guide line.
+ /// </remarks>
+ /// <param name="point">A <see cref="SnapshotPoint"/> indicating the position of interest.</param>
+ /// <returns>
+ /// The elements within which <paramref name="point"/> is nested, in order, from outermost to innermost.
+ /// </returns>
+ IEnumerable<IStructureElement> GetElementsEncapsulatingPoint(SnapshotPoint point);
+
+ /// <summary>
+ /// Gets an enumerable of <see cref="IStructureElement"/>s that intersect with the given
+ /// <see cref="SnapshotSpan"/>.
+ /// </summary>
+ /// <remarks>
+ /// This method is intended as a projection-aware means to obtain language-service provided
+ /// structural context for a span.
+ /// </remarks>
+ /// <param name="spans">The spans to collect elements from.</param>
+ /// <returns>The elements that intersect with the given span.</returns>
+ IEnumerable<IStructureElement> GetElementsIntersectingSpans(NormalizedSnapshotSpanCollection spans);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextData/IStructureSpanningTreeService.cs b/src/Editor/Text/Def/Internal/TextData/IStructureSpanningTreeService.cs
new file mode 100644
index 0000000..1ad9c28
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextData/IStructureSpanningTreeService.cs
@@ -0,0 +1,35 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+namespace Microsoft.VisualStudio.Text.Structure
+{
+ using System;
+ using Microsoft.VisualStudio.Text.Editor;
+
+ /// <summary>
+ /// Defines the interface for the <see cref="IStructureSpanningTreeService"/> which can be
+ /// used to obtain instances of the <see cref="IStructureSpanningTreeManager"/>, which
+ /// provides information about the structural hierarchy of code in an <see cref="ITextView"/>.
+ /// </summary>
+ /// <remarks>
+ /// This interface is a MEF component part and can be imported with a MEF import attribute.
+ /// <code>
+ /// [Import]
+ /// internal IStructureSpanningTreeService StructureSpanningTreeService { get; }
+ /// </code>
+ /// </remarks>
+ public interface IStructureSpanningTreeService
+ {
+ /// <summary>
+ /// Gets the singleton <see cref="IStructureSpanningTreeManager"/> for the specified view.
+ /// </summary>
+ /// <param name="textView">The view to get the structure manager for.</param>
+ /// <exception cref="InvalidOperationException">Throw if not called from the UI thread.</exception>
+ /// <returns>The singleton instance of <see cref="IStructureSpanningTreeManager"/> for the view.</returns>
+ IStructureSpanningTreeManager GetManager(ITextView textView);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextLogic/ITypingTelemetrySession.cs b/src/Editor/Text/Def/Internal/TextLogic/ITypingTelemetrySession.cs
new file mode 100644
index 0000000..a583ca2
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextLogic/ITypingTelemetrySession.cs
@@ -0,0 +1,18 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+
+using System;
+
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ public interface ITypingTelemetrySession : IDisposable
+ {
+ void AfterKeyProcessed();
+ void BeforeKeyProcessed();
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextLogic/ITypingTelemetrySessionProvider.cs b/src/Editor/Text/Def/Internal/TextLogic/ITypingTelemetrySessionProvider.cs
new file mode 100644
index 0000000..11e229b
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextLogic/ITypingTelemetrySessionProvider.cs
@@ -0,0 +1,17 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ public interface ITypingTelemetrySessionProvider
+ {
+ ITypingTelemetrySession CreateTypingTelemetrySession(ITextView textView);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUI/LegacySelection.cs b/src/Editor/Text/Def/Internal/TextUI/LegacySelection.cs
index ee3b9cc..9fe6118 100644
--- a/src/Editor/Text/Def/Internal/TextUI/LegacySelection.cs
+++ b/src/Editor/Text/Def/Internal/TextUI/LegacySelection.cs
@@ -34,9 +34,9 @@ namespace Microsoft.VisualStudio.Text.Editor
/// <summary>
/// When implemented in a derived class, selects all the text in the document. Ensures that the end point
- /// of the selection is visible on screen.
+ /// of the selection is visible on screen if <paramref name="moveCaret"/> is <c>true</c>.
/// </summary>
- public abstract void SelectAll();
+ public abstract void SelectAll(bool moveCaret = true);
/// <summary>
/// When implemented in a derived class, extends the selection from its current start point to the new end point. Ensures
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IEditorOptionDescription.cs b/src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IEditorOptionDescription.cs
new file mode 100644
index 0000000..4dbe7a2
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IEditorOptionDescription.cs
@@ -0,0 +1,50 @@
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Text.OptionDescriptions
+{
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// MEF export, exposed using attributes:
+ /// <code>
+ /// [Export(typeof(IEditorOptionDescription))]
+ /// [Name(BrandNewOptionDefinitionAndDescription.OptionName)] // Must either match the name of an <see cref="EditorOptionDefinition"/> or have the [IsOption(false)]
+ /// [Parent(StandardOptionPages.DynamicEditorOptions)]
+ /// [IsRoaming(true)] // defaults to false
+ /// [SettingName("Line Numbers")] // Named used to persist the option. If not provided then the Name attribute is used. If empty, then setting is not persisted.
+ /// [XmlName("Line Numbers")] // Named used to persist the option to .vssettings files. If not provided then the Name attribute is used. If empty, then setting is not persisted.
+ /// [Order(After = ...)]
+ /// </code>
+ /// </para>
+ /// <para>
+ /// An <see cref="IEditorOptionDescription"/> export can also be an <see cref="EditorOptionDefinition"/> export. Just have your class derive from <see cref="EditorOptionDefinition"/> and add a
+ /// <code>
+ /// [Export(typeof(EditorOptionDefinition))]
+ /// </code>
+ /// tag.
+ /// </para>
+ /// </remarks>
+ public interface IEditorOptionDescription
+ {
+ /// <summary>
+ /// The localized name of the option. If this property is null, then no control will be created for the option (but the option will be persisted appropriately).
+ /// </summary>
+ string DisplayName { get; }
+
+ /// <summary>
+ /// Keywords that can be used when searching for the option.
+ /// </summary>
+ string Keywords { get; }
+
+ /// <summary>
+ /// Return an <see cref="IOptionControl"/> to manage the option in the tools/options page.
+ /// </summary>
+ /// <remarks>
+ /// <para>This method can return null (in which case, the a default control based on the option's data type will be used).</para>
+ /// <para>Only <see cref="bool"/> options have a default control at the moment.</para>
+ /// </remarks>
+ IOptionControl CreateControl(string displayName, IOptionsPage optionpage, EditorOptionDefinition definition);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IOptionControl.cs b/src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IOptionControl.cs
new file mode 100644
index 0000000..5157f27
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IOptionControl.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Windows;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Text.OptionDescriptions
+{
+ /// <summary>
+ /// Defines the UI associated with an option (or static element on the page).
+ /// </summary>
+ public interface IOptionControl
+ {
+ /// <summary>
+ /// Get the UI element associated with the option.
+ /// </summary>
+ /// <remarks>
+ /// Will only be called once if the corresponding tools/options page is displayed.
+ /// </remarks>
+ object Control { get; }
+
+ /// <summary>
+ /// Reset the UI element's value to match the option's value.
+ /// </summary>
+ /// <remarks>
+ /// This method should no-op if the control is not associated with an option.
+ /// </remarks>
+ void Reset();
+
+ /// <summary>
+ /// Set the option's value to match the value represented in the UI element.
+ /// </summary>
+ /// <remarks>
+ /// This method should no-op if the control is not associated with an option.
+ /// </remarks>
+ void Apply();
+
+ /// <summary>
+ /// Current value of the option as reflected in the UI and not the underlying <see cref="IEditorOptions"/>.
+ /// </summary>
+ object GetValue();
+
+ /// <summary>
+ /// Raised whenever the value of the option is changed in the UI.
+ /// </summary>
+ event EventHandler ValueChanged;
+
+ /// <summary>
+ /// Indicates whether the children of this control should be enabled.
+ /// </summary>
+ bool ShouldChildrenBeEnabled { get; }
+
+ event EventHandler ShouldChildrenBeEnabledChanged;
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IOptionsPage.cs b/src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IOptionsPage.cs
new file mode 100644
index 0000000..0e705e1
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/EditorOptions/IOptionsPage.cs
@@ -0,0 +1,10 @@
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Text.OptionDescriptions
+{
+ public interface IOptionsPage
+ {
+ IEditorOptions Options { get; }
+ IOptionControl GetControl(string name);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/GlyphMarginAttribute.cs b/src/Editor/Text/Def/Internal/TextUIWpf/GlyphMarginAttribute.cs
new file mode 100644
index 0000000..a45e054
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/GlyphMarginAttribute.cs
@@ -0,0 +1,42 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ /// <summary>
+ /// This attribute is used to specify target glyph margin by <see cref="IGlyphMouseProcessorProvider"/>s.
+ /// </summary>
+ public sealed class GlyphMarginAttribute : MultipleBaseMetadataAttribute
+ {
+ private readonly string _glyphMargins;
+
+ /// <summary>
+ /// Construct a new instance of the attribute.
+ /// </summary>
+ /// <param name="glyphMargin">The case-insensitive name of the target glyph margin.</param>
+ /// <exception cref="ArgumentNullException"><paramref name="glyphMargin"/> is null or empty.</exception>
+ public GlyphMarginAttribute(string glyphMargin)
+ {
+ if (string.IsNullOrEmpty(glyphMargin))
+ {
+ throw new ArgumentNullException(nameof(glyphMargin));
+ }
+ _glyphMargins = glyphMargin;
+ }
+
+ /// <summary>
+ /// The glyph margin name.
+ /// </summary>
+ public string GlyphMargins
+ {
+ get { return _glyphMargins; }
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/HorizontalPositioningMode.cs b/src/Editor/Text/Def/Internal/TextUIWpf/HorizontalPositioningMode.cs
new file mode 100644
index 0000000..fee0585
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/HorizontalPositioningMode.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ /// <summary>
+ /// Enumeration of the possible ways that an inter-line adornment can be positioned horizontally on a line.
+ /// </summary>
+ public enum HorizontalPositioningMode
+ {
+ /// <summary>
+ /// Adornment is positioned with respect to the left edge of the character at the tag's position.
+ /// </summary>
+ TextRelative,
+
+ /// <summary>
+ /// Adornment is positioned with respect to the left edge of the viewport.
+ /// </summary>
+ ViewRelative,
+
+ /// <summary>
+ /// Adornment is positioned with respect to the left edge of the view.
+ /// </summary>
+ Absolute
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/IClassificationFormatMetadata.cs b/src/Editor/Text/Def/Internal/TextUIWpf/IClassificationFormatMetadata.cs
new file mode 100644
index 0000000..34f67b6
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/IClassificationFormatMetadata.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System.Collections.Generic;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Classification
+{
+ /// <summary>
+ /// Provides metadata for ClassificationFormatDefinitions.
+ /// </summary>
+ public interface IClassificationFormatMetadata : IEditorFormatMetadata, IOrderable
+ {
+ /// <summary>
+ /// Gets a set of ClassificationTypeName objects from the ClassificationTypeAttribute.
+ /// </summary>
+ IEnumerable<string> ClassificationTypeNames { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/ICompositingLineTransformSource.cs b/src/Editor/Text/Def/Internal/TextUIWpf/ICompositingLineTransformSource.cs
new file mode 100644
index 0000000..b5fdd34
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/ICompositingLineTransformSource.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Formatting
+{
+ using Microsoft.VisualStudio.Text.Editor;
+
+ /// <summary>
+ /// Provides the line transform for a line of formatted text.
+ /// </summary>
+ public interface ICompositingLineTransformSource
+ {
+ /// <summary>
+ /// Computes the line transform for a given line of formatted text.
+ /// </summary>
+ /// <param name="line">The line for which to compute the line transform.</param>
+ /// <param name="yPosition">The y-coordinate of the line.</param>
+ /// <param name="placement">The placement of the line with respect to <paramref name="yPosition"/>.</param>
+ /// <returns>The line transform for that line.</returns>
+ /// <remarks>If <paramref name="placement"/> is ViewRelativePosition.Top, then the top of the line
+ /// will be located at <paramref name="yPosition"/>. Otherwise the bottom of the line will be located at
+ /// <paramref name="yPosition"/>. Also, the line transform only affects the line itself and not any space
+ /// allocated above or below the line for adornments.</remarks>
+ LineTransform GetLineTransform(LineTransform currentLineTransform, ITextViewLine line, double yPosition, ViewRelativePosition placement);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/IDataStorage.cs b/src/Editor/Text/Def/Internal/TextUIWpf/IDataStorage.cs
new file mode 100644
index 0000000..c95188f
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/IDataStorage.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System.Windows;
+
+namespace Microsoft.VisualStudio.Text.Storage
+{
+ /// <summary>
+ /// Provides a persistent data storage for items. Items are identified by textual keys and are retrieved as
+ /// <see cref="ResourceDictionary"/> objects.
+ /// </summary>
+ /// <remarks>
+ /// TODO: For Dev11, this interface should provide methods to also write data (to disk or whatever underlying data storage) as opposed
+ /// to only provide a method to retrieve values.
+ /// </remarks>
+ public interface IDataStorage
+ {
+ /// <summary>
+ /// Retrieves the value of the item named itemKey.
+ /// </summary>
+ /// <returns><c>true</c> if item exists in the storage, <c>false</c> otherwise.</returns>
+ bool TryGetItemValue(string itemKey, out ResourceDictionary itemValue);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/IDataStorageService.cs b/src/Editor/Text/Def/Internal/TextUIWpf/IDataStorageService.cs
new file mode 100644
index 0000000..3305f59
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/IDataStorageService.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+namespace Microsoft.VisualStudio.Text.Storage
+{
+ /// <summary>
+ /// Implementers of this interface provide <see cref="IDataStorage"/> objects identified by a set of textual keys.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part and providers should export their implementations with the export attribute.
+ /// </remarks>
+ public interface IDataStorageService
+ {
+ /// <summary>
+ /// Return a <see cref="IDataStorage"/> for the provided key.
+ /// </summary>
+ /// <returns>Null if no data storage for the provided key exists, otherwise returns the corresponding <see cref="IDataStorage"/>.</returns>
+ IDataStorage GetDataStorage(string storageKey);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/IEditorFormatMetadata.cs b/src/Editor/Text/Def/Internal/TextUIWpf/IEditorFormatMetadata.cs
new file mode 100644
index 0000000..3e8d863
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/IEditorFormatMetadata.cs
@@ -0,0 +1,35 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using System.ComponentModel;
+
+namespace Microsoft.VisualStudio.Text.Classification
+{
+ /// <summary>
+ /// Provides metadata for EditorFormatDefinitions.
+ /// </summary>
+ public interface IEditorFormatMetadata
+ {
+ /// <summary>
+ /// Gets the name that identifies a format.
+ /// </summary>
+ string Name { get; }
+
+ /// <summary>
+ /// Determines whether this format is visible to users.
+ /// </summary>
+ [DefaultValue(false)]
+ bool UserVisible { get; }
+
+ /// <summary>
+ /// Priority of the format map, used to resolve situations where two format maps have
+ /// the same name.
+ /// </summary>
+ [DefaultValue(0)]
+ int Priority { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/IRtfBuilderService2.cs b/src/Editor/Text/Def/Internal/TextUIWpf/IRtfBuilderService2.cs
new file mode 100644
index 0000000..b4be161
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/IRtfBuilderService2.cs
@@ -0,0 +1,108 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+namespace Microsoft.VisualStudio.Text.Formatting
+{
+ using System.Threading;
+ using Microsoft.VisualStudio.Text;
+ using Microsoft.VisualStudio.Text.Editor;
+
+ /// <summary>
+ /// Generates RTF-formatted text from a collection of snapshot spans.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part and should be imported using the following attribute:
+ /// [Import(typeof(IRtfBuilderService))]
+ /// </remarks>
+ public interface IRtfBuilderService2 : IRtfBuilderService
+ {
+ /// <summary>
+ /// Gets an RTF string containing the formatted text of the snapshot spans.
+ /// </summary>
+ /// <remarks>
+ /// The generated RTF text is based on an in-order walk of the snapshot spans.
+ /// </remarks>
+ /// <param name="spans">
+ /// The collection of snapshot spans.
+ /// </param>
+ /// <param name="delimiter">
+ /// A delimiter string to be inserted between the RTF generated code for the <see cref="SnapshotSpan"/>s in the <see cref="NormalizedSnapshotSpanCollection"/>.
+ /// </param>
+ /// <param name="cancellationToken">
+ /// <see cref="CancellationToken"/> used to indicate when to abandon the effort to generate the rich text.
+ /// </param>
+ /// <returns>
+ /// A <see cref="string"/> containing RTF data.
+ /// </returns>
+ string GenerateRtf(NormalizedSnapshotSpanCollection spans, string delimiter, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets an RTF string containing the formatted text of the snapshot spans.
+ /// </summary>
+ /// <remarks>
+ /// The generated RTF text is based on an in-order walk of the snapshot spans. A new line "\par" rtf keyword will be placed between the provided
+ /// <see cref="SnapshotSpan"/>s.
+ /// </remarks>
+ /// <param name="spans">
+ /// The collection of snapshot spans.
+ /// </param>
+ /// <param name="cancellationToken">
+ /// <see cref="CancellationToken"/> used to indicate when to abandon the effort to generate the rich text.
+ /// </param>
+ /// <returns>
+ /// A <see cref="string"/> containing RTF data.
+ /// </returns>
+ string GenerateRtf(NormalizedSnapshotSpanCollection spans, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets an RTF string that contains the formatted text of the spans.
+ /// </summary>
+ /// <remarks>
+ /// The generated RTF text is based on an in-order walk of the snapshot spans,
+ /// with the characteristics and formatting properties of <paramref name="textView"/>.
+ /// All the snapshot spans must belong to <paramref name="textView"/>.
+ /// </remarks>
+ /// <param name="spans">
+ /// The collection of snapshot spans.
+ /// </param>
+ /// <param name="textView">
+ /// The <see cref="ITextView"/> that contains the snapshot spans.
+ /// </param>
+ /// <param name="delimiter">
+ /// A delimiter string to be inserted between the RTF generated code for the <see cref="SnapshotSpan"/>s in the <see cref="NormalizedSnapshotSpanCollection"/>.
+ /// </param>
+ /// <param name="cancellationToken">
+ /// <see cref="CancellationToken"/> used to indicate when to abandon the effort to generate the rich text.
+ /// </param>
+ /// <returns>
+ /// A <see cref="string"/> containing RTF data.
+ /// </returns>
+ string GenerateRtf(NormalizedSnapshotSpanCollection spans, ITextView textView, string delimiter, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets an RTF string that contains the formatted text of the spans.
+ /// </summary>
+ /// <remarks>
+ /// The generated RTF text is based on an in-order walk of the snapshot spans,
+ /// with the characteristics and formatting properties of <paramref name="textView"/>.
+ /// All the snapshot spans must belong to <paramref name="textView"/>. A new line "\par" rtf keyword will be
+ /// placed between the provided <see cref="SnapshotSpan"/>s.
+ /// </remarks>
+ /// <param name="spans">
+ /// The collection of snapshot spans.
+ /// </param>
+ /// <param name="textView">
+ /// The <see cref="ITextView"/> that contains the snapshot spans.
+ /// <param name="cancellationToken">
+ /// <see cref="CancellationToken"/> used to indicate when to abandon the effort to generate the rich text.
+ /// </param>
+ /// <returns>
+ /// A <see cref="string"/> containing RTF data.
+ /// </returns>
+ string GenerateRtf(NormalizedSnapshotSpanCollection spans, ITextView textView, CancellationToken cancellationToken);
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/ISuggestionTag.cs b/src/Editor/Text/Def/Internal/TextUIWpf/ISuggestionTag.cs
new file mode 100644
index 0000000..d9cbd51
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/ISuggestionTag.cs
@@ -0,0 +1,19 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using Microsoft.VisualStudio.Text.Tagging;
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ /// <summary>
+ /// Represents a suggestion tag, which is consumed by the suggestion margin
+ /// to place suggestion visual element such as a Light Bulb.
+ /// </summary>
+ public interface ISuggestionTag : ITag
+ {
+ }
+}
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/IViewSynchronizationManager.cs b/src/Editor/Text/Def/Internal/TextUIWpf/IViewSynchronizationManager.cs
new file mode 100644
index 0000000..70eddaa
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/IViewSynchronizationManager.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Formatting
+{
+ using Microsoft.VisualStudio.Text.Editor;
+
+ /// <summary>
+ /// Manage the simultaneous layout to two <see cref="ITextView"/>.
+ /// </summary>
+ public interface IViewSynchronizationManager
+ {
+ ITextView GetSubordinateView(ITextView masterView);
+
+ bool TryGetAnchorPointInSubordinateView(SnapshotPoint anchorPoint, out SnapshotPoint correspondingAnchorPoint);
+
+ SnapshotPoint GetAnchorPointAboveInSubordinateView(SnapshotPoint anchorPoint);
+
+ void WhichPairedLinesShouldBeDisplayed(SnapshotPoint masterAnchorPoint, SnapshotPoint subordinateAnchorPoint, out bool layoutMaster, out bool layoutSubordinate, bool goingUp);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/Internal/TextUIWpf/IsOverlayLayerAttribute.cs b/src/Editor/Text/Def/Internal/TextUIWpf/IsOverlayLayerAttribute.cs
new file mode 100644
index 0000000..888972a
--- /dev/null
+++ b/src/Editor/Text/Def/Internal/TextUIWpf/IsOverlayLayerAttribute.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ /// <summary>
+ /// Indicates that an <see cref="AdornmentLayerDefinition"/> is an overlay layer.
+ /// </summary>
+ /// <remarks>
+ /// <para>Layers that do not specify this attribute will not be considered overlay layers.</para>
+ /// <para>An overlay layer is not part of the normal view stack (and is not moved when the view is scrolled).</para>
+ /// <para>It only supports adornments that have the <see cref="AdornmentPositioningBehavior.OwnerControlled"/>.</para>
+ /// <para>Adorments placed in an overlay layer use a coordinate system where (0, 0) is the top-left corner of the view.</para>
+ /// </remarks>
+ public sealed class IsOverlayLayerAttribute: SingletonBaseMetadataAttribute
+ {
+ /// <summary>
+ /// Indicates whether an <see cref="AdornmentLayerDefinition"/> defines an overlay adornment layer or not.
+ /// </summary>
+ public bool IsOverlayLayer { get; private set; }
+
+ /// <summary>
+ /// Creates new insatnce of the <see cref="IsOverlayLayerAttribute"/> class.
+ /// </summary>
+ /// <param name="isOverlayLayer">Sets whether the adornment layer is an overlay layer.</param>
+ public IsOverlayLayerAttribute(bool isOverlayLayer)
+ {
+ this.IsOverlayLayer = isOverlayLayer;
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextData/Diagrams/BufferMarkers.cd b/src/Editor/Text/Def/TextData/Diagrams/BufferMarkers.cd
deleted file mode 100644
index 0c1ef8b..0000000
--- a/src/Editor/Text/Def/TextData/Diagrams/BufferMarkers.cd
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Interface Name="Microsoft.VisualStudio.Text.ITrackingPoint">
- <Position X="3.5" Y="2.25" Width="2.25" />
- <TypeIdentifier>
- <HashCode>AAAAIAAABCAAAAAAKAAAAAAABAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Model\ITrackingPoint.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="TextBuffer" />
- <Property Name="TrackingMode" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITrackingSpan">
- <Position X="6.75" Y="2.25" Width="2" />
- <TypeIdentifier>
- <HashCode>AAAAAAAABAAAAAAIIIAAAAAABAAAAAAAAAAAQAAAAAg=</HashCode>
- <FileName>Model\ITrackingSpan.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="TextBuffer" />
- <Property Name="TrackingMode" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextBuffer" Collapsed="true">
- <Position X="5.5" Y="1" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAABEAQAAABAAAABAAAAAgAAAGAAAAAAAAQAAQAACA=</HashCode>
- <FileName>Model\ITextBuffer.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Enum Name="Microsoft.VisualStudio.Text.PointTrackingMode">
- <Position X="3.5" Y="4.75" Width="2.25" />
- <TypeIdentifier>
- <HashCode>AIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAA=</HashCode>
- <FileName>Model\PointTrackingMode.cs</FileName>
- </TypeIdentifier>
- </Enum>
- <Enum Name="Microsoft.VisualStudio.Text.SpanTrackingMode">
- <Position X="6.75" Y="4.75" Width="2" />
- <TypeIdentifier>
- <HashCode>AAAAAAgAAgAAAAAAAAAgAAAAAAAAAAAAIAAAAAAAAAA=</HashCode>
- <FileName>Model\SpanTrackingMode.cs</FileName>
- </TypeIdentifier>
- </Enum>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextData/Diagrams/Projection.cd b/src/Editor/Text/Def/TextData/Diagrams/Projection.cd
deleted file mode 100644
index 261bd76..0000000
--- a/src/Editor/Text/Def/TextData/Diagrams/Projection.cd
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Interface Name="Microsoft.VisualStudio.Text.ITextBuffer" Collapsed="true">
- <Position X="1.25" Y="0.75" Width="2.25" />
- <Members>
- <Method Name="Delete" Hidden="true" />
- <Method Name="Insert" Hidden="true" />
- <Method Name="Replace" Hidden="true" />
- </Members>
- <AssociationLine Name="CurrentSnapshot" Type="Microsoft.VisualStudio.Text.ITextSnapshot" FixedFromPoint="true">
- <Path>
- <Point X="3.5" Y="1.188" />
- <Point X="5.25" Y="1.188" />
- </Path>
- </AssociationLine>
- <TypeIdentifier>
- <HashCode>IAAABEAQAQABEAAABAAAABgAAAOAAAAAEAAQAAQCACA=</HashCode>
- <FileName>Model\ITextBuffer.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="CurrentSnapshot" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Projection.IProjectionBuffer">
- <Position X="2.5" Y="5" Width="2.25" />
- <TypeIdentifier>
- <HashCode>AAAAAgAAAAAAAAAAAAAgAAAAAIAQBAAAAAAQAAAAAAA=</HashCode>
- <FileName>Model\Projection\IProjectionBuffer.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot">
- <Position X="5.25" Y="2" Width="3" />
- <AssociationLine Name="TextBuffer" Type="Microsoft.VisualStudio.Text.Projection.IProjectionBufferBase" FixedFromPoint="true">
- <Path>
- <Point X="5.25" Y="2.625" />
- <Point X="3.5" Y="2.625" />
- </Path>
- </AssociationLine>
- <AssociationLine Name="SourceSnapshots" Type="Microsoft.VisualStudio.Text.ITextSnapshot" FixedFromPoint="true" FixedToPoint="true">
- <Path>
- <Point X="8.25" Y="2.521" />
- <Point X="8.625" Y="2.521" />
- <Point X="8.625" Y="1.062" />
- <Point X="8.25" Y="1.062" />
- </Path>
- </AssociationLine>
- <TypeIdentifier>
- <HashCode>AAAAAAAAgIAAQQgAIAAAQAAAAAAgAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Model\Projection\IProjectionSnapshot.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="TextBuffer" />
- </ShowAsAssociation>
- <ShowAsCollectionAssociation>
- <Property Name="SourceSnapshots" />
- </ShowAsCollectionAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextSnapshot" Collapsed="true">
- <Position X="5.25" Y="0.75" Width="3" />
- <AssociationLine Name="TextBuffer" Type="Microsoft.VisualStudio.Text.ITextBuffer" FixedFromPoint="true">
- <Path>
- <Point X="5.25" Y="0.875" />
- <Point X="3.5" Y="0.875" />
- </Path>
- </AssociationLine>
- <TypeIdentifier>
- <HashCode>IACAAIAAgAAAAAAYKAAIAARAAAQAAAQCAAAAAAEAKAA=</HashCode>
- <FileName>Model\ITextSnapshot.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="TextBuffer" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Projection.IProjectionBufferBase">
- <Position X="1.25" Y="2" Width="2.25" />
- <AssociationLine Name="CurrentSnapshot" Type="Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot" FixedFromPoint="true">
- <Path>
- <Point X="3.5" Y="3.5" />
- <Point X="5.25" Y="3.5" />
- </Path>
- </AssociationLine>
- <AssociationLine Name="SourceBuffers" Type="Microsoft.VisualStudio.Text.ITextBuffer" FixedFromPoint="true">
- <Path>
- <Point X="3.062" Y="2" />
- <Point X="3.062" Y="1.441" />
- </Path>
- <MemberNameLabel ManuallyPlaced="true">
- <Position X="-1.057" Y="0.112" />
- </MemberNameLabel>
- </AssociationLine>
- <TypeIdentifier>
- <HashCode>AAAABEAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAACA=</HashCode>
- <FileName>Model\Projection\IProjectionBufferBase.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="CurrentSnapshot" />
- </ShowAsAssociation>
- <ShowAsCollectionAssociation>
- <Property Name="SourceBuffers" />
- </ShowAsCollectionAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Projection.IElisionBuffer">
- <Position X="0.5" Y="5" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAABAAAAAAAAAAAAAAAAAgBAAAQEAAAAAAAAgBAAAA=</HashCode>
- <FileName>Model\Projection\IElisionBuffer.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="SourceBuffer" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Projection.IElisionSnapshot">
- <Position X="5.25" Y="5.25" Width="3" />
- <AssociationLine Name="SourceSnapshot" Type="Microsoft.VisualStudio.Text.ITextSnapshot" ManuallyRouted="true">
- <Path>
- <Point X="8.25" Y="6.092" />
- <Point X="8.802" Y="6.092" />
- <Point X="8.802" Y="0.875" />
- <Point X="8.25" Y="0.875" />
- </Path>
- </AssociationLine>
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAQAAIAAAAAAAAAAAAAAAAAAQAAAAAAA=</HashCode>
- <FileName>Model\Projection\IElisionSnapshot.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="SourceSnapshot" />
- </ShowAsAssociation>
- </Interface>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextData/Diagrams/ReadOnlyRegions.cd b/src/Editor/Text/Def/TextData/Diagrams/ReadOnlyRegions.cd
deleted file mode 100644
index 1de57b4..0000000
--- a/src/Editor/Text/Def/TextData/Diagrams/ReadOnlyRegions.cd
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Class Name="Microsoft.VisualStudio.Text.ReadOnlyRegionsChangedEventArgs">
- <Position X="3.5" Y="3.25" Width="2.75" />
- <Members>
- <Field Name="newlyReadonlyRegions" Hidden="true" />
- <Field Name="newlyWritableRegions" Hidden="true" />
- <Method Name="ReadOnlyRegionsChangedEventArgs" Hidden="true" />
- </Members>
- <Compartments>
- <Compartment Name="Fields" Collapsed="true" />
- </Compartments>
- <AssociationLine Name="NewlyReadonlyRegions" Type="Microsoft.VisualStudio.Text.NormalizedSpanCollection" FixedFromPoint="true">
- <Path>
- <Point X="4.062" Y="4.247" />
- <Point X="4.062" Y="5.5" />
- </Path>
- </AssociationLine>
- <AssociationLine Name="NewlyWritableRegions" Type="Microsoft.VisualStudio.Text.NormalizedSpanCollection" FixedFromPoint="true">
- <Path>
- <Point X="5.875" Y="4.247" />
- <Point X="5.875" Y="5.5" />
- </Path>
- </AssociationLine>
- <TypeIdentifier>
- <HashCode>AAAAAAAACAAAAAAAAAAAAAAAAAAAAAAEAAAABAAgAAA=</HashCode>
- <FileName>Model\ReadOnlyRegionsChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="NewlyReadonlyRegions" />
- <Property Name="NewlyWritableRegions" />
- </ShowAsAssociation>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.NormalizedSpanCollection" Collapsed="true">
- <Position X="3.5" Y="5.5" Width="2.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAQAAAkgAAAAABAQAAQAIAAAAAAAwAAEiA=</HashCode>
- <FileName>Model\NormalizedSpanCollection.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Interface Name="Microsoft.VisualStudio.Text.IReadOnlyRegion">
- <Position X="3.75" Y="1" Width="2" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAIAAAA=</HashCode>
- <FileName>Model\IReadOnlyRegion.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="EdgeInsertionMode" />
- <Property Name="Span" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextSpan">
- <Position X="7.25" Y="1" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAAAAAABAAAAAAIIIAAAAAAAAAAAAAAAAAAQAAAAAg=</HashCode>
- <FileName>Model\ITextSpan.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="TextBuffer" />
- <Property Name="TrackingMode" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextBuffer" Collapsed="true">
- <Position X="10.5" Y="1" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAABEAQAAABAAAABAAAAAgAAAGAAAAAAAAQAAQAACA=</HashCode>
- <FileName>Model\ITextBuffer.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.IReadOnlyRegionEdit">
- <Position X="7.25" Y="3.5" Width="2.5" />
- <TypeIdentifier>
- <HashCode>AAAAABAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Model\IReadOnlyRegionEdit.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Enum Name="Microsoft.VisualStudio.Text.EdgeInsertionMode">
- <Position X="0.5" Y="1" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAEAAAAAAAA=</HashCode>
- <FileName>Model\EdgeInsertionMode.cs</FileName>
- </TypeIdentifier>
- </Enum>
- <Enum Name="Microsoft.VisualStudio.Text.SpanTrackingMode">
- <Position X="10.5" Y="2" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAgAAgAAAAAAAAAgAAAAAAAAAAAAIAAAAAAAAAA=</HashCode>
- <FileName>Model\SpanTrackingMode.cs</FileName>
- </TypeIdentifier>
- </Enum>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextData/Diagrams/SnapshotMarkers.cd b/src/Editor/Text/Def/TextData/Diagrams/SnapshotMarkers.cd
deleted file mode 100644
index 2595a22..0000000
--- a/src/Editor/Text/Def/TextData/Diagrams/SnapshotMarkers.cd
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Struct Name="Microsoft.VisualStudio.Text.SnapshotPoint">
- <Position X="3.25" Y="3.5" Width="1.75" />
- <Members>
- <Method Name="Equals" Hidden="true" />
- <Method Name="GetHashCode" Hidden="true" />
- <Method Name="operator !=" Hidden="true" />
- <Method Name="operator ==" Hidden="true" />
- <Field Name="position" Hidden="true" />
- <Field Name="snapshot" Hidden="true" />
- <Method Name="SnapshotPoint" Hidden="true" />
- <Method Name="ToInt32" Hidden="true" />
- </Members>
- <TypeIdentifier>
- <HashCode>AAIAACAAAAggAAQkwAGCIgAAQAAAAIAAAABAKAAAAiE=</HashCode>
- <FileName>Model\SnapshotPoint.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="Snapshot" />
- </ShowAsAssociation>
- <Lollipop Position="0.2" />
- </Struct>
- <Struct Name="Microsoft.VisualStudio.Text.SnapshotSpan">
- <Position X="6.75" Y="3.5" Width="2.25" />
- <Members>
- <Method Name="Equals" Hidden="true" />
- <Method Name="GetHashCode" Hidden="true" />
- <Method Name="operator !=" Hidden="true" />
- <Method Name="operator ==" Hidden="true" />
- <Method Name="SnapshotSpan" Hidden="true" />
- <Method Name="ToString" Hidden="true" />
- </Members>
- <TypeIdentifier>
- <HashCode>AAJAAAAAADAgAAAsgEAAAABAAAAQAoAAAAAACgIQAiA=</HashCode>
- <FileName>Model\SnapshotSpan.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="Snapshot" />
- </ShowAsAssociation>
- </Struct>
- <Interface Name="Microsoft.VisualStudio.Text.ITextSnapshot" Collapsed="true">
- <Position X="5" Y="2.25" Width="1.5" />
- <TypeIdentifier>
- <HashCode>IACAAIAAgAAAAAAYKAAIAARAAAQAAAQCAAAAAAEAKAA=</HashCode>
- <FileName>Model\ITextSnapshot.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextData/Diagrams/Text.cd b/src/Editor/Text/Def/TextData/Diagrams/Text.cd
deleted file mode 100644
index 4d197ca..0000000
--- a/src/Editor/Text/Def/TextData/Diagrams/Text.cd
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Class Name="Microsoft.VisualStudio.Text.TextSnapshotChangedEventArgs">
- <Position X="7" Y="5" Width="2.25" />
- <Members>
- <Field Name="after" Hidden="true" />
- <Field Name="before" Hidden="true" />
- <Field Name="editTag" Hidden="true" />
- </Members>
- <AssociationLine Name="Before" Type="Microsoft.VisualStudio.Text.ITextSnapshot" FixedFromPoint="true">
- <Path>
- <Point X="7" Y="5.302" />
- <Point X="5.75" Y="5.302" />
- </Path>
- </AssociationLine>
- <AssociationLine Name="After" Type="Microsoft.VisualStudio.Text.ITextSnapshot" ManuallyRouted="true" FixedFromPoint="true" FixedToPoint="true">
- <Path>
- <Point X="7" Y="5.642" />
- <Point X="6.596" Y="5.642" />
- <Point X="6.596" Y="6.438" />
- <Point X="5.75" Y="6.438" />
- </Path>
- </AssociationLine>
- <AssociationLine Name="AfterVersion" Type="Microsoft.VisualStudio.Text.ITextVersion" FixedFromPoint="true">
- <Path>
- <Point X="7.688" Y="5" />
- <Point X="7.688" Y="3.4" />
- </Path>
- </AssociationLine>
- <AssociationLine Name="BeforeVersion" Type="Microsoft.VisualStudio.Text.ITextVersion" FixedFromPoint="true">
- <Path>
- <Point X="8.938" Y="5" />
- <Point X="8.938" Y="3.4" />
- </Path>
- </AssociationLine>
- <TypeIdentifier>
- <HashCode>BABAAAAAAAAAAAAAAAIAAAAAAAAAAAAQAAAAEgQAQAA=</HashCode>
- <FileName>Model\TextSnapshotChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="Before" />
- <Property Name="After" />
- <Property Name="AfterVersion" />
- <Property Name="BeforeVersion" />
- </ShowAsAssociation>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.TextContentChangedEventArgs">
- <Position X="7" Y="7.75" Width="2.25" />
- <Members>
- <Field Name="options" Hidden="true" />
- <Method Name="TextContentChangedEventArgs" Hidden="true" />
- </Members>
- <TypeIdentifier>
- <HashCode>AEAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAABAAAA=</HashCode>
- <FileName>Model\TextContentChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="Changes" />
- </ShowAsAssociation>
- </Class>
- <Interface Name="Microsoft.VisualStudio.Text.ITextEdit">
- <Position X="0.75" Y="2.75" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAAAEAAABAAAAAAAAAEAAAAAAEAAAAAAAAAAAAAACA=</HashCode>
- <FileName>Model\ITextEdit.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextSnapshotLine">
- <Position X="0.5" Y="5.5" Width="2" />
- <TypeIdentifier>
- <HashCode>EAMAAAAAACAiAAAIIAAIEIBAAAAAAAAAAAAAAAAABAA=</HashCode>
- <FileName>Model\ITextSnapshotLine.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextBuffer">
- <Position X="3.5" Y="0.5" Width="2.25" />
- <Members>
- <Method Name="Delete" Hidden="true" />
- <Method Name="Insert" Hidden="true" />
- <Method Name="Replace" Hidden="true" />
- </Members>
- <AssociationLine Name="CurrentSnapshot" Type="Microsoft.VisualStudio.Text.ITextSnapshot">
- <MemberNameLabel ManuallyPlaced="true">
- <Position X="0.06" Y="0.11" />
- </MemberNameLabel>
- </AssociationLine>
- <TypeIdentifier>
- <HashCode>IAAABEAQAQABEAAABAAAABgAAAOAAAAAEAAQAAQCACA=</HashCode>
- <FileName>Model\ITextBuffer.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="CurrentSnapshot" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextSnapshot">
- <Position X="3.5" Y="5" Width="2.25" />
- <TypeIdentifier>
- <HashCode>IACAAIAAgAAAAAAYKAAIAARAAAQAAAQCAAAAAAEAKAA=</HashCode>
- <FileName>Model\ITextSnapshot.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="TextBuffer" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.INormalizedTextChangeCollection" Collapsed="true">
- <Position X="10.25" Y="6.25" Width="2.5" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAA=</HashCode>
- <FileName>Model\INormalizedTextChangeCollection.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextChange">
- <Position X="11.25" Y="2.75" Width="1.5" />
- <TypeIdentifier>
- <HashCode>QAAAAEAIAAAAUBAAgAAARAAAAAEQAAAAAAAAAEAAAAA=</HashCode>
- <FileName>Model\ITextChange.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextBufferEdit">
- <Position X="0.75" Y="0.5" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAQBAgAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Model\ITextBufferEdit.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="Snapshot" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextVersion">
- <Position X="7.25" Y="0.75" Width="2.5" />
- <TypeIdentifier>
- <HashCode>AgCAAAAAAAAAAEgAMAAAAABAAAQAAAAAAAAAAAACAAA=</HashCode>
- <FileName>Model\ITextVersion.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Font Name="Tahoma" Size="8.25" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextData/Diagrams/TextEdit.cd b/src/Editor/Text/Def/TextData/Diagrams/TextEdit.cd
deleted file mode 100644
index 792d70c..0000000
--- a/src/Editor/Text/Def/TextData/Diagrams/TextEdit.cd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Interface Name="Microsoft.VisualStudio.Text.ITextBufferEdit">
- <Position X="6" Y="0.75" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAQBAgAAAQgAAIAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Model\ITextBufferEdit.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.IReadOnlyRegionEdit">
- <Position X="7" Y="3.75" Width="2" />
- <TypeIdentifier>
- <HashCode>AAAAABAAAAEAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Model\IReadOnlyRegionEdit.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextEdit">
- <Position X="4.5" Y="3.75" Width="2" />
- <TypeIdentifier>
- <HashCode>AAAAAEAAABAAAAAAAAAEAAAAAAEAAAAAAAAAAAAAACA=</HashCode>
- <FileName>Model\ITextEdit.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextData/Diagrams/TextEvents.cd b/src/Editor/Text/Def/TextData/Diagrams/TextEvents.cd
deleted file mode 100644
index 74bcb98..0000000
--- a/src/Editor/Text/Def/TextData/Diagrams/TextEvents.cd
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Class Name="Microsoft.VisualStudio.Text.TextSnapshotChangedEventArgs">
- <Position X="6" Y="0.5" Width="2.5" />
- <Members>
- <Field Name="after" Hidden="true" />
- <Field Name="before" Hidden="true" />
- <Method Name="TextSnapshotChangedEventArgs" Hidden="true" />
- </Members>
- <TypeIdentifier>
- <HashCode>BABAAAAAAAAAAAAAAAIAAAAAAAAAAAAQAAAAEgQAQAA=</HashCode>
- <FileName>Model\TextSnapshotChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.TextContentChangedEventArgs">
- <Position X="3.75" Y="3.75" Width="2.5" />
- <Members>
- <Field Name="options" Hidden="true" />
- <Method Name="TextContentChangedEventArgs" Hidden="true" />
- </Members>
- <TypeIdentifier>
- <HashCode>AEAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAABAAAA=</HashCode>
- <FileName>Model\TextContentChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Projection.ProjectionSourceSpansChangedEventArgs">
- <Position X="5" Y="6" Width="3" />
- <Members>
- <Field Name="deletedSpans" Hidden="true" />
- <Field Name="insertedSpans" Hidden="true" />
- <Method Name="ProjectionSourceSpansChangedEventArgs" Hidden="true" />
- <Field Name="spanPosition" Hidden="true" />
- </Members>
- <TypeIdentifier>
- <HashCode>IIAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAEACQARAA=</HashCode>
- <FileName>Model\Projection\ProjectionSourceSpansChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Projection.ProjectionSourceBuffersChangedEventArgs">
- <Position X="5" Y="8.75" Width="3" />
- <Members>
- <Field Name="addedBuffers" Hidden="true" />
- <Method Name="ProjectionSourceBuffersChangedEventArgs" Hidden="true" />
- <Field Name="removedBuffers" Hidden="true" />
- </Members>
- <TypeIdentifier>
- <HashCode>AAAAAAAgAAAAIAAAAAAAAAAAAAAAAAAEAAAABAAAAAA=</HashCode>
- <FileName>Model\Projection\ProjectionSourceBuffersChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.ReadOnlyRegionsChangedEventArgs">
- <Position X="8.25" Y="3.75" Width="2.75" />
- <Members>
- <Field Name="newlyReadonlyRegions" Hidden="true" />
- <Field Name="newlyWritableRegions" Hidden="true" />
- <Method Name="ReadOnlyRegionsChangedEventArgs" Hidden="true" />
- </Members>
- <TypeIdentifier>
- <HashCode>AAAAAAAACAAAAAAAAAAAAAAAAAAAAAAEAAAABAAgAAA=</HashCode>
- <FileName>Model\ReadOnlyRegionsChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Projection.ElisionSourceSpansChangedEventArgs">
- <Position X="1.75" Y="6" Width="2.75" />
- <Members>
- <Field Name="elidedSpans" Hidden="true" />
- <Field Name="expandedSpans" Hidden="true" />
- </Members>
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAgAAQAYAA=</HashCode>
- <FileName>Model\Projection\ElisionSourceSpansChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextData/Model/Microsoft.VisualStudio.Text.Model.Overview.mht b/src/Editor/Text/Def/TextData/Model/Microsoft.VisualStudio.Text.Model.Overview.mht
deleted file mode 100644
index 0a1bd8b..0000000
--- a/src/Editor/Text/Def/TextData/Model/Microsoft.VisualStudio.Text.Model.Overview.mht
+++ /dev/null
@@ -1,4612 +0,0 @@
-MIME-Version: 1.0
-Content-Type: multipart/related; boundary="----=_NextPart_01C91992.81DAA780"
-
-This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Windows® Internet Explorer®.
-
-------=_NextPart_01C91992.81DAA780
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Model.Overview.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link rel=3DFile-List
-href=3D"Microsoft.VisualStudio.Text.Model.Overview_files/filelist.xml">
-<title>Text Model Subsystem</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Subject>VisualStudio Shell</o:Subject>
- <o:Author>Vijaye Raji</o:Author>
- <o:LastAuthor>Ameen Tayyebi</o:LastAuthor>
- <o:Revision>4</o:Revision>
- <o:TotalTime>124</o:TotalTime>
- <o:LastPrinted>2005-05-26T01:48:00Z</o:LastPrinted>
- <o:Created>2008-03-27T17:40:00Z</o:Created>
- <o:LastSaved>2008-09-18T20:28:00Z</o:LastSaved>
- <o:Pages>3</o:Pages>
- <o:Words>3195</o:Words>
- <o:Characters>18216</o:Characters>
- <o:Company>Microsoft Corporation</o:Company>
- <o:Lines>151</o:Lines>
- <o:Paragraphs>42</o:Paragraphs>
- <o:CharactersWithSpaces>21369</o:CharactersWithSpaces>
- <o:Version>12.00</o:Version>
- </o:DocumentProperties>
-</xml><![endif]-->
-<link rel=3DthemeData
-href=3D"Microsoft.VisualStudio.Text.Model.Overview_files/themedata.thmx">
-<link rel=3DcolorSchemeMapping
-href=3D"Microsoft.VisualStudio.Text.Model.Overview_files/colorschememapping=
-.xml">
-<!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackMoves>false</w:TrackMoves>
- <w:TrackFormatting/>
- <w:PunctuationKerning/>
- <w:ValidateAgainstSchemas/>
- <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
- <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
- <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
- <w:DoNotPromoteQF/>
- <w:LidThemeOther>EN-US</w:LidThemeOther>
- <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
- <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
- <w:Compatibility>
- <w:BreakWrappedTables/>
- <w:SnapToGridInCell/>
- <w:WrapTextWithPunct/>
- <w:UseAsianBreakRules/>
- <w:DontGrowAutofit/>
- <w:SplitPgBreakAndParaMark/>
- <w:DontVertAlignCellWithSp/>
- <w:DontBreakConstrainedForcedTables/>
- <w:DontVertAlignInTxbx/>
- <w:Word11KerningPairs/>
- <w:CachedColBalance/>
- </w:Compatibility>
- <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
- <m:mathPr>
- <m:mathFont m:val=3D"Cambria Math"/>
- <m:brkBin m:val=3D"before"/>
- <m:brkBinSub m:val=3D"&#45;-"/>
- <m:smallFrac m:val=3D"off"/>
- <m:dispDef/>
- <m:lMargin m:val=3D"0"/>
- <m:rMargin m:val=3D"0"/>
- <m:defJc m:val=3D"centerGroup"/>
- <m:wrapIndent m:val=3D"1440"/>
- <m:intLim m:val=3D"subSup"/>
- <m:naryLim m:val=3D"undOvr"/>
- </m:mathPr></w:WordDocument>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:LatentStyles DefLockedState=3D"false" DefUnhideWhenUsed=3D"false"
- DefSemiHidden=3D"false" DefQFormat=3D"false" DefPriority=3D"1"
- LatentStyleCount=3D"267">
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-Normal"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 9"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"footnote text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-caption"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"footnote referenc=
-e"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation refere=
-nce"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Title"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Subtitle"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Hyperlink"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-Strong"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"HTML Top of Form"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"HTML Bottom of Fo=
-rm"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Normal (Web)"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Normal Table"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation subjec=
-t"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" Name=3D"No List"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 1"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 2"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 3"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Contemporar=
-y"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Elegant"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Professiona=
-l"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Subtle 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Subtle 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Balloon Text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Theme"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true"
- Name=3D"Placeholder Text"/>
- <w:LsdException Locked=3D"false" Priority=3D"2" QFormat=3D"true" Name=3D"=
-No Spacing"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true" Name=
-=3D"Revision"/>
- <w:LsdException Locked=3D"false" Priority=3D"34" QFormat=3D"true"
- Name=3D"List Paragraph"/>
- <w:LsdException Locked=3D"false" Priority=3D"29" QFormat=3D"true" Name=3D=
-"Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"30" QFormat=3D"true"
- Name=3D"Intense Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"19" QFormat=3D"true"
- Name=3D"Subtle Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"21" QFormat=3D"true"
- Name=3D"Intense Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"31" QFormat=3D"true"
- Name=3D"Subtle Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"32" QFormat=3D"true"
- Name=3D"Intense Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"33" QFormat=3D"true" Name=3D=
-"Book Title"/>
- <w:LsdException Locked=3D"false" Priority=3D"37" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" Name=3D"Bibliography"/>
- <w:LsdException Locked=3D"false" Priority=3D"39" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"TOC Heading"/>
- </w:LatentStyles>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
- @font-face
- {font-family:SimSun;
- panose-1:2 1 6 0 3 1 1 1 1 1;
- mso-font-alt:\5B8B\4F53;
- mso-font-charset:134;
- mso-generic-font-family:auto;
- mso-font-pitch:variable;
- mso-font-signature:3 680460288 22 0 262145 0;}
-@font-face
- {font-family:PMingLiU;
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-alt:\65B0\7D30\660E\9AD4;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
-@font-face
- {font-family:"Cambria Math";
- panose-1:2 4 5 3 5 4 6 3 2 4;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Calibri;
- panose-1:2 15 5 2 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-1610611985 1073750139 0 0 159 0;}
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-520082689 -1073717157 41 0 66047 0;}
-@font-face
- {font-family:"Trebuchet MS";
- panose-1:2 11 6 3 2 2 2 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:647 0 0 0 159 0;}
-@font-face
- {font-family:Verdana;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-1593833729 1073750107 16 0 415 0;}
-@font-face
- {font-family:"Lucida Console";
- panose-1:2 11 6 9 4 5 4 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-2147482993 6144 0 0 31 0;}
-@font-face
- {font-family:Consolas;
- panose-1:2 11 6 9 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-1610611985 1073750091 0 0 159 0;}
-@font-face
- {font-family:"\@SimSun";
- panose-1:2 1 6 0 3 1 1 1 1 1;
- mso-font-charset:134;
- mso-generic-font-family:auto;
- mso-font-pitch:variable;
- mso-font-signature:3 680460288 22 0 262145 0;}
-@font-face
- {font-family:"\@PMingLiU";
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-h1
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 1 Char";
- mso-style-next:Normal;
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- font-weight:normal;
- mso-bidi-font-weight:bold;}
-h2
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-style-link:"Heading 2 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:14.0pt;
- font-family:"Trebuchet MS","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#5F5F5F;
- letter-spacing:2.0pt;}
-h3
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"Heading 4";
- mso-style-link:"Heading 3 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:3;
- font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- color:#FF6600;
- font-weight:normal;
- mso-bidi-font-weight:bold;}
-h4
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 4 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:4;
- font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:"Times New Roman";
- color:olive;}
-p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
- {mso-style-unhide:no;
- mso-style-link:"Footnote Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Comment Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoHeader, li.MsoHeader, div.MsoHeader
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-link:"Header Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoFooter, li.MsoFooter, div.MsoFooter
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-link:"Footer Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCaption, li.MsoCaption, div.MsoCaption
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-span.MsoFootnoteReference
- {mso-style-unhide:no;
- vertical-align:super;}
-span.MsoCommentReference
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;}
-p.MsoListBullet, li.MsoListBullet, div.MsoListBullet
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpFirst, li.MsoListBulletCxSpFirst, div.MsoListBulletCxSpF=
-irst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpMiddle, li.MsoListBulletCxSpMiddle, div.MsoListBulletCxS=
-pMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpLast, li.MsoListBulletCxSpLast, div.MsoListBulletCxSpLast
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2, li.MsoListBullet2, div.MsoListBullet2
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpFirst, li.MsoListBullet2CxSpFirst, div.MsoListBullet2Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpMiddle, li.MsoListBullet2CxSpMiddle, div.MsoListBullet2=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpLast, li.MsoListBullet2CxSpLast, div.MsoListBullet2CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3, li.MsoListBullet3, div.MsoListBullet3
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpFirst, li.MsoListBullet3CxSpFirst, div.MsoListBullet3Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpMiddle, li.MsoListBullet3CxSpMiddle, div.MsoListBullet3=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpLast, li.MsoListBullet3CxSpLast, div.MsoListBullet3CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2, li.MsoListNumber2, div.MsoListNumber2
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpFirst, li.MsoListNumber2CxSpFirst, div.MsoListNumber2Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpMiddle, li.MsoListNumber2CxSpMiddle, div.MsoListNumber2=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpLast, li.MsoListNumber2CxSpLast, div.MsoListNumber2CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-a:link, span.MsoHyperlink
- {mso-style-unhide:no;
- color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {mso-style-priority:1;
- mso-style-unhide:no;
- color:purple;
- mso-themecolor:followedhyperlink;
- text-decoration:underline;
- text-underline:single;}
-p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-parent:"Comment Text";
- mso-style-link:"Comment Subject Char";
- mso-style-next:"Comment Text";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Balloon Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";}
-p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParag=
-raphCxSpFirst
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListPar=
-agraphCxSpMiddle
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagra=
-phCxSpLast
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoQuote, li.MsoQuote, div.MsoQuote
- {mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Quote Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:black;
- font-style:italic;}
-span.Heading1Char
- {mso-style-name:"Heading 1 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 1";
- mso-ansi-font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-span.Heading2Char
- {mso-style-name:"Heading 2 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 2";
- mso-ansi-font-size:13.0pt;
- mso-bidi-font-size:13.0pt;
- font-family:"Cambria","serif";
- mso-ascii-font-family:Cambria;
- mso-ascii-theme-font:major-latin;
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:major-fareast;
- mso-hansi-font-family:Cambria;
- mso-hansi-theme-font:major-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:major-bidi;
- color:#4F81BD;
- mso-themecolor:accent1;
- font-weight:bold;}
-span.Heading4Char
- {mso-style-name:"Heading 4 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 4";
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:olive;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- font-weight:bold;}
-span.Heading3Char
- {mso-style-name:"Heading 3 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 3";
- mso-ansi-font-size:14.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:#FF6600;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- mso-bidi-font-weight:bold;}
-span.FootnoteTextChar
- {mso-style-name:"Footnote Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Footnote Text";
- mso-ansi-font-size:11.0pt;}
-span.CommentTextChar
- {mso-style-name:"Comment Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Comment Text";}
-span.HeaderChar
- {mso-style-name:"Header Char";
- mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Header;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.FooterChar
- {mso-style-name:"Footer Char";
- mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Footer;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.CommentSubjectChar
- {mso-style-name:"Comment Subject Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-parent:"Comment Text Char";
- mso-style-link:"Comment Subject";
- font-weight:bold;}
-span.BalloonTextChar
- {mso-style-name:"Balloon Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Balloon Text";
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;}
-span.QuoteChar
- {mso-style-name:"Quote Char";
- mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Quote;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- color:black;
- font-style:italic;}
-p.Heading0, li.Heading0, div.Heading0
- {mso-style-name:"Heading 0";
- mso-style-unhide:no;
- mso-style-parent:"Heading 1";
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:28.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:Arial;
- color:#006699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-p.SubHeading, li.SubHeading, div.SubHeading
- {mso-style-name:SubHeading;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:maroon;
- font-weight:bold;
- mso-bidi-font-weight:normal;}
-span.CodeCharChar
- {mso-style-name:"Code Char Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Code;
- mso-ansi-font-size:9.0pt;
- mso-bidi-font-size:9.0pt;
- font-family:"Lucida Console";
- mso-ascii-font-family:"Lucida Console";
- mso-hansi-font-family:"Lucida Console";
- mso-no-proof:yes;}
-p.Code, li.Code, div.Code
- {mso-style-name:Code;
- mso-style-unhide:no;
- mso-style-link:"Code Char Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:3.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-layout-grid-align:none;
- text-autospace:none;
- font-size:9.0pt;
- font-family:"Lucida Console";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-span.NoteChar
- {mso-style-name:"Note Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Note;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- background:#F3F3F3;
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Note, li.Note, div.Note
- {mso-style-name:Note;
- mso-style-unhide:no;
- mso-style-link:"Note Char";
- margin-top:0in;
- margin-right:.2in;
- margin-bottom:12.0pt;
- margin-left:.2in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- background:#F3F3F3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Style2, li.Style2, div.Style2
- {mso-style-name:Style2;
- mso-style-unhide:no;
- mso-style-parent:"";
- mso-style-next:Normal;
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- background:#F9FFF3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-p.Style3, li.Style3, div.Style3
- {mso-style-name:Style3;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- background:#F5FAF4;
- mso-layout-grid-align:none;
- text-autospace:none;
- border:none;
- mso-border-alt:solid windowtext 1.0pt;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- mso-border-shadow:yes;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:PMingLiU;
- mso-bidi-font-family:"Times New Roman";
- mso-fareast-language:ZH-CN;
- mso-no-proof:yes;}
-span.DescriptionTextChar
- {mso-style-name:"Description Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Description Text";}
-p.DescriptionText, li.DescriptionText, div.DescriptionText
- {mso-style-name:"Description Text";
- mso-style-unhide:no;
- mso-style-link:"Description Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.25in;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.Issue, li.Issue, div.Issue
- {mso-style-name:Issue;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan lines-together;
- border:none;
- mso-border-alt:solid navy 1.5pt;
- padding:0in;
- mso-padding-alt:1.0pt 1.0pt 1.0pt 1.0pt;
- mso-border-shadow:yes;
- font-size:10.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";
- color:red;
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.msolistparagraph0, li.msolistparagraph0, div.msolistparagraph0
- {mso-style-name:msolistparagraph;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-p.msolistparagraph0CxSpFirst, li.msolistparagraph0CxSpFirst, div.msolistpar=
-agraph0CxSpFirst
- {mso-style-name:msolistparagraphCxSpFirst;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-p.msolistparagraph0CxSpMiddle, li.msolistparagraph0CxSpMiddle, div.msolistp=
-aragraph0CxSpMiddle
- {mso-style-name:msolistparagraphCxSpMiddle;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-p.msolistparagraph0CxSpLast, li.msolistparagraph0CxSpLast, div.msolistparag=
-raph0CxSpLast
- {mso-style-name:msolistparagraphCxSpLast;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-.MsoChpDefault
- {mso-style-type:export-only;
- mso-default-props:yes;
- font-size:10.0pt;
- mso-ansi-font-size:10.0pt;
- mso-bidi-font-size:10.0pt;
- mso-ascii-font-family:Calibri;
- mso-hansi-font-family:Calibri;}
- /* Page Definitions */
- @page
- {mso-footnote-separator:url("Microsoft.VisualStudio.Text.Model.Overview_fi=
-les/header.htm") fs;
- mso-footnote-continuation-separator:url("Microsoft.VisualStudio.Text.Model=
-.Overview_files/header.htm") fcs;
- mso-endnote-separator:url("Microsoft.VisualStudio.Text.Model.Overview_file=
-s/header.htm") es;
- mso-endnote-continuation-separator:url("Microsoft.VisualStudio.Text.Model.=
-Overview_files/header.htm") ecs;}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
- @list l0
- {mso-list-id:-129;
- mso-list-type:simple;
- mso-list-template-ids:-1739002844;}
-@list l0:level1
- {mso-level-style-link:"List Number 2";
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l1
- {mso-list-id:-126;
- mso-list-type:simple;
- mso-list-template-ids:-1045901690;}
-@list l1:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 3";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.75in;
- mso-level-number-position:left;
- margin-left:.75in;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l2
- {mso-list-id:-125;
- mso-list-type:simple;
- mso-list-template-ids:-1069260336;}
-@list l2:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 2";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l3
- {mso-list-id:-119;
- mso-list-type:simple;
- mso-list-template-ids:1390696726;}
-@list l3:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.25in;
- mso-level-number-position:left;
- margin-left:.25in;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l4
- {mso-list-id:361705730;
- mso-list-type:hybrid;
- mso-list-template-ids:-1564313072 67698689 67698691 67698693 67698689 6769=
-8691 67698693 67698689 67698691 67698693;}
-@list l4:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l4:level2
- {mso-level-tab-stop:1.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level3
- {mso-level-tab-stop:1.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level4
- {mso-level-tab-stop:2.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level5
- {mso-level-tab-stop:2.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level6
- {mso-level-tab-stop:3.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level7
- {mso-level-tab-stop:3.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level8
- {mso-level-tab-stop:4.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level9
- {mso-level-tab-stop:4.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5
- {mso-list-id:737099002;
- mso-list-type:hybrid;
- mso-list-template-ids:497705626 67698689 67698691 67698693 67698689 676986=
-91 67698693 67698689 67698691 67698693;}
-@list l5:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:none;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l5:level2
- {mso-level-tab-stop:1.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level3
- {mso-level-tab-stop:1.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level4
- {mso-level-tab-stop:2.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level5
- {mso-level-tab-stop:2.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level6
- {mso-level-tab-stop:3.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level7
- {mso-level-tab-stop:3.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level8
- {mso-level-tab-stop:4.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level9
- {mso-level-tab-stop:4.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-priority:99;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-table.MsoTableGrid
- {mso-style-name:"Table Grid";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-unhide:no;
- border:solid windowtext 1.0pt;
- mso-border-alt:solid windowtext .5pt;
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-border-insideh:.5pt solid windowtext;
- mso-border-insidev:.5pt solid windowtext;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-</style>
-<![endif]--><!--[if gte mso 9]><xml>
- <o:shapedefaults v:ext=3D"edit" spidmax=3D"3074"/>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <o:shapelayout v:ext=3D"edit">
- <o:idmap v:ext=3D"edit" data=3D"1"/>
- </o:shapelayout></xml><![endif]-->
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple style=3D'tab-interval:.5in'>
-
-<div class=3DSection1>
-
-<p class=3DHeading0>Text Model Subsystem</p>
-
-<div style=3D'mso-element:para-border-div;border:none;border-bottom:solid w=
-indowtext 1.0pt;
-mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in'>
-
-<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:solid windo=
-wtext .75pt;
-padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><o:p>&nbsp;</o:p></p>
-
-</div>
-
-<h1 style=3D'margin-top:24.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.3in;text-indent:-.3in;line-height:normal;tab-stops:list .3in'><a
-name=3D"_Toc76978452"></a><a name=3D"_Toc151974416"></a><a name=3D"_Toc1519=
-73942"></a><a
-name=3D"_Toc149118079"></a><a name=3D"_Toc149118215"></a><a name=3D"_Toc149=
-118380"></a><a
-name=3D"_Toc149118641"></a><a name=3D"_Toc151873508"></a><a name=3D"_Toc151=
-873650"></a><a
-name=3D"_Toc151974258"></a><a name=3D"_Toc153684427"></a><a name=3D"_Toc151=
-892155"></a><a
-name=3D"_Toc151886240"></a><a name=3D"_Toc151886043"></a><a name=3D"_Toc153=
-700829"></a><a
-name=3D"_Toc151442559"></a><a name=3D"_Toc155080032"><span style=3D'mso-boo=
-kmark:
-_Toc151442559'><span style=3D'mso-bookmark:_Toc153700829'><span style=3D'ms=
-o-bookmark:
-_Toc151886043'><span style=3D'mso-bookmark:_Toc151886240'><span style=3D'ms=
-o-bookmark:
-_Toc151892155'><span style=3D'mso-bookmark:_Toc153684427'><span style=3D'ms=
-o-bookmark:
-_Toc151974258'><span style=3D'mso-bookmark:_Toc151873650'><span style=3D'ms=
-o-bookmark:
-_Toc151873508'><span style=3D'mso-bookmark:_Toc149118641'><span style=3D'ms=
-o-bookmark:
-_Toc149118380'><span style=3D'mso-bookmark:_Toc149118215'><span style=3D'ms=
-o-bookmark:
-_Toc149118079'><span style=3D'mso-bookmark:_Toc151973942'><span style=3D'ms=
-o-bookmark:
-_Toc151974416'><span style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso=
--fareast-font-family:
-"Times New Roman"'>Overview</span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></a>=
-<span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>This document describes the core concep=
-ts and
-public types of the <i>Text Model</i><i style=3D'mso-bidi-font-style:normal=
-'>
-Subsystem</i>.<span style=3D'mso-spacerun:yes'>&nbsp; </span>The Text Model
-Subsystem provides services and public types to manipulate sequences of Uni=
-code
-characters.</span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The Text Model Subsystem comprises two
-separate areas that are described in greater detail below:</span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></p>
-
-<p class=3DMsoListParagraphCxSpFirst style=3D'text-indent:-.25in;mso-list:l=
-5 level1 lfo5'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><![if !supportLists]><span
-style=3D'font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-fa=
-mily:
-Symbol'><span style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "=
-Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Basic Text Manipulation</span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></p>
-
-<p class=3DMsoListParagraphCxSpLast style=3D'text-indent:-.25in;mso-list:l5=
- level1 lfo5'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><![if !supportLists]><span
-style=3D'font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-fa=
-mily:
-Symbol'><span style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "=
-Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Text Projection</span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></p>
-
-<h1 style=3D'margin-top:24.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.3in;text-indent:-.3in;line-height:normal;tab-stops:list .3in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080033"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>Basic
-Text Manipulation</span></a></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></h1>
-
-<h2 style=3D'margin-top:20.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.4in;text-indent:-.4in;page-break-after:avoid;tab-stops:list .4in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080034"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>ITextBuffer,
-IText</span></a></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Snapshot, and
-ITextSnapshotLine<o:p></o:p></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></h=
-2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The fundamental interface of the Text M=
-odel is
-<b>ITextBuffer</b>, which represents a sequence of Unicode characters encod=
-ed
-using UTF-16(</span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span><a
-style=3D'mso-footnote-id:ftn1' href=3D"#_ftn1" name=3D"_ftnref1" title=3D""=
-><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-special-character:footnote'><![if !supportFootnotes]><span
-style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;font-family:"Calibri","=
-sans-serif";
-mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New R=
-oman";
-mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA'=
->[1]</span><![endif]></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></a><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'>)
-(that is, using the same encoding used by the String type in the .Net
-platform). Frequently a TextBuffer will be backed by a document, but this is
-not required and a TextBuffer can be used for manipulating any text. The <i=
->Text
-Document</i> subsystem is responsible for keeping track of the association
-between documents and TextBuffers.</span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>During its lifetime, a TextBuffer proce=
-eds
-through one or more versions; a new version is generated each time the buff=
-er
-is edited (see below). Associated with each version is an immutable <b>ITex=
-tSnapshot</b>
-that can be used to examine the contents of that version of the text buffer=
-. <i>As
-long as a reference is held to a snapshot, it can continue to be used to
-examine the text of its version on any thread and without taking locks, eve=
-n as
-the TextBuffer continues to change.</i> </span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The content of a TextSnapshot can be
-addressed as a sequence of characters or as a sequence of lines; characters=
- and
-lines are both indexed starting at zero. The empty TextSnapshot contains ze=
-ro
-characters and one empty line. A line is delimited by any valid Unicode line
-break character sequence, or by the beginning or end of the buffer. Line br=
-eak
-characters are explicitly represented in the TextSnapshot, and the line bre=
-aks
-in a TextSnapshot need not all be the same.</span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>A single line of text is described by a=
-n <b>ITextSnapshotLine
-</b>object, which can be obtained from a TextBuffer for a particular line
-number or for a particular character position (in which case the returned l=
-ine
-is the line containing the character at that position).</span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Associated with each TextBuffer is a <i=
->ContentType;</i>
-this property is used throughout the text system to determine the kinds of
-operations that are available on the TextBuffer. See the descriptions of the
-Classification and Adornment subsystems for more details. The default
-ContentType is simply &#8220;text&#8221;.</span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>A TextBuffer maintains a property bag by
-virtue of its implementation of the <b>IPropertyOwner </b>interface. Objects
-placed in the <b>Properties </b>collection are easily reachable from the
-TextBuffer, and, because the reference from the TextBuffer is not weak, will
-remain alive as long as the TextBuffer does, unless they are explicitly rem=
-oved
-from the collection. </span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></p>
-
-<h2 style=3D'margin-top:20.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.4in;text-indent:-.4in;page-break-after:avoid;tab-stops:list .4in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080035"></a><a name=3D"_Documents_and_Folders"></a><span
-style=3D'mso-bookmark:_Toc155080035'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'>Span
-and NormalizedSpanCollection</span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'> <o:p></o:p></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The type <b>Span</b> represents an inte=
-ger
-interval of nonnegative length. Just as an integer is used in the Text API =
-to
-refer to a character position in a TextSnapshot, a span is used represent a
-fixed span of text in a TextSnapshot. The Start<b> </b>(lower bound) and Le=
-ngth<b>
-</b>of a span must be nonnegative. The End property of a Span is equal to t=
-he
-sum of its Start and Length; thus, when applied to a TextBuffer, the Span
-describes an open interval on the right&#8212;it does <i>not </i>include the
-character indexed by the End property. For example, the span with Start 5 a=
-nd
-Length 3 has End 8 and includes the characters at positions 5, 6, and 7. By
-convention, this span is written like this: &#8220;[5..8)&#8221;
-(alternatively, it can be written showing the start and length separated by=
- a
-comma, viz.: &#8220;[5,3]&#8221;). Notice that Span constructors that take =
-two
-integer arguments expect the start and length, not the start and end. A span
-may have zero length.<b style=3D'mso-bidi-font-weight:normal'> <o:p></o:p><=
-/b></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Two spans are said to <i style=3D'mso-b=
-idi-font-style:
-normal'>intersect </i>if they have any positions in common, including the E=
-nd
-position. Thus the intersection of [3, 5) and [2, 7) is [3, 5) and the
-intersection of [3, 5) and [5, 7) is [5, 5) (an empty span).</span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Two spans are said to <i style=3D'mso-b=
-idi-font-style:
-normal'>overlap </i>if they have positions in common, excluding the End
-position. This means that an empty span never overlaps any other span and t=
-he
-overlap of two spans is never empty.</span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Some operations result in a list of Spa=
-ns; it
-is easier to process such a list if it has certain properties. In particula=
-r, a
-<i>normalized </i>list of Spans is ordered by the Start properties of the
-spans, and overlapping or abutting spans are merged. For example, given the=
- set
-of spans [5..9), [0..1), [3..6), [9..10), the normalized list of spans is
-[0..1), [3..10). These semantics are embodied in the <b>NormalizedSpanColle=
-ction</b>
-type (that is, its spans are ordered by their Start property, and they do n=
-ot
-overlap or abut). This type supports computing the union, intersection,
-overlap, and set difference of two NormalizedSpanCollections.</span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></p>
-
-<h2 style=3D'margin-top:20.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.4in;text-indent:-.4in;page-break-after:avoid;tab-stops:list .4in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080036"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>SnapshotPoint,
-SnapshotSpan, and NormalizedSnapshotSpanCollection<o:p></o:p></span></a></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1550800=
-36'>The <b
-style=3D'mso-bidi-font-weight:normal'>SnapshotPoint </b>struct is an immuta=
-ble
-type that represents a character position in a particular snapshot. The
-position is guaranteed to lie between zero and the length of the snapshot (=
-when
-it takes its maximal value the position addresses the greatest position at
-which an insertion could take place &#8211; one position past the last
-character in the snapshot).</span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1550800=
-36'>The <b
-style=3D'mso-bidi-font-weight:normal'>SnapshotSpan </b>struct is an immutab=
-le
-type that represents a span of text in a particular snapshot. Its End posit=
-ion
-is guaranteed to lie between zero and the length of the snapshot.</span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1550800=
-36'>The <b
-style=3D'mso-bidi-font-weight:normal'>NormalizedSnapshotSpanCollection </b>=
-is
-very similar to the <b style=3D'mso-bidi-font-weight:normal'>NormalizedSpan=
-Collection
-</b>described previously, except that it consists of SnapshotSpans, all from
-the same snapshot. </span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1550800=
-36'>A
-live object of any of these types holds a reference to the snapshot in ques=
-tion
-and prevents it from being garbage collected.</span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></p>
-
-<h2 style=3D'margin-top:20.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.4in;text-indent:-.4in;page-break-after:avoid;tab-stops:list .4in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc155080036'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'>ITextEdit,
-EditOptions, TextVersion and Text change notifications</span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The content of a TextBuffer can be chan=
-ged
-using an <b>ITextEdit</b> object. Creating such an object using one of the
-CreateEdit() methods of ITextBuffer initiates a text transaction consisting=
- of
-zero or more edits, each of which is modeled as a replacement of some span =
-of
-text in the buffer by a string. The coordinates and content of each edit are
-expressed in terms of the state of the current snapshot of the buffer when =
-the
-transaction was started; the TextEdit object is responsible for adjusting t=
-he
-coordinates of edits that are affected by other edits in the same transacti=
-on.
-For example, consider a TextBuffer containing the string
-&#8220;abcdefghij&#8221; and a transaction containing two edits, where the
-first edit replaces the two character span at [2..4) with &#8220;X&#8221; a=
-nd
-the second replaces the three character span at [6..9) with &#8220;Y&#8221;.
-The result is &#8220;abXefYj&#8221;. Notice that the coordinates for the se=
-cond
-edit were computed with respect to the contents of the buffer at the beginn=
-ing
-of the transaction, that is, before the first edit was applied. For a second
-example, consider a TextBuffer containing the string &#8220;abcd&#8221; and=
- a
-transaction containing two edits, where the first edit inserts &#8220;X&#82=
-21;
-at position 3 and the second deletes 2 characters starting at position 2; t=
-he
-result is &#8220;abX&#8221;.</span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>When the TextEdit object is committed by
-calling its <b>Apply</b> method, the changes to the buffer become effective=
-. If
-there was at least one non-vacuous edit performed, a new <b>TextVersion</b>=
- is
-created, a new <b>ITextSnapshot </b>is created, and a single <b>Changed</b>
-event is raised.</span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Only one TextEdit object can be instant=
-iated
-for a TextBuffer at any time, and all TextEdits must be performed on the th=
-read
-that owns the TextBuffer (if ownership has been claimed). A TextEdit can be=
- abandoned
-by calling its <b>Cancel</b> or <b>Dispose</b> method.</span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>ITextBuffer also provides <b>Insert</b>=
-, <b>Delete</b>,
-and <b>Replace</b> convenience methods similar to those found on the ITextE=
-dit
-interface; calling these has the same effect as creating an ITextEdit objec=
-t,
-making the similar call, and then applying the singleton edit.</span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>As mentioned above, each non-vacuous ch=
-ange
-to a TextBuffer results in a new version of the TextBuffer, described by a
-TextVersion object. There is a distinct TextSnapshot for each TextVersion.
-Whereas snapshots capture the complete state of the TextBuffer after each e=
-dit
-transaction, TextVersions incrementally describe the changes that lead from=
- one
-snapshot to the next. From a snapshot you can navigate to the corresponding=
- <b>TextVersion</b>
-that in turn refers to a <b>NormalizedTextChangeCollection</b>. This collec=
-tion
-describes the changes that, when applied to the snapshot, will result in the
-subsequent snapshot (the normalized collection is therefore always null for=
- the
-most recent version of the TextBuffer). Each TextChange in the normalized
-collection contains the character position of the change, the replaced stri=
-ng,
-and the replacement string (the former is empty for a simple insertion and =
-the
-latter is empty for a simple deletion).</span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The <b style=3D'mso-bidi-font-weight:no=
-rmal'>EditOptions
-</b>enumeration type describes options that alter the behavior of TextEdit
-objects. The <b style=3D'mso-bidi-font-weight:normal'>ComputeMinimalChange =
-</b>option
-specifies that, for a text replacement, the editor should compute the minim=
-al
-set of edits required to accomplish the replacement and break the replaceme=
-nt
-down into that set. For example, if the string &#8220;ABCD&#8221; at positi=
-on 0
-is replaced by &#8220;ABC&#8221; and this edit is specified, the TextVersion
-that is created will show a simple insertion of &#8220;D&#8221; at position=
- 3.</span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></p>
-
-<h2 style=3D'margin-top:20.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.4in;text-indent:-.4in;page-break-after:avoid;tab-stops:list .4in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080038"></a><a name=3D"_Content_Type"></a><span style=3D'mso=
--bookmark:
-_Toc155080038'><span style=3D'mso-fareast-font-family:"Times New Roman"'>IT=
-rackingPoint
-and ITrackingSpan</span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>An <b>ITrackingPoint</b> denotes a part=
-icular
-position in a particular TextBuffer. If the buffer is edited so as to cause=
- the
-character at the denoted position to shift, the TrackingPoint shifts along =
-with
-it. Thus if a TrackingPoint refers to position 10 in a buffer and 5 charact=
-ers
-are inserted at the beginning of the buffer, the TrackingPoint for the
-resulting snapshot will then refer to position 15. If an insertion happens =
-at
-precisely the position denoted by the TtrackingPoint, its behavior is
-determined by its <b style=3D'mso-bidi-font-weight:normal'>PointT<span
-style=3D'mso-bidi-font-weight:bold'>rackingMode</span></b>, which can be ei=
-ther <b>Positive
-</b>or <b>Negative</b>. If the tracking mode is positive, the TrackingPoint
-will refer to the same character, now at the end of the insertion; if the
-tracking mode is negative, the TrackingPoint will refer to the first insert=
-ed
-character at the original position. If the character at the position denote=
-d by
-a TrackingPoint is deleted, the TrackingPoint shifts to the point of the
-deletion and refers to the first character that following the deleted range.
-For example, if a TrackingPoint refers to the character at position 5 and t=
-hen
-the characters at positions 3 through 6 are deleted, the TrackingPoint will
-refer to the character at position 3. To obtain the position of a
-TrackingPoint, you must specify the TextSnapshot of interest. </span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>An <b>ITrackingSpan</b> is a similar ob=
-ject
-that denotes a range of characters instead of a single position, and whose
-behavior is conditioned by its <b>SpanTrackingMode</b>. If the SpanTracking=
-Mode
-is <b>EdgeInclusive</b>, the TrackingSpan grows to incorporate text inserte=
-d at
-its edges; if the SpanTrackingMode is <b>EdgeExclusive</b>, the TrackingSpan
-does not incorporate text inserted at its edges. Two other SpanTrackingModes
-are less frequently used: in <b style=3D'mso-bidi-font-weight:normal'>EdgeN=
-egative</b>
-mode both ends points behave like Negative tracking text points; in <b
-style=3D'mso-bidi-font-weight:normal'>EdgePositive </b>mode both end points
-behave like Positive tracking text points. These modes are most useful
-respectively at the beginning and end of a buffer.</span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The position of a TrackingPoint or the =
-Span
-of a TrackingSpan can be obtained for any snapshot of the TextBuffer to whi=
-ch
-they belong. TrackingPoints and TrackingSpans may be safely referenced from=
- any
-thread.</span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>In addition to the tracking modes descr=
-ibed
-above, <b style=3D'mso-bidi-font-weight:normal'>TrackingFidelityMode </b>is=
- used
-to control the behavior of tracking points and spans. Each of the fidelity
-modes is explained below in terms of text points; the start and end points =
-of
-text spans behave individually in the same way. In the discussion below, th=
-e <i>origin</i>
-version of a point is the version against which it was created (that is, the
-origin version is the TextVersion object on which the factory method for the
-point was called). The <i>cached </i>version is the largest version number
-against which the </span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:Consolas;color:#00B0F0'>GetPosition</span> method has =
-been
-called. Tracking behavior is described with respect to the <i>target</i>
-version, the version against which the GetPosition method is called. Tracki=
-ng
-fidelity modes affect the behavior of </span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-<span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:Consolas;color:#00B0F0'>GetPosition</span> depending o=
-n the
-relative ordering of the origin, cached, and target versions.</span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></p>
-
-<h3><span style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:=
-_Toc153700829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Forward<o:p></o:p></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></h3>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>When the target version is greater than=
- or
-equal to the cached version, the point tracks forward as expected. When the
-cached version is greater than the origin version, and the target version
-number is between the two, </span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:Consolas;color:#00B0F0'>GetPosition</span> may give
-unexpected results. For example, consider a buffer containing the string
-&#8220;0123&#8221; and a </span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:Consolas;color:#00B0F0'>Positive</span> tracking point=
- at
-position 2. Now suppose the substring &#8220;12&#8221; is deleted, leaving
-&#8220;03&#8221;, and the position of the point is queried; it will have the
-value 1. If the position of the point is subsequently queried for the previ=
-ous version,
-it will have the value 3 rather than 2. This is because the forward fidelity
-mode simply reverses edits when moving backwards in version space from the
-cached version to the target version. In this case, the deletion of
-&#8220;12&#8221; is reversed (becomes an insertion at position 1), and beca=
-use
-the point is </span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:Consolas;color:#00B0F0'>Positive</span> tracking, it
-advances two positions. In this mode, the information that the point was
-previously in the middle of the deleted substring is lost.</span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin=
-'><o:p></o:p></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Because they do not force historical
-information to be retained, forward tracking points are the most space
-efficient. Typically they should be used only when points are not shared am=
-ong
-several clients, because queries by one client that are not known to another
-client may cause unexpected results. Still, it is anticipated that this
-fidelity mode will be the most commonly used. It is especially advantageous=
- to
-use this mode if large numbers of spans are being created, say, one for each
-node in an AST.</span></span></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Forward is the default tracking fidelit=
-y for
-both points and spans. </span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></p>
-
-<h3><span style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:=
-_Toc153700829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Backward<o:p></o:p></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></h3>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The point tracks forward as expected, a=
-nd
-when the target version is less than the cached version, </span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:Consolas;color:#00B0F0'>GetPosition</span> always give=
-s the
-same answer. When the target version is less than the origin version, it
-behaves like a Forward tracking point (but there is no history to remember =
-in
-this case).</span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin=
-'><o:p></o:p></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Backward tracking points require the
-retention of more historical information and are therefore less space effic=
-ient
-than forward tracking points. Therefore, Backward tracking points should on=
-ly
-be used for short-lived objects; typically they are used in situations where
-some derived model may temporarily be out of sync with the text buffer by a=
- few
-versions, and it is necessary to map both forward and backward with complete
-fidelity. </span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></p>
-
-<h3><span style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:=
-_Toc153700829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>UndoRedo<o:p></o:p></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></h3>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The point behaves like a forward tracki=
-ng
-point unless it is mapped to a reiterated version (a version that is the re=
-sult
-of an undo or redo operation). In the latter case, </span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:Consolas;color:#00B0F0'>GetPosition</span> is guarante=
-ed to
-return the same result it would have for the version being reiterated. Of
-course, if the target version is earlier than the origin version, the point=
- has
-no history to reiterate, and it behaves like a Forward tracking point. </sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin=
-'><o:p></o:p></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>For example, consider a buffer containi=
-ng
-&#8220;012345&#8221; and a positive tracking point at position 2. Now suppo=
-se
-the string &#8220;123&#8221; is deleted. Getting the position of the point =
-at
-this juncture returns the value 1. Now suppose the deletion is undone and <=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:Consolas;color:#00B0F0'>GetPosition</span> is called. A
-positive tracking point that does not have UndoRedo fidelity would return t=
-he
-position 3, since the undo appears to be a simple insertion. A point having
-UndoRedo fidelity returns position 2.</span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Like Backward tracking points, UndoRedo
-tracking points require retention of more historical information and should
-only be used if absolutely required. </span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/p>
-
-<h2 style=3D'margin-top:20.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.4in;text-indent:-.4in;page-break-after:avoid;tab-stops:list .4in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080039"></a><a name=3D"_Obtaining_Documents_and"></a><a
-name=3D"_Reading_and_Writing"></a><span style=3D'mso-bookmark:_Toc155080039=
-'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>IReadOnlyRegion and </s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>IReadOnlyRegionEdit<o:p=
-></o:p></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Individual spans of text in a TextBuffe=
-r may
-be marked as read only, with each designated by an <b>IReadOnlyRegion</b>.
-Attempts to modify the text in a read only region have no effect. Each
-TextBuffer can create an <b style=3D'mso-bidi-font-weight:normal'>IReadOnly=
-RegionEdit</b>
-which can be used to create and remove <b>IReadOnlyRegion</b>s on that buff=
-er.
-The IReadOnlyRegionEdit object is similar to an ITextEdit object&#8212;it m=
-ust
-by applied to have effect, and each non-vacuous edit generates a new version
-and snapshot of the text buffer. The behavior of a ReadOnlyRegion at its
-boundaries is determined by its <b>EdgeInsertionMode</b>.</span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></p>
-
-<h2 style=3D'margin-top:20.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.4in;text-indent:-.4in;page-break-after:avoid;tab-stops:list .4in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080040"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>ITextBufferFactory</span></a></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span><sp=
-an
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Service<o:p></o:p></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>TextBuffers are created using the <b>IT=
-extBufferFactoryService</b>,
-which allows creation of an empty TextBuffer or a TextBuffer initialized fr=
-om a
-string or System.IO.<b>TextReader</b>.</span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</p>
-
-<h1 style=3D'margin-top:24.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.3in;text-indent:-.3in;line-height:normal;tab-stops:list .3in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080041"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>Text
-Projection</span></a></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></h1>
-
-<h2 style=3D'margin-top:20.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.4in;text-indent:-.4in;page-break-after:avoid;tab-stops:list .4in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080042"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>IProjectionBuffer</span></a></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>An
-<b>IProjectionBuffer</b> is a specialized TextBuffer that does not actually
-store text; rather, it presents a projection of text drawn from one or more
-other TextBuffers. In particular, a ProjectionBuffer is specified by an ord=
-ered
-sequence of ITrackingSpans known as <i style=3D'mso-bidi-font-style:normal'=
->Source
-Spans</i>; it presents the contents of these spans as a contiguous sequence=
- of
-characters. The TextBuffers from which the source spans are drawn are called
-the <i style=3D'mso-bidi-font-style:normal'>Source Buffers. </i>A client of=
- the
-ProjectionBuffer need not be aware that it is different from an ordinary
-TextBuffer and so can be insulated from the fact that the text it presents =
-is
-virtualized (on the other hand it may well be aware of the presence of a
-ProjectionBuffer).<o:p></o:p></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>The
-ProjectionBuffer listens to text change events on the source buffers. Whene=
-ver
-the text in a source span changes, the ProjectionBuffer maps the changed te=
-xt
-coordinates into its own coordinates and raises appropriate text change eve=
-nts.
-For example, consider source buffers A and B with contents as shown below,<=
-o:p></o:p></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></p>
-
-<div style=3D'mso-element:para-border-div;border:solid windowtext 1.0pt;
-mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
-background:#E5E5E5;mso-shading:windowtext;mso-pattern:gray-10 auto'>
-
-<p class=3DCode style=3D'background:#E5E5E5;mso-shading:windowtext;mso-patt=
-ern:
-gray-10 auto;border:none;mso-border-alt:solid windowtext .5pt;padding:0in;
-mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'><span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp; </span>01234<o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></p>
-
-<p class=3DCode style=3D'background:#E5E5E5;mso-shading:windowtext;mso-patt=
-ern:
-gray-10 auto;border:none;mso-border-alt:solid windowtext .5pt;padding:0in;
-mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>A:
-ABCDE<o:p></o:p></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></p>
-
-<p class=3DCode style=3D'background:#E5E5E5;mso-shading:windowtext;mso-patt=
-ern:
-gray-10 auto;border:none;mso-border-alt:solid windowtext .5pt;padding:0in;
-mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'><o:p>&nbsp;</o:p></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DCode style=3D'background:#E5E5E5;mso-shading:windowtext;mso-patt=
-ern:
-gray-10 auto;border:none;mso-border-alt:solid windowtext .5pt;padding:0in;
-mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'><span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp; </span>01234<o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></p>
-
-<p class=3DCode style=3D'background:#E5E5E5;mso-shading:windowtext;mso-patt=
-ern:
-gray-10 auto;border:none;mso-border-alt:solid windowtext .5pt;padding:0in;
-mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>B:
-vwxyz<o:p></o:p></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></p>
-
-</div>
-
-<p class=3DMsoNormal style=3D'margin-bottom:0in;margin-bottom:.0001pt'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:"Verdana","sans-serif";mso-fareast-font-family:SimSun'=
-><o:p>&nbsp;</o:p></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>and
-suppose ProjectionBuffer P is formed from two text spans, one comprising al=
-l of
-buffer A and the other all of buffer B. P has these contents:<o:p></o:p></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></p>
-
-<div style=3D'mso-element:para-border-div;border:solid windowtext 1.0pt;
-mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
-background:#E5E5E5;mso-shading:windowtext;mso-pattern:gray-10 auto'>
-
-<p class=3DCode style=3D'background:#E5E5E5;mso-shading:windowtext;mso-patt=
-ern:
-gray-10 auto;border:none;mso-border-alt:solid windowtext .5pt;padding:0in;
-mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'><span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp; </span>0123456789<o:p></o:p></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></p>
-
-<p class=3DCode style=3D'background:#E5E5E5;mso-shading:windowtext;mso-patt=
-ern:
-gray-10 auto;border:none;mso-border-alt:solid windowtext .5pt;padding:0in;
-mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>P:
-ABCDEvwxyz<o:p></o:p></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></p>
-
-</div>
-
-<p class=3DMsoNormal style=3D'margin-bottom:0in;margin-bottom:.0001pt'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:"Courier New";mso-fareast-font-family:SimSun;mso-bidi-=
-font-family:
-"Times New Roman"'><o:p>&nbsp;</o:p></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>If
-the substring &#8220;xy&#8221; is deleted from buffer B (at position 2), P =
-will
-raise an event indicating that the characters at positions 7 and 8 were
-deleted. </span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'font-family:"Verdana","sans-serif";mso-fareast-font-family:SimSun'=
-><o:p></o:p></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>The</span>
-ProjectionBuffer can also be edited directly; it propagates edits to the
-appropriate source buffers. For example, if a string is inserted into the P=
- at
-position 6, the insertion will be propagated to B at position 1.</span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:SimSun'><o:p></o:p></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>There
-are certain restrictions on the source spans that contribute to a
-ProjectionBuffer:<o:p></o:p></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></p>
-
-<ul style=3D'margin-top:0in' type=3Ddisc>
- <li class=3DMsoNormal style=3D'margin-bottom:6.0pt;line-height:normal;mso-=
-list:
- l4 level1 lfo6;tab-stops:list .5in'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-fa=
-mily:
- SimSun'>Source spans may not be overlapping (more precisely, a single
- location in a projection buffer cannot map to more than one location in
- any source buffer, and a single location in a source buffer cannot map=
- to
- more than one location in a projection buffer). <o:p></o:p></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></li>
- <li class=3DMsoNormal style=3D'margin-bottom:6.0pt;line-height:normal;mso-=
-list:
- l4 level1 lfo6;tab-stops:list .5in'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-fa=
-mily:
- SimSun'>In order to more easily prevent overlapping source spans, a so=
-urce
- span may be EdgeInclusive only if it covers an entire TextBuffer.
- EdgeNegative spans may only be used at the beginning of a source buffe=
-r,
- and EdgePositive spans at the end of a source buffer. There is no
- restriction on EdgeExclusive source spans.<o:p></o:p></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></li>
- <li class=3DMsoNormal style=3D'margin-bottom:6.0pt;line-height:normal;mso-=
-list:
- l4 level1 lfo6;tab-stops:list .5in'><span style=3D'mso-bookmark:_Toc15=
-1442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-fa=
-mily:
- SimSun'>No circularities are permitted in the source buffer relationsh=
-ip.<o:p></o:p></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></li>
-</ul>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>In
-addition to garden variety insertion, deletion, and replacement of character
-strings, ProjectionBuffers support insertion, deletion, and replacement of
-source spans. These source span changes cause ordinary text change events t=
-o be
-raised as if the text contained in the spans had itself been inserted, dele=
-ted,
-or replaced. In the example above, if the first source span were deleted, t=
-he
-ProjectionBuffer would raise an event indicating that the characters ABCDE =
-had
-been deleted.<o:p></o:p></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>Read only regions created for a
-ProjectionBuffer apply only at the level of the projection, prohibiting cha=
-nges
-to the affected text through that buffer. They do not prevent the same text
-from being changed in the source buffer. Thus read only regions do not
-guarantee immutability of text unless applied to a non-projection buffer.</=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>Events
-are raised when the set of source buffers for a projection buffer changes a=
-nd
-when the set of source spans changes.<o:p></o:p></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>ProjectionBuffers
-are created using the <b>IProjectionBufferFactory </b>service.<o:p></o:p></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></p>
-
-<h3 style=3D'margin-top:15.0pt;margin-right:0in;margin-bottom:6.0pt;margin-=
-left:
-.5in;text-indent:-.5in;line-height:normal;tab-stops:list .5in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080043"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>Boundary
-Conditions</span></a></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc155080043'></span><span style=3D'mso-bookmark:_To=
-c151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'><o:p></o:p></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></h3>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun'>In
-the example above, if an insertion is made into ProjectionBuffer P at posit=
-ion
-5, the intent could be that the text should be inserted into TextBuffer A at
-position 5, or it could be that it should be inserted into TextBuffer B at
-position 0 (or it could be that the insertion string should be split between
-the two source buffers). To resolve such ambiguities, the creator of the
-ProjectionBuffer may optionally supply an object that implements the <b>IPr=
-ojectionEditResolver</b>
-interface. <o:p></o:p></span></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><i style=3D'mso-bidi-font-style:normal'=
-><span
-style=3D'mso-fareast-font-family:SimSun'>TODO: literal source spans.<o:p></=
-o:p></span></i></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:=
-_Toc153700829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:SimSun'>IProjectionSnapshot and PositionAf=
-finity<o:p></o:p></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><i style=3D'mso-bidi-font-style:normal'=
-><span
-style=3D'mso-fareast-font-family:SimSun'>TODO: point mapping, affinity, span
-mapping<o:p></o:p></span></i></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><b style=3D'mso-bidi-font-weight:normal=
-'><span
-style=3D'mso-fareast-font-family:SimSun'>IProjectionSnapshot </span></b></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-fareast-font-family:SimSun'>is a specialization of ITextSnapsh=
-ot. It
-can be used to examine the source snapshot spans that contribute to a
-particular snapshot of a projection buffer, and also to map positions from =
-the
-projection buffer to its sources and vice versa.<o:p></o:p></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></p>
-
-<h2 style=3D'margin-top:20.0pt;margin-right:0in;margin-bottom:10.0pt;margin=
--left:
-.4in;text-indent:-.4in;page-break-after:avoid;tab-stops:list .4in'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><a
-name=3D"_Toc155080044"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>IBufferGraph</span></a></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc155080044'></span><span style=3D'mso-bookmark:_To=
-c151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-SimSun;
-mso-bidi-font-style:italic'><o:p></o:p></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc151442559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'>The<b> IBufferGraph</b> interface facil=
-itates
-mapping positions across a graph of ProjectionBuffers. The graph is defined=
- by
-the <i>top buffer, </i>which can be any text buffer. If it is a
-ProjectionBuffer, the graph will be nontrivial. IBufferGraph supports mappi=
-ng
-from a point in the top buffer to a point in a particular source buffer, or
-from a span in the top buffer to a set of spans in a particular source buff=
-er.
-Similarly, it can map a point or span from a source buffer to a point in the
-top buffer. Buffer graphs are created using the <b>IBufferGraphFactoryServi=
-ce</b><span
-style=3D'mso-bidi-font-weight:bold'>.</span> </span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></p>
-
-<h2><span style=3D'mso-fareast-font-family:"Times New Roman"'>IMappingPoint=
- and
-IMappingSpan<o:p></o:p></span></h2>
-
-</div>
-
-<div style=3D'mso-element:footnote-list'><![if !supportFootnotes]><br clear=
-=3Dall>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]>
-
-<div style=3D'mso-element:footnote' id=3Dftn1>
-
-<p class=3DMsoFootnoteText><a style=3D'mso-footnote-id:ftn1' href=3D"#_ftnr=
-ef1"
-name=3D"_ftn1" title=3D""><span style=3D'mso-special-character:footnote'><!=
-[if !supportFootnotes]><span
-style=3D'font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Calibri","=
-sans-serif";
-mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New R=
-oman";
-mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA'=
->[1]</span><![endif]></span></a>
-The TextBuffer does not guarantee that its contents are a valid Unicode
-sequence; it expects its clients to create only legal sequences. Text model
-clients should not fail if presented with illegal sequences (for example,
-surrogate characters without an appropriate paired surrogate).</p>
-
-</div>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C91992.81DAA780
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Model.Overview_files/themedata.thmx
-Content-Transfer-Encoding: base64
-Content-Type: application/vnd.ms-officetheme
-
-UEsDBBQABgAIAAAAIQCCirwT+gAAABwCAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKyRy2rDMBBF
-94X+g9C22HK6KKXYzqJJd30s0g8Y5LEtao+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TDBNyWBofUcmDyA5LcczdKN
-vwAAAP//AwBQSwMEFAAGAAgAAAAhAA3RkJ+2AAAAGwEAACcAAAB0aGVtZS90aGVtZS9fcmVscy90
-aGVtZU1hbmFnZXIueG1sLnJlbHOEj00KwjAUhPeCdwhvb9O6EJEm3YjQrdQDhOQ1DTY/JFHs7Q2u
-LAguh2G+mWm7l53JE2My3jFoqhoIOumVcZrBbbjsjkBSFk6J2TtksGCCjm837RVnkUsoTSYkUigu
-MZhyDidKk5zQilT5gK44o49W5CKjpkHIu9BI93V9oPGbAXzFJL1iEHvVABmWUJr/s/04GolnLx8W
-Xf5RQXPZhQUoosbM4CObqkwEylu6usTfAAAA//8DAFBLAQItABQABgAIAAAAIQCCirwT+gAAABwC
-AAATAAAAAAAAAAAAAAAAAAAAAABbQ29udGVudF9UeXBlc10ueG1sUEsBAi0AFAAGAAgAAAAhAKXW
-p+fAAAAANgEAAAsAAAAAAAAAAAAAAAAAKwEAAF9yZWxzLy5yZWxzUEsBAi0AFAAGAAgAAAAhAGt5
-lhaDAAAAigAAABwAAAAAAAAAAAAAAAAAFAIAAHRoZW1lL3RoZW1lL3RoZW1lTWFuYWdlci54bWxQ
-SwECLQAUAAYACAAAACEAlrWt4pYGAABQGwAAFgAAAAAAAAAAAAAAAADRAgAAdGhlbWUvdGhlbWUv
-dGhlbWUxLnhtbFBLAQItABQABgAIAAAAIQAN0ZCftgAAABsBAAAnAAAAAAAAAAAAAAAAAJsJAAB0
-aGVtZS90aGVtZS9fcmVscy90aGVtZU1hbmFnZXIueG1sLnJlbHNQSwUGAAAAAAUABQBdAQAAlgoA
-AAAA
-
-------=_NextPart_01C91992.81DAA780
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Model.Overview_files/colorschememapping.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml
-
-<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?>
-<a:clrMap xmlns:a=3D"http://schemas.openxmlformats.org/drawingml/2006/main"=
- bg1=3D"lt1" tx1=3D"dk1" bg2=3D"lt2" tx2=3D"dk2" accent1=3D"accent1" accent=
-2=3D"accent2" accent3=3D"accent3" accent4=3D"accent4" accent5=3D"accent5" a=
-ccent6=3D"accent6" hlink=3D"hlink" folHlink=3D"folHlink"/>
-------=_NextPart_01C91992.81DAA780
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Model.Overview_files/header.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link id=3DMain-File rel=3DMain-File
-href=3D"../Microsoft.VisualStudio.Text.Model.Overview.htm">
-<![if IE]>
-<base
-href=3D"file:///C:\515CB117\Microsoft.VisualStudio.Text.Model.Overview_file=
-s\header.htm"
-id=3D"webarch_temp_base_tag">
-<![endif]>
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
-
-<div style=3D'mso-element:footnote-separator' id=3Dfs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:footnote-continuation-separator' id=3Dfcs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-separator' id=3Des>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-continuation-separator' id=3Decs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C91992.81DAA780
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Model.Overview_files/filelist.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml; charset="utf-8"
-
-<xml xmlns:o=3D"urn:schemas-microsoft-com:office:office">
- <o:MainFile HRef=3D"../Microsoft.VisualStudio.Text.Model.Overview.htm"/>
- <o:File HRef=3D"themedata.thmx"/>
- <o:File HRef=3D"colorschememapping.xml"/>
- <o:File HRef=3D"header.htm"/>
- <o:File HRef=3D"filelist.xml"/>
-</xml>
-------=_NextPart_01C91992.81DAA780--
diff --git a/src/Editor/Text/Def/TextData/Model/TextSnapshotExtensions.cs b/src/Editor/Text/Def/TextData/Model/TextSnapshotExtensions.cs
new file mode 100644
index 0000000..ac99230
--- /dev/null
+++ b/src/Editor/Text/Def/TextData/Model/TextSnapshotExtensions.cs
@@ -0,0 +1,81 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+
+namespace Microsoft.VisualStudio.Text
+{
+ public static class ITextSnapshotExtensions
+ {
+ public static NormalizedSnapshotSpanCollection ToNormalizedSnapshotSpanCollection(this SnapshotSpan snapshotSpan)
+ {
+ return new NormalizedSnapshotSpanCollection(snapshotSpan);
+ }
+
+ public static bool IsMultiline(this SnapshotSpan snapshotSpan)
+ {
+ return snapshotSpan.Snapshot.GetLineNumberFromPosition(snapshotSpan.Start.Position) !=
+ snapshotSpan.Snapshot.GetLineNumberFromPosition(snapshotSpan.End.Position);
+ }
+
+ public static SnapshotSpan GetEntireSpan(this ITextSnapshot textSnapshot)
+ {
+ return new SnapshotSpan(textSnapshot, 0, textSnapshot.Length);
+ }
+
+ public static SnapshotPoint? TryGetSnapshotPoint(this ITextSnapshot snapshot, int lineNumber, int columnIndex)
+ {
+ if (TryGetSnapshotPoint(snapshot, lineNumber, columnIndex, out var snapshotPoint))
+ {
+ return snapshotPoint;
+ }
+
+ return null;
+ }
+
+ public static bool TryGetSnapshotPoint(this ITextSnapshot snapshot, int lineNumber, int columnIndex, out SnapshotPoint position)
+ {
+ position = new SnapshotPoint();
+
+ if (lineNumber < 0 || lineNumber >= snapshot.LineCount)
+ {
+ return false;
+ }
+
+ var line = snapshot.GetLineFromLineNumber(lineNumber);
+ if (columnIndex < 0 || columnIndex >= line.LengthIncludingLineBreak)
+ {
+ return false;
+ }
+
+ int result = line.Start.Position + columnIndex;
+ position = new SnapshotPoint(snapshot, result);
+ return true;
+ }
+
+ public static void GetLineAndColumn(this SnapshotPoint point, out int lineNumber, out int columnIndex)
+ {
+ point.Snapshot.GetLineAndColumn(point.Position, out lineNumber, out columnIndex);
+ }
+
+ public static (int line, int column) GetLineAndColumn(this SnapshotPoint point)
+ {
+ GetLineAndColumn(point, out int line, out int column);
+ return (line, column);
+ }
+
+ public static (int line, int column) GetLineAndColumn1Based(this SnapshotPoint point)
+ {
+ var (line, column) = GetLineAndColumn(point);
+ return (line + 1, column + 1);
+ }
+
+ public static void GetLineAndColumn(this ITextSnapshot snapshot, int position, out int lineNumber, out int columnIndex)
+ {
+ var line = snapshot.GetLineFromPosition(position);
+
+ lineNumber = line.LineNumber;
+ columnIndex = position - line.Start.Position;
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextData/TextData.csproj b/src/Editor/Text/Def/TextData/TextData.csproj
index e4a64d4..8379d57 100644
--- a/src/Editor/Text/Def/TextData/TextData.csproj
+++ b/src/Editor/Text/Def/TextData/TextData.csproj
@@ -2,11 +2,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.VisualStudio.Text.Data</AssemblyName>
- <TargetFramework>net46</TargetFramework>
<RootNamespace>Microsoft.VisualStudio.Text</RootNamespace>
<PushToPublicFeed>true</PushToPublicFeed>
<NoWarn>649;436;$(NoWarn)</NoWarn>
<AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/src/Editor/Text/Def/TextLogic/AssemblyInfo.cs b/src/Editor/Text/Def/TextLogic/AssemblyInfo.cs
index 40ffec5..6b99226 100644
--- a/src/Editor/Text/Def/TextLogic/AssemblyInfo.cs
+++ b/src/Editor/Text/Def/TextLogic/AssemblyInfo.cs
@@ -3,6 +3,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
//
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.Versioning;
using System.Security.Permissions;
@@ -22,3 +23,7 @@ using System.Security.Permissions;
[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
#pragma warning restore 618
[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Commanding.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Platform.VSEditor, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Editor.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
diff --git a/src/Editor/Text/Def/TextLogic/Classification/Microsoft.VisualStudio.Text.Classification.Overview.mht b/src/Editor/Text/Def/TextLogic/Classification/Microsoft.VisualStudio.Text.Classification.Overview.mht
deleted file mode 100644
index 3bbdf22..0000000
--- a/src/Editor/Text/Def/TextLogic/Classification/Microsoft.VisualStudio.Text.Classification.Overview.mht
+++ /dev/null
@@ -1,3155 +0,0 @@
-MIME-Version: 1.0
-Content-Type: multipart/related; boundary="----=_NextPart_01C89573.42B3B3B0"
-
-This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Windows® Internet Explorer®.
-
-------=_NextPart_01C89573.42B3B3B0
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Classification.Overview.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link rel=3DFile-List
-href=3D"Microsoft.VisualStudio.Text.Classification.Overview_files/filelist.=
-xml">
-<title>Classification Subsystem</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Subject>VisualStudio Shell</o:Subject>
- <o:Author>Vijaye Raji</o:Author>
- <o:Template>VisualStudio SDK Overview.dot</o:Template>
- <o:LastAuthor>Jack Tilford</o:LastAuthor>
- <o:Revision>8</o:Revision>
- <o:TotalTime>100</o:TotalTime>
- <o:LastPrinted>2005-05-26T01:48:00Z</o:LastPrinted>
- <o:Created>2007-01-05T22:45:00Z</o:Created>
- <o:LastSaved>2008-04-03T17:12:00Z</o:LastSaved>
- <o:Pages>1</o:Pages>
- <o:Words>770</o:Words>
- <o:Characters>4394</o:Characters>
- <o:Company>Microsoft Corporation</o:Company>
- <o:Lines>36</o:Lines>
- <o:Paragraphs>10</o:Paragraphs>
- <o:CharactersWithSpaces>5154</o:CharactersWithSpaces>
- <o:Version>12.00</o:Version>
- </o:DocumentProperties>
-</xml><![endif]-->
-<link rel=3DthemeData
-href=3D"Microsoft.VisualStudio.Text.Classification.Overview_files/themedata=
-.thmx">
-<link rel=3DcolorSchemeMapping
-href=3D"Microsoft.VisualStudio.Text.Classification.Overview_files/colorsche=
-memapping.xml">
-<!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:Zoom>110</w:Zoom>
- <w:TrackMoves>false</w:TrackMoves>
- <w:TrackFormatting/>
- <w:PunctuationKerning/>
- <w:ValidateAgainstSchemas/>
- <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
- <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
- <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
- <w:DoNotPromoteQF/>
- <w:LidThemeOther>EN-US</w:LidThemeOther>
- <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
- <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
- <w:Compatibility>
- <w:BreakWrappedTables/>
- <w:SnapToGridInCell/>
- <w:WrapTextWithPunct/>
- <w:UseAsianBreakRules/>
- <w:DontGrowAutofit/>
- <w:SplitPgBreakAndParaMark/>
- <w:DontVertAlignCellWithSp/>
- <w:DontBreakConstrainedForcedTables/>
- <w:DontVertAlignInTxbx/>
- <w:Word11KerningPairs/>
- <w:CachedColBalance/>
- </w:Compatibility>
- <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
- <m:mathPr>
- <m:mathFont m:val=3D"Cambria Math"/>
- <m:brkBin m:val=3D"before"/>
- <m:brkBinSub m:val=3D"&#45;-"/>
- <m:smallFrac m:val=3D"off"/>
- <m:dispDef/>
- <m:lMargin m:val=3D"0"/>
- <m:rMargin m:val=3D"0"/>
- <m:defJc m:val=3D"centerGroup"/>
- <m:wrapIndent m:val=3D"1440"/>
- <m:intLim m:val=3D"subSup"/>
- <m:naryLim m:val=3D"undOvr"/>
- </m:mathPr></w:WordDocument>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:LatentStyles DefLockedState=3D"false" DefUnhideWhenUsed=3D"false"
- DefSemiHidden=3D"false" DefQFormat=3D"false" DefPriority=3D"1"
- LatentStyleCount=3D"267">
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-Normal"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 9"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"footnote text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-caption"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"footnote referenc=
-e"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation refere=
-nce"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Title"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Subtitle"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Hyperlink"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-Strong"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"HTML Top of Form"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"HTML Bottom of Fo=
-rm"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Normal (Web)"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Normal Table"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation subjec=
-t"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" Name=3D"No List"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 1"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 2"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 3"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Contemporar=
-y"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Elegant"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Professiona=
-l"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Subtle 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Subtle 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Balloon Text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Theme"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true"
- Name=3D"Placeholder Text"/>
- <w:LsdException Locked=3D"false" Priority=3D"2" QFormat=3D"true" Name=3D"=
-No Spacing"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true" Name=
-=3D"Revision"/>
- <w:LsdException Locked=3D"false" Priority=3D"34" QFormat=3D"true"
- Name=3D"List Paragraph"/>
- <w:LsdException Locked=3D"false" Priority=3D"29" QFormat=3D"true" Name=3D=
-"Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"30" QFormat=3D"true"
- Name=3D"Intense Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"19" QFormat=3D"true"
- Name=3D"Subtle Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"21" QFormat=3D"true"
- Name=3D"Intense Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"31" QFormat=3D"true"
- Name=3D"Subtle Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"32" QFormat=3D"true"
- Name=3D"Intense Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"33" QFormat=3D"true" Name=3D=
-"Book Title"/>
- <w:LsdException Locked=3D"false" Priority=3D"37" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" Name=3D"Bibliography"/>
- <w:LsdException Locked=3D"false" Priority=3D"39" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"TOC Heading"/>
- </w:LatentStyles>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
- @font-face
- {font-family:PMingLiU;
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-alt:\65B0\7D30\660E\9AD4;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
-@font-face
- {font-family:"Cambria Math";
- panose-1:2 4 5 3 5 4 6 3 2 4;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Calibri;
- panose-1:2 15 5 2 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-1610611985 1073750139 0 0 159 0;}
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-520082689 -1073717157 41 0 66047 0;}
-@font-face
- {font-family:Verdana;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-1593833729 1073750107 16 0 415 0;}
-@font-face
- {font-family:"Lucida Console";
- panose-1:2 11 6 9 4 5 4 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-2147482993 6144 0 0 31 0;}
-@font-face
- {font-family:"Trebuchet MS";
- panose-1:2 11 6 3 2 2 2 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:647 0 0 0 159 0;}
-@font-face
- {font-family:Consolas;
- panose-1:2 11 6 9 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-1610611985 1073750091 0 0 159 0;}
-@font-face
- {font-family:"\@PMingLiU";
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
-@font-face
- {font-family:Georgia;
- panose-1:2 4 5 2 5 4 5 2 3 3;
- mso-font-charset:0;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:647 0 0 0 159 0;}
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-h1
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 1 Char";
- mso-style-next:Normal;
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- font-weight:normal;
- mso-bidi-font-weight:bold;}
-h2
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-style-link:"Heading 2 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:14.0pt;
- font-family:"Trebuchet MS","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#5F5F5F;
- letter-spacing:2.0pt;}
-h3
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"Heading 4";
- mso-style-link:"Heading 3 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:3;
- font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- color:#FF6600;
- font-weight:normal;
- mso-bidi-font-weight:bold;}
-h4
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 4 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:4;
- font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:"Times New Roman";
- color:olive;}
-p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
- {mso-style-unhide:no;
- mso-style-link:"Footnote Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Comment Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoHeader, li.MsoHeader, div.MsoHeader
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-link:"Header Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoFooter, li.MsoFooter, div.MsoFooter
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-link:"Footer Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCaption, li.MsoCaption, div.MsoCaption
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-span.MsoFootnoteReference
- {mso-style-unhide:no;
- vertical-align:super;}
-span.MsoCommentReference
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;}
-p.MsoListBullet, li.MsoListBullet, div.MsoListBullet
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpFirst, li.MsoListBulletCxSpFirst, div.MsoListBulletCxSpF=
-irst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpMiddle, li.MsoListBulletCxSpMiddle, div.MsoListBulletCxS=
-pMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpLast, li.MsoListBulletCxSpLast, div.MsoListBulletCxSpLast
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2, li.MsoListBullet2, div.MsoListBullet2
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpFirst, li.MsoListBullet2CxSpFirst, div.MsoListBullet2Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpMiddle, li.MsoListBullet2CxSpMiddle, div.MsoListBullet2=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpLast, li.MsoListBullet2CxSpLast, div.MsoListBullet2CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3, li.MsoListBullet3, div.MsoListBullet3
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpFirst, li.MsoListBullet3CxSpFirst, div.MsoListBullet3Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpMiddle, li.MsoListBullet3CxSpMiddle, div.MsoListBullet3=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpLast, li.MsoListBullet3CxSpLast, div.MsoListBullet3CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2, li.MsoListNumber2, div.MsoListNumber2
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpFirst, li.MsoListNumber2CxSpFirst, div.MsoListNumber2Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpMiddle, li.MsoListNumber2CxSpMiddle, div.MsoListNumber2=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpLast, li.MsoListNumber2CxSpLast, div.MsoListNumber2CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-a:link, span.MsoHyperlink
- {mso-style-unhide:no;
- color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {mso-style-priority:1;
- mso-style-unhide:no;
- color:purple;
- mso-themecolor:followedhyperlink;
- text-decoration:underline;
- text-underline:single;}
-p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-parent:"Comment Text";
- mso-style-link:"Comment Subject Char";
- mso-style-next:"Comment Text";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Balloon Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";}
-p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParag=
-raphCxSpFirst
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListPar=
-agraphCxSpMiddle
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagra=
-phCxSpLast
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoQuote, li.MsoQuote, div.MsoQuote
- {mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Quote Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:black;
- font-style:italic;}
-span.Heading1Char
- {mso-style-name:"Heading 1 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 1";
- mso-ansi-font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-span.Heading2Char
- {mso-style-name:"Heading 2 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 2";
- mso-ansi-font-size:13.0pt;
- mso-bidi-font-size:13.0pt;
- font-family:"Cambria","serif";
- mso-ascii-font-family:Cambria;
- mso-ascii-theme-font:major-latin;
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:major-fareast;
- mso-hansi-font-family:Cambria;
- mso-hansi-theme-font:major-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:major-bidi;
- color:#4F81BD;
- mso-themecolor:accent1;
- font-weight:bold;}
-span.Heading4Char
- {mso-style-name:"Heading 4 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 4";
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:olive;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- font-weight:bold;}
-span.Heading3Char
- {mso-style-name:"Heading 3 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 3";
- mso-ansi-font-size:14.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:#FF6600;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- mso-bidi-font-weight:bold;}
-span.FootnoteTextChar
- {mso-style-name:"Footnote Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Footnote Text";
- mso-ansi-font-size:11.0pt;}
-span.CommentTextChar
- {mso-style-name:"Comment Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Comment Text";}
-span.HeaderChar
- {mso-style-name:"Header Char";
- mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Header;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.FooterChar
- {mso-style-name:"Footer Char";
- mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Footer;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.CommentSubjectChar
- {mso-style-name:"Comment Subject Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-parent:"Comment Text Char";
- mso-style-link:"Comment Subject";
- font-weight:bold;}
-span.BalloonTextChar
- {mso-style-name:"Balloon Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Balloon Text";
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;}
-span.QuoteChar
- {mso-style-name:"Quote Char";
- mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Quote;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- color:black;
- font-style:italic;}
-p.Heading0, li.Heading0, div.Heading0
- {mso-style-name:"Heading 0";
- mso-style-unhide:no;
- mso-style-parent:"Heading 1";
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:28.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:Arial;
- color:#006699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-p.SubHeading, li.SubHeading, div.SubHeading
- {mso-style-name:SubHeading;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:maroon;
- font-weight:bold;
- mso-bidi-font-weight:normal;}
-span.CodeCharChar
- {mso-style-name:"Code Char Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Code;
- mso-ansi-font-size:9.0pt;
- mso-bidi-font-size:9.0pt;
- font-family:"Lucida Console";
- mso-ascii-font-family:"Lucida Console";
- mso-hansi-font-family:"Lucida Console";
- mso-no-proof:yes;}
-p.Code, li.Code, div.Code
- {mso-style-name:Code;
- mso-style-unhide:no;
- mso-style-link:"Code Char Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:3.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-layout-grid-align:none;
- text-autospace:none;
- font-size:9.0pt;
- font-family:"Lucida Console";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-span.NoteChar
- {mso-style-name:"Note Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Note;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- background:#F3F3F3;
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Note, li.Note, div.Note
- {mso-style-name:Note;
- mso-style-unhide:no;
- mso-style-link:"Note Char";
- margin-top:0in;
- margin-right:.2in;
- margin-bottom:12.0pt;
- margin-left:.2in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- background:#F3F3F3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Style2, li.Style2, div.Style2
- {mso-style-name:Style2;
- mso-style-unhide:no;
- mso-style-parent:"";
- mso-style-next:Normal;
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- background:#F9FFF3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-p.Style3, li.Style3, div.Style3
- {mso-style-name:Style3;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- background:#F5FAF4;
- mso-layout-grid-align:none;
- text-autospace:none;
- border:none;
- mso-border-alt:solid windowtext 1.0pt;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- mso-border-shadow:yes;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:PMingLiU;
- mso-bidi-font-family:"Times New Roman";
- mso-fareast-language:ZH-CN;
- mso-no-proof:yes;}
-span.DescriptionTextChar
- {mso-style-name:"Description Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Description Text";}
-p.DescriptionText, li.DescriptionText, div.DescriptionText
- {mso-style-name:"Description Text";
- mso-style-unhide:no;
- mso-style-link:"Description Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.25in;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.Issue, li.Issue, div.Issue
- {mso-style-name:Issue;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan lines-together;
- border:none;
- mso-border-alt:solid navy 1.5pt;
- padding:0in;
- mso-padding-alt:1.0pt 1.0pt 1.0pt 1.0pt;
- mso-border-shadow:yes;
- font-size:10.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";
- color:red;
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.msolistparagraph0, li.msolistparagraph0, div.msolistparagraph0
- {mso-style-name:msolistparagraph;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-p.msolistparagraph0CxSpFirst, li.msolistparagraph0CxSpFirst, div.msolistpar=
-agraph0CxSpFirst
- {mso-style-name:msolistparagraphCxSpFirst;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-p.msolistparagraph0CxSpMiddle, li.msolistparagraph0CxSpMiddle, div.msolistp=
-aragraph0CxSpMiddle
- {mso-style-name:msolistparagraphCxSpMiddle;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-p.msolistparagraph0CxSpLast, li.msolistparagraph0CxSpLast, div.msolistparag=
-raph0CxSpLast
- {mso-style-name:msolistparagraphCxSpLast;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-.MsoChpDefault
- {mso-style-type:export-only;
- mso-default-props:yes;
- font-size:10.0pt;
- mso-ansi-font-size:10.0pt;
- mso-bidi-font-size:10.0pt;
- mso-ascii-font-family:Calibri;
- mso-hansi-font-family:Calibri;}
- /* Page Definitions */
- @page
- {mso-footnote-separator:url("Microsoft.VisualStudio.Text.Classification.Ov=
-erview_files/header.htm") fs;
- mso-footnote-continuation-separator:url("Microsoft.VisualStudio.Text.Class=
-ification.Overview_files/header.htm") fcs;
- mso-endnote-separator:url("Microsoft.VisualStudio.Text.Classification.Over=
-view_files/header.htm") es;
- mso-endnote-continuation-separator:url("Microsoft.VisualStudio.Text.Classi=
-fication.Overview_files/header.htm") ecs;}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
- @list l0
- {mso-list-id:-129;
- mso-list-type:simple;
- mso-list-template-ids:-1739002844;}
-@list l0:level1
- {mso-level-style-link:"List Number 2";
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l1
- {mso-list-id:-126;
- mso-list-type:simple;
- mso-list-template-ids:-1045901690;}
-@list l1:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 3";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.75in;
- mso-level-number-position:left;
- margin-left:.75in;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l2
- {mso-list-id:-125;
- mso-list-type:simple;
- mso-list-template-ids:-1069260336;}
-@list l2:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 2";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l3
- {mso-list-id:-119;
- mso-list-type:simple;
- mso-list-template-ids:1390696726;}
-@list l3:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.25in;
- mso-level-number-position:left;
- margin-left:.25in;
- text-indent:-.25in;
- font-family:Symbol;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-priority:99;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-table.MsoTableGrid
- {mso-style-name:"Table Grid";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-unhide:no;
- border:solid windowtext 1.0pt;
- mso-border-alt:solid windowtext .5pt;
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-border-insideh:.5pt solid windowtext;
- mso-border-insidev:.5pt solid windowtext;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-</style>
-<![endif]--><!--[if gte mso 9]><xml>
- <o:shapedefaults v:ext=3D"edit" spidmax=3D"8194"/>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <o:shapelayout v:ext=3D"edit">
- <o:idmap v:ext=3D"edit" data=3D"1"/>
- </o:shapelayout></xml><![endif]-->
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple style=3D'tab-interval:.5in'>
-
-<div class=3DSection1>
-
-<p class=3DHeading0>Classification Subsystem</p>
-
-<div style=3D'mso-element:para-border-div;border:none;border-bottom:solid w=
-indowtext 1.0pt;
-mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in'>
-
-<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:solid windo=
-wtext .75pt;
-padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><o:p>&nbsp;</o:p></p>
-
-</div>
-
-<h1><a name=3D"_Toc155080032"></a><a name=3D"_Toc151442559"></a><a
-name=3D"_Toc153700829"></a><a name=3D"_Toc151886043"></a><a name=3D"_Toc151=
-886240"></a><a
-name=3D"_Toc151892155"></a><a name=3D"_Toc153684427"></a><a name=3D"_Toc151=
-974258"></a><a
-name=3D"_Toc151873650"></a><a name=3D"_Toc151873508"></a><a name=3D"_Toc149=
-118641"></a><a
-name=3D"_Toc149118380"></a><a name=3D"_Toc149118215"></a><a name=3D"_Toc149=
-118079"></a><a
-name=3D"_Toc151973942"></a><a name=3D"_Toc151974416"></a><a name=3D"_Toc769=
-78452"></a><a
-name=3D"_Toc149120311"><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Overview</span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></a><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>This
-document provides a conceptual overview of the <i style=3D'mso-bidi-font-st=
-yle:
-normal'>Classification Subsystem</i>.<span style=3D'mso-spacerun:yes'>&nbsp;
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>The
-Classification Subsystem is composed of two separate areas that are describ=
-ed
-in greater detail below:</span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoListBullet2CxSpFirst><span style=3D'mso-bookmark:_Toc76978452=
-'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'><![if !supportLists]><span
-style=3D'font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-fa=
-mily:
-Symbol'><span style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "=
-Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Text Classification</span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></p>
-
-<p class=3DMsoListBullet2CxSpLast><span style=3D'mso-bookmark:_Toc76978452'=
-><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'><![if !supportLists]><span
-style=3D'font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-fa=
-mily:
-Symbol'><span style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "=
-Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Text Formatting</span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_=
-Toc151974416'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><a name=3D"_Toc149120312"><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Text Classification</sp=
-an></a></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>The
-Classification subsystem provides abstractions, extensions, and services to
-partition text into equivalence classes of different types in a light weight
-and efficient manner.<span style=3D'mso-spacerun:yes'>&nbsp; </span>Other
-components can consume these equivalence classes and use them to do meaning=
-ful
-work. </span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>The
-<i>Text Classification </i>area of the Classification Subsystem is concerned
-with the actual process of splitting the text into different equivalence
-classes, determining the different valid types, and aggregating the
-contributions from all clients that contribute classifications.</span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_=
-Toc151974416'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><a name=3D"_Toc149120313"><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Classification types</s=
-pan></a></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>A <i>classification</i>
-<i>type </i>is defined as an equivalence class, which is an abstract catego=
-ry
-of text.<span style=3D'mso-spacerun:yes'>&nbsp; </span>These types can mult=
-iply
-inherit from other classification types.<span style=3D'mso-spacerun:yes'>&n=
-bsp;
-</span>Examples of classifications in an IDE might be &#8220;keyword&#8221;,
-&#8220;comment&#8221;, and &#8220;identifier&#8221; all inheriting from
-&#8220;code&#8221;.<span style=3D'mso-spacerun:yes'>&nbsp; </span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>Examples
-of classifications in a word processor might be &#8220;noun&#8221;,
-&#8220;verb&#8221;, and &#8220;adjective&#8221; all inheriting from
-&#8220;natural </span></span></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-ascii-font-family:C=
-alibri;
-mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;mso-hansi-th=
-eme-font:
-minor-latin'>language&#8221;.<span style=3D'mso-spacerun:yes'>&nbsp; </span=
->The </span><strong><span
-style=3D'font-family:"Calibri","sans-serif"'>IClassificationType</span></st=
-rong></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-ascii-font-family:C=
-alibri;
-mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;mso-hansi-th=
-eme-font:
-minor-latin'> is the</span> type used to represent classification types.<sp=
-an
-style=3D'mso-spacerun:yes'>&nbsp; </span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>Clients
-need to define new classification types if the existing types existing in t=
-he
-system don&#8217;t meet their needs.</span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_=
-Toc151974416'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><a name=3D"_Toc149120314"><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Classifications</span><=
-/a></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>A <i>classification</i>
-is defined as an instance of a particular classification type, typically ov=
-er a
-span of text.<span style=3D'mso-spacerun:yes'>&nbsp; </span><strong><span
-style=3D'font-family:"Calibri","sans-serif"'>ClassificationSpan</span></str=
-ong></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-ascii-font-family:C=
-alibri;
-mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;mso-hansi-th=
-eme-font:
-minor-latin'> is used to represent a classification.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span><b style=3D'mso-bidi-font-weight:n=
-ormal'>ClassificationSpan</b>
-can be thought</span> of as a label over a particular span of text that tel=
-ls
-the system that this span of text is of a particular classification type.<s=
-pan
-style=3D'mso-spacerun:yes'>&nbsp; </span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>Examples
-of classifications in a C# file could be &#8220;for&#8221;,
-&#8220;while&#8221;, &#8220;return&#8221; (all keywords).<span
-style=3D'mso-spacerun:yes'>&nbsp; </span>Examples of classifications in a W=
-ord
-document could be &#8220;run&#8221;, &#8220;eat&#8221;, &#8220;sat&#8221; (=
-all
-verbs).<span style=3D'mso-spacerun:yes'>&nbsp; </span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>Clients
-need to </span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-ascii-font-family:C=
-alibri;
-mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;mso-hansi-th=
-eme-font:
-minor-latin'>instantiate </span><strong><span style=3D'font-family:"Calibri=
-","sans-serif"'>ClassificationSpans</span></strong></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-ascii-font-family:C=
-alibri;
-mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;mso-hansi-th=
-eme-font:
-minor-latin'>, which</span> are the physical manifestation of a classificat=
-ion
-type, if they define a classifier.</span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></p>
-
-<h2><span style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_=
-Toc151974416'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><a name=3D"_Toc149120315"><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Classifiers</span></a><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>A <i>classifier</i>
-is defined as a mechanism that breaks text up into a set of
-classifications.<span style=3D'mso-spacerun:yes'>&nbsp; </span>Classifiers =
-must
-be defined per content type and instantiated per text buffer (see the Text
-Model subsystem overview).<span style=3D'mso-spacerun:yes'>&nbsp; </span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>For
-example a C# classifier could produce classifications that label all keywor=
-ds
-and comments in a C# file.<span style=3D'mso-spacerun:yes'>&nbsp; </span>An
-English language classifier could take a document and produce classificatio=
-ns
-that label all nouns, verbs and adjectives in a document.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>Clients
-need to </span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-ascii-font-family:C=
-alibri;
-mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;mso-hansi-th=
-eme-font:
-minor-latin'>implement </span><strong><span style=3D'font-family:"Calibri",=
-"sans-serif"'>IClassifier</span></strong></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-ascii-font-family:C=
-alibri;
-mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;mso-hansi-th=
-eme-font:
-minor-latin'> to take part in tex</span>t classification.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_=
-Toc151974416'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><a name=3D"_Toc149120316"><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Classifier aggregators<=
-/span></a></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>A <i>classifier
-aggregator</i> is defined as a mechanism to combine all classifier contribu=
-tions
-for a single text buffer into a single set of classifications.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span>Since more than one classifier may=
- label
-a span of text, the aggregator is needed to combine the contributions.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>For
-example, both a C# classifier and an English language classifier could crea=
-te
-classifications over a comment in a C# file.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span>If the comment was &#8220;</span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'font-family:Consolas;
-color:green'>// This method produces a classifier.</span>&#8221; a C#
-classifier might label the entire span as a comment and the English language
-classifier might classify &#8220;produces&#8221; as a &#8220;verb&#8221; an=
-d &#8220;method&#8221;
-as a &#8220;noun&#8221; the aggregator would produce a set of non-overlappi=
-ng
-classifications whose type is based on all of the contributions.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span>The classifications over the examp=
-le
-comment would look like:</span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></p>
-
-<div style=3D'mso-element:para-border-div;border:solid windowtext 1.0pt;
-mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
-background:#E5E5E5;mso-shading:windowtext;mso-pattern:gray-10 auto'>
-
-<p class=3DMsoNormal style=3D'background:#E5E5E5;mso-shading:windowtext;mso=
--pattern:
-gray-10 auto;border:none;mso-border-alt:solid windowtext .5pt;padding:0in;
-mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span style=3D'mso-bookmark:_Toc76=
-978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'font-family:Consolas;color:green'>//</span><sup>{comment}</sup></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'font-family:Consolas;
-color:green'> This</span><sup>{comment, pronoun}</sup></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'font-family:Consolas;
-color:green'> method</span><sup>{comment, noun}</sup></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'font-family:Consolas;
-color:green'> produces</span><sup>{comment, verb}</sup></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'font-family:Consolas;
-color:green'> a</span><sup>{comment, indefinite article}</sup></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'font-family:Consolas;
-color:green'> classifier</span><sup>{comment, noun}</sup></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'font-family:Consolas;
-color:green'>.</span><sup>{comment, punctuation}</sup></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'font-family:Consolas;
-color:green'><o:p></o:p></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</p>
-
-</div>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>A
-classifier aggregator is also a classifier since it breaks up text into a s=
-et
-of classifications.<span style=3D'mso-spacerun:yes'>&nbsp; </span>The class=
-ifier
-aggregator is also responsible for ensuring that there are no overlapping
-classifications and that the classifications are sorted.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span>Individual classifiers are free to
-return any set of classifications in any order and overlapping in any way.<=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>Clients
-do not need to implement a classifier aggregator because an implementation =
-of<b
-style=3D'mso-bidi-font-weight:normal'> IClassifierAggregatorService</b> exi=
-sts in
-the Classification subsystem.</span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-p>
-
-<h1><span style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_=
-Toc151974416'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><a name=3D"_Toc149120317"><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Classification formatti=
-ng and
-text coloring</span></a></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>The
-<i style=3D'mso-bidi-font-style:normal'>Text Formatting</i> area is one exa=
-mple
-of a system built on top of text classification.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span>Since it is so central to applicat=
-ion
-development, it is included in the Classification subsystem.<span
-style=3D'mso-spacerun:yes'>&nbsp; </span>The classification formatting area=
- is
-what is used by the Text View subsystem to determine the display of text in=
- an
-application.<span style=3D'mso-spacerun:yes'>&nbsp; </span>The Text Formatt=
-ing
-area is dependent on WPF, but no other piece of classification is.</span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_=
-Toc151974416'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><a name=3D"_Toc149120318"><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Classification formats<=
-/span></a></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>A
-classification format is defined as a set of formatting properties over a
-specific classification type.<span style=3D'mso-spacerun:yes'>&nbsp; </span=
->These
-formats inherit from format of the classification type&#8217;s parent.</spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_=
-Toc151974416'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><a name=3D"_Toc149120319"><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Classification format m=
-ap</span></a></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1519744=
-16'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-fareast-font-family=
-:"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>A <i>classification
-format map</i> is defined as a map from a classification type to a set of t=
-ext
-formatting properties (see Text View subsystem overview).<span
-style=3D'mso-spacerun:yes'>&nbsp; </span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'>An
-implementation of the format map is provided which takes care of handling a=
-ll
-of the productions of classification formats and determining a static map.<=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc76978452'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc155080=
-032'><a
-name=3D"_ClassificationSpan"></a><a name=3D"_ClassificationTypeAttribute"><=
-/a><a
-name=3D"_IClassificationType"></a><a name=3D"_IDocument"></a><a
-name=3D"_IClassificationTypeRegistry"></a><a name=3D"_IClassifier"></a><a
-name=3D"_IClassificationFormatMap"></a><a name=3D"_IClassificationFormatMap=
-Selector"></a><a
-name=3D"_IClassificationFormatMapMerger"></a><span style=3D'font-family:"Ge=
-orgia","serif"'><o:p>&nbsp;</o:p></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></p>
-
-<span style=3D'mso-bookmark:_Toc155080032'></span><span style=3D'mso-bookma=
-rk:_Toc151442559'></span><span
-style=3D'mso-bookmark:_Toc153700829'></span><span style=3D'mso-bookmark:_To=
-c151886043'></span><span
-style=3D'mso-bookmark:_Toc151886240'></span><span style=3D'mso-bookmark:_To=
-c151892155'></span><span
-style=3D'mso-bookmark:_Toc153684427'></span><span style=3D'mso-bookmark:_To=
-c151974258'></span><span
-style=3D'mso-bookmark:_Toc151873650'></span><span style=3D'mso-bookmark:_To=
-c151873508'></span><span
-style=3D'mso-bookmark:_Toc149118641'></span><span style=3D'mso-bookmark:_To=
-c149118380'></span><span
-style=3D'mso-bookmark:_Toc149118215'></span><span style=3D'mso-bookmark:_To=
-c149118079'></span><span
-style=3D'mso-bookmark:_Toc151973942'></span><span style=3D'mso-bookmark:_To=
-c151974416'></span><span
-style=3D'mso-bookmark:_Toc76978452'></span>
-
-<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C89573.42B3B3B0
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Classification.Overview_files/themedata.thmx
-Content-Transfer-Encoding: base64
-Content-Type: application/vnd.ms-officetheme
-
-UEsDBBQABgAIAAAAIQCCirwT+gAAABwCAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKyRy2rDMBBF
-94X+g9C22HK6KKXYzqJJd30s0g8Y5LEtao+ENAnJ33fsuFC6CC10IxBizpl7Va6P46AOGJPzVOlV
-XmiFZH3jqKv0++4pu9cqMVADgyes9AmTXtfXV+XuFDApmaZU6Z45PBiTbI8jpNwHJHlpfRyB5Ro7
-E8B+QIfmtijujPXESJzxxNB1+SoLRNegeoPILzCKx7Cg8Pv5DCSAmAtYq8czYVqi0hDC4CywRDAH
-an7oM9+2zmLj7X4UaT6DF9jNBDO/XGD1P+ov5wZb2A+stkfp4lx/xCH9LdtSay6Tc/7Uu5AuGC6X
-t7Rh5r+tPwEAAP//AwBQSwMEFAAGAAgAAAAhAKXWp+fAAAAANgEAAAsAAABfcmVscy8ucmVsc4SP
-z2rDMAyH74W9g9F9UdLDGCV2L6WQQy+jfQDhKH9oIhvbG+vbT8cGCrsIhKTv96k9/q6L+eGU5yAW
-mqoGw+JDP8to4XY9v3+CyYWkpyUIW3hwhqN727VfvFDRozzNMRulSLYwlRIPiNlPvFKuQmTRyRDS
-SkXbNGIkf6eRcV/XH5ieGeA2TNP1FlLXN2Cuj6jJ/7PDMMyeT8F/ryzlRQRuN5RMaeRioagv41O9
-kKhlqtQe0LW4+db9AQAA//8DAFBLAwQUAAYACAAAACEAa3mWFoMAAACKAAAAHAAAAHRoZW1lL3Ro
-ZW1lL3RoZW1lTWFuYWdlci54bWwMzE0KwyAQQOF9oXeQ2TdjuyhFYrLLrrv2AEOcGkHHoNKf29fl
-44M3zt8U1ZtLDVksn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AAAAAAAAAAAAAAAJsJAAB0
-aGVtZS90aGVtZS9fcmVscy90aGVtZU1hbmFnZXIueG1sLnJlbHNQSwUGAAAAAAUABQBdAQAAlgoA
-AAAA
-
-------=_NextPart_01C89573.42B3B3B0
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Classification.Overview_files/colorschememapping.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml
-
-<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?>
-<a:clrMap xmlns:a=3D"http://schemas.openxmlformats.org/drawingml/2006/main"=
- bg1=3D"lt1" tx1=3D"dk1" bg2=3D"lt2" tx2=3D"dk2" accent1=3D"accent1" accent=
-2=3D"accent2" accent3=3D"accent3" accent4=3D"accent4" accent5=3D"accent5" a=
-ccent6=3D"accent6" hlink=3D"hlink" folHlink=3D"folHlink"/>
-------=_NextPart_01C89573.42B3B3B0
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Classification.Overview_files/header.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link id=3DMain-File rel=3DMain-File
-href=3D"../Microsoft.VisualStudio.Text.Classification.Overview.htm">
-<![if IE]>
-<base
-href=3D"file:///C:\515CB117\Microsoft.VisualStudio.Text.Classification.Over=
-view_files\header.htm"
-id=3D"webarch_temp_base_tag">
-<![endif]>
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
-
-<div style=3D'mso-element:footnote-separator' id=3Dfs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:footnote-continuation-separator' id=3Dfcs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-separator' id=3Des>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-continuation-separator' id=3Decs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C89573.42B3B3B0
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Classification.Overview_files/filelist.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml; charset="utf-8"
-
-<xml xmlns:o=3D"urn:schemas-microsoft-com:office:office">
- <o:MainFile HRef=3D"../Microsoft.VisualStudio.Text.Classification.Overview=
-.htm"/>
- <o:File HRef=3D"themedata.thmx"/>
- <o:File HRef=3D"colorschememapping.xml"/>
- <o:File HRef=3D"header.htm"/>
- <o:File HRef=3D"filelist.xml"/>
-</xml>
-------=_NextPart_01C89573.42B3B3B0--
diff --git a/src/Editor/Text/Def/TextLogic/Diagrams/Tagging.cd b/src/Editor/Text/Def/TextLogic/Diagrams/Tagging.cd
deleted file mode 100644
index 7be15b0..0000000
--- a/src/Editor/Text/Def/TextLogic/Diagrams/Tagging.cd
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Comment CommentText="Provision - extension points for creating taggers on source buffers.">
- <Position X="3.542" Y="0.802" Height="0.75" Width="1.7" />
- </Comment>
- <Comment CommentText="Aggregation is a provided service that takes care of creating, projecting, and aggregating tags/taggers over a buffer or view. Currently, consumers of tagging must consume tags by getting aggregators for the buffer or view they are interested in (there is no explicit ITagConsumer or the like). The buffer version of this service is here, in TextLogic, and the view version is in TextUI (IVewTagAggregatorFactoryService).">
- <Position X="10.782" Y="0.541" Height="1.625" Width="3.064" />
- </Comment>
- <Comment CommentText=" &lt;-- Tag Creation Aggregation --&gt;">
- <Position X="7" Y="3.875" Height="0.802" Width="2.356" />
- </Comment>
- <Comment CommentText="On the consumer side, tags are retrieved by passing in a SnapshotSpan and returned as MappingTagSpans. The change event at this level is in terms of mapping spans.">
- <Position X="8.75" Y="4.865" Height="1.729" Width="2.148" />
- </Comment>
- <Comment CommentText="On the producer side, tags are retrieved (by the aggregator) by passing in a NormalizedSnapshotSpanCollection, and returned as TagSpans. In this way, producers need have no knowledge of projection/buffer graphs. The change event at this level also is in terms of SnapshotSpans.">
- <Position X="5.635" Y="4.875" Height="1.75" Width="2.096" />
- </Comment>
- <Class Name="Microsoft.VisualStudio.Text.Tagging.TagSpan&lt;T&gt;">
- <Position X="1.75" Y="2.75" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAA=</HashCode>
- <FileName>Tagging\TagSpan.cs</FileName>
- </TypeIdentifier>
- <Lollipop Position="0.2" />
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Tagging.MappingTagSpan&lt;T&gt;" Collapsed="true">
- <Position X="13.75" Y="3.75" Width="2" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAA=</HashCode>
- <FileName>Tagging\MappingTagSpan.cs</FileName>
- </TypeIdentifier>
- <Lollipop Position="0.2" />
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Tagging.TagsChangedEventArgs" Collapsed="true">
- <Position X="13.75" Y="4.5" Width="2.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAA=</HashCode>
- <FileName>Tagging\TagsChangedEventArgs.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Interface Name="Microsoft.VisualStudio.Text.Tagging.ITagAggregator&lt;T&gt;">
- <Position X="11" Y="3.75" Width="2.5" />
- <TypeIdentifier>
- <HashCode>AAAAAIAAQAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAIA=</HashCode>
- <FileName>Tagging\ITagAggregator.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Tagging.IBufferTagAggregatorFactoryService">
- <Position X="10.75" Y="2.25" Width="3" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Tagging\IBufferTagAggregatorFactoryService.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Tagging.ITagger&lt;T&gt;">
- <Position X="3.75" Y="3.75" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAAAIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Tagging\ITagger.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Tagging.ITaggerProvider">
- <Position X="3.5" Y="2.25" Width="2" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Tagging\ITaggerProvider.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Tagging.ITag" Collapsed="true">
- <Position X="7.5" Y="2.25" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Tagging\ITag.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextLogic/Diagrams/Undo.cd b/src/Editor/Text/Def/TextLogic/Diagrams/Undo.cd
deleted file mode 100644
index 2edfbad..0000000
--- a/src/Editor/Text/Def/TextLogic/Diagrams/Undo.cd
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1" MembersFormat="NameAndType">
- <Comment CommentText="Clients use the tb undo manager to get the UndoHistory so that they can create transactions. Serves the same purpose as the undo history registry -- do we need both?">
- <Position X="2.344" Y="7.48" Height="1.719" Width="1.7" />
- </Comment>
- <Comment CommentText="RegisterHistory is called on each text buffer by EditorOperations; it returns an undo history">
- <Position X="7.687" Y="7.153" Height="1.01" Width="1.7" />
- </Comment>
- <Comment CommentText="Platform callers to Undo &amp; Redo: none are in VS.&#xD;&#xA;1. DefaultKeyProcessor &#xD;&#xA;2. Masticater&#xD;&#xA;3. Various tests&#xD;&#xA;4. Undo margin&#xD;&#xA;">
- <Position X="2.938" Y="3.125" Height="1.938" Width="1.7" />
- </Comment>
- <Comment CommentText="TBUndoManager registers undo history with buffer; listens for changes and creates undo transaction if none has been already created&#xD;&#xA;">
- <Position X="0.583" Y="2.781" Height="1.5" Width="1.7" />
- </Comment>
- <Interface Name="Microsoft.VisualStudio.Text.Operations.IMergeTextUndoTransactionPolicy">
- <Position X="8.75" Y="4.75" Width="2.75" />
- <TypeIdentifier>
- <HashCode>AAgAAAAAAAAAAAQAAQAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Undo\IMergeTextUndoTransactionPolicy.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Operations.ITextUndoHistoryRegistry">
- <Position X="4.75" Y="6.5" Width="2.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAAAAIAAAAAgAAAgAAACAEAAAAAA=</HashCode>
- <FileName>Undo\ITextUndoHistoryRegistry.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Operations.ITextUndoPrimitive">
- <Position X="12.75" Y="0.5" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAABAAABAAAAQAAQAAACAAAAQAAAAAAAAEAAAA=</HashCode>
- <FileName>Undo\ITextUndoPrimitive.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Operations.ITextBufferUndoManager">
- <Position X="0.5" Y="0.75" Width="3" />
- <TypeIdentifier>
- <HashCode>AEAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Undo\ITextBufferUndoManager.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Operations.ITextBufferUndoManagerProvider">
- <Position X="0.5" Y="5.75" Width="3.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAAAQAAAAAAAQAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Undo\ITextBufferUndoManagerProvider.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Operations.ITextUndoHistory">
- <Position X="4.5" Y="0.5" Width="3" />
- <TypeIdentifier>
- <HashCode>CAAAAAAAJAAABQAAAAAAAABBAAAAAgAgIAAABQEAoAA=</HashCode>
- <FileName>Undo\ITextUndoHistory.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="LastUndoTransaction" />
- <Property Name="CurrentTransaction" />
- <Property Name="State" />
- <Property Name="LastRedoTransaction" />
- </ShowAsAssociation>
- <ShowAsCollectionAssociation>
- <Property Name="RedoStack" />
- <Property Name="UndoStack" />
- </ShowAsCollectionAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Operations.ITextUndoTransaction">
- <Position X="9.25" Y="0.5" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAARCAgBAIAAAAAQAAACAAAIgAAAAACBAEAAAA=</HashCode>
- <FileName>Undo\ITextUndoTransaction.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="MergePolicy" />
- <Property Name="State" />
- <Property Name="History" />
- <Property Name="Parent" />
- </ShowAsAssociation>
- <ShowAsCollectionAssociation>
- <Property Name="UndoPrimitives" />
- </ShowAsCollectionAssociation>
- </Interface>
- <Enum Name="Microsoft.VisualStudio.Text.Operations.TextUndoHistoryState">
- <Position X="5.25" Y="4.75" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAAAABAAAAAAAAAAAAQAAAAAAAAAAAAAAAAQAAAAAA=</HashCode>
- <FileName>Undo\TextUndoHistoryState.cs</FileName>
- </TypeIdentifier>
- </Enum>
- <Enum Name="Microsoft.VisualStudio.Text.Operations.UndoTransactionState">
- <Position X="13" Y="4.5" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAEAAAIAIAgAAQAAAAAAAAAAAAAAAAQQAAAAA=</HashCode>
- <FileName>Undo\TextUndoTransactionState.cs</FileName>
- </TypeIdentifier>
- </Enum>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextLogic/DifferenceBuffer/IDifferenceBuffer2.cs b/src/Editor/Text/Def/TextLogic/DifferenceBuffer/IDifferenceBuffer2.cs
new file mode 100644
index 0000000..ebfecb6
--- /dev/null
+++ b/src/Editor/Text/Def/TextLogic/DifferenceBuffer/IDifferenceBuffer2.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Differencing
+{
+ using System;
+
+ public interface IDifferenceBuffer2 : IDifferenceBuffer
+ {
+ /// <summary>
+ /// The source of the left buffer in the difference. Can be set to null.
+ /// </summary>
+ new ITextBuffer BaseLeftBuffer { get; set; }
+
+ event EventHandler<BufferChangedEventArgs> BaseLeftBufferChanged;
+ }
+
+ public class BufferChangedEventArgs : EventArgs
+ {
+ public BufferChangedEventArgs(ITextBuffer oldBuffer, ITextBuffer newBuffer)
+ {
+ this.OldBuffer = oldBuffer;
+ this.NewBuffer = newBuffer;
+ }
+
+ public ITextBuffer OldBuffer { get; }
+ public ITextBuffer NewBuffer { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextLogic/DifferenceBuffer/IDifferenceBufferFactoryService.cs b/src/Editor/Text/Def/TextLogic/DifferenceBuffer/IDifferenceBufferFactoryService.cs
index 7d4b1e5..5e5d61c 100644
--- a/src/Editor/Text/Def/TextLogic/DifferenceBuffer/IDifferenceBufferFactoryService.cs
+++ b/src/Editor/Text/Def/TextLogic/DifferenceBuffer/IDifferenceBufferFactoryService.cs
@@ -37,6 +37,7 @@ namespace Microsoft.VisualStudio.Text.Differencing
/// <para>If <paramref name="disableEditing"/> is false, then <paramref name="wrapRightBuffer"/> is ignored (and the right buffer will not be wrapped).</para>
/// <para>If <paramref name="wrapLeftBuffer"/> is false, then the caller of this method is responsible for making sure <paramref name="leftBaseBuffer"/> is read-only.</para>
/// <para>If <paramref name="disableEditing"/> is true and <paramref name="wrapRightBuffer"/> is false, then the caller of this method is responsible for making sure <paramref name="rightBaseBuffer"/> is read-only.</para>
+ /// <para>If <paramref name="wrapLeftBuffer"/> is true, then <paramref name="leftBaseBuffer"/> can be null.</para>
/// </remarks>
IDifferenceBuffer CreateDifferenceBuffer(ITextBuffer leftBaseBuffer, ITextBuffer rightBaseBuffer, StringDifferenceOptions options,
bool disableEditing = false, bool wrapLeftBuffer = true, bool wrapRightBuffer = true);
diff --git a/src/Editor/Text/Def/TextLogic/TextLogic.csproj b/src/Editor/Text/Def/TextLogic/TextLogic.csproj
index 15d863a..b88d248 100644
--- a/src/Editor/Text/Def/TextLogic/TextLogic.csproj
+++ b/src/Editor/Text/Def/TextLogic/TextLogic.csproj
@@ -2,10 +2,10 @@
<PropertyGroup>
<AssemblyName>Microsoft.VisualStudio.Text.Logic</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
- <TargetFramework>net46</TargetFramework>
<PushToPublicFeed>true</PushToPublicFeed>
<NoWarn>649;436;$(NoWarn)</NoWarn>
<AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/src/Editor/Text/Def/TextUI/Adornments/AdornmentLayerDefinition.cs b/src/Editor/Text/Def/TextUI/Adornments/AdornmentLayerDefinition.cs
new file mode 100644
index 0000000..90f3e9e
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/AdornmentLayerDefinition.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+
+ /// <summary>
+ /// Provides information for an IAdornmentLayer export.
+ /// </summary>
+ /// <remarks>
+ /// Because you cannot subclass this type, you can use the [Export] attribute with no type.
+ /// </remarks>
+ /// <example>
+ /// internal sealed class Components
+ /// {
+ /// [Export]
+ /// [Name("ExampleAdornmentLayer")]
+ /// [Order(After = "Selection", Before = "Text")]
+ /// internal AdornmentLayerDefinition viewLayerDefinition;
+ ///
+ /// { other components }
+ /// }
+ /// </example>
+ public sealed class AdornmentLayerDefinition
+ {
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/IXplatAdornmentLayer.cs b/src/Editor/Text/Def/TextUI/Adornments/IXplatAdornmentLayer.cs
new file mode 100644
index 0000000..aebe3a2
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/IXplatAdornmentLayer.cs
@@ -0,0 +1,107 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ using System;
+ using System.Collections.ObjectModel;
+ using System.Windows;
+
+ /// <summary>
+ /// Represents an adornment layer.
+ /// </summary>
+ public interface IXPlatAdornmentLayer
+ {
+ /// <summary>
+ /// Adds a <see cref="object"/> to the layer.
+ /// </summary>
+ /// <param name="behavior">The positioning behavior of <paramref name="adornment"/>.</param>
+ /// <param name="visualSpan">The span with which <paramref name="adornment"/> is associated.</param>
+ /// <param name="tag">The tag associated with <paramref name="adornment"/>.</param>
+ /// <param name="adornment">The <see cref="object"/> to add to the view.</param>
+ /// <param name="removedCallback">The delegate to call when <paramref name="adornment"/>
+ /// is removed from the view.</param>
+ /// <returns><c>true</c> if <paramref name="adornment"/> was added to the layer, otherwise <c>false</c>.
+ /// <paramref name="visualSpan"/> does not intersect the text that is visible in the view.</returns>
+ /// <remarks>
+ /// <para>If <paramref name="visualSpan"/> is specified, then the adornment will be removed whenever any line that crosses <paramref name="visualSpan"/> is formatted.</para>
+ /// <para>If <paramref name="visualSpan"/> has a length of zero, then it will be invalidated when the line that contains the following character is invalidated
+ /// (or the last line, if the visual span is at the end of the buffer).</para>
+ /// </remarks>
+ bool AddAdornment(XPlatAdornmentPositioningBehavior behavior, SnapshotSpan? visualSpan,
+ object tag, object adornment, XPlatAdornmentRemovedCallback removedCallback);
+
+ /// <summary>
+ /// Adds a XPlatAdornmentPositioningBehavior.TextRelative <see cref="object"/> to the layer.
+ /// </summary>
+ /// <param name="visualSpan">The span with which <paramref name="adornment"/> is associated.</param>
+ /// <param name="tag">The tag associated with <paramref name="adornment"/>.</param>
+ /// <param name="adornment">The <see cref="object"/> to add to the view.</param>
+ /// <returns><c>true</c> if <paramref name="adornment"/> was added to the layer, otherwise <c>false</c>.
+ /// <paramref name="visualSpan"/> does not intersect the text that is visible in the view.</returns>
+ /// <remarks>This is equivalent to calling AddElement(XPlatAdornmentPositioningBehavior.TextRelative,
+ /// visualSpan, tag, adornment, null);</remarks>
+ /// <remarks>
+ /// <para>The adornment is removed when any line that crosses <paramref name="visualSpan"/> is formatted.</para>
+ /// <para>If <paramref name="visualSpan"/> has a length of zero, then it will be invalidated when the line that contains the following character is invalidated
+ /// (or the last line, if the visualSpan is at the end of the buffer).</para>
+ /// </remarks>
+ bool AddAdornment(SnapshotSpan visualSpan, object tag, object adornment);
+
+ /// <summary>
+ /// Removes a specific <see cref="object"/>.
+ /// </summary>
+ /// <param name="adornment"><see cref="object"/> to remove.</param>
+ void RemoveAdornment(object adornment);
+
+ /// <summary>
+ /// Removes all <see cref="object"/> objects associated with a particular tag.
+ /// </summary>
+ /// <param name="tag">The tag to use to remove <see cref="object"/>s.</param>
+ void RemoveAdornmentsByTag(object tag);
+
+ /// <summary>
+ /// Removes all adornments with visual spans that overlap the given visual span.
+ /// Any adornments without specified visual spans are ignored.
+ /// </summary>
+ /// <param name="visualSpan">The visual span to check for overlap with adornments.</param>
+ void RemoveAdornmentsByVisualSpan(SnapshotSpan visualSpan);
+
+ /// <summary>
+ /// Removes all adornments for which the given predicate returns <c>true</c>.
+ /// </summary>
+ /// <param name="match">The predicate that will be called for each adornment</param>
+ void RemoveMatchingAdornments(Predicate<IXPlatAdornmentLayerElement> match);
+
+ /// <summary>
+ /// Removes all adornments with visual spans for which the given predicate returns <c>true</c>.
+ /// Any adornments without specified visual spans and tag are ignored.
+ /// </summary>
+ /// <param name="visualSpan">The visual span to check for overlap with adornments.</param>
+ /// <param name="match">The predicate that will be called for each adornment</param>
+ void RemoveMatchingAdornments(SnapshotSpan visualSpan, Predicate<IXPlatAdornmentLayerElement> match);
+
+ /// <summary>
+ /// Removes all <see cref="object"/> objects in the layer.
+ /// </summary>
+ void RemoveAllAdornments();
+
+ /// <summary>
+ /// Determines whether this layer is empty, that is, it does not contain any adornments.
+ /// </summary>
+ bool IsEmpty { get; }
+
+ /// <summary>
+ /// Gets or sets the opacity factor applied to the entire adornment layer when it is rendered in the user interface.
+ /// </summary>
+ double Opacity { get; set; }
+
+ /// <summary>
+ /// Gets a collection of the adornments and their associated data in the layer.
+ /// </summary>
+ ReadOnlyCollection<IXPlatAdornmentLayerElement> Elements { get; }
+
+ object VisualElement { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/IXplatAdornmentLayerElement.cs b/src/Editor/Text/Def/TextUI/Adornments/IXplatAdornmentLayerElement.cs
new file mode 100644
index 0000000..a9ead98
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/IXplatAdornmentLayerElement.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ using System.Windows;
+ using Microsoft.VisualStudio.Text;
+
+ /// <summary>
+ /// Defines an element in an adornment layer.
+ /// </summary>
+ public interface IXPlatAdornmentLayerElement
+ {
+ /// <summary>
+ /// Gets the snapshot span that is associated with the adornment.
+ /// </summary>
+ SnapshotSpan? VisualSpan { get; }
+ /// <summary>
+ /// Gets the positioning behavior of the adornment.
+ /// </summary>
+ XPlatAdornmentPositioningBehavior Behavior { get; }
+ /// <summary>
+ /// Gets the adornment.
+ /// </summary>
+ object Adornment { get; }
+
+ /// <summary>
+ /// Gets the tag associated with the adornment.
+ /// </summary>
+ object Tag { get; }
+ /// <summary>
+ /// Defines the behavior when an adornment has been removed.
+ /// </summary>
+ XPlatAdornmentRemovedCallback RemovedCallback { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/Legacy/BlockContext.cs b/src/Editor/Text/Def/TextUI/Adornments/Legacy/BlockContext.cs
new file mode 100644
index 0000000..e282700
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/Legacy/BlockContext.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Text.Editor;
+using Microsoft.VisualStudio.Text.Tagging;
+using System;
+
+// TODO: DevDiv bug #369787: remove this in Dev16 when IBlockTag and related facilities are deprecated.
+namespace Microsoft.VisualStudio.Text.Adornments
+{
+#pragma warning disable 618
+ /// <summary>
+ /// An implementation of <see cref="IBlockContext"/>.
+ /// </summary>
+ [Obsolete("Use IStructureTag APIs instead")]
+ public class BlockContext : IBlockContext
+ {
+ private readonly IBlockTag _blockTag;
+ private readonly ITextView _view;
+ private readonly object _content;
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="IBlockContext"/> with the specified block tag.
+ /// </summary>
+ /// <param name="blockTag">The block tag associated with the structural block.</param>
+ /// <param name="view">The text view associated with the structural block.</param>
+ /// <param name="content">The content, including hiearchical parent statements, to be displayed in the tooltip.</param>
+ public BlockContext(IBlockTag blockTag, ITextView view, object content)
+ {
+ if (blockTag == null)
+ throw new ArgumentNullException(nameof(blockTag));
+
+ if (view == null)
+ throw new ArgumentNullException(nameof(view));
+
+ if (content == null)
+ throw new ArgumentNullException(nameof(content));
+
+ _blockTag = blockTag;
+ _view = view;
+ _content = content;
+ }
+
+ /// <summary>
+ /// Gets the block tag associated with this context.
+ /// </summary>
+ public IBlockTag BlockTag
+ {
+ get { return _blockTag; }
+ }
+
+ /// <summary>
+ /// Gets the text view associated with this context.
+ /// </summary>
+ public ITextView TextView
+ {
+ get { return _view; }
+ }
+
+ /// <summary>
+ /// Gets the content that will be displayed in the tool tip, including hierarchical parent content.
+ /// </summary>
+ public object Content
+ {
+ get { return _content; }
+ }
+ }
+#pragma warning restore 618
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContext.cs b/src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContext.cs
new file mode 100644
index 0000000..15dd30f
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContext.cs
@@ -0,0 +1,33 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using Microsoft.VisualStudio.Text.Editor;
+using Microsoft.VisualStudio.Text.Tagging;
+
+// TODO: DevDiv bug #369787: remove this in Dev16 when IBlockTag and related facilities are deprecated.
+namespace Microsoft.VisualStudio.Text.Adornments
+{
+ /// <summary>
+ /// Defines the block context used to display structural block information.
+ /// </summary>
+ [Obsolete("Use IStructureTag APIs instead")]
+ public interface IBlockContext
+ {
+ /// <summary>
+ /// Gets the content that will be displayed in the tool tip, including hierarchical parent content.
+ /// </summary>
+ object Content { get; }
+
+ /// <summary>
+ /// Gets the block tag associated with this context.
+ /// </summary>
+ IBlockTag BlockTag { get; }
+
+ /// <summary>
+ /// Gets the text view associated with this context.
+ /// </summary>
+ ITextView TextView { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContextProvider.cs b/src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContextProvider.cs
new file mode 100644
index 0000000..a58de7f
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContextProvider.cs
@@ -0,0 +1,32 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+// TODO: DevDiv bug #369787: remove this in Dev16 when IBlockTag and related facilities are deprecated.
+namespace Microsoft.VisualStudio.Text.Adornments
+{
+ /// <summary>
+ /// Creates a <see cref="IBlockContextSource"/> for a given buffer.
+ /// </summary>
+ /// <remarks>This is a MEF component part, and should be exported as follows:
+ /// [Export(typeof(IBlockContextProvider))]
+ /// Component exporters must add the Name and Order attribute to define the order of the provider in the provider chain.
+ /// </remarks>
+ [Obsolete("Use IStructureContextProvider instead")]
+ public interface IBlockContextProvider
+ {
+#pragma warning disable 618
+ /// <summary>
+ /// Creates a block context source for the given text buffer.
+ /// </summary>
+ /// <param name="textBuffer">The text buffer for which to create a provider.</param>
+ /// <param name="token">The cancelation token for this asynchronous method call.</param>
+ /// <returns>A valid <see cref="IBlockContextSource" /> instance, or null if none could be created.</returns>
+ Task<IBlockContextSource> TryCreateBlockContextSourceAsync(ITextBuffer textBuffer, CancellationToken token);
+#pragma warning restore 618
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContextSource.cs b/src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContextSource.cs
new file mode 100644
index 0000000..747ce50
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/Legacy/IBlockContextSource.cs
@@ -0,0 +1,29 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Text.Editor;
+using Microsoft.VisualStudio.Text.Tagging;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+// TODO: DevDiv bug #369787: remove this in Dev16 when IBlockTag and related facilities are deprecated.
+namespace Microsoft.VisualStudio.Text.Adornments
+{
+ /// <summary>
+ /// Provides content for structural block tool tips for a given <see cref="IBlockTag"/>.
+ /// </summary>
+ [Obsolete("Use IStructureContextSource instead")]
+ public interface IBlockContextSource : IDisposable
+ {
+ /// <summary>
+ /// Gets the contexts for the given block tag.
+ /// </summary>
+ /// <param name="blockTag">The block tag for which the context is requested.</param>
+ /// <param name="view">The text view associated with the current context.</param>
+ /// <param name="token">The cancellation token for this asynchronous method call.</param>
+ /// <returns>The <see cref="IBlockContext" /> to be displayed in the tool tip.</returns>
+ Task<IBlockContext> GetBlockContextAsync(IBlockTag blockTag, ITextView view, CancellationToken token);
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/Legacy/PredefinedStructureTypes.cs b/src/Editor/Text/Def/TextUI/Adornments/Legacy/PredefinedStructureTypes.cs
new file mode 100644
index 0000000..63910ca
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/Legacy/PredefinedStructureTypes.cs
@@ -0,0 +1,48 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+
+// TODO: DevDiv bug #369787: remove this in Dev16 when IBlockTag and related facilities are deprecated.
+namespace Microsoft.VisualStudio.Text.Adornments
+{
+ /// <summary>
+ /// Enumerates the predefined structural block types.
+ /// </summary>
+ [Obsolete("Use PredefinedStructureTagTypes instead")]
+ public static class PredefinedStructureTypes
+ {
+ /// <summary>
+ /// Represents structural blocks, with vertical line adornments displayed.
+ /// </summary>
+ public const string Structural = "Structural";
+
+ /// <summary>
+ /// Represents non-structural blocks, with no vertical line adornments
+ /// displayed, only expand and collapse.
+ /// </summary>
+ public const string Nonstructural = "Nonstructural";
+
+ public const string PropertyBlock = "PropertyBlock";
+ public const string AccessorBlock = "AccessorBlock";
+ public const string AnonymousMethodBlock = "AnonymousMethodBlock"; // i.e. lambda bodies
+ public const string Constructor = "Constructor";
+ public const string Destructor = "Destructor";
+ public const string Operator = "Operator";
+ public const string Method = "Method";
+ public const string Namespace = "Namespace";
+ public const string Class = "Class";
+ public const string Interface = "Interface";
+ public const string Struct = "Struct";
+ public const string TryCatchFinally = "TryCatchFinally";
+ public const string Conditional = "Conditional"; // i.e. If statements, ‘switch’ statements.i.e conditionals+branches
+ public const string Case = "Case";
+ public const string Loop = "Loop"; // i.e. While/For/Foreach/Do/Until (i.e.loops)
+ public const string Standalone = "Standalone"; // i.e. stand-alone {} used for scoping.
+
+ public const string Lock = "Context"; // i.e. using/lock/checked/unchecked. Need a better name for this.
+
+ public const string Unknown = "Unknown";
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/Legacy/StructureAdornmentStyle.cs b/src/Editor/Text/Def/TextUI/Adornments/Legacy/StructureAdornmentStyle.cs
new file mode 100644
index 0000000..d19a639
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/Legacy/StructureAdornmentStyle.cs
@@ -0,0 +1,16 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+
+namespace Microsoft.VisualStudio.Text.Adornments
+{
+ [Obsolete("Use StructureTipStyle instead")]
+ public class StructureAdornmentStyle
+ {
+ public virtual object BorderBrush { get; protected set; }
+
+ public virtual object BackgroundBrush { get; protected set; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/PredefinedAdornmentLayers.cs b/src/Editor/Text/Def/TextUI/Adornments/PredefinedAdornmentLayers.cs
new file mode 100644
index 0000000..73082c0
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/PredefinedAdornmentLayers.cs
@@ -0,0 +1,81 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ using Microsoft.VisualStudio.Text.Adornments;
+ using Microsoft.VisualStudio.Text.Differencing;
+
+ /// <summary>
+ /// This static class defines the names of the adornment layers
+ /// predefined by the editor.
+ /// </summary>
+ public static class PredefinedAdornmentLayers
+ {
+ /// <summary>
+ /// The outlining layer contains the collapse hint adornment.
+ /// </summary>
+ public const string Outlining = "Outlining";
+
+ /// <summary>
+ /// The squiggle layer contains the squiggle adornment used to indicate errors.
+ /// </summary>
+ public const string Squiggle = "Squiggle";
+
+ /// <summary>
+ /// The selection layer hosts the selection and provisional highlight text caret for IME input mode.
+ /// </summary>
+ public const string Selection = "SelectionAndProvisionHighlight";
+
+ /// <summary>
+ /// The caret layer contains the text caret.
+ /// </summary>
+ public const string Caret = "Caret";
+
+ /// <summary>
+ /// The text layer contains the textual content of the editor.
+ /// </summary>
+ public const string Text = "Text";
+
+ /// <summary>
+ /// The text marker layer contains the text markers provided by the <see cref="ITextMarkerProviderFactory"/> classes.
+ /// </summary>
+ public const string TextMarker = "TextMarker";
+
+ /// <summary>
+ /// The current line highlighter layer containst the current line highlighter adronment.
+ /// </summary>
+ public const string CurrentLineHighlighter = "CurrentLineHighlighter";
+
+ /// <summary>
+ /// The layer used to draw the line differences in the views created by the <see cref="IDifferenceViewer"/>.
+ /// </summary>
+ public const string DifferenceChanges = "DifferenceChanges";
+
+ /// <summary>
+ /// The layer used to draw the word differences in the views created by the <see cref="IDifferenceViewer"/>.
+ /// </summary>
+ public const string DifferenceWordChanges = "DifferenceWordChanges";
+
+ /// <summary>
+ /// The layer used to draw hashmarks in to align blocks in the <see cref="IDifferenceViewer"/> split view.
+ /// </summary>
+ public const string DifferenceSpace = "DifferenceSpace";
+
+ /// <summary>
+ /// Name of the layer used to draw the Peek or other adornments placed between lines of text.
+ /// </summary>
+ public const string InterLine = "Inter Line Adornment";
+
+ /// <summary>
+ /// Name of the layer used to draw the closing brace adornment for brace completion.
+ /// </summary>
+ public const string BraceCompletion = "BraceCompletion";
+
+ /// <summary>
+ /// Name of the layer used to draw the vertical structural block adornments.
+ /// </summary>
+ public const string BlockStructure = "BlockStructure";
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/ToolTipService/IToolTipPresenter.cs b/src/Editor/Text/Def/TextUI/Adornments/ToolTipService/IToolTipPresenter.cs
index 57f5fc7..7c5b13b 100644
--- a/src/Editor/Text/Def/TextUI/Adornments/ToolTipService/IToolTipPresenter.cs
+++ b/src/Editor/Text/Def/TextUI/Adornments/ToolTipService/IToolTipPresenter.cs
@@ -10,7 +10,7 @@
/// <remarks>
/// This type is proffered to the IDE via an <see cref="IToolTipPresenterFactory"/> and is
/// always constructed and called purely on the UI thread. Each <see cref="IToolTipPresenter"/>
- /// is a single-use object that is responsible for converting the given content to
+ /// is a single-use object that is responsible for converting the given content to
/// into platform-specific UI elements and displaying them in a popup UI.
/// </remarks>
public interface IToolTipPresenter
diff --git a/src/Editor/Text/Def/TextUI/Adornments/ToolTipService/IToolTipPresenter2.cs b/src/Editor/Text/Def/TextUI/Adornments/ToolTipService/IToolTipPresenter2.cs
new file mode 100644
index 0000000..319d13b
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/ToolTipService/IToolTipPresenter2.cs
@@ -0,0 +1,11 @@
+namespace Microsoft.VisualStudio.Text.Adornments
+{
+ public interface IToolTipPresenter2 : IToolTipPresenter
+ {
+ /// <summary>
+ /// Gets a value indicating whether the mouse pointer is located over this interactive Quick Info content,
+ /// including any parts that are out of the Quick Info visual tree (such as popups).
+ /// </summary>
+ bool IsMouseOverAggregated { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/XPlatAdornmentPositioningBehavior.cs b/src/Editor/Text/Def/TextUI/Adornments/XPlatAdornmentPositioningBehavior.cs
new file mode 100644
index 0000000..2ce0d97
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/XPlatAdornmentPositioningBehavior.cs
@@ -0,0 +1,32 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ /// <summary>
+ /// Defines the positioning of adornments.
+ /// </summary>
+ public enum XPlatAdornmentPositioningBehavior
+ {
+ /// <summary>
+ /// The adornment is not moved automatically.
+ /// </summary>
+ OwnerControlled,
+
+ /// <summary>
+ /// The adornment is positioned relative to the top left corner of the view.
+ /// </summary>
+ ViewportRelative,
+
+ /// <summary>
+ /// The adornment is positioned relative to the text in the view.
+ /// </summary>
+ TextRelative,
+
+ /// <summary>
+ /// Behaves like a AdornmentPositioningBehavior.TextRelative adornment but only scrolls vertically.
+ /// </summary>
+ TextRelativeVerticalOnly
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/XPlatAdornmentRemovedCallback.cs b/src/Editor/Text/Def/TextUI/Adornments/XPlatAdornmentRemovedCallback.cs
new file mode 100644
index 0000000..2fbbe08
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/XPlatAdornmentRemovedCallback.cs
@@ -0,0 +1,15 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ using System.Windows;
+
+ /// <summary>
+ /// Defines the behavior when a <see cref="object"/> is removed from an <see cref="IXPlatAdornmentLayer"/>.
+ /// </summary>
+ /// <param name="tag">The tag associated with <paramref name="element"/>.</param>
+ /// <param name="element">The <see cref="object"/> removed from the view.</param>
+ public delegate void XPlatAdornmentRemovedCallback(object tag, object element);
+}
diff --git a/src/Editor/Text/Def/TextUI/Adornments/XPlatIntraTextAdornmentTag.cs b/src/Editor/Text/Def/TextUI/Adornments/XPlatIntraTextAdornmentTag.cs
new file mode 100644
index 0000000..7cf3657
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Adornments/XPlatIntraTextAdornmentTag.cs
@@ -0,0 +1,122 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ using System;
+ using Microsoft.VisualStudio.Text.Formatting;
+ using Microsoft.VisualStudio.Text.Tagging;
+
+ /// <summary>
+ /// Represents a tag that provides adornments to be displayed as interspersed with text.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// The tag's span will be elided from the view and that text will be replaced by the adornment provided by this tag.
+ /// </para>
+ /// <para>
+ /// The aggregator for these tags is created on a per-view basis and handles the
+ /// production of <see cref="SpaceNegotiatingAdornmentTag"/> objects, text hiding, and
+ /// the positioning of adornments on the adornment layer.
+ /// </para>
+ /// <para>
+ /// This will only work for views that have the
+ /// <see cref="PredefinedTextViewRoles.Structured"/> view role.
+ /// </para>
+ /// </remarks>
+ public class XPlatIntraTextAdornmentTag : ITag
+ {
+ /// <summary>
+ /// Initializes a new instance of a <see cref="XPlatIntraTextAdornmentTag"/>.
+ /// </summary>
+ /// <param name="adornment">The adornment to be displayed at tag's position. Must not be null.</param>
+ /// <param name="removalCallback">Called when adornment is removed from the view. May be null.</param>
+ /// <param name="topSpace">The amount of space needed between the top of the text in the <see cref="ITextViewLine"/> and the top of the <see cref="ITextViewLine"/>.</param>
+ /// <param name="baseline">The baseline of the space-negotiating adornment.</param>
+ /// <param name="textHeight">The height of the text portion of the space-negotiating adornment.</param>
+ /// <param name="bottomSpace">The amount of space needed between the bottom of the text in the <see cref="ITextViewLine"/> and the bottom of the <see cref="ITextViewLine"/>.</param>
+ /// <param name="affinity">The affinity of the adornment. Should be null iff the adornment has a non-zero-length span at the view's text buffer.</param>
+ public XPlatIntraTextAdornmentTag(object adornment, XPlatAdornmentRemovedCallback removalCallback,
+ double? topSpace, double? baseline, double? textHeight, double? bottomSpace, PositionAffinity? affinity)
+ {
+ if (adornment == null)
+ throw new ArgumentNullException(nameof(adornment));
+
+ Adornment = adornment;
+ RemovalCallback = removalCallback;
+
+ this.TopSpace = topSpace;
+ this.Baseline = baseline;
+ this.TextHeight = textHeight;
+ this.BottomSpace = bottomSpace;
+
+ this.Affinity = affinity;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of a <see cref="double"/>.
+ /// </summary>
+ /// <param name="adornment">The adornment to be displayed at tag's position. Must not be null.</param>
+ /// <param name="removalCallback">Called when adornment is removed from the view. May be null.</param>
+ /// <param name="affinity">The affinity of the adornment. Should be null iff the adornment has a zero-length span at the view's text buffer.</param>
+ public XPlatIntraTextAdornmentTag(object adornment, XPlatAdornmentRemovedCallback removalCallback, PositionAffinity? affinity)
+ : this(adornment, removalCallback, null, null, null, null, affinity)
+ { }
+
+ /// <summary>
+ /// Initializes a new instance of a <see cref="double"/>.
+ /// </summary>
+ /// <param name="adornment">The adornment to be displayed at tag's position. Must not be null.</param>
+ /// <param name="removalCallback">Called when adornment is removed from the view. May be null.</param>
+ /// <remarks>This constructor should only be used for adornments that replace text in the view's text buffer.</remarks>
+ public XPlatIntraTextAdornmentTag(object adornment, XPlatAdornmentRemovedCallback removalCallback)
+ : this(adornment, removalCallback, null, null, null, null, null)
+ { }
+
+ /// <summary>
+ /// Gets the adornment to be displayed at the position of the tag. It must not be null.
+ /// </summary>
+ /// <remarks>
+ /// This adornment will be added to the view. Note that WPF elements can only be parented in a single
+ /// place in the visual tree. Therefore these adornment instances should not be added to any other WPF UI.
+ /// </remarks>
+ public object Adornment { get; private set; }
+
+ /// <summary>
+ /// Called when adornment is removed from the view. It may be null.
+ /// </summary>
+ public XPlatAdornmentRemovedCallback RemovalCallback { get; private set; }
+
+ /// <summary>
+ /// Gets the amount of space needed between the top of the text in the <see cref="ITextViewLine"/> and the top of the <see cref="ITextViewLine"/>.
+ /// </summary>
+ public double? TopSpace { get; private set; }
+
+ /// <summary>
+ /// Gets the baseline of the space-negotiating adornment.
+ /// </summary>
+ public double? Baseline { get; private set; }
+
+ /// <summary>
+ /// Gets the height of the text portion of the space-negotiating adornment.
+ /// </summary>
+ public double? TextHeight { get; private set; }
+
+ /// <summary>
+ /// Gets the amount of space needed between the bottom of the text in the <see cref="ITextViewLine"/> and the bottom of the <see cref="ITextViewLine"/>.
+ /// </summary>
+ public double? BottomSpace { get; private set; }
+
+ /// <summary>
+ /// Gets the <see cref="PositionAffinity"/> of the space-negotiating adornment.
+ /// </summary>
+ /// <remarks>
+ /// Should be non-null for tags with zero length spans (at the edit buffer level of the view's buffer graph) and only for those tags.
+ /// </remarks>
+ public PositionAffinity? Affinity { get; private set; }
+
+ //// TODO: Implement like in IntraTextAdornment static class
+ //public virtual bool IsSelected { get; set; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/AssemblyInfo.cs b/src/Editor/Text/Def/TextUI/AssemblyInfo.cs
index 6382b2e..f26bbe9 100644
--- a/src/Editor/Text/Def/TextUI/AssemblyInfo.cs
+++ b/src/Editor/Text/Def/TextUI/AssemblyInfo.cs
@@ -3,10 +3,22 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
//
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.Versioning;
using System.Security.Permissions;
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.MultiCaret.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Platform.VSEditor, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Editor.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Commanding.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Commanding.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.UI.Utilities, PublicKey=" + ThisAssembly.PublicKey)]
+
+// InternalsVisibleTo for VS for Mac implementation assembly:
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Implementation, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e57febc1f220077550a65e338d3d15d7cbd189cf4f62f7c3829dcb2f8441a6c40631d172e3deb4dc0bb7237b44ec9daeb9bd7d72c3d64c4f52b968795443cb58bc341583c29440345b8c35f72f6a31aecb2903376136f8fc35779bb422eb643f8668fa6605c697bff927e3bb10745328ff878bd1b7e42bbcb839f04baa8460bd")]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Cocoa.View.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
//
// General Information about an assembly is controlled through the following
diff --git a/src/Editor/Text/Def/TextUI/Commanding/CommandExecutionContext.cs b/src/Editor/Text/Def/TextUI/Commanding/CommandExecutionContext.cs
index f39cd55..72efbf0 100644
--- a/src/Editor/Text/Def/TextUI/Commanding/CommandExecutionContext.cs
+++ b/src/Editor/Text/Def/TextUI/Commanding/CommandExecutionContext.cs
@@ -12,16 +12,16 @@ namespace Microsoft.VisualStudio.Commanding
/// <summary>
/// Creates new instance of the <see cref="CommandExecutionContext"/>.
/// </summary>
- public CommandExecutionContext(IUIThreadOperationContext waitContext)
+ public CommandExecutionContext(IUIThreadOperationContext operationContext)
{
- this.WaitContext = waitContext ?? throw new ArgumentNullException(nameof(waitContext));
+ this.OperationContext = operationContext ?? throw new ArgumentNullException(nameof(operationContext));
}
/// <summary>
/// Provides a context of executing a command handler on the UI thread, which
/// enables two way shared cancellability and wait indication.
/// </summary>
- public IUIThreadOperationContext WaitContext { get; }
+ public IUIThreadOperationContext OperationContext { get; }
}
}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/CommandSelector.cs b/src/Editor/Text/Def/TextUI/Commanding/CommandSelector.cs
new file mode 100644
index 0000000..51224cc
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/CommandSelector.cs
@@ -0,0 +1,292 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding
+{
+ public static class CommandSelector
+ {
+ // Note: keep selectors in alphabetical order within their region groupings.
+ // Provide the standard macOS default key bindings in a <summary> commment
+ // for applicable selectors.
+ //
+ // ⎋ - Escape
+ // ⌃ - Control
+ // ⌥ - Option
+ // ⌘ - Command
+ // ⇧ - Shift
+
+ #region NSStandardKeyBindingResponding
+
+ /// <summary>⎋</summary>
+ public const string CancelOperation = "cancelOperation:";
+
+ /// <summary>⌃L</summary>
+ public const string CenterSelectionInVisibleArea = "centerSelectionInVisibleArea:";
+
+ /// <summary>⌥⎋</summary>
+ public const string Complete = "complete:";
+
+ public const string CycleToNextInputKeyboardLayout = "cycleToNextInputKeyboardLayout:";
+ public const string CycleToNextInputScript = "cycleToNextInputScript:";
+
+ public const string Delete = "delete:";
+
+ /// <summary>⌫</summary>
+ public const string DeleteBackward = "deleteBackward:";
+
+ /// <summary>⌃⌫</summary>
+ public const string DeleteBackwardByDecomposingPreviousCharacter = "deleteBackwardByDecomposingPreviousCharacter:";
+
+ /// <summary>⌦</summary>
+ public const string DeleteForward = "deleteForward:";
+
+ /// <summary>⌘⌫</summary>
+ public const string DeleteToBeginningOfLine = "deleteToBeginningOfLine:";
+
+ /// <summary>⌃K</summary>
+ public const string DeleteToEndOfParagraph = "deleteToEndOfParagraph:";
+
+ /// <summary>⌥⌫</summary>
+ public const string DeleteWordBackward = "deleteWordBackward:";
+
+ /// <summary>⌥⌦</summary>
+ public const string DeleteWordForward = "deleteWordForward:";
+
+ /// <summary>⇤, ⇧↹</summary>
+ public const string InsertBacktab = "insertBacktab:";
+
+ /// <summary>⌃</summary>
+ public const string InsertDoubleQuoteIgnoringSubstitution = "insertDoubleQuoteIgnoringSubstitution:";
+
+ /// <summary>⌃↩</summary>
+ public const string InsertLinereturn = "insertLinereturn:";
+
+ /// <summary>↩</summary>
+ public const string InsertNewline = "insertNewline:";
+
+ /// <summary>⌃O</summary>
+ public const string InsertNewlineIgnoringFieldEditor = "insertNewlineIgnoringFieldEditor:";
+
+ public const string InsertRightToLeftSlash = "insertRightToLeftSlash:";
+
+ /// <summary>⌃'</summary>
+ public const string InsertSingleQuoteIgnoringSubstitution = "insertSingleQuoteIgnoringSubstitution:";
+
+ /// <summary>⇥, ↹</summary>
+ public const string InsertTab = "insertTab:";
+
+ public const string InsertTabIgnoringFieldEditor = "insertTabIgnoringFieldEditor:";
+
+ public const string MakeBaseWritingDirectionLeftToRight = "makeBaseWritingDirectionLeftToRight:";
+ public const string MakeBaseWritingDirectionNatural = "makeBaseWritingDirectionNatural:";
+ public const string MakeBaseWritingDirectionRightToLeft = "makeBaseWritingDirectionRightToLeft:";
+ public const string MakeTextWritingDirectionLeftToRight = "makeTextWritingDirectionLeftToRight:";
+ public const string MakeTextWritingDirectionNatural = "makeTextWritingDirectionNatural:";
+ public const string MakeTextWritingDirectionRightToLeft = "makeTextWritingDirectionRightToLeft:";
+
+ /// <summary>⌃B</summary>
+ public const string MoveBackward = "moveBackward:";
+
+ /// <summary>⇧⌃B</summary>
+ public const string MoveBackwardAndModifySelection = "moveBackwardAndModifySelection:";
+
+ /// <summary>⇣, ⌃N</summary>
+ public const string MoveDown = "moveDown:";
+
+ /// <summary>⇧⇣, ⇧⌃N</summary>
+ public const string MoveDownAndModifySelection = "moveDownAndModifySelection:";
+
+ /// <summary>⌃F</summary>
+ public const string MoveForward = "moveForward:";
+
+ /// <summary>⇧⌃F</summary>
+ public const string MoveForwardAndModifySelection = "moveForwardAndModifySelection:";
+
+ /// <summary>⇠</summary>
+ public const string MoveLeft = "moveLeft:";
+
+ /// <summary>⇧⇠</summary>
+ public const string MoveLeftAndModifySelection = "moveLeftAndModifySelection:";
+
+ /// <summary>⌥⇧⇡</summary>
+ public const string MoveParagraphBackwardAndModifySelection = "moveParagraphBackwardAndModifySelection:";
+
+ /// <summary>⌥⇧⇣</summary>
+ public const string MoveParagraphForwardAndModifySelection = "moveParagraphForwardAndModifySelection:";
+
+ /// <summary>⇢</summary>
+ public const string MoveRight = "moveRight:";
+
+ /// <summary>⇧⇢</summary>
+ public const string MoveRightAndModifySelection = "moveRightAndModifySelection:";
+
+ /// <summary>⌘⇡</summary>
+ public const string MoveToBeginningOfDocument = "moveToBeginningOfDocument:";
+
+ /// <summary>⇧⌘⇡</summary>
+ public const string MoveToBeginningOfDocumentAndModifySelection = "moveToBeginningOfDocumentAndModifySelection:";
+
+ /// <summary>⌃A</summary>
+ public const string MoveToBeginningOfParagraph = "moveToBeginningOfParagraph:";
+
+ /// <summary>⇧⌃A</summary>
+ public const string MoveToBeginningOfParagraphAndModifySelection = "moveToBeginningOfParagraphAndModifySelection:";
+
+ /// <summary>⌘⇣</summary>
+ public const string MoveToEndOfDocument = "moveToEndOfDocument:";
+
+ /// <summary>⇧⌘⇣</summary>
+ public const string MoveToEndOfDocumentAndModifySelection = "moveToEndOfDocumentAndModifySelection:";
+
+ /// <summary>⌃E</summary>
+ public const string MoveToEndOfParagraph = "moveToEndOfParagraph:";
+
+ /// <summary>⇧⌃E</summary>
+ public const string MoveToEndOfParagraphAndModifySelection = "moveToEndOfParagraphAndModifySelection:";
+
+ /// <summary>⌘⇠</summary>
+ public const string MoveToLeftEndOfLine = "moveToLeftEndOfLine:";
+
+ /// <summary>⇧⌘⇠</summary>
+ public const string MoveToLeftEndOfLineAndModifySelection = "moveToLeftEndOfLineAndModifySelection:";
+
+ /// <summary>⌘⇢</summary>
+ public const string MoveToRightEndOfLine = "moveToRightEndOfLine:";
+
+ /// <summary>⇧⌘⇢</summary>
+ public const string MoveToRightEndOfLineAndModifySelection = "moveToRightEndOfLineAndModifySelection:";
+
+ /// <summary>⇡, ⌃P</summary>
+ public const string MoveUp = "moveUp:";
+
+ /// <summary>⇧⇡, ⇧⌃P</summary>
+ public const string MoveUpAndModifySelection = "moveUpAndModifySelection:";
+
+ /// <summary>⌃⌥B</summary>
+ public const string MoveWordBackward = "moveWordBackward:";
+
+ /// <summary>⇧⌃⌥B</summary>
+ public const string MoveWordBackwardAndModifySelection = "moveWordBackwardAndModifySelection:";
+
+ /// <summary>⌃⌥F</summary>
+ public const string MoveWordForward = "moveWordForward:";
+
+ /// <summary>⇧⌃⌥F</summary>
+ public const string MoveWordForwardAndModifySelection = "moveWordForwardAndModifySelection:";
+
+ /// <summary>⌥⇠</summary>
+ public const string MoveWordLeft = "moveWordLeft:";
+
+ /// <summary>⇧⌥⇠</summary>
+ public const string MoveWordLeftAndModifySelection = "moveWordLeftAndModifySelection:";
+
+ /// <summary>⌥⇢</summary>
+ public const string MoveWordRight = "moveWordRight:";
+
+ /// <summary>⇧⌥⇢</summary>
+ public const string MoveWordRightAndModifySelection = "moveWordRightAndModifySelection:";
+
+ /// <summary>⌥fn⇣, ⌥⇟</summary>
+ public const string PageDown = "pageDown:";
+
+ /// <summary>⇧fn⇣, ⇧⇟</summary>
+ public const string PageDownAndModifySelection = "pageDownAndModifySelection:";
+
+ /// <summary>⌥fn⇡, ⌥⇞</summary>
+ public const string PageUp = "pageUp:";
+
+ /// <summary>⇧fn⇡, ⇧⇞</summary>
+ public const string PageUpAndModifySelection = "pageUpAndModifySelection:";
+
+ /// <summary>⌘F, ⌥⌘F, ⌘G, ⌥⌘G</summary>
+ public const string PerformTextFinderAction = "performTextFinderAction:";
+
+ /// <summary>fn⇡, ⇞</summary>
+ public const string ScrollPageDown = "scrollPageDown:";
+
+ /// <summary>fn⇣, ⇟</summary>
+ public const string ScrollPageUp = "scrollPageUp:";
+
+ /// <summary>fn⇠</summary>
+ public const string ScrollToBeginningOfDocument = "scrollToBeginningOfDocument:";
+
+ /// <summary>fn⇢</summary>
+ public const string ScrollToEndOfDocument = "scrollToEndOfDocument:";
+
+ public const string SelectNextKeyView = "selectNextKeyView:";
+
+ public const string SelectPreviousKeyView = "selectPreviousKeyView:";
+
+ public const string TogglePlatformInputSystem = "togglePlatformInputSystem:";
+
+ /// <summary>⌃T</summary>
+ public const string Transpose = "transpose:";
+
+ public const string Yank = "yank:";
+
+ #endregion
+
+ #region Standard AppKit Selectors
+
+ /// <summary>⌘C</summary>
+ public const string Copy = "copy:";
+
+ /// <summary>⌘X</summary>
+ public const string Cut = "cut:";
+
+ public const string Noop = "noop:";
+
+ /// <summary>⌘V</summary>
+ public const string Paste = "paste:";
+
+ /// <summary>⇧⌘Z</summary>
+ public const string Redo = "redo:";
+
+ /// <summary>⌘A</summary>
+ public const string SelectAll = "selectAll:";
+
+ /// <summary>⌘Z</summary>
+ public const string Undo = "undo:";
+
+ #endregion
+
+ #region Semi-standard AppKit Selectors
+
+ /// <summary>⌘+</summary>
+ public const string ZoomIn = "zoomIn:";
+
+ /// <summary>⌘-</summary>
+ public const string ZoomOut = "zoomOut:";
+
+ /// <summary>⌘0</summary>
+ public const string ZoomReset = "zoomReset:";
+
+ #endregion
+
+ #region VS Editor Specific Selectors
+
+ public const string CommitUniqueCompletionListItem = "commitUniqueCompletionListItem:";
+
+ public const string InvokeSignatureHelp = "invokeSignatureHelp:";
+
+ public const string TransposeWord = "transposeWord:";
+
+ public const string TransposeLine = "transposeLine:";
+
+ #endregion
+ }
+
+ public enum TextFinderAction
+ {
+ ShowFindInterface = 1,
+ NextMatch,
+ PreviousMatch,
+ ReplaceAll,
+ Replace,
+ ReplaceAndFind,
+ SetSearchString,
+ ReplaceAllInSelection,
+ SelectAll,
+ SelectAllInSelection,
+ HideFindInterface,
+ ShowReplaceInterface,
+ HideReplaceInterface
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Commanding/CommandState.cs b/src/Editor/Text/Def/TextUI/Commanding/CommandState.cs
index 93680c1..a6de4a3 100644
--- a/src/Editor/Text/Def/TextUI/Commanding/CommandState.cs
+++ b/src/Editor/Text/Def/TextUI/Commanding/CommandState.cs
@@ -2,7 +2,12 @@
namespace Microsoft.VisualStudio.Commanding
{
+ /// <summary>
+ /// Returned by <see cref="ICommandHandler{T}.GetCommandState(T)"/> and determines the state of the command.
+ /// </summary>
+#pragma warning disable CA1815 // Override equals and operator equals on value types
public struct CommandState
+#pragma warning restore CA1815 // Override equals and operator equals on value types
{
/// <summary>
/// If true, the command state is unspecified and should not be taken into account.
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/CodeCleanupCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/CodeCleanupCommandArgs.cs
new file mode 100644
index 0000000..6530588
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/CodeCleanupCommandArgs.cs
@@ -0,0 +1,9 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ public sealed class CodeCleanUpCommandArgs : EditorCommandArgs
+ {
+ public CodeCleanUpCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/ErrorCommandArgsBase.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/ErrorCommandArgsBase.cs
new file mode 100644
index 0000000..8647e3b
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/ErrorCommandArgsBase.cs
@@ -0,0 +1,35 @@
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ using System.Collections.Generic;
+ using Microsoft.VisualStudio.Text.Tagging;
+
+ /// <summary>
+ /// Base <see cref="EditorCommandArgs"/> type for navigation between errors.
+ /// </summary>
+ public abstract class ErrorCommandArgsBase : EditorCommandArgs
+ {
+ /// <summary>
+ /// The list of <see cref="IErrorTag.ErrorType"/> name strings of tags applicable to this command invocation.
+ /// </summary>
+ /// <remarks>
+ /// Can be <c>null</c>, indicating that this command applies to all types of errors.
+ /// </remarks>
+ public IEnumerable<string> ErrorTagTypeNames { get; }
+
+ /// <summary>
+ /// Creates an instance of <see cref="ErrorCommandArgsBase"/> with a list of matching error types.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> upon which to invoke the command.</param>
+ /// <param name="subjectBuffer">The <see cref="ITextBuffer"/> upon which to invoke the command.</param>
+ /// <param name="errorTypeNames">A list of error type names to include.</param>
+ /// <remarks>
+ /// <paramref name="errorTypeNames"/> defaults to the set of all defined error types if not specified.
+ /// </remarks>
+ protected ErrorCommandArgsBase(ITextView textView, ITextBuffer subjectBuffer, IEnumerable<string> errorTypeNames)
+ : base(textView, subjectBuffer)
+ {
+ this.ErrorTagTypeNames = errorTypeNames;
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/GoToContainingDeclarationCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/GoToContainingDeclarationCommandArgs.cs
new file mode 100644
index 0000000..106deca
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/GoToContainingDeclarationCommandArgs.cs
@@ -0,0 +1,9 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ public sealed class GoToContainingDeclarationCommandArgs : EditorCommandArgs
+ {
+ public GoToContainingDeclarationCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/IncrementLastSecondaryCaretCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/IncrementLastSecondaryCaretCommandArgs.cs
new file mode 100644
index 0000000..58eb4c7
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/IncrementLastSecondaryCaretCommandArgs.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ /// <summary>
+ /// This command refers to the gesture which takes the last secondary caret as defined in
+ /// <see cref="RemoveLastSecondaryCaretCommandArgs"/>, and moving it to the location where a caret would
+ /// be added by <see cref="InsertNextMatchingCaretCommandArgs"/>. This command is only available if there are
+ /// already multiple carets.
+ /// </summary>
+ public sealed class IncrementLastSecondaryCaretCommandArgs : EditorCommandArgs
+ {
+ public IncrementLastSecondaryCaretCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/InsertAllMatchingCaretsCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/InsertAllMatchingCaretsCommandArgs.cs
new file mode 100644
index 0000000..12fa52d
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/InsertAllMatchingCaretsCommandArgs.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ /// <summary>
+ /// This command refers to the gesture to select all instances of text that matches the current primary selection.
+ /// </summary>
+ public sealed class InsertAllMatchingCaretsCommandArgs : EditorCommandArgs
+ {
+ public InsertAllMatchingCaretsCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/InsertNextMatchingCaretCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/InsertNextMatchingCaretCommandArgs.cs
new file mode 100644
index 0000000..932036b
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/InsertNextMatchingCaretCommandArgs.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ /// <summary>
+ /// This command refers to the gesture to add a new caret at the next instance of whatever the primary selection contains within the given view.
+ /// </summary>
+ public sealed class InsertNextMatchingCaretCommandArgs : EditorCommandArgs
+ {
+ public InsertNextMatchingCaretCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/InvokeQuickFixCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/InvokeQuickFixCommandArgs.cs
new file mode 100644
index 0000000..67d5099
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/InvokeQuickFixCommandArgs.cs
@@ -0,0 +1,9 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ public sealed class InvokeQuickFixCommandArgs : EditorCommandArgs
+ {
+ public InvokeQuickFixCommandArgs (ITextView textView, ITextBuffer subjectBuffer) : base (textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/MoveLastCaretDownCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/MoveLastCaretDownCommandArgs.cs
new file mode 100644
index 0000000..5e3a277
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/MoveLastCaretDownCommandArgs.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ /// <summary>
+ /// This command refers to the gesture which takes the last secondary caret as defined in
+ /// <see cref="RemoveLastSecondaryCaretCommandArgs"/>, and moving it to the location where a caret would
+ /// be added by <see cref="InsertNextMatchingCaretCommandArgs"/>. This command is only available if there are
+ /// already multiple carets.
+ /// </summary>
+ public sealed class MoveLastCaretDownCommandArgs : EditorCommandArgs
+ {
+ public MoveLastCaretDownCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/NavigateToNextIssueInDocumentCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/NavigateToNextIssueInDocumentCommandArgs.cs
new file mode 100644
index 0000000..9a8980c
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/NavigateToNextIssueInDocumentCommandArgs.cs
@@ -0,0 +1,35 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ using System.Collections.Generic;
+ using Microsoft.VisualStudio.Text.Adornments;
+ using Microsoft.VisualStudio.Text.Tagging;
+
+ /// <summary>
+ /// <see cref="EditorCommandArgs"/> for next error command.
+ /// </summary>
+ public sealed class NavigateToNextIssueInDocumentCommandArgs : ErrorCommandArgsBase
+ {
+ /// <summary>
+ /// Creates an instance of <see cref="NavigateToNextIssueInDocumentCommandArgs"/> with a list of error types.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> upon which to invoke the command.</param>
+ /// <param name="subjectBuffer">The <see cref="ITextBuffer"/> upon which to invoke the command.</param>
+ public NavigateToNextIssueInDocumentCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : this(textView, subjectBuffer, null)
+ {
+ }
+
+ /// <summary>
+ /// Creates an instance of <see cref="NavigateToNextIssueInDocumentCommandArgs"/> with a list of error types.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> upon which to invoke the command.</param>
+ /// <param name="subjectBuffer">The <see cref="ITextBuffer"/> upon which to invoke the command.</param>
+ /// <param name="errorTypeNames">A list of error type names to include.</param>
+ /// <remarks>
+ /// <paramref name="errorTypeNames"/> defaults to the set of all defined error types if not specified.
+ /// </remarks>
+ public NavigateToNextIssueInDocumentCommandArgs(ITextView textView, ITextBuffer subjectBuffer, IEnumerable<string> errorTypeNames)
+ : base(textView, subjectBuffer, errorTypeNames)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/NavigateToPreviousIssueInDocumentCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/NavigateToPreviousIssueInDocumentCommandArgs.cs
new file mode 100644
index 0000000..39f24c3
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/NavigateToPreviousIssueInDocumentCommandArgs.cs
@@ -0,0 +1,35 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ using System.Collections.Generic;
+ using Microsoft.VisualStudio.Text.Adornments;
+ using Microsoft.VisualStudio.Text.Tagging;
+
+ /// <summary>
+ /// <see cref="EditorCommandArgs"/> for next error command.
+ /// </summary>
+ public sealed class NavigateToPreviousIssueInDocumentCommandArgs : ErrorCommandArgsBase
+ {
+ /// <summary>
+ /// Creates an instance of <see cref="NavigateToNextIssueInDocumentCommandArgs"/> with a list of error types.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> upon which to invoke the command.</param>
+ /// <param name="subjectBuffer">The <see cref="ITextBuffer"/> upon which to invoke the command.</param>
+ public NavigateToPreviousIssueInDocumentCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : this(textView, subjectBuffer, null)
+ {
+ }
+
+ /// <summary>
+ /// Creates an instance of <see cref="NavigateToPreviousIssueInDocumentCommandArgs"/> with a list of error types.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> upon which to invoke the command.</param>
+ /// <param name="subjectBuffer">The <see cref="ITextBuffer"/> upon which to invoke the command.</param>
+ /// <param name="errorTypeNames">A list of error type names to include.</param>
+ /// <remarks>
+ /// <paramref name="errorTypeNames"/> defaults to the set of all defined error types if not specified.
+ /// </remarks>
+ public NavigateToPreviousIssueInDocumentCommandArgs(ITextView textView, ITextBuffer subjectBuffer, IEnumerable<string> errorTypeNames = null)
+ : base(textView, subjectBuffer, errorTypeNames)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindBaseSymbolsCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindBaseSymbolsCommandArgs.cs
new file mode 100644
index 0000000..5c5e5c3
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindBaseSymbolsCommandArgs.cs
@@ -0,0 +1,31 @@
+//
+// FindBaseSymbolsCommandArgs.cs
+// Copyright (c) 2019 Microsoft
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation
+{
+ public sealed class FindBaseSymbolsCommandArgs : EditorCommandArgs
+ {
+ public FindBaseSymbolsCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindDerivedSymbolsCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindDerivedSymbolsCommandArgs.cs
new file mode 100644
index 0000000..14872c1
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindDerivedSymbolsCommandArgs.cs
@@ -0,0 +1,32 @@
+//
+// FindDerivedSymbols.cs
+//
+// Copyright (c) 2019 Microsoft
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation
+{
+ public sealed class FindDerivedSymbolsCommandArgs : EditorCommandArgs
+ {
+ public FindDerivedSymbolsCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindExtensionMethodsCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindExtensionMethodsCommandArgs.cs
new file mode 100644
index 0000000..2d7e532
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindExtensionMethodsCommandArgs.cs
@@ -0,0 +1,31 @@
+//
+// FindExtensionMethodsCommandArgs.cs
+//
+// Copyright (c) 2019 Microsoft
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation
+{
+ public sealed class FindExtensionMethodsCommandArgs : EditorCommandArgs
+ {
+ public FindExtensionMethodsCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindImplementingMembersCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindImplementingMembersCommandArgs.cs
new file mode 100644
index 0000000..6b09cb5
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindImplementingMembersCommandArgs.cs
@@ -0,0 +1,32 @@
+//
+// FindImplementingMembersCommandArgs.cs
+//
+// Copyright (c) 2019 Microsoft
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation
+{
+ public sealed class FindImplementingMembersCommandArgs : EditorCommandArgs
+ {
+ public FindImplementingMembersCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindMemberOverloadsCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindMemberOverloadsCommandArgs.cs
new file mode 100644
index 0000000..9699c83
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindMemberOverloadsCommandArgs.cs
@@ -0,0 +1,32 @@
+//
+// FindMemberOverloadsCommandArgs.cs
+//
+// Copyright (c) 2019 Microsoft
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation
+{
+ public sealed class FindMemberOverloadsCommandArgs : EditorCommandArgs
+ {
+ public FindMemberOverloadsCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindReferencesOfOverloadsCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindReferencesOfOverloadsCommandArgs.cs
new file mode 100644
index 0000000..8f133ef
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/Navigation/FindReferencesOfOverloadsCommandArgs.cs
@@ -0,0 +1,32 @@
+//
+// FindReferencesOfOverloadsCommandArgs.cs
+//
+// Copyright (c) 2019 Microsoft
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands.Navigation
+{
+ public sealed class FindReferencesOfOverloadsCommandArgs : EditorCommandArgs
+ {
+ public FindReferencesOfOverloadsCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/RedoCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/RedoCommandArgs.cs
index 5e606b8..63881ca 100644
--- a/src/Editor/Text/Def/TextUI/Commanding/Commands/RedoCommandArgs.cs
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/RedoCommandArgs.cs
@@ -2,7 +2,9 @@ namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
{
public sealed class RedoCommandArgs : EditorCommandArgs
{
+#pragma warning disable CA1051 // Do not declare visible instance fields
public readonly int Count;
+#pragma warning restore CA1051 // Do not declare visible instance fields
public RedoCommandArgs(ITextView textView, ITextBuffer subjectBuffer, int count = 1) : base(textView, subjectBuffer)
{
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/RemoveLastSecondaryCaretCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/RemoveLastSecondaryCaretCommandArgs.cs
new file mode 100644
index 0000000..a491289
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/RemoveLastSecondaryCaretCommandArgs.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ /// <summary>
+ /// This command refers to the gesture used to remove a secondary caret from a text view. The the caret to remove is identified
+ /// as the last caret in a circular loop, starting at the primary caret. Effectively, that means either the caret directly above
+ /// the primary caret, or the last one in the view. This command is not available if there is only one caret.
+ /// </summary>
+ public sealed class RemoveLastSecondaryCaretCommandArgs : EditorCommandArgs
+ {
+ public RemoveLastSecondaryCaretCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/RotatePrimaryCaretNextCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/RotatePrimaryCaretNextCommandArgs.cs
new file mode 100644
index 0000000..bb278a8
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/RotatePrimaryCaretNextCommandArgs.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ /// <summary>
+ /// This command refers to the gesture to change the primary caret to the next caret in the document, and make that visible to the user.
+ /// </summary>
+ public sealed class RotatePrimaryCaretNextCommandArgs : EditorCommandArgs
+ {
+ public RotatePrimaryCaretNextCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/RotatePrimaryCaretPreviousCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/RotatePrimaryCaretPreviousCommandArgs.cs
new file mode 100644
index 0000000..b517389
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/RotatePrimaryCaretPreviousCommandArgs.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ /// <summary>
+ /// This command refers to the gesture to make the primary caret the next one up in the document, and make it visible to the user.
+ /// </summary>
+ public sealed class RotatePrimaryCaretPreviousCommandArgs : EditorCommandArgs
+ {
+ public RotatePrimaryCaretPreviousCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/SelectContainingDeclarationCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/SelectContainingDeclarationCommandArgs.cs
new file mode 100644
index 0000000..3851c5c
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/SelectContainingDeclarationCommandArgs.cs
@@ -0,0 +1,9 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ public sealed class SelectContainingDeclarationCommandArgs : EditorCommandArgs
+ {
+ public SelectContainingDeclarationCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/ShowClipboardHistoryCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/ShowClipboardHistoryCommandArgs.cs
new file mode 100644
index 0000000..8defee7
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/ShowClipboardHistoryCommandArgs.cs
@@ -0,0 +1,9 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ public sealed class ShowClipboardHistoryCommandArgs: EditorCommandArgs
+ {
+ public ShowClipboardHistoryCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/ShowNavigateMenuCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/ShowNavigateMenuCommandArgs.cs
new file mode 100644
index 0000000..7dd4d93
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/ShowNavigateMenuCommandArgs.cs
@@ -0,0 +1,9 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ public sealed class ShowNavigateMenuCommandArgs: EditorCommandArgs
+ {
+ public ShowNavigateMenuCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/ToggleCommentSelectionCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/ToggleCommentSelectionCommandArgs.cs
new file mode 100644
index 0000000..c682c5c
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/ToggleCommentSelectionCommandArgs.cs
@@ -0,0 +1,9 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
+{
+ public sealed class ToggleCommentSelectionCommandArgs : EditorCommandArgs
+ {
+ public ToggleCommentSelectionCommandArgs(ITextView textView, ITextBuffer subjectBuffer) : base(textView, subjectBuffer)
+ {
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/Commands/UndoCommandArgs.cs b/src/Editor/Text/Def/TextUI/Commanding/Commands/UndoCommandArgs.cs
index ce0df8b..f25f631 100644
--- a/src/Editor/Text/Def/TextUI/Commanding/Commands/UndoCommandArgs.cs
+++ b/src/Editor/Text/Def/TextUI/Commanding/Commands/UndoCommandArgs.cs
@@ -2,7 +2,9 @@ namespace Microsoft.VisualStudio.Text.Editor.Commanding.Commands
{
public sealed class UndoCommandArgs : EditorCommandArgs
{
+#pragma warning disable CA1051 // Do not declare visible instance fields
public readonly int Count;
+#pragma warning restore CA1051 // Do not declare visible instance fields
public UndoCommandArgs(ITextView textView, ITextBuffer subjectBuffer, int count = 1) : base(textView, subjectBuffer)
{
diff --git a/src/Editor/Text/Def/TextUI/Commanding/IChainedCommandHandler.cs b/src/Editor/Text/Def/TextUI/Commanding/IChainedCommandHandler.cs
index 7dab7e3..286d8d1 100644
--- a/src/Editor/Text/Def/TextUI/Commanding/IChainedCommandHandler.cs
+++ b/src/Editor/Text/Def/TextUI/Commanding/IChainedCommandHandler.cs
@@ -23,6 +23,10 @@ namespace Microsoft.VisualStudio.Commanding
{
/// <summary>
/// Called to determine the state of the command.
+ /// This method should never return <see cref="CommandState.Unspecified"/> as it would prevent calling following command handlers.
+ /// <paramref name="nextCommandHandler"/> should be called instead. If a <see cref="IChainedCommandHandler{T}"/> handles a command
+ /// it doesn't own, its <see cref="GetCommandState(T, Func{CommandState})"/> should always call <paramref name="nextCommandHandler"/>"
+ /// to give a chance a <see cref="ICommandHandler"/> that owns the command to enable or disable it.
/// </summary>
/// <param name="args">The <see cref="CommandArgs"/> arguments for the command.</param>
/// <param name="nextCommandHandler">The next command handler in the command execution chain.</param>
@@ -31,6 +35,8 @@ namespace Microsoft.VisualStudio.Commanding
/// <summary>
/// Called to execute the command.
+ /// If this implementation does not execute the command, <paramref name="nextCommandHandler"/> should be called
+ /// so that other <see cref="ICommandHandler"/>s may act on this command.
/// </summary>
/// <param name="args">The <see cref="CommandArgs"/> arguments for the command.</param>
/// <param name="nextCommandHandler">The next command handler in the command execution chain.</param>
diff --git a/src/Editor/Text/Def/TextUI/Commanding/ICommandDispatcherFactory.cs b/src/Editor/Text/Def/TextUI/Commanding/ICommandDispatcherFactory.cs
new file mode 100644
index 0000000..95cf8cf
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/ICommandDispatcherFactory.cs
@@ -0,0 +1,7 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding
+{
+ public interface ICommandDispatcherFactory
+ {
+ ISelectorCommandDispatcher GetDispatcher(ITextView textView);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Commanding/ICommandHandler.cs b/src/Editor/Text/Def/TextUI/Commanding/ICommandHandler.cs
index c999be2..f98d68b 100644
--- a/src/Editor/Text/Def/TextUI/Commanding/ICommandHandler.cs
+++ b/src/Editor/Text/Def/TextUI/Commanding/ICommandHandler.cs
@@ -53,4 +53,15 @@ namespace Microsoft.VisualStudio.Commanding
/// <returns>Returns <c>true</c> if the command was handled, <c>false</c> otherwise.</returns>
bool ExecuteCommand(T args, CommandExecutionContext executionContext);
}
+
+ /// <summary>
+ /// A command handler that can opt out of <see cref="ICommandHandler{T}.ExecuteCommand(T, CommandExecutionContext)"/>.
+ /// </summary>
+ internal interface IDynamicCommandHandler<T> where T : CommandArgs
+ {
+ /// <summary>
+ /// Determines whether <see cref="ICommandHandler{T}.ExecuteCommand(T, CommandExecutionContext)"/> should be called.
+ /// </summary>
+ bool CanExecuteCommand(T args);
+ }
}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/IEditorCommandHandlerServiceFactory.cs b/src/Editor/Text/Def/TextUI/Commanding/IEditorCommandHandlerServiceFactory.cs
index 226deb2..c16e312 100644
--- a/src/Editor/Text/Def/TextUI/Commanding/IEditorCommandHandlerServiceFactory.cs
+++ b/src/Editor/Text/Def/TextUI/Commanding/IEditorCommandHandlerServiceFactory.cs
@@ -12,16 +12,17 @@
public interface IEditorCommandHandlerServiceFactory
{
/// <summary>
- /// Gets or creates a <see cref="IEditorCommandHandlerService"/> for a given <see cref="ITextView"/>.
+ /// Gets or creates an <see cref="IEditorCommandHandlerService"/> instance for a given <see cref="ITextView"/>.
/// </summary>
+ /// <remarks>Only one <see cref="IEditorCommandHandlerService"/> instance is ever created for each <see cref="ITextView" />.</remarks>
/// <param name="textView">A text view to get or create <see cref="IEditorCommandHandlerService"/> for.</param>
IEditorCommandHandlerService GetService(ITextView textView);
/// <summary>
- /// Gets or creates a <see cref="IEditorCommandHandlerService"/> for a given <see cref="ITextView"/> and <see cref="ITextBuffer"/>.
+ /// Creates a new <see cref="IEditorCommandHandlerService"/> instance for a given <see cref="ITextView"/> and <see cref="ITextBuffer"/>.
/// </summary>
- /// <param name="textView">A text view to get or create <see cref="IEditorCommandHandlerService"/> for.</param>
- /// <param name="subjectBuffer">A text buffer to get or create <see cref="IEditorCommandHandlerService"/> for.</param>
+ /// <param name="textView">A text view to create <see cref="IEditorCommandHandlerService"/> for.</param>
+ /// <param name="subjectBuffer">A text buffer to create <see cref="IEditorCommandHandlerService"/> for.</param>
IEditorCommandHandlerService GetService(ITextView textView, ITextBuffer subjectBuffer);
}
}
diff --git a/src/Editor/Text/Def/TextUI/Commanding/ISelectorCommandDispatcher.cs b/src/Editor/Text/Def/TextUI/Commanding/ISelectorCommandDispatcher.cs
new file mode 100644
index 0000000..92eb554
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Commanding/ISelectorCommandDispatcher.cs
@@ -0,0 +1,14 @@
+namespace Microsoft.VisualStudio.Text.Editor.Commanding
+{
+ /// <summary>
+ /// A dispatcher to execute commands on a text view based on standard macOS selectors.
+ /// </summary>
+ public interface ISelectorCommandDispatcher
+ {
+ bool RespondsToSelector(string selector, object sender, int? tag = null);
+ void DoCommandBySelector(string selector, object sender, int? tag = null);
+ void ReplaceText(Span replaceSpan, string text);
+ void InsertChar(char c);
+ void InsertChars(string chars);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Diagrams/BasePrimitives.cd b/src/Editor/Text/Def/TextUI/Diagrams/BasePrimitives.cd
deleted file mode 100644
index c45269d..0000000
--- a/src/Editor/Text/Def/TextUI/Diagrams/BasePrimitives.cd
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Comment CommentText="Editor primitive types exposed in the definition assembly">
- <Position X="7.261" Y="0.5" Height="0.781" Width="1.7" />
- </Comment>
- <Class Name="Microsoft.VisualStudio.Text.Editor.TextBuffer">
- <Position X="3.5" Y="0.5" Width="3.25" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAQAQAAQAAAAAAAAAAAAAAAACAAAAQAAAAAg=</HashCode>
- <FileName>Primitives\TextBuffer.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Editor.Caret">
- <Position X="0.5" Y="4.5" Width="2.75" />
- <TypeIdentifier>
- <HashCode>AAAJAACgAIAAAAAAAACACAACJgAIAAAAAACAAAggAAQ=</HashCode>
- <FileName>Primitives\Caret.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Editor.Selection">
- <Position X="0.5" Y="12.25" Width="3.25" />
- <TypeIdentifier>
- <HashCode>AABAAAAAACAAAAAAAAIAAEAAAAAAAAAQAAAAQABAAAA=</HashCode>
- <FileName>Primitives\Selection.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Editor.TextView">
- <Position X="0.5" Y="0.5" Width="2.75" />
- <TypeIdentifier>
- <HashCode>AAAAQAAAAgARAARAIAAAAAAAEAAAAAgkAAAEAAEAQAA=</HashCode>
- <FileName>Primitives\TextView.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Editor.TextRange">
- <Position X="6.5" Y="12.25" Width="2.25" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAMABAMqAAQAAAAACEYAAAEAAIAQAALABg=</HashCode>
- <FileName>Primitives\TextRange.cs</FileName>
- </TypeIdentifier>
- <Lollipop Position="0.1" />
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Editor.TextPoint">
- <Position X="6.5" Y="3.25" Width="2.5" />
- <TypeIdentifier>
- <HashCode>AAAJABCAAIAQggIEJABYCAAKKiAIAgAQAAGAAQkgABU=</HashCode>
- <FileName>Primitives\TextPoint.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Editor.DisplayTextPoint">
- <Position X="4.25" Y="3.25" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAEAQEAAAAAAAAAAgAAAAAAAFAAAAAABA=</HashCode>
- <FileName>Primitives\DisplayTextPoint.cs</FileName>
- </TypeIdentifier>
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Editor.DisplayTextRange">
- <Position X="4.25" Y="12.25" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AEgQAAAAAAAAABAFAAAAAAAAAAgQAAAEAAAAAAAAABA=</HashCode>
- <FileName>Primitives\DisplayTextRange.cs</FileName>
- </TypeIdentifier>
- <Lollipop Position="0.2" />
- </Class>
- <Enum Name="Microsoft.VisualStudio.Text.Editor.HowToShow">
- <Position X="7.25" Y="1.5" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAAAAAAAACBCAAAAAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Primitives\HowToShow.cs</FileName>
- </TypeIdentifier>
- </Enum>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Diagrams/Editor.cd b/src/Editor/Text/Def/TextUI/Diagrams/Editor.cd
deleted file mode 100644
index 6a1c4dd..0000000
--- a/src/Editor/Text/Def/TextUI/Diagrams/Editor.cd
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Interface Name="Microsoft.VisualStudio.Text.Editor.ITextView">
- <Position X="4.25" Y="1.75" Width="2.5" />
- <TypeIdentifier>
- <HashCode>AAAAGAIABAEEAEAiKNwAAAAACgIQAkkAFAAACAjAQIA=</HashCode>
- <FileName>Editor\ITextView.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="ViewScroller" />
- <Property Name="Caret" />
- <Property Name="Selection" />
- <Property Name="TextBuffer" />
- <Property Name="TextSnapshot" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Editor.ITextCaret">
- <Position X="9.75" Y="1.75" Width="2.5" />
- <TypeIdentifier>
- <HashCode>ABAAAAAABBAAAAAgAACQAEAIAAALAAAACACAAAAAEAg=</HashCode>
- <FileName>Editor\ITextCaret.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Editor.ITextSelection">
- <Position X="7.75" Y="1.75" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAJAACAAAKAAIAgABAAAAAAAAAgAAEAAAAAAQABAAAA=</HashCode>
- <FileName>Editor\ITextSelection.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="TextView" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextSnapshot" Collapsed="true">
- <Position X="1.5" Y="1.75" Width="1.5" />
- <TypeIdentifier />
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextBuffer" Collapsed="true">
- <Position X="1.5" Y="2.75" Width="1.5" />
- <TypeIdentifier />
- <ShowAsAssociation>
- <Property Name="CurrentSnapshot" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Editor.IViewScroller">
- <Position X="0.75" Y="4" Width="2.5" />
- <TypeIdentifier>
- <HashCode>AAQAAAAAAAAEAAAAAAAAAAAAAAAACAAhAAAAAAAAAAA=</HashCode>
- <FileName>Editor\IViewScroller.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Editor.IScrollMap">
- <Position X="1" Y="9.75" Width="2.25" />
- <TypeIdentifier>
- <HashCode>gAAAAAAAAAAAAAAAAAAAAAAAAAAAEAEAAAAAAACAAAA=</HashCode>
- <FileName>Editor\IScrollMap.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Editor.IVerticalFractionMap">
- <Position X="1" Y="7" Width="2.25" />
- <AssociationLine Name="TextView" Type="Microsoft.VisualStudio.Text.Editor.ITextView" FixedFromPoint="true" FixedToPoint="true">
- <Path>
- <Point X="3.25" Y="7.406" />
- <Point X="3.625" Y="7.406" />
- <Point X="3.625" Y="6.625" />
- <Point X="4.25" Y="6.625" />
- </Path>
- </AssociationLine>
- <TypeIdentifier>
- <HashCode>ABACAAAAAAAAAIAAAAAAAAAAAAgAAAAAAAAAAAAAAAA=</HashCode>
- <FileName>Editor\IVerticalFractionMap.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="TextView" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Editor.ITextViewMargin">
- <Position X="7.5" Y="7.5" Width="1.75" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAAAIAAAAAIAAAAAAAAAAACAAAAAAAAAAA=</HashCode>
- <FileName>Editor\ITextViewMargin.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Editor.IVerticalScrollBar">
- <Position X="4.75" Y="9.75" Width="2.25" />
- <TypeIdentifier>
- <HashCode>AAAAACQAABAgAAAAAACBAAAAAAAAAAAAAAAAAAAAACA=</HashCode>
- <FileName>Editor\IVerticalScrollBar.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Property Name="Map" />
- </ShowAsAssociation>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Formatting.ITextViewLine">
- <Position X="12.75" Y="2.5" Width="3.25" />
- <TypeIdentifier>
- <HashCode>UEMIIACARChiAAQAYMgQEFBAAQGIQIIqGACAAoAUEAA=</HashCode>
- <FileName>Formatting\ITextViewLine.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Editor/ISpaceReservationAgent.cs b/src/Editor/Text/Def/TextUI/Editor/ISpaceReservationAgent.cs
new file mode 100644
index 0000000..7fcc727
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Editor/ISpaceReservationAgent.cs
@@ -0,0 +1,51 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ using System;
+ using System.Drawing;
+ using System.Windows.Media;
+
+ /// <summary>
+ /// Handles the display of space reservation adornments.
+ /// </summary>
+ public interface ISpaceReservationAgent
+ {
+ /// <summary>
+ /// Positions and displays the contents of the the <see cref="ISpaceReservationAgent"/>.
+ /// </summary>
+ /// <param name="reservedSpace">Currently reserved space.</param>
+ /// <returns>The space. If null is returned, the <see cref="ISpaceReservationManager"/> will remove the agent.</returns>
+ /// <remarks>If an agent does not want to be removed, but also does not wish to request any additional space, it can return a non-null but empty Geometry.</remarks>
+ Geometry PositionAndDisplay(Geometry reservedSpace);
+
+ /// <summary>
+ /// Called whenever the content of the space reservation agent should be hidden.
+ /// </summary>
+ /// <remarks>This method is called by the manager to hide the content of the space reservation agent.</remarks>
+ void Hide();
+
+ /// <summary>
+ /// Determines whether the mouse is over this agent or anything it contains.
+ /// </summary>
+ bool IsMouseOver { get; }
+
+ /// <summary>
+ /// Determines whether the adornment created by the space reservation agent has keyboard focus.
+ /// </summary>
+ bool HasFocus { get; }
+
+ /// <summary>
+ /// Occurs when the adornment created by the ISpaceReservationAgent loses focus.
+ /// </summary>
+ event EventHandler LostFocus;
+
+ /// <summary>
+ /// Occurs when the adornment created by the ISpaceReservationAgent gets focus.
+ /// </summary>
+ event EventHandler GotFocus;
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Editor/ISpaceReservationManager.cs b/src/Editor/Text/Def/TextUI/Editor/ISpaceReservationManager.cs
new file mode 100644
index 0000000..7d7b048
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Editor/ISpaceReservationManager.cs
@@ -0,0 +1,88 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ using System.Collections.ObjectModel;
+ using System.Windows;
+ using Microsoft.VisualStudio.Text.Adornments;
+ using System;
+ using System.Windows.Media;
+
+ /// <summary>
+ /// Manages space reservation adornments.
+ /// </summary>
+ public interface ISpaceReservationManager
+ {
+ /// <summary>
+ /// Creates a default implementation of an <see cref="ISpaceReservationAgent"/> that displays <paramref name="content"/> in a popup window.
+ /// </summary>
+ /// <param name="visualSpan">The span of text associated with the tip.</param>
+ /// <param name="style">The style options for displaying the tip.</param>
+ /// <param name="content">The UI element to be displayed in the tip.</param>
+ /// <returns>An <see cref="ISpaceReservationAgent"/> that will display the desired content in a popup window.</returns>
+ ISpaceReservationAgent CreatePopupAgent(ITrackingSpan visualSpan, PopupStyles style, object content);
+
+ /// <summary>
+ /// Updates <paramref name="agent"/> with the <paramref name="visualSpan"/>.
+ /// This only works for PopupAgents and returns for other agents.
+ /// </summary>
+ /// <param name="agent">The agent to add.</param>
+ /// <param name="visualSpan">The agent's new visual span.</param>
+ void UpdatePopupAgent(ISpaceReservationAgent agent, ITrackingSpan visualSpan, PopupStyles styles);
+
+ /// <summary>
+ /// Adds <paramref name="agent"/> to the list of agents managed by this manager.
+ /// </summary>
+ /// <param name="agent">The agent to add.</param>
+ void AddAgent(ISpaceReservationAgent agent);
+
+ /// <summary>
+ /// Removes <paramref name="agent"/> from the list of agents managed by this manager.
+ /// </summary>
+ /// <param name="agent">The agent to remove.</param>
+ /// <returns><c>true</c> if the agent was in the list of agents to remove.</returns>
+ bool RemoveAgent(ISpaceReservationAgent agent);
+
+ /// <summary>
+ /// Gets the list of agents managed by this manager.
+ /// </summary>
+ /// <remarks>Any implementation of aa <see cref="ISpaceReservationAgent"/> can be used for this method.</remarks>
+ ReadOnlyCollection<ISpaceReservationAgent> Agents { get; }
+
+ /// <summary>
+ /// Occurs when the agent is changed.
+ /// </summary>
+ /// <remarks></remarks>
+ event EventHandler<SpaceReservationAgentChangedEventArgs> AgentChanged;
+
+ /// <summary>
+ /// Determines whether the mouse is over an agent managed by this manager.
+ /// </summary>
+ bool IsMouseOver { get; }
+
+ /// <summary>
+ /// Determines whether the adornment created by the space reservation agent has keyboard focus.
+ /// </summary>
+ bool HasAggregateFocus { get; }
+
+ string Name { get; }
+ int Rank { get; }
+
+ /// <summary>
+ /// Occurs when keyboard focus is lost by any of the managed adornments.
+ /// </summary>
+ event EventHandler LostAggregateFocus;
+
+ void PositionAndDisplay(GeometryGroup reservedGeometry);
+
+ /// <summary>
+ /// Occurs when any of the managed adornments gets keyboard focus.
+ /// </summary>
+ event EventHandler GotAggregateFocus;
+
+
+ }
+}
+
diff --git a/src/Editor/Text/Def/TextUI/Editor/ITextView.cs b/src/Editor/Text/Def/TextUI/Editor/ITextView.cs
index b11d1b5..ea3a02d 100644
--- a/src/Editor/Text/Def/TextUI/Editor/ITextView.cs
+++ b/src/Editor/Text/Def/TextUI/Editor/ITextView.cs
@@ -463,5 +463,16 @@ namespace Microsoft.VisualStudio.Text.Editor
event EventHandler GotAggregateFocus;
#endregion // Events
+
+ /// <summary>
+ /// Gets a named <see cref="ISpaceReservationManager"/>.
+ /// </summary>
+ /// <param name="name">The name of the manager.</param>
+ /// <returns>An instance of the manager in this view. Not null.</returns>
+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="name"/> is not registered via an <see cref="SpaceReservationManagerDefinition"/>.</exception>
+ /// <remarks>
+ /// <para>Managers must be exported using <see cref="SpaceReservationManagerDefinition"/> component parts.</para>
+ /// </remarks>
+ ISpaceReservationManager GetSpaceReservationManager(string name);
}
}
diff --git a/src/Editor/Text/Def/TextUI/Editor/ITextView2.cs b/src/Editor/Text/Def/TextUI/Editor/ITextView2.cs
index 0469f75..93ffcc5 100644
--- a/src/Editor/Text/Def/TextUI/Editor/ITextView2.cs
+++ b/src/Editor/Text/Def/TextUI/Editor/ITextView2.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
@@ -92,4 +92,4 @@ namespace Microsoft.VisualStudio.Text.Editor
/// <param name="textViewLine">Returns out the <see cref="ITextViewLine"/> requested.</param>
bool TryGetTextViewLineContainingBufferPosition(SnapshotPoint bufferPosition, out ITextViewLine textViewLine);
}
-}
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Editor/ITextView3.cs b/src/Editor/Text/Def/TextUI/Editor/ITextView3.cs
new file mode 100644
index 0000000..b4a6a0f
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Editor/ITextView3.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+
+using System;
+
+using Microsoft.VisualStudio.Text.Formatting;
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ public interface ITextView3 : ITextView2
+ {
+ /// <summary>
+ /// Gets or sets the Zoom level for the <see cref="ITextView3"/> between 20% to 400%
+ /// </summary>
+ double ZoomLevel { get; set; }
+
+ IXPlatAdornmentLayer GetXPlatAdornmentLayer(string name);
+
+ ITextViewLineSource FormattedLineSource { get; }
+
+ void Focus();
+
+ bool IsKeyboardFocused { get; }
+ event EventHandler IsKeyboardFocusedChanged;
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Editor/ITextViewFactoryService.cs b/src/Editor/Text/Def/TextUI/Editor/ITextViewFactoryService.cs
new file mode 100644
index 0000000..6ceea3b
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Editor/ITextViewFactoryService.cs
@@ -0,0 +1,174 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain internal APIs that are subject to change without notice.
+// Use at your own risk.
+//
+
+using System;
+using System.Collections.Generic;
+
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ public interface ITextViewFactoryService
+ {
+ /// <summary>
+ /// Creates an <see cref="ITextView"/> that displays the contents of <paramref name="viewModel"/>.
+ /// </summary>
+ /// <param name="viewModel">The <see cref="ITextViewModel"/> that provides the text buffers for the view.</param>
+ /// <param name="roles">The set of roles filled by the view.</param>
+ /// <param name="parentOptions">The options environment for the text view.</param>
+ /// <returns>An <see cref="ITextView"/>.</returns>
+ /// <exception cref="ArgumentNullException"><paramref name="viewModel"/> or <paramref name="roles"/> or <paramref name="parentOptions"/> is null.</exception>
+ ITextView CreateTextView(ITextViewModel viewModel, ITextViewRoleSet roles, IEditorOptions parentOptions);
+
+ /// <summary>
+ /// Creates an <see cref="ITextView"/> that displays the contents of <paramref name="dataModel"/>.
+ /// </summary>
+ /// <param name="dataModel">The <see cref="ITextDataModel"/> that provides the text buffers over which an <see cref="ITextViewModel"/>
+ /// will be built for the view.</param>
+ /// <param name="roles">The set of roles filled by the view.</param>
+ /// <param name="parentOptions">The options environment for the text view.</param>
+ /// <returns>An <see cref="ITextView"/>.</returns>
+ /// <remarks>
+ /// An <see cref="ITextDataModel"/> can be displayed in multiple views. An <see cref="ITextViewModel"/> will be constructed based on
+ /// the <see cref="IContentType"/> of the <paramref name="dataModel"/> and the <paramref name="roles"/>.
+ /// </remarks>
+ /// <exception cref="ArgumentNullException"><paramref name="dataModel"/> or <paramref name="roles"/> or <paramref name="parentOptions"/> is null.</exception>
+ ITextView CreateTextView(ITextDataModel dataModel, ITextViewRoleSet roles, IEditorOptions parentOptions);
+
+ /// <summary>
+ /// Creates an <see cref="ITextView"/> that displays the contents of <paramref name="textBuffer"/>.
+ /// </summary>
+ /// <param name="textBuffer">The <see cref="ITextBuffer"/> that provides the text for the view.</param>
+ /// <param name="roles">The set of roles filled by the view.</param>
+ /// <param name="parentOptions">The options environment for the text view.</param>
+ /// <returns>An <see cref="ITextView"/>.</returns>
+ /// <remarks>
+ /// An <see cref="ITextBuffer"/> can be displayed in multiple views. A trivial <see cref="ITextDataModel"/> will be constructed and
+ /// an <see cref="ITextViewModel"/> will be constructed based on
+ /// the <see cref="IContentType"/> of the <paramref name="textBuffer"/> and the <paramref name="roles"/>.
+ /// </remarks>
+ /// <exception cref="ArgumentNullException"><paramref name="textBuffer"/> or <paramref name="roles"/> or <paramref name="parentOptions"/> is null.</exception>
+ ITextView CreateTextView(ITextBuffer textBuffer, ITextViewRoleSet roles, IEditorOptions parentOptions);
+
+ /// <summary>
+ /// Creates an <see cref="ITextView"/> that displays the contents of <paramref name="textBuffer"/>.
+ /// </summary>
+ /// <param name="textBuffer">The <see cref="ITextBuffer"/> that provides the text for the view.</param>
+ /// <param name="roles">The set of roles filled by the view.</param>
+ /// <returns>An <see cref="ITextView"/>.</returns>
+ /// <remarks>
+ /// An <see cref="ITextBuffer"/> can be displayed in multiple views. A trivial <see cref="ITextDataModel"/> will be constructed and
+ /// an <see cref="ITextViewModel"/> will be constructed based on
+ /// the <see cref="IContentType"/> of the <paramref name="textBuffer"/> and the <paramref name="roles"/>.
+ /// </remarks>
+ /// <exception cref="ArgumentNullException"><paramref name="textBuffer"/> or <paramref name="roles"/> is null.</exception>
+ ITextView CreateTextView(ITextBuffer textBuffer, ITextViewRoleSet roles);
+
+ /// <summary>
+ /// Creates an <see cref="ITextView"/> that displays the contents of <paramref name="textBuffer"/>.
+ /// </summary>
+ /// <param name="textBuffer">The <see cref="ITextBuffer"/> that provides the text for the view.</param>
+ /// <returns>An <see cref="ITextView"/> having the default set of text view roles.</returns>
+ /// <remarks>
+ /// An <see cref="ITextBuffer"/> can be displayed in multiple views. A trivial <see cref="ITextDataModel"/> will be constructed and
+ /// an <see cref="ITextViewModel"/> will be constructed based on
+ /// the <see cref="IContentType"/> of the <paramref name="textBuffer"/>.
+ /// </remarks>
+ /// <exception cref="ArgumentNullException"><paramref name="textBuffer"/> is null.</exception>
+ ITextView CreateTextView(ITextBuffer textBuffer);
+
+ /// <summary>
+ /// Creates an <see cref="ITextView"/> on a newly created <see cref="ITextBuffer"/> having
+ /// content type <code>Text</code>.
+ /// </summary>
+ /// <returns>A <see cref="ITextView"/>.</returns>
+ ITextView CreateTextView();
+
+ ///// <summary>
+ ///// Creates a host for the text view.
+ ///// </summary>
+ ///// <param name="wpfTextView">The text view to host.</param>
+ ///// <param name="setFocus"><c>true</c> if the <see cref="IWpfTextViewHost"/> should take focus after it is initialized, <c>false</c> otherwise.</param>
+ ///// <returns>An <see cref="IWpfTextViewHost"/>.</returns>
+ ///// <exception cref="ArgumentNullException"><paramref name="wpfTextView"/> is null.</exception>
+ //IWpfTextViewHost CreateTextViewHost(ITextView wpfTextView, bool setFocus);
+
+ /// <summary>
+ /// The empty ITextViewRoleSet.
+ /// </summary>
+ ITextViewRoleSet NoRoles { get; }
+
+ /// <summary>
+ /// The set of all predefined text view roles.
+ /// </summary>
+ ITextViewRoleSet AllPredefinedRoles { get; }
+
+ /// <summary>
+ /// The set of roles that are used when creating a text view without specifying text view roles.
+ /// </summary>
+ ITextViewRoleSet DefaultRoles { get; }
+
+ /// <summary>
+ /// Creates a <see cref="ITextViewRoleSet"/> containing the given roles.
+ /// </summary>
+ /// <param name="roles">The roles of interest.</param>
+ /// <returns>The text view role set.</returns>
+ /// <exception cref="ArgumentNullException"> roles is null.</exception>
+ ITextViewRoleSet CreateTextViewRoleSet(IEnumerable<string> roles);
+
+ /// <summary>
+ /// Creates a <see cref="ITextViewRoleSet"/> containing the given roles.
+ /// </summary>
+ /// <param name="roles">The roles of interest.</param>
+ /// <returns>The text view role set.</returns>
+ ITextViewRoleSet CreateTextViewRoleSet(params string[] roles);
+
+ /// <summary>
+ /// Raised when any <see cref="ITextView"/> is created.
+ /// </summary>
+ event EventHandler<TextViewCreatedEventArgs> TextViewCreated;
+
+ /// <summary>
+ /// Creates an <see cref="ITextView"/> that displays the contents of <paramref name="dataModel"/> without initializing it.
+ /// </summary>
+ /// <param name="dataModel">The <see cref="ITextDataModel"/> that provides the text buffers over which an <see cref="ITextViewModel"/>
+ /// will be built for the view.</param>
+ /// <param name="roles">The set of roles filled by the view.</param>
+ /// <param name="parentOptions">The options environment for the text view.</param>
+ /// <returns>An <see cref="ITextView"/>.</returns>
+ /// <remarks>
+ /// <para>An <see cref="ITextDataModel"/> can be displayed in multiple views. An <see cref="ITextViewModel"/> will be constructed based on
+ /// the <see cref="IContentType"/> of the <paramref name="dataModel"/> and the <paramref name="roles"/>.</para>
+ /// <para>ITextEditorFactoryService2.InitializeTextView(view) must be called on the view returned by this funtion.</para>
+ /// </remarks>
+ /// <exception cref="ArgumentNullException"><paramref name="dataModel"/> or <paramref name="roles"/> or <paramref name="parentOptions"/> is null.</exception>
+ ITextView CreateTextViewWithoutInitialization(ITextDataModel dataModel, ITextViewRoleSet roles, IEditorOptions parentOptions);
+
+ ///// <summary>
+ ///// Creates a host for the text view without initializing it.
+ ///// </summary>
+ ///// <param name="wpfTextView">The text view to host.</param>
+ ///// <param name="setFocus"><c>true</c> if the <see cref="IWpfTextViewHost"/> should take focus after it is initialized, <c>false</c> otherwise.</param>
+ ///// <returns>An <see cref="IWpfTextViewHost"/>.</returns>
+ ///// <remarks>
+ ///// <para>ITextEditorFactoryService2.InitializeTextViewHost(host) must be called on the host returned by this funtion.</para>
+ ///// </remarks>
+ ///// <exception cref="ArgumentNullException"><paramref name="wpfTextView"/> is null.</exception>
+ //IWpfTextViewHost CreateTextViewHostWithoutInitialization(IWpfTextView wpfTextView, bool setFocus);
+
+ /// <summary>
+ /// Initialize a view created using CreateTextViewWithoutInitialization.
+ /// </summary>
+ void InitializeTextView(ITextView view);
+
+ ///// <summary>
+ ///// Initialize a view created using CreateTextViewHostWithoutInitialization.
+ ///// </summary>
+ //void InitializeTextViewHost(IWpfTextViewHost host);
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Editor/PredefinedMarginNames.cs b/src/Editor/Text/Def/TextUI/Editor/PredefinedMarginNames.cs
index ae93b02..ee47fca 100644
--- a/src/Editor/Text/Def/TextUI/Editor/PredefinedMarginNames.cs
+++ b/src/Editor/Text/Def/TextUI/Editor/PredefinedMarginNames.cs
@@ -135,5 +135,9 @@ namespace Microsoft.VisualStudio.Text.Editor
/// </summary>
public const string OverviewSourceImage = "OverviewSourceImageMargin";
+ /// <summary>
+ /// Name of the margin that shows potentially-actionable non-modal messages to the user.
+ /// </summary>
+ public const string InfoBar = "InfoBar";
}
}
diff --git a/src/Editor/Text/Def/TextUI/Editor/SpaceReservationAgentChangedEventArgs.cs b/src/Editor/Text/Def/TextUI/Editor/SpaceReservationAgentChangedEventArgs.cs
new file mode 100644
index 0000000..55aea71
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Editor/SpaceReservationAgentChangedEventArgs.cs
@@ -0,0 +1,39 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ using System;
+
+ /// <summary>
+ /// Provides information when an <see cref="ISpaceReservationAgent"/> is changed in an <see cref="ISpaceReservationManager"/>.
+ /// </summary>
+
+ public class SpaceReservationAgentChangedEventArgs : EventArgs
+ {
+ private readonly ISpaceReservationAgent _newAgent;
+ private readonly ISpaceReservationAgent _oldAgent;
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="SpaceReservationAgentChangedEventArgs"/>.
+ /// </summary>
+ /// <param name="oldAgent">The <see cref="ISpaceReservationAgent "/> associated with the previous value.</param>
+ /// <param name="newAgent">The <see cref="ISpaceReservationAgent "/> associated with the new value.</param>
+ public SpaceReservationAgentChangedEventArgs(ISpaceReservationAgent oldAgent, ISpaceReservationAgent newAgent)
+ {
+ _oldAgent = oldAgent;
+ _newAgent = newAgent;
+ }
+
+ /// <summary>
+ /// Gets the old agent.
+ /// </summary>
+ public ISpaceReservationAgent OldAgent { get { return _oldAgent; } }
+
+ /// <summary>
+ /// Gets the new agent.
+ /// </summary>
+ public ISpaceReservationAgent NewAgent { get { return _newAgent; } }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Editor/SpaceReservationManagerDefinition.cs b/src/Editor/Text/Def/TextUI/Editor/SpaceReservationManagerDefinition.cs
new file mode 100644
index 0000000..4691cf0
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Editor/SpaceReservationManagerDefinition.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ /// <summary>
+ /// Represents metadata for an <see cref="ISpaceReservationManager"/>.
+ /// </summary>
+ /// <remarks>
+ /// Because you cannot subclass this type, you can simply use the [Export] attribute.
+ /// </remarks>
+ /// <example>
+ /// internal sealed class Components
+ /// {
+ /// [Export]
+ /// [Name("SampleSpaceReservationManager")]
+ /// [Order(After = "Selection", Before = "Text")]
+ /// internal SpaceReservationManagerDefinition sampleManagerDefinition;
+ ///
+ /// { other components }
+ /// }
+ /// </example>
+ public sealed class SpaceReservationManagerDefinition
+ {
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions.cs b/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions.cs
index 18354f1..0f16c0a 100644
--- a/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions.cs
+++ b/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions.cs
@@ -4,7 +4,6 @@
//
using System;
using System.Diagnostics;
-using Microsoft.VisualStudio.Text.Formatting;
namespace Microsoft.VisualStudio.Text.Editor
{
@@ -138,7 +137,7 @@ namespace Microsoft.VisualStudio.Text.Editor
/// <summary>
/// See <see cref="ITextView2.TryGetTextViewLineContainingBufferPosition(SnapshotPoint, out Formatting.ITextViewLine)"/>.
/// </summary>
- public static bool TryGetTextViewLineContainingBufferPosition(this ITextView textView, SnapshotPoint bufferPosition, out ITextViewLine textViewLine)
+ public static bool TryGetTextViewLineContainingBufferPosition(this ITextView textView, SnapshotPoint bufferPosition, out ITextViewLineCollection textViewLines)
{
if (textView == null)
{
@@ -147,11 +146,11 @@ namespace Microsoft.VisualStudio.Text.Editor
if (textView is ITextView2 textView2)
{
- return textView2.TryGetTextViewLineContainingBufferPosition(bufferPosition, out textViewLine);
+ return textView2.TryGetTextViewLineContainingBufferPosition(bufferPosition, out textViewLines);
}
else
{
- textViewLine = null;
+ textViewLines = null;
return false;
}
}
diff --git a/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions2.cs b/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions2.cs
new file mode 100644
index 0000000..cc6a171
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions2.cs
@@ -0,0 +1,131 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Text.Outlining;
+using Microsoft.VisualStudio.Text.Projection;
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ public static class TextViewExtensions2
+ {
+ public static bool TryMoveCaretToAndEnsureVisible(
+ this ITextView textView,
+ SnapshotPoint point,
+ IOutliningManagerService outliningManagerService = null,
+ EnsureSpanVisibleOptions ensureSpanVisibleOptions = EnsureSpanVisibleOptions.None)
+ {
+ return textView.TryMoveCaretToAndEnsureVisible(
+ new VirtualSnapshotPoint(point),
+ outliningManagerService,
+ ensureSpanVisibleOptions);
+ }
+
+ public static bool TryMoveCaretToAndEnsureVisible(
+ this ITextView textView,
+ VirtualSnapshotPoint point,
+ IOutliningManagerService outliningManagerService = null,
+ EnsureSpanVisibleOptions ensureSpanVisibleOptions = EnsureSpanVisibleOptions.None)
+ {
+ if (textView.IsClosed)
+ {
+ return false;
+ }
+
+ var pointInView = textView.GetPositionInView(point.Position);
+ if (!pointInView.HasValue)
+ {
+ return false;
+ }
+
+ // If we were given an outlining service, we need to expand any outlines first, or else
+ // the Caret.MoveTo won't land in the correct location if our target is inside a
+ // collapsed outline.
+ if (outliningManagerService != null)
+ {
+ var outliningManager = outliningManagerService.GetOutliningManager(textView);
+ if (outliningManager != null)
+ {
+ outliningManager.ExpandAll(new SnapshotSpan(pointInView.Value, length: 0), match: _ => true);
+ }
+ }
+
+ var newPosition = textView.Caret.MoveTo(new VirtualSnapshotPoint(pointInView.Value, point.VirtualSpaces));
+
+ // We use the caret's position in the view's current snapshot here in case something
+ // changed text in response to a caret move (e.g. line commit)
+ var spanInView = new SnapshotSpan(newPosition.BufferPosition, 0);
+ textView.ViewScroller.EnsureSpanVisible(spanInView, ensureSpanVisibleOptions);
+
+ return true;
+ }
+
+ public static SnapshotPoint GetSnapshotPoint(this ITextView textView, int lineNumber, int columnNumber = 0)
+ {
+ return textView.TextSnapshot.TryGetSnapshotPoint(lineNumber, columnNumber) ?? default;
+ }
+
+ public static void SelectSpan(
+ this ITextView textView,
+ SnapshotSpan span,
+ IOutliningManagerService outliningManagerService = null,
+ EnsureSpanVisibleOptions ensureSpanVisibleOptions = EnsureSpanVisibleOptions.None)
+ {
+ textView.TryMoveCaretToAndEnsureVisible(span.Start, outliningManagerService, ensureSpanVisibleOptions);
+ textView.Selection.Select(span, isReversed: false);
+ }
+
+ public static SnapshotPoint GetPosition(this ITextView textView, int position)
+ {
+ var snapshot = textView.TextSnapshot;
+ if (position < 0 || position > snapshot.Length)
+ {
+ return default;
+ }
+
+ return new SnapshotPoint(textView.TextSnapshot, position);
+ }
+
+ public static void NavigateToLineAndColumn(this ITextView textView, int lineNumber, int columnNumber = 0)
+ {
+ var point = textView.TextSnapshot.TryGetSnapshotPoint(lineNumber, columnNumber) ?? default;
+ if (point != default)
+ {
+ textView.TryMoveCaretToAndEnsureVisible(point);
+ }
+ }
+
+ public static SnapshotPoint? GetPositionInView(this ITextView textView, SnapshotPoint point)
+ {
+ return textView.BufferGraph.MapUpToSnapshot(
+ point,
+ PointTrackingMode.Positive,
+ PositionAffinity.Successor,
+ textView.TextSnapshot);
+ }
+
+ public static SnapshotPoint? GetPositionInSubjectBuffer(this ITextView textView, SnapshotPoint point)
+ {
+ var dataBufferPosition = textView.BufferGraph.MapDownToFirstMatch(
+ point,
+ PointTrackingMode.Positive,
+ t => !(t.TextBuffer is IProjectionBufferBase),
+ PositionAffinity.Successor);
+ return dataBufferPosition;
+ }
+
+ public static ITextBuffer GetSubjectBufferFromPosition(this ITextView textView, SnapshotPoint point)
+ {
+ var position = GetPositionInSubjectBuffer(textView, point);
+ if (position.HasValue && position.Value.Snapshot.TextBuffer is ITextBuffer buffer)
+ {
+ return buffer;
+ }
+
+ return null;
+ }
+
+ public static ITextBuffer GetSubjectBufferFromCaret(this ITextView view)
+ => view.GetSubjectBufferFromPosition(view.Caret.Position.BufferPosition);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/EditorOptions/ViewOptions.cs b/src/Editor/Text/Def/TextUI/EditorOptions/ViewOptions.cs
index fc50df7..b121e18 100644
--- a/src/Editor/Text/Def/TextUI/EditorOptions/ViewOptions.cs
+++ b/src/Editor/Text/Def/TextUI/EditorOptions/ViewOptions.cs
@@ -80,6 +80,22 @@ namespace Microsoft.VisualStudio.Text.Editor.OptionsExtensionMethods
return options.GetOptionValue<bool>(DefaultTextViewOptions.UseVisibleWhitespaceId);
}
+ public static bool IsVisibleWhitespaceOnlyWhenSelectedEnabled(this IEditorOptions options)
+ {
+ if (options == null)
+ throw new ArgumentNullException(nameof(options));
+
+ return options.GetOptionValue<bool>(DefaultTextViewOptions.UseVisibleWhitespaceOnlyWhenSelectedId);
+ }
+
+ public static DefaultTextViewOptions.IncludeWhitespaces VisibleWhitespaceEnabledTypes(this IEditorOptions options)
+ {
+ if (options == null)
+ throw new ArgumentNullException(nameof(options));
+
+ return options.GetOptionValue<DefaultTextViewOptions.IncludeWhitespaces>(DefaultTextViewOptions.UseVisibleWhitespaceIncludeId);
+ }
+
/// <summary>
/// Determines whether the view prohibits all user input.
/// </summary>
@@ -132,6 +148,17 @@ namespace Microsoft.VisualStudio.Text.Editor.OptionsExtensionMethods
return options.GetOptionValue<bool>(DefaultTextViewOptions.IsViewportLeftClippedId);
}
+
+ /// <summary>
+ /// Determines if the caret should be moved to the end of the selection after performing the "select all" operation.
+ /// </summary>
+ public static bool ShouldMoveCaretOnSelectAll(this IEditorOptions options)
+ {
+ if (options == null)
+ throw new ArgumentNullException(nameof(options));
+
+ return options.GetOptionValue(DefaultTextViewOptions.ShouldMoveCaretOnSelectAllId);
+ }
#endregion
}
@@ -330,6 +357,29 @@ namespace Microsoft.VisualStudio.Text.Editor
public const string UseVisibleWhitespaceName = "TextView/UseVisibleWhitespace";
/// <summary>
+ /// Determines whether to show spaces, tabs and EndOfLine as visible glyphs only under selection.
+ /// </summary>
+ public static readonly EditorOptionKey<bool> UseVisibleWhitespaceOnlyWhenSelectedId = new EditorOptionKey<bool>(UseVisibleWhitespaceOnlyWhenSelectedName);
+ public const string UseVisibleWhitespaceOnlyWhenSelectedName = "TextView/UseVisibleWhitespace/OnlyWhenSelected";
+
+ /// <summary>
+ /// Determines whether to show spaces, tabs and EndOfLine as visible glyphs only for specific type of whitespace.
+ /// </summary>
+ public static readonly EditorOptionKey<IncludeWhitespaces> UseVisibleWhitespaceIncludeId = new EditorOptionKey<IncludeWhitespaces>(UseVisibleWhitespaceIncludeName);
+ public const string UseVisibleWhitespaceIncludeName = "TextView/UseVisibleWhitespace/Include";
+
+ [Flags]
+ public enum IncludeWhitespaces
+ {
+ None = 0x0,
+ Spaces = 0x1,
+ Tabs = 0x2,
+ LineEndings = 0x4,
+ Ideographics = 0x8,
+ All = 0xf,
+ }
+
+ /// <summary>
/// Enables or disables the code block structure visualizer text adornment feature.
/// </summary>
public static readonly EditorOptionKey<bool> ShowBlockStructureId = new EditorOptionKey<bool>(ShowBlockStructureName);
@@ -383,6 +433,60 @@ namespace Microsoft.VisualStudio.Text.Editor
/// </summary>
public const string CaretWidthOptionName = "TextView/CaretWidth";
public readonly static EditorOptionKey<double> CaretWidthId = new EditorOptionKey<double>(CaretWidthOptionName);
+
+ /// <summary>
+ /// Determines whether to enable the highlight current line adornment.
+ /// </summary>
+ public static readonly EditorOptionKey<bool> EnableHighlightCurrentLineId = new EditorOptionKey<bool>(EnableHighlightCurrentLineName);
+ public const string EnableHighlightCurrentLineName = "Adornments/HighlightCurrentLine/Enable";
+
+ /// <summary>
+ /// Determines whether to enable the highlight current line adornment.
+ /// </summary>
+ public static readonly EditorOptionKey<bool> EnableSimpleGraphicsId = new EditorOptionKey<bool>(EnableSimpleGraphicsName);
+ public const string EnableSimpleGraphicsName = "Graphics/Simple/Enable";
+
+ /// <summary>
+ /// Determines whether the opacity of text markers and selection is reduced in high contrast mode.
+ /// </summary>
+ public static readonly EditorOptionKey<bool> UseReducedOpacityForHighContrastOptionId = new EditorOptionKey<bool>(UseReducedOpacityForHighContrastOptionName);
+ public const string UseReducedOpacityForHighContrastOptionName = "UseReducedOpacityForHighContrast";
+
+ /// <summary>
+ /// Determines whether to enable mouse wheel zooming
+ /// </summary>
+ public static readonly EditorOptionKey<bool> EnableMouseWheelZoomId = new EditorOptionKey<bool>(EnableMouseWheelZoomName);
+ public const string EnableMouseWheelZoomName = "TextView/MouseWheelZoom";
+
+ /// <summary>
+ /// Determines the appearance category of a view, which selects a ClassificationFormatMap and EditorFormatMap.
+ /// </summary>
+ public static readonly EditorOptionKey<string> AppearanceCategory = new EditorOptionKey<string>(AppearanceCategoryName);
+ public const string AppearanceCategoryName = "Appearance/Category";
+
+ /// <summary>
+ /// Determines the view zoom level.
+ /// </summary>
+ public static readonly EditorOptionKey<double> ZoomLevelId = new EditorOptionKey<double>(ZoomLevelName);
+ public const string ZoomLevelName = "TextView/ZoomLevel";
+
+ /// <summary>
+ /// Determines whether to enable mouse click + modifier keypress for go to definition.
+ /// </summary>
+ public const string ClickGoToDefEnabledName = "TextView/ClickGoToDefEnabled";
+ public static readonly EditorOptionKey<bool> ClickGoToDefEnabledId = new EditorOptionKey<bool>(ClickGoToDefEnabledName);
+
+ /// <summary>
+ /// Determines whether to open definition target in Peek view for mouse click + modifier keypress.
+ /// </summary>
+ public const string ClickGoToDefOpensPeekName = "TextView/ClickGoToDefOpensPeek";
+ public static readonly EditorOptionKey<bool> ClickGoToDefOpensPeekId = new EditorOptionKey<bool>(ClickGoToDefOpensPeekName);
+
+ /// <summary>
+ /// The default option that determines whether to move the caret when performing the "select all" operation.
+ /// </summary>
+ public static readonly EditorOptionKey<bool> ShouldMoveCaretOnSelectAllId = new EditorOptionKey<bool>(ShouldMoveCaretOnSelectAllName);
+ public const string ShouldMoveCaretOnSelectAllName = "TextView/ShouldMoveCaretOnSelectAll";
#endregion
}
@@ -691,6 +795,42 @@ namespace Microsoft.VisualStudio.Text.Editor
}
/// <summary>
+ /// Defines the Use Visible Whitespace option.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.UseVisibleWhitespaceOnlyWhenSelectedName)]
+ public sealed class UseVisibleWhitespaceOnlyWhenSelected : ViewOptionDefinition<bool>
+ {
+ /// <summary>
+ /// Gets the default value, which is <c>false</c>.
+ /// </summary>
+ public override bool Default { get { return false; } }
+
+ /// <summary>
+ /// Gets the default text view host value.
+ /// </summary>
+ public override EditorOptionKey<bool> Key { get { return DefaultTextViewOptions.UseVisibleWhitespaceOnlyWhenSelectedId; } }
+ }
+
+ /// <summary>
+ /// Defines the Use Visible Whitespace option.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.UseVisibleWhitespaceIncludeName)]
+ public sealed class UseVisibleWhitespaceEnabledTypes : ViewOptionDefinition<DefaultTextViewOptions.IncludeWhitespaces>
+ {
+ /// <summary>
+ /// Gets the default value, which is <c>false</c>.
+ /// </summary>
+ public override DefaultTextViewOptions.IncludeWhitespaces Default { get { return DefaultTextViewOptions.IncludeWhitespaces.All; } }
+
+ /// <summary>
+ /// Gets the default text view host value.
+ /// </summary>
+ public override EditorOptionKey<DefaultTextViewOptions.IncludeWhitespaces> Key { get { return DefaultTextViewOptions.UseVisibleWhitespaceIncludeId; } }
+ }
+
+ /// <summary>
/// Defines the Show Block Structure option.
/// </summary>
[Export(typeof(EditorOptionDefinition))]
@@ -1026,4 +1166,164 @@ namespace Microsoft.VisualStudio.Text.Editor
/// </summary>
public override EditorOptionKey<bool> Key { get { return DefaultTextViewHostOptions.EnableFileHealthIndicatorOptionId; } }
}
+
+
+ /// <summary>
+ /// Represents the option to highlight the current line.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.EnableHighlightCurrentLineName)]
+ public sealed class HighlightCurrentLineOption : EditorOptionDefinition<bool>
+ {
+ /// <summary>
+ /// Gets the default value.
+ /// </summary>
+ public override bool Default { get { return true; } }
+
+ /// <summary>
+ /// Gets the key for the highlight current line option.
+ /// </summary>
+ public override EditorOptionKey<bool> Key { get { return DefaultTextViewOptions.EnableHighlightCurrentLineId; } }
+ }
+
+ /// <summary>
+ /// Represents the option to draw a selection gradient as opposed to a solid color selection.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.EnableSimpleGraphicsName)]
+ public sealed class SimpleGraphicsOption : EditorOptionDefinition<bool>
+ {
+ /// <summary>
+ /// Gets the default value.
+ /// </summary>
+ public override bool Default { get { return false; } }
+
+ /// <summary>
+ /// Gets the key for the simple graphics option.
+ /// </summary>
+ public override EditorOptionKey<bool> Key { get { return DefaultTextViewOptions.EnableSimpleGraphicsId; } }
+ }
+
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.UseReducedOpacityForHighContrastOptionName)]
+ public sealed class UseReducedOpacityForHighContrastOption : EditorOptionDefinition<bool>
+ {
+ /// <summary>
+ /// Gets the default value.
+ /// </summary>
+ public override bool Default { get { return false; } }
+
+ /// <summary>
+ /// Gets the key for the use reduced opacity option.
+ /// </summary>
+ public override EditorOptionKey<bool> Key { get { return DefaultTextViewOptions.UseReducedOpacityForHighContrastOptionId; } }
+ }
+
+ /// <summary>
+ /// Defines the option to enable the mouse wheel zoom
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.EnableMouseWheelZoomName)]
+ public sealed class MouseWheelZoomEnabled : EditorOptionDefinition<bool>
+ {
+ /// <summary>
+ /// Gets the default value, which is <c>true</c>.
+ /// </summary>
+ public override bool Default { get { return true; } }
+
+ /// <summary>
+ /// Gets the wpf text view value.
+ /// </summary>
+ public override EditorOptionKey<bool> Key { get { return DefaultTextViewOptions.EnableMouseWheelZoomId; } }
+ }
+
+ /// <summary>
+ /// Defines the appearance category.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.AppearanceCategoryName)]
+ public sealed class AppearanceCategoryOption : EditorOptionDefinition<string>
+ {
+ /// <summary>
+ /// Gets the default value.
+ /// </summary>
+ public override string Default { get { return "text"; } }
+
+ /// <summary>
+ /// Gets the key for the appearance category option.
+ /// </summary>
+ public override EditorOptionKey<string> Key { get { return DefaultTextViewOptions.AppearanceCategory; } }
+ }
+
+ /// <summary>
+ /// Defines the zoomlevel.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.ZoomLevelName)]
+ public sealed class ZoomLevel : EditorOptionDefinition<double>
+ {
+ /// <summary>
+ /// Gets the default value.
+ /// </summary>
+ public override double Default { get { return (int)ZoomConstants.DefaultZoom; } }
+
+ /// <summary>
+ /// Gets the key for the text view zoom level.
+ /// </summary>
+ public override EditorOptionKey<double> Key { get { return DefaultTextViewOptions.ZoomLevelId; } }
+ }
+
+ /// <summary>
+ /// Determines whether to enable mouse click + modifier keypress for go to definition.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.ClickGoToDefEnabledName)]
+ public sealed class ClickGotoDefEnabledOption : EditorOptionDefinition<bool>
+ {
+ /// <summary>
+ /// Gets the default value.
+ /// </summary>
+ public override bool Default => true;
+
+ /// <summary>
+ /// Gets the key for the option.
+ /// </summary>
+ public override EditorOptionKey<bool> Key => DefaultTextViewOptions.ClickGoToDefEnabledId;
+ }
+
+ /// <summary>
+ /// Determines whether to open definition target in Peek view for mouse click + modifier keypress.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.ClickGoToDefOpensPeekName)]
+ public sealed class ClickGotoDefOpensPeekOption : EditorOptionDefinition<bool>
+ {
+ /// <summary>
+ /// Gets the default value.
+ /// </summary>
+ public override bool Default => false;
+
+ /// <summary>
+ /// Gets the key for the option.
+ /// </summary>
+ public override EditorOptionKey<bool> Key => DefaultTextViewOptions.ClickGoToDefOpensPeekId;
+ }
+
+ /// <summary>
+ /// The option definition that determines if the caret should be moved to the end of the selection after performing the "select all" operation.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultTextViewOptions.ShouldMoveCaretOnSelectAllName)]
+ internal sealed class ShouldMoveCaretOnSelectAll : EditorOptionDefinition<bool>
+ {
+ /// <summary>
+ /// Gets the default value (true).
+ /// </summary>
+ public override bool Default { get => true; }
+
+ /// <summary>
+ /// Gets the editor option key.
+ /// </summary>
+ public override EditorOptionKey<bool> Key => DefaultTextViewOptions.ShouldMoveCaretOnSelectAllId;
+ }
}
diff --git a/src/Editor/Text/Def/TextUI/Formatting/ILineTransformSource.cs b/src/Editor/Text/Def/TextUI/Formatting/ILineTransformSource.cs
new file mode 100644
index 0000000..3eca8af
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Formatting/ILineTransformSource.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Formatting
+{
+ using Microsoft.VisualStudio.Text.Editor;
+
+ /// <summary>
+ /// Provides the line transform for a line of formatted text.
+ /// </summary>
+ public interface ILineTransformSource
+ {
+ /// <summary>
+ /// Computes the line transform for a given line of formatted text.
+ /// </summary>
+ /// <param name="line">The line for which to compute the line transform.</param>
+ /// <param name="yPosition">The y-coordinate of the line.</param>
+ /// <param name="placement">The placement of the line with respect to <paramref name="yPosition"/>.</param>
+ /// <returns>The line transform for that line.</returns>
+ /// <remarks>If <paramref name="placement"/> is ViewRelativePosition.Top, then the top of the line
+ /// will be located at <paramref name="yPosition"/>. Otherwise the bottom of the line will be located at
+ /// <paramref name="yPosition"/>. Also, the line transform only affects the line itself and not any space
+ /// allocated above or below the line for adornments.</remarks>
+ LineTransform GetLineTransform(ITextViewLine line, double yPosition, ViewRelativePosition placement);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Formatting/ILineTransformSourceProvider.cs b/src/Editor/Text/Def/TextUI/Formatting/ILineTransformSourceProvider.cs
new file mode 100644
index 0000000..27e4593
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Formatting/ILineTransformSourceProvider.cs
@@ -0,0 +1,26 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Formatting
+{
+ using Microsoft.VisualStudio.Text.Editor;
+
+ /// <summary>
+ /// Provides <see cref="ILineTransformSource"/> objects.
+ /// </summary>
+ /// <remarks>This is a MEF component part, and should be exported with the following attribute:
+ /// [Export(typeof(ILineTransformSourceProvider))]
+ /// Exporters must supply a ContentTypeAttribute and TextViewRoleAttribute.
+ /// </remarks>
+ public interface ILineTransformSourceProvider
+ {
+ /// <summary>
+ /// Creates an <see cref="ILineTransformSource"/> for the given <paramref name="textView"/>.
+ /// </summary>
+ /// <param name="textView">The <see cref="ITextView"/> on which the <see cref="ILineTransformSource"/> will format.</param>
+ /// <returns>The new <see cref="ILineTransformSource"/>.
+ /// The value may be null if this <see cref="ILineTransformSourceProvider"/> decides not to participate.</returns>
+ ILineTransformSource Create(ITextView textView);
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Formatting/ITextViewLine.cs b/src/Editor/Text/Def/TextUI/Formatting/ITextViewLine.cs
index 0468f22..36cbe87 100644
--- a/src/Editor/Text/Def/TextUI/Formatting/ITextViewLine.cs
+++ b/src/Editor/Text/Def/TextUI/Formatting/ITextViewLine.cs
@@ -29,7 +29,7 @@ namespace Microsoft.VisualStudio.Text.Formatting
/// surface is displayed without any scaling transform, then 1 unit in the text rendering coordinate system
/// corresponds to one pixel on the display.</para>
/// </remarks>
- public interface ITextViewLine
+ public interface ITextViewLine : IDisposable
{
#region Methods
@@ -234,6 +234,26 @@ namespace Microsoft.VisualStudio.Text.Formatting
/// <returns>A sequence of adornment identity tags in order of their appearance on the line. The collection is always non-null but may be empty.</returns>
/// <exception cref="System.ArgumentNullException"><paramref name="providerTag "/> is null.</exception>
ReadOnlyCollection<object> GetAdornmentTags(object providerTag);
+
+ /// <summary>
+ /// Sets the Change property for this text line.
+ /// </summary>
+ /// <param name="change">The <see cref="TextViewLineChange"/>.</param>
+ void SetChange(TextViewLineChange change);
+
+ /// <summary>
+ /// Sets the position used to format the text in this formatted text line.
+ /// </summary>
+ /// <param name="top">The position for the top of the formatted text line.</param>
+ /// <exception cref="ObjectDisposedException">This <see cref="ITextViewLine"/> has been disposed.</exception>
+ void SetTop(double top);
+
+ /// <summary>
+ /// Sets the change in the position of the top of this formatted text line in the current
+ /// view layout and the previous view layour.
+ /// </summary>
+ /// <param name="deltaY">The new deltaY value for the formatted text line.</param>
+ void SetDeltaY(double deltaY);
#endregion // Methods
#region Properties
@@ -489,5 +509,21 @@ namespace Microsoft.VisualStudio.Text.Formatting
}
#endregion // Properties
+
+ /// <summary>
+ /// Sets the <see cref="ITextSnapshot"/>s upon which this formatted text line is based.
+ /// </summary>
+ /// <param name="visualSnapshot">the new snapshot for the line in the view model's visual buffer.</param>
+ /// <param name="editSnapshot">the new snapshot for the line in the view model's edit buffer.</param>
+ /// <remarks>The length of this text line is not allowed to change as a result of changing the snapshot.</remarks>
+ /// <exception cref="ObjectDisposedException">This <see cref="ITextViewLine"/> has been disposed.</exception>
+ void SetSnapshot(ITextSnapshot visualSnapshot, ITextSnapshot editSnapshot);
+
+ /// <summary>
+ /// Sets the line transform used to format the text in this formatted text line.
+ /// </summary>
+ /// <param name="transform">The line transform for this formatted text line.</param>
+ /// <exception cref="ObjectDisposedException">This <see cref="ITextViewLine"/> has been disposed.</exception>
+ void SetLineTransform(LineTransform transform);
}
}
diff --git a/src/Editor/Text/Def/TextUI/Formatting/ITextViewLineSource.cs b/src/Editor/Text/Def/TextUI/Formatting/ITextViewLineSource.cs
new file mode 100644
index 0000000..4ee0b6f
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Formatting/ITextViewLineSource.cs
@@ -0,0 +1,133 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Formatting
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using System.Threading;
+ using Microsoft.VisualStudio.Text;
+
+ /// <summary>
+ /// Generates text view line from text snapshots.
+ /// </summary>
+ public interface ITextViewLineSource
+ {
+ /// <summary>
+ /// Gets the top text snapshot for which this source will provide formatted text.
+ /// </summary>
+ ITextSnapshot TopTextSnapshot { get; }
+
+ /// <summary>
+ /// Gets the source text snapshot for which this source will provide formatted text.
+ /// </summary>
+ ITextSnapshot SourceTextSnapshot { get; }
+
+ /// <summary>
+ /// Gets the <see cref="ITextAndAdornmentSequencer"/> used by this source.
+ /// </summary>
+ ITextAndAdornmentSequencer TextAndAdornmentSequencer { get; }
+
+ /// <summary>
+ /// Gets the number of spaces between each tab stop.
+ /// </summary>
+ int TabSize { get; }
+
+ /// <summary>
+ /// Gets the width of a column in pixels.
+ /// </summary>
+ /// <remarks>This is used to determine the location of tab stops.</remarks>
+ double ColumnWidth { get; }
+
+ /// <summary>
+ /// Gets the nominal height of a line.
+ /// </summary>
+ /// <remarks>
+ /// This will not, in general, be the same as TextHeightAboveBaseline + TextHeightBelowBaseline since there is might be some padding between
+ /// lines.</remarks>
+ double LineHeight { get; }
+
+ /// <summary>
+ /// Gets the nominal height of the text above the baseline.
+ /// </summary>
+ double TextHeightAboveBaseline { get; }
+
+ /// <summary>
+ /// Gets the nominal height of the text below the baseline.
+ /// </summary>
+ double TextHeightBelowBaseline { get; }
+
+ /// <summary>
+ /// Gets the base indentation (in logical pixels) for all lines generated by this source.
+ /// </summary>
+ /// <remarks>
+ /// This is generally a small value like 2.0, so that some characters (such as an italic slash) will not be clipped
+ /// by the left edge of the view.
+ /// </remarks>
+ double BaseIndentation { get; }
+
+ /// <summary>
+ /// Gets the width (in logical pixels) where the formatted text will be broken into multiple lines.
+ /// </summary>
+ /// <remarks>The value 0.0 means that lines should never be broken.</remarks>
+ double WordWrapWidth { get; }
+
+ /// <summary>
+ /// Gets the maximum auto-indent for wrapped lines.
+ /// </summary>
+ /// <remarks>
+ /// If a long line is word-wrapped, then all the line fragments after the first will be indented by
+ /// the amount of leading white space on the first line, or MaxAutoIndent, whichever is smaller.
+ /// </remarks>
+ double MaxAutoIndent { get; }
+
+ /// <summary>
+ /// True if the formatter uses WPF Display TextFormattingMode, false otherwise.
+ /// </summary>
+ bool UseDisplayMode { get; }
+
+ /// <summary>
+ /// Formats the text and adornments in a <see cref="ITextSnapshotLine"/>.
+ /// </summary>
+ /// <param name="visualLine">The line to format.</param>
+ /// <param name="cancellationToken"><see cref="CancellationToken"/> used to indicate when to give up on doing accurate colorization. null indicates that colorization should be done using the inaccurate versions of the
+ /// classifier that return results quickly (even if they are inaccurate) and correct any errors once accurate results have been calculated.</param>
+ /// <returns>The formatted text for that line.</returns>
+ /// <remarks>
+ /// <para>
+ /// <see cref="ITextViewLine"/> objects are <see cref="IDisposable"/>. The caller must explicitly call Dispose() on the returned lines when they are
+ /// done with them.
+ /// </para>
+ /// <para>
+ /// The supplied <see cref="ITextSnapshotLine"/> must belong to the snapshot of the visual buffer, since visuals
+ /// live on that buffer.
+ /// </para>
+ /// </remarks>
+ Collection<ITextViewLine> FormatLineInVisualBuffer(ITextSnapshotLine visualLine, CancellationToken? cancellationToken = null);
+
+ /// <summary>
+ /// Formats the text and adornments in a <see cref="ITextSnapshotLine"/> if and only if the text properties have changed.
+ /// </summary>
+ /// <param name="visualLine">The line to format.</param>
+ /// <param name="oldLines">Previously formatted line(s) for <paramref name="visualLine"/>.</param>
+ /// <param name="cancellationToken"><see cref="CancellationToken"/> used to indicate when to give up on doing accurate colorization. null indicates that colorization should be done using the inaccurate versions of the
+ /// classifier that return results quickly (even if they are inaccurate) and correct any errors once accurate results have been calculated.</param>
+ /// <returns>null if the text properties for <paramref name="visualLine"/> haven't changed; the newly formatted text for that line otherwise.</returns>
+ /// <remarks>
+ /// <para>
+ /// <see cref="ITextViewLine"/> objects are <see cref="IDisposable"/> and must be disposed explicitly.
+ /// </para>
+ /// <para>
+ /// The supplied <see cref="ITextSnapshotLine"/> must belong to the snapshot of the visual buffer, since visuals
+ /// live on that buffer.
+ /// </para>
+ /// <para>
+ /// This method should only be used if you know that there have been no changes to <paramref name="visualLine"/>'s text or space negotiating adornments.
+ /// </para>
+ /// </remarks>
+ Collection<ITextViewLine> FormatLineInVisualBufferIfChanged(ITextSnapshotLine visualLine, IList<ITextViewLine> oldLines, CancellationToken? cancellationToken = null);
+
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/MultiCaret/IPlatformCaret.cs b/src/Editor/Text/Def/TextUI/MultiCaret/IPlatformCaret.cs
new file mode 100644
index 0000000..59e6c48
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/MultiCaret/IPlatformCaret.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace Microsoft.VisualStudio.Text
+{
+ public interface IPlatformCaret
+ {
+ TimeSpan BlinkTimeOn { get; }
+ TimeSpan BlinkTimeOff { get; }
+
+ event EventHandler<EventArgs> BlinkTimeChanged;
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Operations/IEditorOperations4.cs b/src/Editor/Text/Def/TextUI/Operations/IEditorOperations4.cs
new file mode 100644
index 0000000..47e482a
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Operations/IEditorOperations4.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Operations
+{
+ /// <summary>
+ /// Defines operations relating to the editor, in addition to operations defined by <see cref="IEditorOperations3"/>.
+ /// </summary>
+ public interface IEditorOperations4 : IEditorOperations3
+ {
+ /// <summary>
+ /// Determines whether zooming operations are possible.
+ /// </summary>
+ bool CanZoomTo { get; }
+
+ /// <summary>
+ /// Determines whether a zoom-in operation is possible.
+ /// </summary>
+ bool CanZoomIn { get; }
+
+ /// <summary>
+ /// Determines whether a zoom-out operation is possible.
+ /// </summary>
+ bool CanZoomOut { get; }
+
+ /// <summary>
+ /// Determines whether resetting zoom to 100% operation is possible.
+ /// </summary>
+ bool CanZoomReset { get; }
+
+ /// <summary>
+ /// Resets the text view zoom level to 100%.
+ /// </summary>
+ void ZoomReset();
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Def/TextUI/Operations/Microsoft.VisualStudio.Text.Operations.Overview.mht b/src/Editor/Text/Def/TextUI/Operations/Microsoft.VisualStudio.Text.Operations.Overview.mht
deleted file mode 100644
index d8d7033..0000000
--- a/src/Editor/Text/Def/TextUI/Operations/Microsoft.VisualStudio.Text.Operations.Overview.mht
+++ /dev/null
@@ -1,3843 +0,0 @@
-MIME-Version: 1.0
-Content-Type: multipart/related; boundary="----=_NextPart_01C88FF8.77140040"
-
-This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Windows® Internet Explorer®.
-
-------=_NextPart_01C88FF8.77140040
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Operations.Overview.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link rel=3DFile-List
-href=3D"Microsoft.VisualStudio.Text.Operations.Overview_files/filelist.xml">
-<title>Editor Operations Subsystem</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Subject>VisualStudio Shell</o:Subject>
- <o:Author>Vijaye Raji</o:Author>
- <o:Template>VisualStudio SDK Overview</o:Template>
- <o:LastAuthor>Jack Tilford</o:LastAuthor>
- <o:Revision>19</o:Revision>
- <o:TotalTime>123</o:TotalTime>
- <o:LastPrinted>2005-05-26T01:48:00Z</o:LastPrinted>
- <o:Created>2007-01-05T22:37:00Z</o:Created>
- <o:LastSaved>2008-03-27T17:51:00Z</o:LastSaved>
- <o:Pages>2</o:Pages>
- <o:Words>732</o:Words>
- <o:Characters>4178</o:Characters>
- <o:Company>Microsoft Corporation</o:Company>
- <o:Lines>34</o:Lines>
- <o:Paragraphs>9</o:Paragraphs>
- <o:CharactersWithSpaces>4901</o:CharactersWithSpaces>
- <o:Version>12.00</o:Version>
- </o:DocumentProperties>
-</xml><![endif]-->
-<link rel=3DthemeData
-href=3D"Microsoft.VisualStudio.Text.Operations.Overview_files/themedata.thm=
-x">
-<link rel=3DcolorSchemeMapping
-href=3D"Microsoft.VisualStudio.Text.Operations.Overview_files/colorschemema=
-pping.xml">
-<!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackMoves>false</w:TrackMoves>
- <w:TrackFormatting/>
- <w:PunctuationKerning/>
- <w:ValidateAgainstSchemas/>
- <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
- <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
- <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
- <w:DoNotPromoteQF/>
- <w:LidThemeOther>EN-US</w:LidThemeOther>
- <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
- <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
- <w:Compatibility>
- <w:BreakWrappedTables/>
- <w:SnapToGridInCell/>
- <w:WrapTextWithPunct/>
- <w:UseAsianBreakRules/>
- <w:DontGrowAutofit/>
- <w:SplitPgBreakAndParaMark/>
- <w:DontVertAlignCellWithSp/>
- <w:DontBreakConstrainedForcedTables/>
- <w:DontVertAlignInTxbx/>
- <w:Word11KerningPairs/>
- <w:CachedColBalance/>
- </w:Compatibility>
- <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
- <m:mathPr>
- <m:mathFont m:val=3D"Cambria Math"/>
- <m:brkBin m:val=3D"before"/>
- <m:brkBinSub m:val=3D"&#45;-"/>
- <m:smallFrac m:val=3D"off"/>
- <m:dispDef/>
- <m:lMargin m:val=3D"0"/>
- <m:rMargin m:val=3D"0"/>
- <m:defJc m:val=3D"centerGroup"/>
- <m:wrapIndent m:val=3D"1440"/>
- <m:intLim m:val=3D"subSup"/>
- <m:naryLim m:val=3D"undOvr"/>
- </m:mathPr></w:WordDocument>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:LatentStyles DefLockedState=3D"false" DefUnhideWhenUsed=3D"false"
- DefSemiHidden=3D"false" DefQFormat=3D"false" DefPriority=3D"1"
- LatentStyleCount=3D"267">
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-Normal"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-heading 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"heading 9"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"footnote text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-caption"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"footnote referenc=
-e"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation refere=
-nce"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Title"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Subtitle"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Hyperlink"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" QFormat=3D"true" Name=3D"=
-Strong"/>
- <w:LsdException Locked=3D"false" QFormat=3D"true" Name=3D"Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"HTML Top of Form"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"HTML Bottom of Fo=
-rm"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Normal (Web)"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Normal Table"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"annotation subjec=
-t"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" Name=3D"No List"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Outline List 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Simple 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Classic 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 1"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 2"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Colorful 3"=
-/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Columns 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 7"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table List 8"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table 3D effects =
-3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Contemporar=
-y"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Elegant"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Professiona=
-l"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Subtle 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Subtle 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Web 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Balloon Text"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"0" Name=3D"Table Theme"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true"
- Name=3D"Placeholder Text"/>
- <w:LsdException Locked=3D"false" Priority=3D"2" QFormat=3D"true" Name=3D"=
-No Spacing"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
-"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"99" SemiHidden=3D"true" Name=
-=3D"Revision"/>
- <w:LsdException Locked=3D"false" Priority=3D"34" QFormat=3D"true"
- Name=3D"List Paragraph"/>
- <w:LsdException Locked=3D"false" Priority=3D"29" QFormat=3D"true" Name=3D=
-"Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"30" QFormat=3D"true"
- Name=3D"Intense Quote"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 1"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 2"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 3"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 4"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 5"/>
- <w:LsdException Locked=3D"false" Priority=3D"60" Name=3D"Light Shading Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"61" Name=3D"Light List Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"62" Name=3D"Light Grid Accen=
-t 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"63" Name=3D"Medium Shading 1=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"64" Name=3D"Medium Shading 2=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"65" Name=3D"Medium List 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"66" Name=3D"Medium List 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"67" Name=3D"Medium Grid 1 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"68" Name=3D"Medium Grid 2 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"69" Name=3D"Medium Grid 3 Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"70" Name=3D"Dark List Accent=
- 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"71" Name=3D"Colorful Shading=
- Accent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"72" Name=3D"Colorful List Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"73" Name=3D"Colorful Grid Ac=
-cent 6"/>
- <w:LsdException Locked=3D"false" Priority=3D"19" QFormat=3D"true"
- Name=3D"Subtle Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"21" QFormat=3D"true"
- Name=3D"Intense Emphasis"/>
- <w:LsdException Locked=3D"false" Priority=3D"31" QFormat=3D"true"
- Name=3D"Subtle Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"32" QFormat=3D"true"
- Name=3D"Intense Reference"/>
- <w:LsdException Locked=3D"false" Priority=3D"33" QFormat=3D"true" Name=3D=
-"Book Title"/>
- <w:LsdException Locked=3D"false" Priority=3D"37" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" Name=3D"Bibliography"/>
- <w:LsdException Locked=3D"false" Priority=3D"39" SemiHidden=3D"true"
- UnhideWhenUsed=3D"true" QFormat=3D"true" Name=3D"TOC Heading"/>
- </w:LatentStyles>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
- @font-face
- {font-family:PMingLiU;
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-alt:\65B0\7D30\660E\9AD4;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
-@font-face
- {font-family:"Cambria Math";
- panose-1:2 4 5 3 5 4 6 3 2 4;
- mso-font-charset:1;
- mso-generic-font-family:roman;
- mso-font-format:other;
- mso-font-pitch:variable;
- mso-font-signature:0 0 0 0 0 0;}
-@font-face
- {font-family:Calibri;
- panose-1:2 15 5 2 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-1610611985 1073750139 0 0 159 0;}
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-520082689 -1073717157 41 0 66047 0;}
-@font-face
- {font-family:"Trebuchet MS";
- panose-1:2 11 6 3 2 2 2 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:647 0 0 0 159 0;}
-@font-face
- {font-family:"Lucida Console";
- panose-1:2 11 6 9 4 5 4 2 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-2147482993 6144 0 0 31 0;}
-@font-face
- {font-family:Consolas;
- panose-1:2 11 6 9 2 2 4 3 2 4;
- mso-font-charset:0;
- mso-generic-font-family:modern;
- mso-font-pitch:fixed;
- mso-font-signature:-1610611985 1073750091 0 0 159 0;}
-@font-face
- {font-family:Verdana;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:-1593833729 1073750107 16 0 415 0;}
-@font-face
- {font-family:"\@PMingLiU";
- panose-1:2 2 5 0 0 0 0 0 0 0;
- mso-font-charset:136;
- mso-generic-font-family:roman;
- mso-font-pitch:variable;
- mso-font-signature:-1610611969 684719354 22 0 1048577 0;}
- /* Style Definitions */
- p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-h1
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 1 Char";
- mso-style-next:Normal;
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- font-weight:normal;
- mso-bidi-font-weight:bold;}
-h2
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-style-link:"Heading 2 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:14.0pt;
- font-family:"Trebuchet MS","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:Arial;
- color:#5F5F5F;
- letter-spacing:2.0pt;}
-h3
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-parent:"Heading 4";
- mso-style-link:"Heading 3 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:3;
- font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- color:#FF6600;
- font-weight:normal;
- mso-bidi-font-weight:bold;}
-h4
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Heading 4 Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:4;
- font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:minor-fareast;
- mso-bidi-font-family:"Times New Roman";
- color:olive;}
-p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
- {mso-style-unhide:no;
- mso-style-link:"Footnote Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Comment Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoHeader, li.MsoHeader, div.MsoHeader
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-link:"Header Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoFooter, li.MsoFooter, div.MsoFooter
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-link:"Footer Char";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- tab-stops:center 3.25in right 6.5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoCaption, li.MsoCaption, div.MsoCaption
- {mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-span.MsoFootnoteReference
- {mso-style-unhide:no;
- vertical-align:super;}
-span.MsoCommentReference
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;}
-p.MsoListBullet, li.MsoListBullet, div.MsoListBullet
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpFirst, li.MsoListBulletCxSpFirst, div.MsoListBulletCxSpF=
-irst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpMiddle, li.MsoListBulletCxSpMiddle, div.MsoListBulletCxS=
-pMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.25in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBulletCxSpLast, li.MsoListBulletCxSpLast, div.MsoListBulletCxSpLast
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.25in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l3 level1 lfo1;
- tab-stops:list .25in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2, li.MsoListBullet2, div.MsoListBullet2
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpFirst, li.MsoListBullet2CxSpFirst, div.MsoListBullet2Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpMiddle, li.MsoListBullet2CxSpMiddle, div.MsoListBullet2=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet2CxSpLast, li.MsoListBullet2CxSpLast, div.MsoListBullet2CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l2 level1 lfo2;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3, li.MsoListBullet3, div.MsoListBullet3
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpFirst, li.MsoListBullet3CxSpFirst, div.MsoListBullet3Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpMiddle, li.MsoListBullet3CxSpMiddle, div.MsoListBullet3=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.75in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListBullet3CxSpLast, li.MsoListBullet3CxSpLast, div.MsoListBullet3CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.75in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l1 level1 lfo3;
- tab-stops:list .75in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2, li.MsoListNumber2, div.MsoListNumber2
- {mso-style-priority:1;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpFirst, li.MsoListNumber2CxSpFirst, div.MsoListNumber2Cx=
-SpFirst
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpMiddle, li.MsoListNumber2CxSpMiddle, div.MsoListNumber2=
-CxSpMiddle
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListNumber2CxSpLast, li.MsoListNumber2CxSpLast, div.MsoListNumber2CxSp=
-Last
- {mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- text-indent:-.25in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- mso-list:l0 level1 lfo4;
- tab-stops:list .5in;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-a:link, span.MsoHyperlink
- {mso-style-unhide:no;
- color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {mso-style-priority:1;
- mso-style-unhide:no;
- color:purple;
- mso-themecolor:followedhyperlink;
- text-decoration:underline;
- text-underline:single;}
-p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-parent:"Comment Text";
- mso-style-link:"Comment Subject Char";
- mso-style-next:"Comment Text";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-weight:bold;}
-p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
- {mso-style-noshow:yes;
- mso-style-unhide:no;
- mso-style-link:"Balloon Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";}
-p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParag=
-raphCxSpFirst
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListPar=
-agraphCxSpMiddle
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagra=
-phCxSpLast
- {mso-style-priority:34;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Verdana","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.MsoQuote, li.MsoQuote, div.MsoQuote
- {mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-qformat:yes;
- mso-style-link:"Quote Char";
- mso-style-next:Normal;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:black;
- font-style:italic;}
-span.Heading1Char
- {mso-style-name:"Heading 1 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 1";
- mso-ansi-font-size:20.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Arial;
- color:#666699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-span.Heading2Char
- {mso-style-name:"Heading 2 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 2";
- mso-ansi-font-size:13.0pt;
- mso-bidi-font-size:13.0pt;
- font-family:"Cambria","serif";
- mso-ascii-font-family:Cambria;
- mso-ascii-theme-font:major-latin;
- mso-fareast-font-family:"Times New Roman";
- mso-fareast-theme-font:major-fareast;
- mso-hansi-font-family:Cambria;
- mso-hansi-theme-font:major-latin;
- mso-bidi-font-family:"Times New Roman";
- mso-bidi-theme-font:major-bidi;
- color:#4F81BD;
- mso-themecolor:accent1;
- font-weight:bold;}
-span.Heading4Char
- {mso-style-name:"Heading 4 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 4";
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:olive;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- font-weight:bold;}
-span.Heading3Char
- {mso-style-name:"Heading 3 Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Heading 3";
- mso-ansi-font-size:14.0pt;
- mso-bidi-font-size:14.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;
- color:#FF6600;
- mso-ansi-language:EN-US;
- mso-fareast-language:EN-US;
- mso-bidi-language:AR-SA;
- mso-bidi-font-weight:bold;}
-span.FootnoteTextChar
- {mso-style-name:"Footnote Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Footnote Text";
- mso-ansi-font-size:11.0pt;}
-span.CommentTextChar
- {mso-style-name:"Comment Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Comment Text";}
-span.HeaderChar
- {mso-style-name:"Header Char";
- mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Header;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.FooterChar
- {mso-style-name:"Footer Char";
- mso-style-priority:1;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Footer;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;}
-span.CommentSubjectChar
- {mso-style-name:"Comment Subject Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-parent:"Comment Text Char";
- mso-style-link:"Comment Subject";
- font-weight:bold;}
-span.BalloonTextChar
- {mso-style-name:"Balloon Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Balloon Text";
- mso-ansi-font-size:8.0pt;
- mso-bidi-font-size:8.0pt;
- font-family:"Tahoma","sans-serif";
- mso-ascii-font-family:Tahoma;
- mso-hansi-font-family:Tahoma;
- mso-bidi-font-family:Tahoma;}
-span.QuoteChar
- {mso-style-name:"Quote Char";
- mso-style-priority:29;
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Quote;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- color:black;
- font-style:italic;}
-p.Heading0, li.Heading0, div.Heading0
- {mso-style-name:"Heading 0";
- mso-style-unhide:no;
- mso-style-parent:"Heading 1";
- margin-top:6.0pt;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-line-height-alt:14.0pt;
- mso-pagination:widow-orphan;
- page-break-after:avoid;
- mso-outline-level:1;
- font-size:28.0pt;
- mso-bidi-font-size:16.0pt;
- font-family:"Tahoma","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:Arial;
- color:#006699;
- mso-font-kerning:16.0pt;
- mso-bidi-font-weight:bold;}
-p.SubHeading, li.SubHeading, div.SubHeading
- {mso-style-name:SubHeading;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- color:maroon;
- font-weight:bold;
- mso-bidi-font-weight:normal;}
-span.CodeCharChar
- {mso-style-name:"Code Char Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Code;
- mso-ansi-font-size:9.0pt;
- mso-bidi-font-size:9.0pt;
- font-family:"Lucida Console";
- mso-ascii-font-family:"Lucida Console";
- mso-hansi-font-family:"Lucida Console";
- mso-no-proof:yes;}
-p.Code, li.Code, div.Code
- {mso-style-name:Code;
- mso-style-unhide:no;
- mso-style-link:"Code Char Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:3.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-layout-grid-align:none;
- text-autospace:none;
- font-size:9.0pt;
- font-family:"Lucida Console";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-span.NoteChar
- {mso-style-name:"Note Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:Note;
- mso-ansi-font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- background:#F3F3F3;
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Note, li.Note, div.Note
- {mso-style-name:Note;
- mso-style-unhide:no;
- mso-style-link:"Note Char";
- margin-top:0in;
- margin-right:.2in;
- margin-bottom:12.0pt;
- margin-left:.2in;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- background:#F3F3F3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:11.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.Style2, li.Style2, div.Style2
- {mso-style-name:Style2;
- mso-style-unhide:no;
- mso-style-parent:"";
- mso-style-next:Normal;
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- background:#F9FFF3;
- border:none;
- mso-border-top-alt:.5pt;
- mso-border-left-alt:.5pt;
- mso-border-bottom-alt:1.5pt;
- mso-border-right-alt:1.5pt;
- mso-border-color-alt:windowtext;
- mso-border-style-alt:solid;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";
- mso-no-proof:yes;}
-p.Style3, li.Style3, div.Style3
- {mso-style-name:Style3;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:12.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan;
- background:#F5FAF4;
- mso-layout-grid-align:none;
- text-autospace:none;
- border:none;
- mso-border-alt:solid windowtext 1.0pt;
- padding:0in;
- mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
- mso-border-shadow:yes;
- font-size:9.0pt;
- font-family:Consolas;
- mso-fareast-font-family:PMingLiU;
- mso-bidi-font-family:"Times New Roman";
- mso-fareast-language:ZH-CN;
- mso-no-proof:yes;}
-span.DescriptionTextChar
- {mso-style-name:"Description Text Char";
- mso-style-unhide:no;
- mso-style-locked:yes;
- mso-style-link:"Description Text";}
-p.DescriptionText, li.DescriptionText, div.DescriptionText
- {mso-style-name:"Description Text";
- mso-style-unhide:no;
- mso-style-link:"Description Text Char";
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.25in;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";
- mso-fareast-font-family:"Times New Roman";
- mso-bidi-font-family:"Times New Roman";}
-p.Issue, li.Issue, div.Issue
- {mso-style-name:Issue;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:0in;
- mso-pagination:widow-orphan lines-together;
- border:none;
- mso-border-alt:solid navy 1.5pt;
- padding:0in;
- mso-padding-alt:1.0pt 1.0pt 1.0pt 1.0pt;
- mso-border-shadow:yes;
- font-size:10.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";
- color:red;
- font-style:italic;
- mso-bidi-font-style:normal;}
-p.msolistparagraph0, li.msolistparagraph0, div.msolistparagraph0
- {mso-style-name:msolistparagraph;
- mso-style-unhide:no;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-p.msolistparagraph0CxSpFirst, li.msolistparagraph0CxSpFirst, div.msolistpar=
-agraph0CxSpFirst
- {mso-style-name:msolistparagraphCxSpFirst;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-p.msolistparagraph0CxSpMiddle, li.msolistparagraph0CxSpMiddle, div.msolistp=
-aragraph0CxSpMiddle
- {mso-style-name:msolistparagraphCxSpMiddle;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:0in;
- margin-left:.5in;
- margin-bottom:.0001pt;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-p.msolistparagraph0CxSpLast, li.msolistparagraph0CxSpLast, div.msolistparag=
-raph0CxSpLast
- {mso-style-name:msolistparagraphCxSpLast;
- mso-style-unhide:no;
- mso-style-type:export-only;
- margin-top:0in;
- margin-right:0in;
- margin-bottom:6.0pt;
- margin-left:.5in;
- mso-add-space:auto;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- mso-bidi-font-size:12.0pt;
- font-family:"Times New Roman","serif";
- mso-fareast-font-family:"Times New Roman";}
-.MsoChpDefault
- {mso-style-type:export-only;
- mso-default-props:yes;
- font-size:10.0pt;
- mso-ansi-font-size:10.0pt;
- mso-bidi-font-size:10.0pt;
- mso-ascii-font-family:Calibri;
- mso-hansi-font-family:Calibri;}
- /* Page Definitions */
- @page
- {mso-footnote-separator:url("Microsoft.VisualStudio.Text.Operations.Overvi=
-ew_files/header.htm") fs;
- mso-footnote-continuation-separator:url("Microsoft.VisualStudio.Text.Opera=
-tions.Overview_files/header.htm") fcs;
- mso-endnote-separator:url("Microsoft.VisualStudio.Text.Operations.Overview=
-_files/header.htm") es;
- mso-endnote-continuation-separator:url("Microsoft.VisualStudio.Text.Operat=
-ions.Overview_files/header.htm") ecs;}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-even-header:url("Microsoft.VisualStudio.Text.Operations.Overview_files=
-/header.htm") eh1;
- mso-header:url("Microsoft.VisualStudio.Text.Operations.Overview_files/head=
-er.htm") h1;
- mso-footer:url("Microsoft.VisualStudio.Text.Operations.Overview_files/head=
-er.htm") f1;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
- @list l0
- {mso-list-id:-129;
- mso-list-type:simple;
- mso-list-template-ids:-1739002844;}
-@list l0:level1
- {mso-level-style-link:"List Number 2";
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l1
- {mso-list-id:-126;
- mso-list-type:simple;
- mso-list-template-ids:-1045901690;}
-@list l1:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 3";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.75in;
- mso-level-number-position:left;
- margin-left:.75in;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l2
- {mso-list-id:-125;
- mso-list-type:simple;
- mso-list-template-ids:-1069260336;}
-@list l2:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet 2";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l3
- {mso-list-id:-119;
- mso-list-type:simple;
- mso-list-template-ids:1390696726;}
-@list l3:level1
- {mso-level-number-format:bullet;
- mso-level-style-link:"List Bullet";
- mso-level-text:\F0B7;
- mso-level-tab-stop:.25in;
- mso-level-number-position:left;
- margin-left:.25in;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l4
- {mso-list-id:782309382;
- mso-list-type:hybrid;
- mso-list-template-ids:-2130535516 67698689 67698691 67698693 67698689 6769=
-8691 67698693 67698689 67698691 67698693;}
-@list l4:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l4:level2
- {mso-level-tab-stop:1.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level3
- {mso-level-tab-stop:1.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level4
- {mso-level-tab-stop:2.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level5
- {mso-level-tab-stop:2.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level6
- {mso-level-tab-stop:3.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level7
- {mso-level-tab-stop:3.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level8
- {mso-level-tab-stop:4.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l4:level9
- {mso-level-tab-stop:4.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5
- {mso-list-id:907811759;
- mso-list-type:hybrid;
- mso-list-template-ids:2147251200 67698689 67698691 67698693 67698689 67698=
-691 67698693 67698689 67698691 67698693;}
-@list l5:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l5:level2
- {mso-level-tab-stop:1.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level3
- {mso-level-tab-stop:1.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level4
- {mso-level-tab-stop:2.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level5
- {mso-level-tab-stop:2.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level6
- {mso-level-tab-stop:3.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level7
- {mso-level-tab-stop:3.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level8
- {mso-level-tab-stop:4.0in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-@list l5:level9
- {mso-level-tab-stop:4.5in;
- mso-level-number-position:left;
- text-indent:-.25in;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 10]>
-<style>
- /* Style Definitions */
- table.MsoNormalTable
- {mso-style-name:"Table Normal";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-noshow:yes;
- mso-style-priority:99;
- mso-style-qformat:yes;
- mso-style-parent:"";
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-table.MsoTableGrid
- {mso-style-name:"Table Grid";
- mso-tstyle-rowband-size:0;
- mso-tstyle-colband-size:0;
- mso-style-unhide:no;
- border:solid windowtext 1.0pt;
- mso-border-alt:solid windowtext .5pt;
- mso-padding-alt:0in 5.4pt 0in 5.4pt;
- mso-border-insideh:.5pt solid windowtext;
- mso-border-insidev:.5pt solid windowtext;
- mso-para-margin:0in;
- mso-para-margin-bottom:.0001pt;
- line-height:14.0pt;
- mso-pagination:widow-orphan;
- font-size:10.0pt;
- font-family:"Calibri","sans-serif";}
-</style>
-<![endif]--><!--[if gte mso 9]><xml>
- <o:shapedefaults v:ext=3D"edit" spidmax=3D"8194"/>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <o:shapelayout v:ext=3D"edit">
- <o:idmap v:ext=3D"edit" data=3D"1"/>
- </o:shapelayout></xml><![endif]-->
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple style=3D'tab-interval:.5in'>
-
-<div class=3DSection1>
-
-<p class=3DHeading0>Editor Operations Subsystem</p>
-
-<div style=3D'mso-element:para-border-div;border:none;border-bottom:solid w=
-indowtext 1.0pt;
-mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in'>
-
-<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:solid windo=
-wtext .75pt;
-padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><o:p>&nbsp;</o:p></p>
-
-</div>
-
-<h1><a name=3D"_Toc76978452"></a><a name=3D"_Toc151974416"></a><a
-name=3D"_Toc151973942"></a><a name=3D"_Toc149118079"></a><a name=3D"_Toc149=
-118215"></a><a
-name=3D"_Toc149118380"></a><a name=3D"_Toc149118641"></a><a name=3D"_Toc151=
-873508"></a><a
-name=3D"_Toc151873650"></a><a name=3D"_Toc151974258"></a><a name=3D"_Toc153=
-684427"></a><a
-name=3D"_Toc151892155"></a><a name=3D"_Toc151886240"></a><a name=3D"_Toc151=
-886043"></a><a
-name=3D"_Toc153700829"></a><a name=3D"_Toc151442559"></a><a name=3D"_Toc155=
-080032"></a><a
-name=3D"_Toc149120311"></a><a name=3D"_Toc152403723"></a><a name=3D"_Toc149=
-637917"><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-"Times New Roman"'>Overview</span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></a><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-fareast-font-family:=
-"Times New Roman"'><o:p></o:p></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'>This
-document provides a conceptual overview of the </span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><i style=3D'mso-bidi-font-style:normal'=
-><span
-style=3D'font-family:"Verdana","sans-serif"'>Operations</span></i> subsyste=
-m.
-This subsystem provides services and public types to perform operations on =
-the editor.
-These are broken down into three separate areas that are described in great=
-er
-detail below:</span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoListBullet2CxSpFirst><span style=3D'mso-bookmark:_Toc15240372=
-3'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><![if !supportLists]><span
-style=3D'font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-fa=
-mily:
-Symbol'><span style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "=
-Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Editor Operations</span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></span></p>
-
-<p class=3DMsoListBullet2CxSpMiddle><span style=3D'mso-bookmark:_Toc1524037=
-23'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><![if !supportLists]><span
-style=3D'font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-fa=
-mily:
-Symbol'><span style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "=
-Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Text Navigation</span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></p>
-
-<p class=3DMsoListBullet2CxSpMiddle><span style=3D'mso-bookmark:_Toc1524037=
-23'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><![if !supportLists]><span
-style=3D'font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-fa=
-mily:
-Symbol'><span style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "=
-Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Find Logic</span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></p>
-
-<p class=3DMsoListBullet2CxSpLast><span style=3D'mso-bookmark:_Toc152403723=
-'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><![if !supportLists]><span
-style=3D'font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-fa=
-mily:
-Symbol'><span style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "=
-Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>TextBuffer Undo Manager</span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><a name=3D"_Toc124327313"></a><a
-name=3D"_Toc149637918"><span style=3D'mso-bookmark:_Toc124327313'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>Editor Operations</span=
-></span></a></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>The Editor Operations area of the </sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><i
-style=3D'mso-bidi-font-style:normal'><span style=3D'font-family:"Verdana","=
-sans-serif"'>Operations</span></i>
-subsystem is concerned with providing operations that can be performed upon=
- the
-ITextView of an editor.</span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>There are five categories of operation=
-s that
-are implemented:</span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></p>
-
-<ul style=3D'margin-top:0in' type=3Ddisc>
- <li class=3DMsoNormal style=3D'margin-bottom:6.0pt;line-height:normal;mso-=
-list:
- l5 level1 lfo5;tab-stops:list .5in'><span style=3D'mso-bookmark:_Toc15=
-2403723'><span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span><a
- href=3D"#_Navigation_Operations"><span style=3D'mso-bookmark:_Toc15240=
-3723'><span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-ascii-font-fam=
-ily:
- Calibri;mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;
- mso-hansi-theme-font:minor-latin'>Navigation Operations</span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/a><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'><span
- style=3D'mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-lati=
-n;
- mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin'><o:p><=
-/o:p></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></li>
-</ul>
-
-<ul style=3D'margin-top:0in' type=3Ddisc>
- <li class=3DMsoNormal style=3D'margin-bottom:6.0pt;line-height:normal;mso-=
-list:
- l4 level1 lfo6;tab-stops:list .5in'><span style=3D'mso-bookmark:_Toc15=
-2403723'><span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span><a
- href=3D"#_Edit_Operations"><span style=3D'mso-bookmark:_Toc152403723'>=
-<span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-ascii-font-fam=
-ily:
- Calibri;mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;
- mso-hansi-theme-font:minor-latin'>Edit Operations</span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/a><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'><span
- style=3D'mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-lati=
-n;
- mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin'><o:p><=
-/o:p></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></li>
- <li class=3DMsoNormal style=3D'margin-bottom:6.0pt;line-height:normal;mso-=
-list:
- l4 level1 lfo6;tab-stops:list .5in'><span style=3D'mso-bookmark:_Toc15=
-2403723'><span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span><a
- href=3D"#_Selection_Operations"><span style=3D'mso-bookmark:_Toc152403=
-723'><span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-ascii-font-fam=
-ily:
- Calibri;mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;
- mso-hansi-theme-font:minor-latin'>Selection Operations</span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/a><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'><span
- style=3D'mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-lati=
-n;
- mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin'><o:p><=
-/o:p></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></li>
- <li class=3DMsoNormal style=3D'margin-bottom:6.0pt;line-height:normal;mso-=
-list:
- l4 level1 lfo6;tab-stops:list .5in'><span style=3D'mso-bookmark:_Toc15=
-2403723'><span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span><a
- href=3D"#_Clipboard_Operations"><span style=3D'mso-bookmark:_Toc152403=
-723'><span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-ascii-font-fam=
-ily:
- Calibri;mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;
- mso-hansi-theme-font:minor-latin'>Clipboard Operations</span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/a><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'><span
- style=3D'mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-lati=
-n;
- mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin'><o:p><=
-/o:p></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></li>
- <li class=3DMsoNormal style=3D'margin-bottom:6.0pt;line-height:normal;mso-=
-list:
- l4 level1 lfo6;tab-stops:list .5in'><span style=3D'mso-bookmark:_Toc15=
-2403723'><span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span><a
- href=3D"#_Editor_PropertyOperations"><span style=3D'mso-bookmark:_Toc1=
-52403723'><span
- style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc1=
-55080032'><span
- style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc1=
-53700829'><span
- style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc1=
-51886240'><span
- style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc1=
-53684427'><span
- style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc1=
-51873650'><span
- style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc1=
-49118641'><span
- style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc1=
-49118215'><span
- style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc1=
-51973942'><span
- style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc7=
-6978452'><span
- style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-ascii-font-fam=
-ily:
- Calibri;mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;
- mso-hansi-theme-font:minor-latin'>Editor Property Operations</span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/a><span
- style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc1=
-49120311'><span
- style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc1=
-51442559'><span
- style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc1=
-51886043'><span
- style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc1=
-51892155'><span
- style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc1=
-51974258'><span
- style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc1=
-51873508'><span
- style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc1=
-49118380'><span
- style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc1=
-49118079'><span
- style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc1=
-51974416'><span
- style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc12=
-4327313'><span
- style=3D'mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-lati=
-n;
- mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin'><o:p><=
-/o:p></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></li>
-</ul>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>Editor Operations also define a set of=
- command
-handlers and keybindings that hook up the editor operations with the Nautil=
-us
-Command and Input subsystem</span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_Navigation_Operations"></a><span style=3D'mso-fareast-font-family:=
-"Times New Roman"'><span
-style=3D'mso-spacerun:yes'>&nbsp;</span><a name=3D"_Toc149637920">Navigation
-Operations</a><o:p></o:p></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><a
-name=3D"_IEditorOperationsProvider_Definitio"></a>This category of operatio=
-ns is
-concerned with caret movement (for example, moving the caret to the end of =
-the
-current line, moving it to the start of the document, page up, page down, e=
-tc).
-Since these operations do not alter text in the editor, they are not undo
-aware.</span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_Edit_Operations"></a><span style=3D'mso-fareast-font-family:"Times=
- New Roman"'><span
-style=3D'mso-spacerun:yes'>&nbsp;</span><a name=3D"_Toc149637921">Edit Oper=
-ations</a><o:p></o:p></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>This category of operations is concern=
-ed
-with text manipulation (for example, deleting text, inserting text, indenti=
-ng
-tabs, etc). These operations alter text, they are undo aware. Undo aware
-operations take in an UndoHistory input parameter, which they will use to
-create UndoTransactions..</span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_Selection_Operations"></a><span style=3D'mso-fareast-font-family:"=
-Times New Roman"'><span
-style=3D'mso-spacerun:yes'>&nbsp;</span><a name=3D"_Toc149637922">Selection
-Operations</a><o:p></o:p></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>This category of operations is concern=
-ed
-with selection manipulation (for example, selecting all text in the editor,
-extending selections, resetting selections, etc). Since these operations do=
- not
-alter text in the editor, they are not undo aware.</span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_Clipboard_Operations"></a><span style=3D'mso-fareast-font-family:"=
-Times New Roman"'><span
-style=3D'mso-spacerun:yes'>&nbsp;</span><a name=3D"_Toc149637923">Clipboard
-Operations</a><o:p></o:p></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>This category of operations is concern=
-ed
-with utilizing the clipboard. For example, cut, copy, and paste. They also
-contain operations that tell you whether the clipboard operations (cut and
-paste) is currently allowed (the editor may be in read-only mode). Some of
-these operations alter text, namely cut and paste. Hence, these methods are
-undo aware<a name=3D"_Editor_PropertyOperations"></a>, and take in an UndoH=
-istory
-input parameter.</span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><span
-style=3D'mso-spacerun:yes'>&nbsp;</span><a name=3D"_Toc149637924">Editor Pr=
-operty
-Operations</a><o:p></o:p></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>This category of operations is concern=
-ed with
-getting and setting properties on the editor. For example, the tab size used
-for indenting operations, the overwrite mode, the ITextView that the operat=
-ions
-are bound to, etc. Since these operations do not alter to text in the edito=
-r,
-they are not undo aware.</span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_Toc149637925"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>Text
-Navigation</span></a></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>The Text Navigation area of </span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><b
-style=3D'mso-bidi-font-weight:normal'><i style=3D'mso-bidi-font-style:norma=
-l'><span
-style=3D'font-family:"Verdana","sans-serif"'>Operations</span></i></b> subs=
-ystem
-is concerned with providing text navigation operations on a given ITextBuff=
-er.</span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_The_ITextStructureNavigator_Interfa"></a><span style=3D'mso-fareas=
-t-font-family:
-"Times New Roman"'>ITextStructureNavigator<o:p></o:p></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>Defines methods which navigate over te=
-xt in
-the given ITextBuffer for a supported IContentType.</span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span><a
-name=3D"_The_TextExtent_Class"></a><span style=3D'mso-bookmark:_Toc15240372=
-3'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><span style=3D'mso-ascii-font-family:C=
-alibri;
-mso-ascii-theme-font:minor-latin;mso-hansi-font-family:Calibri;mso-hansi-th=
-eme-font:
-minor-latin'><o:p></o:p></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'>TextExtent<o:p></o:p></=
-span></span></span></span></span></span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>Encapsulates information about the ext=
-ent of
-a word. Apart from the extent location, also provides the method IsSignific=
-ant,
-which gets the significance of the text extent. The significance determines
-whether the word is significant. Insignificant words should be ignored duri=
-ng
-navigation operations.</span></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></p>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>For example, suppose whitespace consti=
-tutes
-word boundaries. A word consisting of purely whitespace is therefore
-insignificant. If we have the sentence &#8220;abc<span
-style=3D'mso-spacerun:yes'>&nbsp;&nbsp; </span>efg&#8221;, and your caret i=
-s at
-b, the move caret to next word operation should take you to e, skipping the
-whitespace between the two words.</span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_The_ITextStructureNavigatorCache_In"></a>ITextStructureNavigatorPr=
-ovider</span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>This is the extension point clients im=
-plement
-to provide an </span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;
-mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin'>ITextStruct=
-ureNavigators
-for a particular ContentType. The Operations subsystem implements one navig=
-ator
-for the </span>&#8220;text&#8221; ContentType.</span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></p>
-
-<h1><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_The_ITextStructureNavigatorFactory_"></a><a
-name=3D"_The_ITextStructureNavigatorFactoryP"></a>Text Search</span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>The Text Search area of the </span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><i
-style=3D'mso-bidi-font-style:normal'><span style=3D'font-family:"Verdana","=
-sans-serif"'>Operations</span></i>
-subsystem is concerned with providing a search engine that clients may use =
-to
-perform searches on an ITextBuffer.</span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_The_IFindLogic_Interface"></a>ITextSearchService</span></span></sp=
-an></span></span></span></span></span></span></span></span></span></span></=
-span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-bidi-font-family:Tahoma;color:#FF6600'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></h2>
-
-<p class=3DMsoNormal style=3D'margin-bottom:0in;margin-bottom:.0001pt'><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'>Thi
-is an engine which supports searching for text in a ITextBuffer. </span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;
-mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin'>The find op=
-tion
-&#8220;</span>Regular Expressions&#8221;use the .Net Regular Expression eng=
-ine
-for search and replace. The find option &#8220;Match Whole Word&#8221; makes
-use of Text Navigation of the Operations subsystem to determine the extent =
-of a
-word.<a name=3D"_The_IFindLogicProvider_Interface"></a></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></span></span></span></span></span></span></p>
-
-<p class=3DMsoNormal style=3D'margin-bottom:0in;margin-bottom:.0001pt'><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;
-mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin'><o:p>&nbsp;=
-</o:p></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></span></span></span></sp=
-an></p>
-
-<h1><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_Toc149637936"><span style=3D'mso-fareast-font-family:"Times New Ro=
-man"'>TextBuffer
-Undo Manager</span></a></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><span
-style=3D'mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></h1>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>The TextBuffer Undo Manager area of th=
-e </span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span></span></span></span></span></span></span><span
-style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:_Toc149120=
-311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><i
-style=3D'mso-bidi-font-style:normal'><span style=3D'font-family:"Verdana","=
-sans-serif"'>Operations</span></i>
-subsystem is concerned with managing Undo for a ITextBuffer.</span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></p>
-
-<h2><span style=3D'mso-bookmark:_Toc152403723'><span style=3D'mso-bookmark:=
-_Toc149120311'><span
-style=3D'mso-bookmark:_Toc155080032'><span style=3D'mso-bookmark:_Toc151442=
-559'><span
-style=3D'mso-bookmark:_Toc153700829'><span style=3D'mso-bookmark:_Toc151886=
-043'><span
-style=3D'mso-bookmark:_Toc151886240'><span style=3D'mso-bookmark:_Toc151892=
-155'><span
-style=3D'mso-bookmark:_Toc153684427'><span style=3D'mso-bookmark:_Toc151974=
-258'><span
-style=3D'mso-bookmark:_Toc151873650'><span style=3D'mso-bookmark:_Toc151873=
-508'><span
-style=3D'mso-bookmark:_Toc149118641'><span style=3D'mso-bookmark:_Toc149118=
-380'><span
-style=3D'mso-bookmark:_Toc149118215'><span style=3D'mso-bookmark:_Toc149118=
-079'><span
-style=3D'mso-bookmark:_Toc151973942'><span style=3D'mso-bookmark:_Toc151974=
-416'><span
-style=3D'mso-bookmark:_Toc76978452'><span style=3D'mso-bookmark:_Toc1243273=
-13'><a
-name=3D"_The_ITextBufferUndoManager_Interfac"></a>ITextBufferUndoManager</s=
-pan></span></span></span></span></span></span></span></span></span></span><=
-/span></span></span></span></span></span></span></span></span></h2>
-
-<p class=3DMsoNormal><span style=3D'mso-bookmark:_Toc152403723'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'>An ITextBufferUndoManager manages undo=
- for a
-given ITextBuffer. This includes:</span></span></span></span></span></span>=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></p>
-
-<p class=3DMsoListBullet2CxSpFirst><span style=3D'mso-bookmark:_Toc15240372=
-3'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><![if !supportLists]><span style=3D'fo=
-nt-family:
-Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "Times New Roma=
-n"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Registering an UndoHistory for a ITextBuffer=
-</span></span></span></span></span></span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoListBullet2CxSpMiddle><span style=3D'mso-bookmark:_Toc1524037=
-23'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><![if !supportLists]><span style=3D'fo=
-nt-family:
-Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "Times New Roma=
-n"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Listen to Change events from the ITextBuffer,
-and for each ITextBuffer Change, create an UndoTransaction on the ITextBuff=
-er&#8217;s
-UndoHistory so that the ITextBuffer Change will be undoable.</span></span><=
-/span></span></span></span></span></span></span></span></span></span></span=
-></span></span></span></span></span></span></span></p>
-
-<p class=3DMsoListBullet2CxSpLast><span style=3D'mso-bookmark:_Toc152403723=
-'><span
-style=3D'mso-bookmark:_Toc149120311'><span style=3D'mso-bookmark:_Toc155080=
-032'><span
-style=3D'mso-bookmark:_Toc151442559'><span style=3D'mso-bookmark:_Toc153700=
-829'><span
-style=3D'mso-bookmark:_Toc151886043'><span style=3D'mso-bookmark:_Toc151886=
-240'><span
-style=3D'mso-bookmark:_Toc151892155'><span style=3D'mso-bookmark:_Toc153684=
-427'><span
-style=3D'mso-bookmark:_Toc151974258'><span style=3D'mso-bookmark:_Toc151873=
-650'><span
-style=3D'mso-bookmark:_Toc151873508'><span style=3D'mso-bookmark:_Toc149118=
-641'><span
-style=3D'mso-bookmark:_Toc149118380'><span style=3D'mso-bookmark:_Toc149118=
-215'><span
-style=3D'mso-bookmark:_Toc149118079'><span style=3D'mso-bookmark:_Toc151973=
-942'><span
-style=3D'mso-bookmark:_Toc151974416'><span style=3D'mso-bookmark:_Toc769784=
-52'><span
-style=3D'mso-bookmark:_Toc124327313'><![if !supportLists]><span style=3D'fo=
-nt-family:
-Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
-style=3D'mso-list:Ignore'>&middot;<span style=3D'font:7.0pt "Times New Roma=
-n"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span></span></span><![endif]>Provide assessors for clients to gain access=
- to
-the ITextBuffer that the undo manager works on top of, and the UndoHistory =
-that
-is registered for that ITextBuffer.</span></span></span></span></span></spa=
-n></span></span></span></span></span></span></span></span></span></span></s=
-pan></span></span></span><a
-name=3D"_The_ITextBufferUndoManagerProvider_"></a></p>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C88FF8.77140040
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Operations.Overview_files/themedata.thmx
-Content-Transfer-Encoding: base64
-Content-Type: application/vnd.ms-officetheme
-
-UEsDBBQABgAIAAAAIQCCirwT+gAAABwCAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKyRy2rDMBBF
-94X+g9C22HK6KKXYzqJJd30s0g8Y5LEtao+ENAnJ33fsuFC6CC10IxBizpl7Va6P46AOGJPzVOlV
-XmiFZH3jqKv0++4pu9cqMV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AAAGwEAACcAAAB0aGVtZS90aGVtZS9fcmVscy90
-aGVtZU1hbmFnZXIueG1sLnJlbHOEj00KwjAUhPeCdwhvb9O6EJEm3YjQrdQDhOQ1DTY/JFHs7Q2u
-LAguh2G+mWm7l53JE2My3jFoqhoIOumVcZrBbbjsjkBSFk6J2TtksGCCjm837RVnkUsoTSYkUigu
-MZhyDidKk5zQilT5gK44o49W5CKjpkHIu9BI93V9oPGbAXzFJL1iEHvVABmWUJr/s/04GolnLx8W
-Xf5RQXPZhQUoosbM4CObqkwEylu6usTfAAAA//8DAFBLAQItABQABgAIAAAAIQCCirwT+gAAABwC
-AAATAAAAAAAAAAAAAAAAAAAAAABbQ29udGVudF9UeXBlc10ueG1sUEsBAi0AFAAGAAgAAAAhAKXW
-p+fAAAAANgEAAAsAAAAAAAAAAAAAAAAAKwEAAF9yZWxzLy5yZWxzUEsBAi0AFAAGAAgAAAAhAGt5
-lhaDAAAAigAAABwAAAAAAAAAAAAAAAAAFAIAAHRoZW1lL3RoZW1lL3RoZW1lTWFuYWdlci54bWxQ
-SwECLQAUAAYACAAAACEAlrWt4pYGAABQGwAAFgAAAAAAAAAAAAAAAADRAgAAdGhlbWUvdGhlbWUv
-dGhlbWUxLnhtbFBLAQItABQABgAIAAAAIQAN0ZCftgAAABsBAAAnAAAAAAAAAAAAAAAAAJsJAAB0
-aGVtZS90aGVtZS9fcmVscy90aGVtZU1hbmFnZXIueG1sLnJlbHNQSwUGAAAAAAUABQBdAQAAlgoA
-AAAA
-
-------=_NextPart_01C88FF8.77140040
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Operations.Overview_files/colorschememapping.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml
-
-<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?>
-<a:clrMap xmlns:a=3D"http://schemas.openxmlformats.org/drawingml/2006/main"=
- bg1=3D"lt1" tx1=3D"dk1" bg2=3D"lt2" tx2=3D"dk2" accent1=3D"accent1" accent=
-2=3D"accent2" accent3=3D"accent3" accent4=3D"accent4" accent5=3D"accent5" a=
-ccent6=3D"accent6" hlink=3D"hlink" folHlink=3D"folHlink"/>
-------=_NextPart_01C88FF8.77140040
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Operations.Overview_files/header.htm
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/html; charset="us-ascii"
-
-<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
-xmlns:o=3D"urn:schemas-microsoft-com:office:office"
-xmlns:w=3D"urn:schemas-microsoft-com:office:word"
-xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
-xmlns=3D"http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
-<meta name=3DProgId content=3DWord.Document>
-<meta name=3DGenerator content=3D"Microsoft Word 12">
-<meta name=3DOriginator content=3D"Microsoft Word 12">
-<link id=3DMain-File rel=3DMain-File
-href=3D"../Microsoft.VisualStudio.Text.Operations.Overview.htm">
-<![if IE]>
-<base
-href=3D"file:///C:\515CB117\Microsoft.VisualStudio.Text.Operations.Overview=
-_files\header.htm"
-id=3D"webarch_temp_base_tag">
-<![endif]>
-</head>
-
-<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
-
-<div style=3D'mso-element:footnote-separator' id=3Dfs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:footnote-continuation-separator' id=3Dfcs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-separator' id=3Des>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-separato=
-r'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1 width=3D"33%">
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:endnote-continuation-separator' id=3Decs>
-
-<p class=3DMsoNormal><span style=3D'mso-special-character:footnote-continua=
-tion-separator'><![if !supportFootnotes]>
-
-<hr align=3Dleft size=3D1>
-
-<![endif]></span></p>
-
-</div>
-
-<div style=3D'mso-element:header' id=3Deh1>
-
-<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>
-
-</div>
-
-<div style=3D'mso-element:header' id=3Dh1>
-
-<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>
-
-</div>
-
-<div style=3D'mso-element:footer' id=3Df1>
-
-<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>
-
-</div>
-
-</body>
-
-</html>
-
-------=_NextPart_01C88FF8.77140040
-Content-Location: file:///C:/515CB117/Microsoft.VisualStudio.Text.Operations.Overview_files/filelist.xml
-Content-Transfer-Encoding: quoted-printable
-Content-Type: text/xml; charset="utf-8"
-
-<xml xmlns:o=3D"urn:schemas-microsoft-com:office:office">
- <o:MainFile HRef=3D"../Microsoft.VisualStudio.Text.Operations.Overview.htm=
-"/>
- <o:File HRef=3D"themedata.thmx"/>
- <o:File HRef=3D"colorschememapping.xml"/>
- <o:File HRef=3D"header.htm"/>
- <o:File HRef=3D"filelist.xml"/>
-</xml>
-------=_NextPart_01C88FF8.77140040--
diff --git a/src/Editor/Text/Def/TextUI/Tags/Legacy/BlockTag.cs b/src/Editor/Text/Def/TextUI/Tags/Legacy/BlockTag.cs
new file mode 100644
index 0000000..5379d2c
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Tags/Legacy/BlockTag.cs
@@ -0,0 +1,104 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Tagging
+{
+ using System;
+ using Microsoft.VisualStudio.Text.Adornments;
+
+ /// <summary>
+ /// An implementation of <see cref="IBlockTag" />.
+ /// </summary>
+ [Obsolete("Use StructureTag instead")]
+ public abstract class BlockTag : IBlockTag
+ {
+ public BlockTag(SnapshotSpan span, SnapshotSpan statementSpan, IBlockTag parent, string type, bool isCollapsible, bool isDefaultCollapsed, bool isImplementation, object collapsedForm, object collapsedHintForm)
+ {
+ this.Span = span;
+ this.Level = (parent == null) ? 0 : (parent.Level + 1);
+ this.StatementSpan = statementSpan;
+ this.Parent = parent;
+ this.Type = type;
+ this.IsCollapsible = isCollapsible;
+ this.IsDefaultCollapsed = isDefaultCollapsed;
+ this.IsImplementation = isImplementation;
+ this.CollapsedForm = collapsedForm;
+ this.CollapsedHintForm = collapsedHintForm;
+ }
+
+ /// <summary>
+ /// Gets the span of the structural block.
+ /// </summary>
+ public virtual SnapshotSpan Span { get; set; }
+
+ /// <summary>
+ /// Gets the level of nested-ness of the structural block.
+ /// </summary>
+ public virtual int Level { get; }
+
+ /// <summary>
+ /// Gets the span of the statement that control the structral block.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// For example, in the following snippet of code,
+ /// <code>
+ /// if (condition1 &amp;&amp;
+ /// condition2) // comment
+ /// {
+ /// something;
+ /// }
+ /// </code>
+ /// this.StatementSpan would extend from the start of the "if" to the end of comment.
+ /// this.Span would extend from before the "{" to the end of the "}".
+ /// </para>
+ /// </remarks>
+ public virtual SnapshotSpan StatementSpan { get; set; }
+
+ /// <summary>
+ /// Gets the hierarchical parent of the structural block.
+ /// </summary>
+ public virtual IBlockTag Parent { get; }
+
+ /// <summary>
+ /// Determines the semantic type of the structural block.
+ /// <remarks>
+ /// See <see cref="PredefinedStructureTypes"/> for the canonical types.
+ /// Use <see cref="PredefinedStructureTypes.Nonstructural"/> for blocks that will not have any visible affordance
+ /// (but will be used for outlining).
+ /// </remarks>
+ /// </summary>
+ public virtual string Type { get; }
+
+ /// <summary>
+ /// Determines whether a block can be collapsed.
+ /// </summary>
+ public virtual bool IsCollapsible { get; }
+
+ /// <summary>
+ /// Determines whether a block is collapsed by default.
+ /// </summary>
+ public virtual bool IsDefaultCollapsed { get; }
+
+ /// <summary>
+ /// Determines whether a block is an block region.
+ /// </summary>
+ /// <remarks>
+ /// Implementation blocks are the blocks of code following a method definition.
+ /// They are used for commands such as the Visual Studio Collapse to Definition command,
+ /// which hides the implementation block and leaves only the method definition exposed.
+ /// </remarks>
+ public virtual bool IsImplementation { get; }
+
+ /// <summary>
+ /// Gets the data object for the collapsed UI. If the default is set, returns null.
+ /// </summary>
+ public virtual object CollapsedForm { get; }
+
+ /// <summary>
+ /// Gets the data object for the collapsed UI tooltip. If the default is set, returns null.
+ /// </summary>
+ public virtual object CollapsedHintForm { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/Tags/Legacy/IBlockTag.cs b/src/Editor/Text/Def/TextUI/Tags/Legacy/IBlockTag.cs
new file mode 100644
index 0000000..99a6d30
--- /dev/null
+++ b/src/Editor/Text/Def/TextUI/Tags/Legacy/IBlockTag.cs
@@ -0,0 +1,90 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Tagging
+{
+ using System;
+ using Microsoft.VisualStudio.Text.Adornments;
+
+ /// <summary>
+ /// Represents a structural code block, which is used for vertical structural line adornments.
+ /// </summary>
+ [Obsolete("Use IStructureTag instead")]
+ public interface IBlockTag : ITag
+ {
+ /// <summary>
+ /// Gets the span of the structural block.
+ /// </summary>
+ SnapshotSpan Span { get; }
+
+ /// <summary>
+ /// Gets the level of nested-ness of the structural block.
+ /// </summary>
+ int Level { get; }
+
+ /// <summary>
+ /// Gets the span of the statement that control the structral block.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// For example, in the following snippet of code,
+ /// <code>
+ /// if (condition1 &amp;&amp;
+ /// condition2) // comment
+ /// {
+ /// something;
+ /// }
+ /// </code>
+ /// this.StatementSpan would extend from the start of the "if" to the end of comment.
+ /// this.Span would extend from before the "{" to the end of the "}".
+ /// </para>
+ /// </remarks>
+ SnapshotSpan StatementSpan { get; }
+
+ /// <summary>
+ /// Gets the hierarchical parent of the structural block.
+ /// </summary>
+ IBlockTag Parent { get; }
+
+ /// <summary>
+ /// Determines the semantic type of the structural block.
+ /// <remarks>
+ /// See <see cref="PredefinedStructureTypes"/> for the canonical types.
+ /// Use <see cref="PredefinedStructureTypes.Nonstructural"/> for blocks that will not have any visible affordance
+ /// (but will be used for outlining).
+ /// </remarks>
+ /// </summary>
+ string Type { get; }
+
+ /// <summary>
+ /// Determines whether a block can be collapsed.
+ /// </summary>
+ bool IsCollapsible { get; }
+
+ /// <summary>
+ /// Determines whether a block is collapsed by default.
+ /// </summary>
+ bool IsDefaultCollapsed { get; }
+
+ /// <summary>
+ /// Determines whether a block is an implementation block.
+ /// </summary>
+ /// <remarks>
+ /// Implementation blocks are the blocks of code following a method definition.
+ /// They are used for commands such as the Visual Studio Collapse to Definition command,
+ /// which hides the implementation block and leaves only the method definition exposed.
+ /// </remarks>
+ bool IsImplementation { get; }
+
+ /// <summary>
+ /// Gets the data object for the collapsed UI. If the default is set, returns null.
+ /// </summary>
+ object CollapsedForm { get; }
+
+ /// <summary>
+ /// Gets the data object for the collapsed UI tooltip. If the default is set, returns null.
+ /// </summary>
+ object CollapsedHintForm { get; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUI/TextUI.csproj b/src/Editor/Text/Def/TextUI/TextUI.csproj
index 21c151c..92bd85c 100644
--- a/src/Editor/Text/Def/TextUI/TextUI.csproj
+++ b/src/Editor/Text/Def/TextUI/TextUI.csproj
@@ -2,13 +2,15 @@
<PropertyGroup>
<AssemblyName>Microsoft.VisualStudio.Text.UI</AssemblyName>
<RootNamespace>Microsoft.VisualStudio.Text.Editor</RootNamespace>
- <TargetFramework>net46</TargetFramework>
<PushToPublicFeed>true</PushToPublicFeed>
<NoWarn>649;436;$(NoWarn)</NoWarn>
<AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
<Reference Include="System.ComponentModel.Composition" />
</ItemGroup>
<ItemGroup>
diff --git a/src/Editor/Text/Def/TextUIWpf/AssemblyInfo.cs b/src/Editor/Text/Def/TextUIWpf/AssemblyInfo.cs
new file mode 100644
index 0000000..426cf80
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/AssemblyInfo.cs
@@ -0,0 +1,31 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Reflection;
+using System.Runtime.ConstrainedExecution;
+using System.Runtime.CompilerServices;
+using System.Runtime.Versioning;
+using System.Security.Permissions;
+using System.Windows;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+
+[assembly: ComponentGuarantees(ComponentGuaranteesOptions.Stable)]
+
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None,
+ ResourceDictionaryLocation.SourceAssembly)]
+
+[assembly: TypeForwardedTo(typeof(Microsoft.VisualStudio.Text.Editor.ConnectionReason))]
diff --git a/src/Editor/Text/Def/TextUIWpf/Classification/ClassificationFormatDefinition.cs b/src/Editor/Text/Def/TextUIWpf/Classification/ClassificationFormatDefinition.cs
new file mode 100644
index 0000000..950d95e
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/Classification/ClassificationFormatDefinition.cs
@@ -0,0 +1,252 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Classification
+{
+ using System.Globalization;
+ using System.Windows;
+ using System.Windows.Media;
+
+ /// <summary>
+ /// Provides classification format information for a particular classification type.
+ /// </summary>
+ /// <remarks>
+ /// <para>This is a MEF component part, and should be exported as:
+ /// [Export(typeof(EditorFormatDefinition))]</para>
+ /// <para>
+ /// Exporters must provide the attributes ClassificationTypeAttribute and NameAttribute. The attributes OrderAttribute,
+ /// DisplayNameAttribute and UserVisibleAttribute may be provided optionally.
+ /// </para>
+ /// </remarks>
+ public abstract class ClassificationFormatDefinition : EditorFormatDefinition
+ {
+ /// <summary>
+ /// Defines the string used to look up the bold value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string IsBoldId = "IsBold";
+
+ /// <summary>
+ /// Defines the string used to look up the italic value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string IsItalicId = "IsItalic";
+
+ /// <summary>
+ /// Defines the string used to look up the font hinting size value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string FontHintingSizeId = "FontHintingSize";
+
+ /// <summary>
+ /// Defines the string used to look up the font rendering size value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string FontRenderingSizeId = "FontRenderingSize";
+
+ /// <summary>
+ /// Defines the string used look up the text effects value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string TextEffectsId = "TextEffects";
+
+ /// <summary>
+ /// Defines the string used to look up the text decorations value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string TextDecorationsId = "TextDecorations";
+
+ /// <summary>
+ /// Defines the string used o look up the typeface value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string TypefaceId = "Typeface";
+
+ /// <summary>
+ /// Defines the string used o look up the foreground opacity value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string ForegroundOpacityId = "ForegroundOpacity";
+
+ /// <summary>
+ /// Defines the string used to look up the background opacity value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string BackgroundOpacityId = "BackgroundOpacity";
+
+ /// <summary>
+ /// Defines the default opacity used for the background color/brush if no <see cref="BackgroundOpacityId"/> entities are defined.
+ /// </summary>
+ public const double DefaultBackgroundOpacity = 0.8;
+
+ /// <summary>
+ /// Defines the default opacity used for the background color/brush in high contrast themes.
+ /// </summary>
+ public const double DefaultHighContrastBackgroundOpacity = 0.5;
+
+ /// <summary>
+ /// Defines the string used to look up the <see cref="CultureInfo"/> value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string CultureInfoId = "CultureInfo";
+
+ /// <summary>
+ /// Gets or sets the <see cref="CultureInfo"/> for this classification format.
+ /// </summary>
+ public CultureInfo CultureInfo { get; protected set; }
+
+ /// <summary>
+ /// Gets or sets the the font hinting size for this classification format.
+ /// </summary>
+ public double? FontHintingSize { get; protected set; }
+
+ /// <summary>
+ /// Gets or sets the the font rendering size for this classification format.
+ /// </summary>
+ public double? FontRenderingSize { get; protected set; }
+
+#pragma warning disable CA2227 // Collection properties should be read only
+ /// <summary>
+ /// Gets or sets the the <see cref="TextEffectCollection"/> for this classification format.
+ /// </summary>
+ public TextEffectCollection TextEffects { get; protected set; }
+#pragma warning restore CA2227 // Collection properties should be read only
+
+#pragma warning disable CA2227 // Collection properties should be read only
+ /// <summary>
+ /// Gets or sets the <see cref="TextDecorationCollection"/> for this classification format.
+ /// </summary>
+ public TextDecorationCollection TextDecorations { get; protected set; }
+#pragma warning restore CA2227 // Collection properties should be read only
+
+ /// <summary>
+ /// Gets or sets the <see cref="Typeface"/> for this classification format.
+ /// </summary>
+ /// <remarks>
+ /// Certain values (bold, italic) in this typeface can be overridden by
+ /// other format definitions that have a higher priority.
+ /// </remarks>
+ public object FontTypeface { get; protected set; }
+
+ /// <summary>
+ /// Gets or sets the opacity of the foreground.
+ /// </summary>
+ /// <remarks>
+ /// This value overrides the opacity settings in the
+ /// ForegroundBrush property if this classification format has a higher priority.
+ /// </remarks>
+ public double? ForegroundOpacity { get; protected set; }
+
+ /// <summary>
+ /// Gets or sets the opacity of the background.
+ /// </summary>
+ /// <remarks>
+ /// This value will override the opacity settings in the
+ /// BackgroundBrush property if this classification format has a higher priority.
+ /// </remarks>
+ public double? BackgroundOpacity { get; protected set; }
+
+ /// <summary>
+ /// Determines whether the text should be bold.
+ /// </summary>
+ /// <remarks>
+ /// This value overrides the bold settings in the
+ /// <see cref="FontTypeface"/> property if this classification format has a higher priority.
+ /// </remarks>
+ public bool? IsBold { get; protected set; }
+
+ /// <summary>
+ /// Determines whether the text should be italic.
+ /// </summary>
+ /// <remarks>
+ /// This value will override the italic settings in the
+ /// <see cref="FontTypeface"/> property if this classification format has a higher priority.
+ /// </remarks>
+ public bool? IsItalic { get; protected set; }
+
+ /// <summary>
+ /// Creates a <see cref="ResourceDictionary"/> using this definition.
+ /// </summary>
+ /// <returns>A <see cref="ResourceDictionary"/> with the values from this definition.</returns>
+ protected override ResourceDictionary CreateResourceDictionaryFromDefinition()
+ {
+ ResourceDictionary resourceDictionary = new ResourceDictionary();
+
+ AddOverridableProperties(resourceDictionary);
+
+ if (this.ForegroundBrush != null)
+ {
+ resourceDictionary[EditorFormatDefinition.ForegroundBrushId] = this.ForegroundBrush;
+
+ // Only set Opacity if it isn't the default value of 1.0
+ if (this.ForegroundBrush.Opacity != 1.0)
+ resourceDictionary[ClassificationFormatDefinition.ForegroundOpacityId] = this.ForegroundBrush.Opacity;
+ }
+ if (this.BackgroundBrush != null)
+ {
+ resourceDictionary[EditorFormatDefinition.BackgroundBrushId] = this.BackgroundBrush;
+
+ // Only set Opacity if it isn't the default value of 1.0
+ if (this.BackgroundBrush.Opacity != 1.0)
+ resourceDictionary[ClassificationFormatDefinition.BackgroundOpacityId] = this.BackgroundBrush.Opacity;
+ }
+ if (this.FontTypeface != null)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.TypefaceId, this.FontTypeface);
+
+ //// Only set bold/italic to true if they are true in the typeface
+ //if (this.FontTypeface.Weight == FontWeights.Bold)
+ // resourceDictionary[ClassificationFormatDefinition.IsBoldId] = true;
+ //if (this.FontTypeface.Style == FontStyles.Italic)
+ //resourceDictionary[ClassificationFormatDefinition.IsItalicId] = true;
+
+ }
+ if (this.FontRenderingSize.HasValue)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.FontRenderingSizeId, this.FontRenderingSize.Value);
+ }
+ if (this.FontHintingSize.HasValue)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.FontHintingSizeId, this.FontHintingSize.Value);
+ }
+
+ if (this.TextDecorations != null)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.TextDecorationsId, this.TextDecorations);
+ }
+ if (this.TextEffects != null)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.TextEffectsId, this.TextEffects);
+ }
+
+ if (this.CultureInfo != null)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.CultureInfoId, this.CultureInfo);
+ }
+
+ return resourceDictionary;
+ }
+
+ /// <summary>
+ /// Adds properties to a resource dictionary from a <see cref="ClassificationFormatDefinition"/> that can be overridden by other properties.
+ /// </summary>
+ private void AddOverridableProperties(ResourceDictionary resourceDictionary)
+ {
+ if (this.ForegroundOpacity.HasValue)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.ForegroundOpacityId, this.ForegroundOpacity.Value);
+ }
+ if (this.BackgroundOpacity.HasValue)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.BackgroundOpacityId, this.BackgroundOpacity.Value);
+ }
+ if (this.IsBold.HasValue)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.IsBoldId, this.IsBold.Value);
+ }
+ if (this.IsItalic.HasValue)
+ {
+ resourceDictionary.Add(ClassificationFormatDefinition.IsItalicId, this.IsItalic.Value);
+ }
+ if (this.ForegroundColor.HasValue)
+ {
+ resourceDictionary[EditorFormatDefinition.ForegroundBrushId] = new SolidColorBrush(this.ForegroundColor.Value);
+ }
+ if (this.BackgroundColor.HasValue)
+ {
+ resourceDictionary[EditorFormatDefinition.BackgroundBrushId] = new SolidColorBrush(this.BackgroundColor.Value);
+ }
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/Classification/EditorFormatDefinition.cs b/src/Editor/Text/Def/TextUIWpf/Classification/EditorFormatDefinition.cs
new file mode 100644
index 0000000..4bb3243
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/Classification/EditorFormatDefinition.cs
@@ -0,0 +1,157 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Windows;
+using System.Windows.Media;
+
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Classification
+{
+ /// <summary>
+ /// Provides format information for a particular item.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// This is a MEF component part, and should be exported as:
+ /// [Export(typeof(EditorFormatDefinition))]
+ /// </para>
+ /// <para>
+ /// Exporters must provide the attribute <see cref="NameAttribute"/>. The attributes <see cref="OrderAttribute"/>,
+ /// <see cref="UserVisibleAttribute"/> may be provided optionally.
+ /// </para>
+ /// <para>
+ /// Consumers of this attribute may optionally ignore the foreground formatting information, the background information,
+ /// or both.
+ /// </para>
+ /// <para>
+ /// It's recommended that exporters of this class prefix the <see cref="NameAttribute"/> with a unique string (e.g.
+ /// their package name) to reduce the chance of conflict with another similarly named export.
+ /// </para>
+ /// </remarks>
+ public abstract class EditorFormatDefinition
+ {
+ /// <summary>
+ /// Defines the string used to look up the background brush value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string BackgroundBrushId = "Background";
+ /// <summary>
+ /// Defines the string used to look up the foreground brush value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string ForegroundBrushId = "Foreground";
+
+ /// <summary>
+ /// Defines the string used to look up the background color value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string BackgroundColorId = "BackgroundColor";
+
+ /// <summary>
+ /// Defines the string used to look up the foreground color value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string ForegroundColorId = "ForegroundColor";
+
+ /// <summary>
+ /// Gets or sets the foreground color for this item.
+ /// </summary>
+ /// <remarks>
+ /// If the foreground brush is set, this color will be ignored.
+ /// </remarks>
+ public Color? ForegroundColor { get; protected set; }
+
+ /// <summary>
+ /// Gets or sets the background color for this item.
+ /// </summary>
+ /// <remarks>
+ /// If the background brush is set, this color will be ignored.
+ /// </remarks>
+ public Color? BackgroundColor { get; protected set; }
+
+ /// <summary>
+ /// Gets or sets the background brush for this item.
+ /// </summary>
+ /// <remarks>
+ /// This brush will override any background color that is set.
+ /// </remarks>
+ public Brush BackgroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Gets or sets the foreground brush for this item.
+ /// </summary>
+ /// <remarks>
+ /// This brush will override any foreground color that is set.
+ /// </remarks>
+ public Brush ForegroundBrush { get; protected set; }
+
+ /// <summary>
+ /// Determines whether the foreground of this format is customizable.
+ /// </summary>
+ public bool? ForegroundCustomizable { get; protected set; }
+
+ /// <summary>
+ /// Determines whether the background of this format is customizable.
+ /// </summary>
+ public bool? BackgroundCustomizable { get; protected set; }
+
+ /// <summary>
+ /// Defines the string used when displaying this format definition to the user. This property is only used
+ /// if the <see cref="UserVisibleAttribute"/> is set to true on this object's export.
+ /// </summary>
+ public string DisplayName { get; protected set; }
+
+ /// <summary>
+ /// Creates a <see cref="ResourceDictionary"/> from this definition.
+ /// </summary>
+ /// <returns>A <see cref="ResourceDictionary"/> with the values from this definition.</returns>
+ public ResourceDictionary CreateResourceDictionary()
+ {
+ return CreateResourceDictionaryFromDefinition();
+ }
+
+ /// <summary>
+ /// Creates a <see cref="ResourceDictionary"/> from this definition.
+ /// </summary>
+ /// <returns>A <see cref="ResourceDictionary"/> with the values from this definition.</returns>
+ protected virtual ResourceDictionary CreateResourceDictionaryFromDefinition()
+ {
+ ResourceDictionary resourceDictionary = new ResourceDictionary();
+ Brush foregroundBrush = null;
+ Brush backgroundBrush = null;
+
+ if (this.ForegroundColor.HasValue)
+ {
+ resourceDictionary[EditorFormatDefinition.ForegroundColorId] = this.ForegroundColor;
+ foregroundBrush = new SolidColorBrush(this.ForegroundColor.Value);
+ }
+ if (this.BackgroundColor.HasValue)
+ {
+ resourceDictionary[EditorFormatDefinition.BackgroundColorId] = this.BackgroundColor;
+ backgroundBrush = new SolidColorBrush(this.BackgroundColor.Value);
+ }
+ if (this.ForegroundBrush != null)
+ {
+ // Clone so we can freeze it.
+ foregroundBrush = this.ForegroundBrush.Clone();
+ }
+ if (this.BackgroundBrush != null)
+ {
+ // Clone so we can freeze it.
+ backgroundBrush = this.BackgroundBrush.Clone();
+ }
+
+ if (foregroundBrush != null)
+ {
+ foregroundBrush.Freeze();
+ resourceDictionary[EditorFormatDefinition.ForegroundBrushId] = foregroundBrush;
+ }
+
+ if (backgroundBrush != null)
+ {
+ backgroundBrush.Freeze();
+ resourceDictionary[EditorFormatDefinition.BackgroundBrushId] = backgroundBrush;
+ }
+
+ return resourceDictionary;
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/Classification/EditorFormatItemsEventArgs.cs b/src/Editor/Text/Def/TextUIWpf/Classification/EditorFormatItemsEventArgs.cs
new file mode 100644
index 0000000..1878682
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/Classification/EditorFormatItemsEventArgs.cs
@@ -0,0 +1,34 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Classification
+{
+ using System;
+ using System.Collections.ObjectModel;
+
+ /// <summary>
+ /// Provides information for the TagsChanged event.
+ /// Returns the span of changed tags as a mapping span.
+ /// </summary>
+ public class FormatItemsEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Gets the formatting items that have changed.
+ /// </summary>
+ public ReadOnlyCollection<string> ChangedItems { get; private set; }
+
+ /// <summary>
+ /// Initializes a new instance of a <see cref="FormatItemsEventArgs"/>.
+ /// </summary>
+ /// <param name="items">A collection of the items that have changed.</param>
+ /// <exception cref="ArgumentNullException"><paramref name="items"/> is null.</exception>
+ public FormatItemsEventArgs(ReadOnlyCollection<string> items)
+ {
+ if (items == null)
+ throw new ArgumentNullException(nameof(items));
+
+ ChangedItems = items;
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/Classification/IEditorFormatMap.cs b/src/Editor/Text/Def/TextUIWpf/Classification/IEditorFormatMap.cs
new file mode 100644
index 0000000..62f0246
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/Classification/IEditorFormatMap.cs
@@ -0,0 +1,85 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Classification
+{
+ using System;
+ using System.Windows;
+
+ /// <summary>
+ /// Maps from arbitrary keys to a <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public interface IEditorFormatMap
+ {
+ /// <summary>
+ /// Gets a <see cref="ResourceDictionary"/> for the specified key.
+ /// </summary>
+ /// <param name="key">
+ /// The key.
+ /// </param>
+ /// <returns>
+ /// The <see cref="ResourceDictionary"/> object that represents the set of property
+ /// contributions from the provided <see cref="EditorFormatDefinition"/>.
+ /// </returns>
+ /// <exception cref="ArgumentNullException"><paramref name="key"/> is empty or null.</exception>
+ ResourceDictionary GetProperties(string key);
+
+ /// <summary>
+ /// Adds a <see cref="ResourceDictionary"/> for a new key.
+ /// </summary>
+ /// <param name="key">The key.</param>
+ /// <param name="properties">The new properties.</param>
+ /// <remarks>
+ /// <para>
+ /// Adding properties will cause the FormatMappingChanged event to be raised.
+ /// </para>
+ /// <para>If <paramref name="key"/> already exists in the map, then this is equivalent to <see cref="SetProperties"/>.</para>
+ /// </remarks>
+ /// <exception cref="ArgumentNullException"><paramref name="key"/> is null or empty.</exception>
+ void AddProperties(string key, ResourceDictionary properties);
+
+ /// <summary>
+ /// Sets the <see cref="ResourceDictionary"/> of a key.
+ /// </summary>
+ /// <param name="key">The key.</param>
+ /// <param name="properties">The new <see cref="ResourceDictionary"/> of properties.</param>
+ /// <remarks>
+ /// <para>
+ /// Setting properties will cause the FormatMappingChanged event to be raised.
+ /// </para>
+ /// <para>
+ /// If the <see cref="ResourceDictionary"/> set does not contain the expected properties, the consumer
+ /// of the properties may throw an exception.
+ /// </para>
+ /// </remarks>
+ void SetProperties(string key, ResourceDictionary properties);
+
+ /// <summary>
+ /// Begins a batch update on this <see cref="IEditorFormatMap"/>. Events
+ /// will not be raised until <see cref="EndBatchUpdate"/> is called.
+ /// </summary>
+ /// <exception cref="InvalidOperationException"><see cref="BeginBatchUpdate"/> was called for a second time
+ /// without calling <see cref="EndBatchUpdate"/>.</exception>
+ /// <remarks>You must call <see cref="EndBatchUpdate"/> in order to re-enable FormatMappingChanged events.</remarks>
+ void BeginBatchUpdate();
+
+ /// <summary>
+ /// Ends a batch update on this <see cref="IEditorFormatMap"/> and raises an event if any changes were made during
+ /// the batch update.
+ /// </summary>
+ /// <exception cref="InvalidOperationException"><see cref="EndBatchUpdate"/> was called without calling <see cref="BeginBatchUpdate"/> first.</exception>
+ /// <remarks>You must call <see cref="EndBatchUpdate"/> in order to re-enable FormatMappingChanged events if <see cref="BeginBatchUpdate"/> was called.</remarks>
+ void EndBatchUpdate();
+
+ /// <summary>
+ /// Determines whether this <see cref="IEditorFormatMap"/> is in the middle of a batch update.
+ /// </summary>
+ bool IsInBatchUpdate { get; }
+
+ /// <summary>
+ /// Occurs when this <see cref="IEditorFormatMap"/> changes.
+ /// </summary>
+ event EventHandler<FormatItemsEventArgs> FormatMappingChanged;
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/Classification/IEditorFormatMapService.cs b/src/Editor/Text/Def/TextUIWpf/Classification/IEditorFormatMapService.cs
new file mode 100644
index 0000000..ff7ea9b
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/Classification/IEditorFormatMapService.cs
@@ -0,0 +1,33 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Text.Classification
+{
+ /// <summary>
+ /// Looks up a format map for a given view role.
+ /// </summary>
+ /// <remarks>This is a MEF component part, and should be imported as follows:
+ /// [Import]
+ /// IEditorFormatMapService formatMap = null;
+ /// </remarks>
+ public interface IEditorFormatMapService
+ {
+ /// <summary>
+ /// Gets an <see cref="IEditorFormatMap"/> appropriate for a given text view. This object is likely
+ /// to be shared among several text views.
+ /// </summary>
+ /// <param name="view">The view.</param>
+ /// <returns>An <see cref="IEditorFormatMap"/> for the text view.</returns>
+ IEditorFormatMap GetEditorFormatMap(ITextView view);
+
+ /// <summary>
+ /// Get a <see cref="IEditorFormatMap"/> for a given appearance category.
+ /// </summary>
+ /// <param name="category">The appearance category.</param>
+ /// <returns>An <see cref="IEditorFormatMap"/> for the category.</returns>
+ IEditorFormatMap GetEditorFormatMap(string category);
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/Classification/MarkerFormatDefinition.cs b/src/Editor/Text/Def/TextUIWpf/Classification/MarkerFormatDefinition.cs
new file mode 100644
index 0000000..83a00fe
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/Classification/MarkerFormatDefinition.cs
@@ -0,0 +1,101 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Classification
+{
+
+ using Microsoft.VisualStudio.Utilities;
+ using Microsoft.VisualStudio.Text.Tagging;
+
+ using System.Windows;
+ using System.Windows.Media;
+
+ /// <summary>
+ /// Provides coloring information for text markers.
+ /// </summary>
+ /// <remarks>
+ /// <para>This is a MEF component part, and should be exported as:
+ /// [Export(typeof(EditorFormatDefinition))]</para>
+ /// <para>
+ /// Exporters must provide the attribute NameAttribute.
+ /// </para>
+ /// <para>
+ /// The <see cref="MarkerFormatDefinition"/> is consumed by the default visual manager for the <see cref="TextMarkerTag"/>. The <see cref="TextMarkerTag.Type"/> property
+ /// should correspond to the <see cref="NameAttribute"/> of this export so that the desired color can be correctly loaded for the text marker.
+ /// </para>
+ /// <para>
+ /// If you wish your <see cref="MarkerFormatDefinition"/> to interact with Visual Studio, then set the <see cref="UserVisibleAttribute"/> on your export to true
+ /// and make sure you set <see cref="EditorFormatDefinition.BackgroundColor"/> and <see cref="EditorFormatDefinition.ForegroundColor"/>. The foreground brush will
+ /// be used to draw the border and the background brush will be used to draw the fill.
+ /// </para>
+ /// <example>
+ /// [Export(typeof(EditorFormatDefinition))]
+ /// [Name("MarkerFormatDefinition/RedMarker")]
+ /// [UserVisible(true)]
+ /// private VisualStudioRedMarker : MarkerFormatDefinition
+ /// {
+ /// VisualStudioRedMarker()
+ /// {
+ /// this.BackgroundColor = Colors.Red;
+ /// this.ForegroundColor = Colors.Blue;
+ /// this.DisplayName = "Red Marker"; //this value should be localized
+ /// this.ZOrder = 5;
+ /// }
+ /// }
+ /// </example>
+ /// </remarks>
+ public abstract class MarkerFormatDefinition : EditorFormatDefinition
+ {
+ /// <summary>
+ /// Defines the string used to lookup the z-order value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string ZOrderId = "MarkerFormatDefinition/ZOrderId";
+
+ /// <summary>
+ /// Defines the string used to lookup the fill brush value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string FillId = "MarkerFormatDefinition/FillId";
+
+ /// <summary>
+ /// Defines the string used to look up the border pen value in the <see cref="ResourceDictionary"/>.
+ /// </summary>
+ public const string BorderId = "MarkerFormatDefinition/BorderId";
+
+ /// <summary>
+ /// The Z-Order is used as the Z-Order of the marker when it's drawn on the text marker adornment layer. This property can be used to specify
+ /// in which order multiple markers should be drawn when they all overlap the same span of text.
+ /// </summary>
+ protected int ZOrder { get; set; }
+
+ /// <summary>
+ /// The brush is used to paint the inner body of the text marker.
+ /// </summary>
+ protected Brush Fill { get; set; }
+
+ /// <summary>
+ /// The pen is used to draw the border of the text marker.
+ /// </summary>
+ /// <remarks>
+ /// This property is optional and can be null, in which case no pen will be used for the border of the text marker adornment.
+ /// </remarks>
+ protected Pen Border { get; set; }
+
+ /// <summary>
+ /// Creates a <see cref="ResourceDictionary"/> using this definition.
+ /// </summary>
+ /// <returns>A <see cref="ResourceDictionary"/> with the values from this definition.</returns>
+ protected override ResourceDictionary CreateResourceDictionaryFromDefinition()
+ {
+ ResourceDictionary result = base.CreateResourceDictionaryFromDefinition();
+
+ if (this.Border != null)
+ result[MarkerFormatDefinition.BorderId] = this.Border;
+
+ result[MarkerFormatDefinition.FillId] = this.Fill;
+ result[MarkerFormatDefinition.ZOrderId] = this.ZOrder;
+
+ return result;
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/Classification/Priority.cs b/src/Editor/Text/Def/TextUIWpf/Classification/Priority.cs
new file mode 100644
index 0000000..6bf72c4
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/Classification/Priority.cs
@@ -0,0 +1,32 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Classification
+{
+ using Microsoft.VisualStudio.Utilities;
+
+ /// <summary>
+ /// Represents the built-in priorities for a classification format.
+ /// </summary>
+ /// <remarks>
+ /// These fields are equivalent to the corresponding fields in <see cref="DefaultOrderings"/>, which should be used instead of these fields.
+ /// </remarks>
+ public static class Priority
+ {
+ /// <summary>
+ /// The default priority.
+ /// </summary>
+ public const string Default = DefaultOrderings.Default;
+
+ /// <summary>
+ /// Low priority.
+ /// </summary>
+ public const string Low = DefaultOrderings.Low;
+
+ /// <summary>
+ /// High priority.
+ /// </summary>
+ public const string High = DefaultOrderings.High;
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/Classification/UserVisibleAttribute.cs b/src/Editor/Text/Def/TextUIWpf/Classification/UserVisibleAttribute.cs
new file mode 100644
index 0000000..d5593aa
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/Classification/UserVisibleAttribute.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Classification
+{
+ /// <summary>
+ /// Determining if an export should be visible to the user.
+ /// </summary>
+ public sealed class UserVisibleAttribute : SingletonBaseMetadataAttribute
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="UserVisibleAttribute"/>.
+ /// </summary>
+ /// <param name="userVisible"><c>true</c> if the extension is visible to the user, otherwise <c>false</c>.</param>
+ public UserVisibleAttribute(bool userVisible)
+ {
+ this.UserVisible = userVisible;
+ }
+
+ /// <summary>
+ /// Determines whether the extension is visible to the user.
+ /// </summary>
+ public bool UserVisible { get; private set; }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/EditorOptions/WpfViewOptionDefinition.cs b/src/Editor/Text/Def/TextUIWpf/EditorOptions/WpfViewOptionDefinition.cs
new file mode 100644
index 0000000..5a93abc
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/EditorOptions/WpfViewOptionDefinition.cs
@@ -0,0 +1,26 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ /// <summary>
+ /// Defines an editor option specific to an <see cref="IWpfTextView"/>.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part, and should be exported with:
+ /// [Export(typeof(EditorOptionDefinition))]
+ /// </remarks>
+ public abstract class WpfViewOptionDefinition<T> : EditorOptionDefinition<T>
+ {
+ /// <summary>
+ /// Determines whether this definition is applicable only to text views.
+ /// </summary>
+ public override bool IsApplicableToScope(IPropertyOwner scope)
+ {
+ return scope is ITextView;
+ }
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/EditorOptions/WpfViewOptions.cs b/src/Editor/Text/Def/TextUIWpf/EditorOptions/WpfViewOptions.cs
new file mode 100644
index 0000000..d5ca1c2
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/EditorOptions/WpfViewOptions.cs
@@ -0,0 +1,120 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using System.ComponentModel.Composition;
+using System.Windows.Input;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Editor.OptionsExtensionMethods
+{
+ /// <summary>
+ /// Provides extension methods for options related to an <see cref="IWpfTextView"/>.
+ /// </summary>
+ public static class WpfViewOptionExtensions
+ {
+ #region Extension methods
+
+ /// <summary>
+ /// Determines whether the option to highlight the current line is enabled.
+ /// </summary>
+ /// <param name="options">The <see cref="IEditorOptions"/>.</param>
+ /// <returns><c>true</c> if the highlight option was enabled, otherwise <c>false</c>.</returns>
+ public static bool IsHighlightCurrentLineEnabled(this IEditorOptions options)
+ {
+ if (options == null)
+ throw new ArgumentNullException(nameof(options));
+
+ return options.GetOptionValue<bool>(DefaultTextViewOptions.EnableHighlightCurrentLineId);
+ }
+
+ /// <summary>
+ /// Determines whether the option to draw a gradient selection is enabled.
+ /// </summary>
+ /// <param name="options">The <see cref="IEditorOptions"/>.</param>
+ /// <returns><c>true</c> if the draw selection gradient option was enabled, otherwise <c>false</c>.</returns>
+ public static bool IsSimpleGraphicsEnabled(this IEditorOptions options)
+ {
+ if (options == null)
+ throw new ArgumentNullException(nameof(options));
+
+ return options.GetOptionValue<bool>(DefaultTextViewOptions.EnableSimpleGraphicsId);
+ }
+
+ /// <summary>
+ /// Determines whether to allow mouse wheel zooming
+ /// </summary>
+ /// <param name="options">The set of editor options.</param>
+ /// <returns><c>true</c> if the mouse wheel zooming is enabled, otherwise <c>false</c>.</returns>
+ /// <remarks>Disabling the mouse wheel zooming does NOT turn off Zooming (it disables zooming using mouse wheel)</remarks>
+ public static bool IsMouseWheelZoomEnabled(this IEditorOptions options)
+ {
+ if (options == null)
+ throw new ArgumentNullException(nameof(options));
+
+ return options.GetOptionValue<bool>(DefaultTextViewOptions.EnableMouseWheelZoomId);
+ }
+
+ /// <summary>
+ /// Specifies the appearance category.
+ /// </summary>
+ /// <param name="options">The <see cref="IEditorOptions"/>.</param>
+ /// <returns>The appearance category, which determines where to look up font properties and colors.</returns>
+ public static string AppearanceCategory(this IEditorOptions options)
+ {
+ if (options == null)
+ throw new ArgumentNullException(nameof(options));
+
+ return options.GetOptionValue<string>(DefaultTextViewOptions.AppearanceCategory);
+ }
+
+ /// <summary>
+ /// Specifies the persisted zoomlevel.
+ /// </summary>
+ /// <param name="options">The <see cref="IEditorOptions"/>.</param>
+ /// <returns>The zoomlevel, which scales the view up or down.</returns>
+ public static double ZoomLevel(this IEditorOptions options)
+ {
+ if (options == null)
+ throw new ArgumentNullException(nameof(options));
+
+ return options.GetOptionValue<double>(DefaultTextViewOptions.ZoomLevelId);
+ }
+ #endregion
+ }
+}
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ /// <summary>
+ /// Represents common <see cref="IWpfTextView"/> options.
+ /// </summary>
+ public static class DefaultWpfViewOptions
+ {
+
+ /// <summary>
+ /// Determines what modifier key to use for go to definition by mouse click + modifier keypress.
+ /// </summary>
+ public const string ClickGoToDefModifierKeyName = "TextView/ClickGoToDefModifierKey";
+ public static readonly EditorOptionKey<ModifierKeys> ClickGoToDefModifierKeyId = new EditorOptionKey<ModifierKeys>(ClickGoToDefModifierKeyName);
+ }
+
+ /// <summary>
+ /// Determines what modifier key to use for go to definition by mouse click + modifier keypress.
+ /// </summary>
+ [Export(typeof(EditorOptionDefinition))]
+ [Name(DefaultWpfViewOptions.ClickGoToDefModifierKeyName)]
+ public sealed class ClickGotoDefModifierKeyOption : WpfViewOptionDefinition<ModifierKeys>
+ {
+ /// <summary>
+ /// Gets the default value.
+ /// </summary>
+ public override ModifierKeys Default => ModifierKeys.Control;
+
+ /// <summary>
+ /// Gets the key for the option.
+ /// </summary>
+ public override EditorOptionKey<ModifierKeys> Key => DefaultWpfViewOptions.ClickGoToDefModifierKeyId;
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/RTF/IRtfBuilderService.cs b/src/Editor/Text/Def/TextUIWpf/RTF/IRtfBuilderService.cs
new file mode 100644
index 0000000..54c0275
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/RTF/IRtfBuilderService.cs
@@ -0,0 +1,95 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Formatting
+{
+
+ using Microsoft.VisualStudio.Text;
+ using Microsoft.VisualStudio.Text.Editor;
+
+ /// <summary>
+ /// Generates RTF-formatted text from a collection of snapshot spans.
+ /// </summary>
+ /// <remarks>
+ /// This is a MEF component part and should be imported using the following attribute:
+ /// [Import(typeof(IRtfBuilderService))]
+ /// </remarks>
+ public interface IRtfBuilderService
+ {
+
+ /// <summary>
+ /// Gets an RTF string containing the formatted text of the snapshot spans.
+ /// </summary>
+ /// <remarks>
+ /// The generated RTF text is based on an in-order walk of the snapshot spans.
+ /// </remarks>
+ /// <param name="spans">
+ /// The collection of snapshot spans.
+ /// </param>
+ /// <param name="delimiter">
+ /// A delimiter string to be inserted between the RTF generated code for the <see cref="SnapshotSpan"/>s in the <see cref="NormalizedSnapshotSpanCollection"/>.
+ /// </param>
+ /// <returns>
+ /// A <see cref="string"/> containing RTF data.
+ /// </returns>
+ string GenerateRtf(NormalizedSnapshotSpanCollection spans, string delimiter);
+
+ /// <summary>
+ /// Gets an RTF string containing the formatted text of the snapshot spans.
+ /// </summary>
+ /// <remarks>
+ /// The generated RTF text is based on an in-order walk of the snapshot spans. A new line "\par" rtf keyword will be placed between the provided
+ /// <see cref="SnapshotSpan"/>s.
+ /// </remarks>
+ /// <param name="spans">
+ /// The collection of snapshot spans.
+ /// </param>
+ /// <returns>
+ /// A <see cref="string"/> containing RTF data.
+ /// </returns>
+ string GenerateRtf(NormalizedSnapshotSpanCollection spans);
+
+ /// <summary>
+ /// Gets an RTF string that contains the formatted text of the spans.
+ /// </summary>
+ /// <remarks>
+ /// The generated RTF text is based on an in-order walk of the snapshot spans,
+ /// with the characteristics and formatting properties of <paramref name="textView"/>.
+ /// All the snapshot spans must belong to <paramref name="textView"/>.
+ /// </remarks>
+ /// <param name="spans">
+ /// The collection of snapshot spans.
+ /// </param>
+ /// <param name="textView">
+ /// The <see cref="ITextView"/> that contains the snapshot spans.
+ /// </param>
+ /// <param name="delimiter">
+ /// A delimiter string to be inserted between the RTF generated code for the <see cref="SnapshotSpan"/>s in the <see cref="NormalizedSnapshotSpanCollection"/>.
+ /// </param>
+ /// <returns>
+ /// A <see cref="string"/> containing RTF data.
+ /// </returns>
+ string GenerateRtf(NormalizedSnapshotSpanCollection spans, ITextView textView, string delimiter);
+
+ /// <summary>
+ /// Gets an RTF string that contains the formatted text of the spans.
+ /// </summary>
+ /// <remarks>
+ /// The generated RTF text is based on an in-order walk of the snapshot spans,
+ /// with the characteristics and formatting properties of <paramref name="textView"/>.
+ /// All the snapshot spans must belong to <paramref name="textView"/>. A new line "\par" rtf keyword will be
+ /// placed between the provided <see cref="SnapshotSpan"/>s.
+ /// </remarks>
+ /// <param name="spans">
+ /// The collection of snapshot spans.
+ /// </param>
+ /// <param name="textView">
+ /// The <see cref="ITextView"/> that contains the snapshot spans.
+ /// </param>
+ /// <returns>
+ /// A <see cref="string"/> containing RTF data.
+ /// </returns>
+ string GenerateRtf(NormalizedSnapshotSpanCollection spans, ITextView textView);
+ }
+}
diff --git a/src/Editor/Text/Def/TextUIWpf/TextUIWpf.csproj b/src/Editor/Text/Def/TextUIWpf/TextUIWpf.csproj
new file mode 100644
index 0000000..a79c89e
--- /dev/null
+++ b/src/Editor/Text/Def/TextUIWpf/TextUIWpf.csproj
@@ -0,0 +1,36 @@
+<Project>
+ <PropertyGroup>
+ <!-- workaround for https://github.com/NuGet/Home/issues/5894 -->
+ <OriginalProjectName>TextUIWpf</OriginalProjectName>
+ </PropertyGroup>
+ <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.UI.Wpf</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <PushToPublicFeed>true</PushToPublicFeed>
+ <NoWarn>649;436;8073;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Page Remove="themes\generic.xaml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="UIAutomationProvider" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\TextData\TextData.csproj" />
+ <ProjectReference Include="..\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\TextUI\TextUI.csproj" />
+ </ItemGroup>
+ <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
+</Project>
diff --git a/src/Editor/Text/Impl/BraceCompletion/AssemblyInfo.cs b/src/Editor/Text/Impl/BraceCompletion/AssemblyInfo.cs
new file mode 100644
index 0000000..a5d6d8c
--- /dev/null
+++ b/src/Editor/Text/Impl/BraceCompletion/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("ComponentModel, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentService.cs b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentService.cs
new file mode 100644
index 0000000..430e947
--- /dev/null
+++ b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentService.cs
@@ -0,0 +1,213 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+namespace Microsoft.VisualStudio.Text.BraceCompletion.Implementation
+{
+ using Microsoft.VisualStudio.Text.Classification;
+ using Microsoft.VisualStudio.Text.Editor;
+ using Microsoft.VisualStudio.Text.Formatting;
+ using Microsoft.VisualStudio.Text.Utilities;
+ using System;
+ using System.Diagnostics;
+ using System.Windows;
+ using System.Windows.Media;
+
+ /// <summary>
+ /// A service for displaying an adornment under the inner most closing brace.
+ /// </summary>
+ internal class BraceCompletionAdornmentService : IBraceCompletionAdornmentService
+ {
+ #region Private Members
+
+ private ITrackingPoint _trackingPoint;
+ private ITextView3 _textView;
+ private IXPlatAdornmentLayer _adornmentLayer;
+ private readonly IEditorFormatMap _editorFormatMap;
+ private Brush _brush;
+
+ #endregion
+
+ #region Constructors
+
+ public BraceCompletionAdornmentService(ITextView3 textView, IEditorFormatMap editorFormatMap)
+ {
+ _textView = textView;
+ _editorFormatMap = editorFormatMap;
+
+ if (_textView == null)
+ throw new ArgumentNullException(nameof(textView));
+ if (_editorFormatMap == null)
+ throw new ArgumentNullException(nameof(editorFormatMap));
+
+ _adornmentLayer = _textView.GetXPlatAdornmentLayer(PredefinedAdornmentLayers.BraceCompletion);
+
+ SetBrush();
+ RegisterEvents();
+ }
+
+ #endregion
+
+ #region IBraceCompletionAdornmentService
+
+ public ITrackingPoint Point
+ {
+ get
+ {
+ return _trackingPoint;
+ }
+
+ set
+ {
+ if (_trackingPoint != value)
+ {
+ // always remove the old adornment first
+ if (_trackingPoint != null)
+ {
+ _adornmentLayer.RemoveAllAdornments();
+ }
+
+ _trackingPoint = value;
+
+ if (_trackingPoint != null)
+ {
+ RenderAdornment();
+ }
+ }
+ }
+ }
+
+ #endregion
+
+ #region Private Helpers
+
+ private void RegisterEvents()
+ {
+ _textView.Closed += TextView_Closed;
+ _textView.LayoutChanged += TextView_LayoutChanged;
+ _editorFormatMap.FormatMappingChanged += EditorFormatMap_FormatMappingChanged;
+ }
+
+ private void EditorFormatMap_FormatMappingChanged(object sender, FormatItemsEventArgs e)
+ {
+ if (e.ChangedItems.Contains(BraceCompletionFormat.FormatName))
+ {
+ SetBrush();
+ }
+ }
+
+ private void TextView_Closed(object sender, EventArgs e)
+ {
+ UnregisterEvents();
+ }
+
+ private void UnregisterEvents()
+ {
+ _textView.Closed -= TextView_Closed;
+ _textView.LayoutChanged -= TextView_LayoutChanged;
+ _editorFormatMap.FormatMappingChanged -= EditorFormatMap_FormatMappingChanged;
+ }
+
+ private void TextView_LayoutChanged(object sender, TextViewLayoutChangedEventArgs e)
+ {
+ if (_trackingPoint != null && _brush != null && _adornmentLayer.IsEmpty)
+ {
+ RenderAdornment();
+ }
+ }
+
+ // Draw the adornment
+ private void RenderAdornment()
+ {
+ Debug.Assert(_adornmentLayer.IsEmpty, "An adornment already exists");
+
+ if (_trackingPoint != null && _brush != null && !_textView.IsClosed && _textView.TextViewLines != null)
+ {
+ // map up from the subject buffer
+ SnapshotSpan? span = TranslatedSpan;
+
+ // check that the span is visible
+ if (span.HasValue && _textView.TextViewLines.FormattedSpan.Contains(span.Value.Start))
+ {
+#if !WINDOWS
+ TextBounds textBounds = _textView.TextViewLines.GetCharacterBounds(span.Value.Start);
+ var nsview = new AppKit.NSView();
+ nsview.WantsLayer = true;
+ var color = ((SolidColorBrush)_brush).Color;
+ nsview.Layer.BackgroundColor = new CoreGraphics.CGColor(color.R / 255f, color.G / 255f, color.B / 255f);
+ nsview.Frame = new CoreGraphics.CGRect(textBounds.Left, textBounds.TextBottom, textBounds.Width, 2);
+ _adornmentLayer.AddAdornment(XPlatAdornmentPositioningBehavior.TextRelative, span, null, nsview, null);
+#endif
+ }
+ }
+ }
+
+ // Gives the span the adornment will occupy on the view buffer.
+ private SnapshotSpan? TranslatedSpan
+ {
+ get
+ {
+ SnapshotSpan? snapshotSpan = null;
+ ITextSnapshot snapshot = _textView.TextSnapshot;
+ SnapshotPoint? point = _trackingPoint.GetPoint(_trackingPoint.TextBuffer.CurrentSnapshot);
+
+ // point.HasValue will be true since GetPoint always returns a point
+ if (point.Value.Snapshot != snapshot)
+ {
+ point = MappingPointSnapshot.MapUpToSnapshotNoTrack(snapshot, point.Value, PositionAffinity.Predecessor);
+ }
+
+ if (point.HasValue && point.Value.Position > 0)
+ {
+ // The point is after the closing brace, we need to subtract 1 to get the span containing the brace.
+ snapshotSpan = new SnapshotSpan(point.Value.Subtract(1), 1);
+ }
+
+ return snapshotSpan;
+ }
+ }
+
+ // Set the fill color of the adornment
+ private void SetBrush()
+ {
+ var resourceDictionary = _editorFormatMap.GetProperties(BraceCompletionFormat.FormatName);
+
+ _brush = null;
+ if (resourceDictionary != null && resourceDictionary.Contains(EditorFormatDefinition.BackgroundBrushId))
+ {
+ Brush brush = resourceDictionary[EditorFormatDefinition.BackgroundBrushId] as Brush;
+
+ // leave the brush null if the opacity is zero
+ if (brush != null && brush.Opacity > 0)
+ {
+ Debug.Assert(brush.IsFrozen);
+ _brush = brush;
+
+ // update the adornment with the brush
+ SetBrushAndRedrawAdornment();
+ }
+ }
+ else
+ {
+ // default to light blue if no format was found
+ Debug.Fail("Unable to get the brace completion adornment brush");
+ _brush = Brushes.LightBlue;
+ }
+ }
+
+ // Redraw the adornment if one exists
+ private void SetBrushAndRedrawAdornment()
+ {
+ if (_trackingPoint != null)
+ {
+ _adornmentLayer.RemoveAllAdornments();
+ RenderAdornment();
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentServiceFactory.cs b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentServiceFactory.cs
new file mode 100644
index 0000000..6938df8
--- /dev/null
+++ b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionAdornmentServiceFactory.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+namespace Microsoft.VisualStudio.Text.BraceCompletion.Implementation
+{
+ using Microsoft.VisualStudio.Text.Classification;
+ using Microsoft.VisualStudio.Text.Editor;
+ using Microsoft.VisualStudio.Utilities;
+ using System.ComponentModel.Composition;
+
+ [Export(typeof(IBraceCompletionAdornmentServiceFactory))]
+ internal class BraceCompletionAdornmentServiceFactory : IBraceCompletionAdornmentServiceFactory
+ {
+ [Export]
+ [Name(PredefinedAdornmentLayers.BraceCompletion)]
+ [Order(After = PredefinedAdornmentLayers.DifferenceSpace)]
+ public AdornmentLayerDefinition braceCompletionAdornmentLayerDefinition;
+
+ [Import]
+ private IEditorFormatMapService _editorFormatMapService;
+
+ #region IBraceCompletionAdornmentServiceFactory
+
+ public IBraceCompletionAdornmentService GetOrCreateService(ITextView textView)
+ {
+ // Get the service from the view's property bag
+ return textView.Properties.GetOrCreateSingletonProperty<IBraceCompletionAdornmentService>(
+ () => new BraceCompletionAdornmentService((ITextView3)textView, _editorFormatMapService.GetEditorFormatMap(textView)));
+ }
+
+ #endregion
+ }
+}
diff --git a/src/Editor/Text/Impl/BraceCompletion/BraceCompletionCommandHandler.cs b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionCommandHandler.cs
new file mode 100644
index 0000000..b30256a
--- /dev/null
+++ b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionCommandHandler.cs
@@ -0,0 +1,194 @@
+// Copyright (c) Microsoft Corporation
+// All rights reserved
+
+namespace Microsoft.VisualStudio.Editor.Implementation
+{
+ using Microsoft.VisualStudio.Commanding;
+ using Microsoft.VisualStudio.Language.Intellisense;
+ using Microsoft.VisualStudio.Text.BraceCompletion;
+ using Microsoft.VisualStudio.Text.Editor;
+ using Microsoft.VisualStudio.Text.Editor.Commanding.Commands;
+ using Microsoft.VisualStudio.Utilities;
+ using System;
+ using System.ComponentModel.Composition;
+
+ /// <summary>
+ /// Passes commands to the IBraceCompletionManager found in the
+ /// property bag of the view.
+ /// </summary>
+ [Export]
+ [Export(typeof(ICommandHandler))]
+ [ContentType("any")]
+ [Name("BraceCompletionCommandHandler")]
+ internal class BraceCompletionCommandHandler :
+ IChainedCommandHandler<TypeCharCommandArgs>,
+ IChainedCommandHandler<ReturnKeyCommandArgs>,
+ IChainedCommandHandler<TabKeyCommandArgs>,
+ IChainedCommandHandler<BackspaceKeyCommandArgs>,
+ IChainedCommandHandler<DeleteKeyCommandArgs>
+ {
+ #region IChainedCommandHandler<TypeCharCommandArgs> Members
+
+ public void ExecuteCommand(TypeCharCommandArgs args, Action nextHandler, CommandExecutionContext context)
+ {
+ if (Enabled(args.TextView))
+ {
+ char typedChar = args.TypedChar;
+
+ // handle closing braces if there is an active session
+ if ((Manager(args.TextView).HasActiveSessions && Manager(args.TextView).ClosingBraces.IndexOf(typedChar) > -1)
+ || Manager(args.TextView).OpeningBraces.IndexOf(typedChar) > -1)
+ {
+ bool handledCommand = false;
+ Manager(args.TextView).PreTypeChar(typedChar, out handledCommand);
+
+ if (handledCommand)
+ {
+ return;
+ }
+
+ nextHandler();
+
+ Manager(args.TextView).PostTypeChar(typedChar);
+
+ return;
+ }
+ }
+ nextHandler();
+ }
+
+ public CommandState GetCommandState(TypeCharCommandArgs args, Func<CommandState> nextCommandHandler)
+ {
+ return nextCommandHandler();
+ }
+
+ public CommandState GetCommandState(ReturnKeyCommandArgs args, Func<CommandState> nextCommandHandler)
+ {
+ return nextCommandHandler();
+ }
+
+ public void ExecuteCommand(ReturnKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
+ {
+ if (Enabled(args.TextView) && Manager(args.TextView).HasActiveSessions)
+ {
+ bool handledCommand = false;
+
+ Manager(args.TextView).PreReturn(out handledCommand);
+
+ if (handledCommand)
+ {
+ return;
+ }
+
+ nextCommandHandler();
+
+ Manager(args.TextView).PostReturn();
+
+ return;
+ }
+ nextCommandHandler();
+ }
+
+ public CommandState GetCommandState(TabKeyCommandArgs args, Func<CommandState> nextCommandHandler)
+ {
+ return nextCommandHandler();
+ }
+
+ public void ExecuteCommand(TabKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
+ {
+ if (Enabled(args.TextView) && Manager(args.TextView).HasActiveSessions)
+ {
+ bool handledCommand = false;
+
+ Manager(args.TextView).PreTab(out handledCommand);
+
+ if (handledCommand)
+ {
+ return;
+ }
+
+ nextCommandHandler();
+
+ Manager(args.TextView).PostTab();
+
+ return;
+ }
+ nextCommandHandler();
+ }
+
+ public CommandState GetCommandState(BackspaceKeyCommandArgs args, Func<CommandState> nextCommandHandler)
+ {
+ return nextCommandHandler();
+ }
+
+ public void ExecuteCommand(BackspaceKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
+ {
+ if (Enabled(args.TextView) && Manager(args.TextView).HasActiveSessions)
+ {
+ bool handledCommand = false;
+
+ Manager(args.TextView).PreBackspace(out handledCommand);
+
+ if (handledCommand)
+ {
+ return;
+ }
+
+ nextCommandHandler();
+
+ Manager(args.TextView).PostBackspace();
+
+ return;
+ }
+ nextCommandHandler();
+ }
+
+ public CommandState GetCommandState(DeleteKeyCommandArgs args, Func<CommandState> nextCommandHandler)
+ {
+ return nextCommandHandler();
+ }
+
+ public void ExecuteCommand(DeleteKeyCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
+ {
+ if (Enabled(args.TextView) && Manager(args.TextView).HasActiveSessions)
+ {
+ bool handledCommand = false;
+
+ Manager(args.TextView).PreDelete(out handledCommand);
+
+ if (handledCommand)
+ {
+ return;
+ }
+
+ nextCommandHandler();
+
+ Manager(args.TextView).PostDelete();
+
+ return;
+ }
+ nextCommandHandler();
+ }
+
+ public string DisplayName => "BraceCompletionCommandHandler";
+
+ #endregion
+
+ #region Private Helpers
+
+ private bool Enabled(ITextView view)
+ {
+ return Manager(view)?.Enabled ?? false;
+ }
+
+ private IBraceCompletionManager Manager(ITextView view)
+ {
+ if (view.Properties.TryGetProperty("BraceCompletionManager", out IBraceCompletionManager _manager))
+ return _manager;
+
+ return null;
+ }
+
+ #endregion
+ }
+}
diff --git a/src/Editor/Text/Impl/BraceCompletion/BraceCompletionFormat.cs b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionFormat.cs
new file mode 100644
index 0000000..531ebab
--- /dev/null
+++ b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionFormat.cs
@@ -0,0 +1,32 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+namespace Microsoft.VisualStudio.Text.BraceCompletion.Implementation
+{
+ using Microsoft.VisualStudio.Text.Classification;
+ using Microsoft.VisualStudio.Utilities;
+ using System.ComponentModel.Composition;
+ using System.Windows.Media;
+
+ [Export(typeof(EditorFormatDefinition))]
+ [Name(BraceCompletionFormat.FormatName)]
+ [UserVisible(true)]
+ [Order(Before = Priority.Default)]
+ internal sealed class BraceCompletionFormat : EditorFormatDefinition
+ {
+ public const string FormatName = "BraceCompletionClosingBrace";
+
+ public BraceCompletionFormat()
+ {
+ this.DisplayName = Strings.ClosingBraceColorDefinitionName;
+
+ this.BackgroundBrush = Brushes.LightBlue;
+ this.ForegroundCustomizable = false;
+ this.BackgroundCustomizable = true;
+ }
+ }
+}
diff --git a/src/Editor/Text/Impl/BraceCompletion/BraceCompletionImpl.csproj b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionImpl.csproj
new file mode 100644
index 0000000..bb50037
--- /dev/null
+++ b/src/Editor/Text/Impl/BraceCompletion/BraceCompletionImpl.csproj
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+
+ <Import Condition="$(OS) == 'Windows_NT'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
+ <Import Condition="$(OS) != 'Windows_NT'" Project="Sdk.props" Sdk="Xamarin.Mac.Sdk" />
+
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.BraceCompletion.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <DefineConstants Condition="$(OS) == 'Windows_NT'">$(DefineConstants);WINDOWS</DefineConstants>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="PresentationFramework" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\Def\TextUIWpf\TextUIWpf.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="Strings.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="Strings.Designer.cs">
+ <DesignTime>true</DesignTime>
+ <AutoGen>true</AutoGen>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+
+ <Import Condition="$(OS) == 'Windows_NT'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
+ <Import Condition="$(OS) != 'Windows_NT'" Project="Sdk.targets" Sdk="Xamarin.Mac.Sdk" />
+
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/BraceCompletion/Strings.Designer.cs b/src/Editor/Text/Impl/BraceCompletion/Strings.Designer.cs
index 31f104b..f22f533 100644
--- a/src/Editor/Text/Impl/BraceCompletion/Strings.Designer.cs
+++ b/src/Editor/Text/Impl/BraceCompletion/Strings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.Text.BraceCompletion.Implementation {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Text.Impl.BraceCompletion.Strings", typeof(Strings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.BraceCompletion.Implementation.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Text/Impl/ClassificationAggregator/AssemblyInfo.cs b/src/Editor/Text/Impl/ClassificationAggregator/AssemblyInfo.cs
new file mode 100644
index 0000000..093c316
--- /dev/null
+++ b/src/Editor/Text/Impl/ClassificationAggregator/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Classification.Aggregator.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("ComponentModel, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Impl/ClassificationAggregator/ClassificationAggregatorImpl.csproj b/src/Editor/Text/Impl/ClassificationAggregator/ClassificationAggregatorImpl.csproj
new file mode 100644
index 0000000..fa07b2e
--- /dev/null
+++ b/src/Editor/Text/Impl/ClassificationAggregator/ClassificationAggregatorImpl.csproj
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Logic.Text.Classification.Aggregator.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/ClassificationType/AssemblyInfo.cs b/src/Editor/Text/Impl/ClassificationType/AssemblyInfo.cs
new file mode 100644
index 0000000..323e47c
--- /dev/null
+++ b/src/Editor/Text/Impl/ClassificationType/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Classification.LookUp.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Impl/ClassificationType/ClassificationTypeImpl.csproj b/src/Editor/Text/Impl/ClassificationType/ClassificationTypeImpl.csproj
new file mode 100644
index 0000000..1a5411b
--- /dev/null
+++ b/src/Editor/Text/Impl/ClassificationType/ClassificationTypeImpl.csproj
@@ -0,0 +1,35 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Logic.Text.Classification.LookUp.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.ComponentModel.Composition" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="Strings.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="Strings.Designer.cs">
+ <DesignTime>true</DesignTime>
+ <AutoGen>true</AutoGen>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Text/Impl/ClassificationType/Strings.Designer.cs b/src/Editor/Text/Impl/ClassificationType/Strings.Designer.cs
index 3828f43..7ecc53b 100644
--- a/src/Editor/Text/Impl/ClassificationType/Strings.Designer.cs
+++ b/src/Editor/Text/Impl/ClassificationType/Strings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.Text.Classification.Implementation.LookUp {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Text.Impl.ClassificationType.Strings", typeof(Strings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Logic.Text.Classification.LookUp.Implementation.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Text/Impl/Commanding/AssemblyInfo.cs b/src/Editor/Text/Impl/Commanding/AssemblyInfo.cs
new file mode 100644
index 0000000..9c67e2a
--- /dev/null
+++ b/src/Editor/Text/Impl/Commanding/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Commanding.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+#pragma warning disable 618
+[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
diff --git a/src/Editor/Text/Impl/Commanding/CommandingImpl.csproj b/src/Editor/Text/Impl/Commanding/CommandingImpl.csproj
new file mode 100644
index 0000000..5512ff9
--- /dev/null
+++ b/src/Editor/Text/Impl/Commanding/CommandingImpl.csproj
@@ -0,0 +1,43 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.UI.Text.Commanding.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ <ProjectReference Include="..\..\Util\TextUIUtil\TextUIUtil.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="CommandingStrings.Designer.cs">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>CommandingStrings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="CommandingStrings.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>CommandingStrings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Text/Impl/Commanding/CommandingStrings.Designer.cs b/src/Editor/Text/Impl/Commanding/CommandingStrings.Designer.cs
index 8d2e4db..758d7c0 100644
--- a/src/Editor/Text/Impl/Commanding/CommandingStrings.Designer.cs
+++ b/src/Editor/Text/Impl/Commanding/CommandingStrings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.UI.Text.Commanding.Implementation {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Text.Impl.Commanding.CommandingStrings", typeof(CommandingStrings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.UI.Text.Commanding.Implementation.CommandingStrings", typeof(CommandingStrings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Text/Impl/Commanding/EditorCommandHandlerService.cs b/src/Editor/Text/Impl/Commanding/EditorCommandHandlerService.cs
index e057ea9..caf42d1 100644
--- a/src/Editor/Text/Impl/Commanding/EditorCommandHandlerService.cs
+++ b/src/Editor/Text/Impl/Commanding/EditorCommandHandlerService.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
@@ -25,6 +25,8 @@ namespace Microsoft.VisualStudio.UI.Text.Commanding.Implementation
private readonly EditorCommandHandlerServiceFactory _factory;
private readonly ITextView _textView;
private readonly ICommandingTextBufferResolver _bufferResolver;
+ private readonly bool _isOldGtkEditor;
+ private readonly ITypingTelemetrySession _telemetrySession;
private readonly static IReadOnlyList<ICommandHandlerAndMetadata> EmptyHandlerList = new List<ICommandHandlerAndMetadata>(0);
private readonly static Action EmptyAction = delegate { };
@@ -43,8 +45,10 @@ namespace Microsoft.VisualStudio.UI.Text.Commanding.Implementation
_commandHandlers = commandHandlers ?? throw new ArgumentNullException(nameof(commandHandlers));
_factory = factory ?? throw new ArgumentNullException(nameof(factory));
_textView = textView ?? throw new ArgumentNullException(nameof(textView));
+ _isOldGtkEditor = _textView.GetType ().FullName == "MonoDevelop.SourceEditor.ExtensibleTextEditor";
_commandHandlersByTypeAndContentType = new Dictionary<(Type commandArgType, IContentType contentType), IReadOnlyList<ICommandHandlerAndMetadata>>();
_bufferResolver = bufferResolver ?? throw new ArgumentNullException(nameof(bufferResolver));
+ _textView.Properties.TryGetProperty(typeof(ITypingTelemetrySession), out _telemetrySession);
}
public CommandState GetCommandState<T>(Func<ITextView, ITextBuffer, T> argsFactory, Func<CommandState> nextCommandHandler) where T : EditorCommandArgs
@@ -154,7 +158,9 @@ namespace Microsoft.VisualStudio.UI.Text.Commanding.Implementation
return;
}
+ _telemetrySession?.BeforeKeyProcessed();
ExecuteCommandHandlerChain(state, handlerChain, nextCommandHandler);
+ _telemetrySession?.AfterKeyProcessed();
}
}
@@ -361,6 +367,12 @@ namespace Microsoft.VisualStudio.UI.Text.Commanding.Implementation
var commandHandler = _factory.GuardedOperations.InstantiateExtension<ICommandHandler>(this, lazyCommandHandler);
if (commandHandler is ICommandHandler<T> || commandHandler is IChainedCommandHandler<T>)
{
+ // The old editor in VSmac is not compatible with any command handlers except for those coming from Roslyn
+ if (_isOldGtkEditor && !commandHandler.GetType().FullName.StartsWith("Microsoft.CodeAnalysis", StringComparison.Ordinal))
+ {
+ continue;
+ }
+
if (newCommandHandlerList == null)
{
newCommandHandlerList = new FrugalList<ICommandHandlerAndMetadata>();
@@ -478,7 +490,7 @@ namespace Microsoft.VisualStudio.UI.Text.Commanding.Implementation
public int CancelAfter
=> _state.IsExecutingTypingCommand ?
- _textView.Options.GetOptionValue<int>("MaximumTypingLatency") :
+ _textView.Options.GetOptionValue(DefaultOptions.MaximumTypingLatencyOptionId) :
Timeout.Infinite;
public bool ShouldCancel()
diff --git a/src/Editor/Text/Impl/DifferenceAlgorithm/AssemblyInfo.cs b/src/Editor/Text/Impl/DifferenceAlgorithm/AssemblyInfo.cs
new file mode 100644
index 0000000..25537f2
--- /dev/null
+++ b/src/Editor/Text/Impl/DifferenceAlgorithm/AssemblyInfo.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.UnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Differencing.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Model.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Editor.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Impl/DifferenceAlgorithm/DifferenceAlgorithmImpl.csproj b/src/Editor/Text/Impl/DifferenceAlgorithm/DifferenceAlgorithmImpl.csproj
new file mode 100644
index 0000000..bb16359
--- /dev/null
+++ b/src/Editor/Text/Impl/DifferenceAlgorithm/DifferenceAlgorithmImpl.csproj
@@ -0,0 +1,19 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.Differencing.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;8073;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.ComponentModel.Composition" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Text/Impl/EditorOperations/AssemblyInfo.cs b/src/Editor/Text/Impl/EditorOperations/AssemblyInfo.cs
new file mode 100644
index 0000000..8caf90d
--- /dev/null
+++ b/src/Editor/Text/Impl/EditorOperations/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.EditorOperations.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
diff --git a/src/Editor/Text/Impl/EditorOperations/EditorOperations.cs b/src/Editor/Text/Impl/EditorOperations/EditorOperations.cs
index 4cd00e0..ec55c3b 100644
--- a/src/Editor/Text/Impl/EditorOperations/EditorOperations.cs
+++ b/src/Editor/Text/Impl/EditorOperations/EditorOperations.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
@@ -25,15 +25,13 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
using Microsoft.VisualStudio.Utilities;
using Microsoft.VisualStudio.Text.Outlining;
using Microsoft.VisualStudio.Text.Tagging;
- using Microsoft.VisualStudio.Text.Utilities;
-#if WINDOWS
using Microsoft.VisualStudio.Language.Intellisense.Utilities;
-#endif
+ using Microsoft.VisualStudio.Text.Utilities;
/// <summary>
/// Provides a default operations set on top of the text editor
/// </summary>
- internal class EditorOperations : IEditorOperations3
+ internal class EditorOperations : IEditorOperations4
{
enum CaretMovementDirection
{
@@ -58,14 +56,14 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
#region Private Members
- ITextView _textView;
- EditorOperationsFactoryService _factory;
- ITextDocument _textDocument;
- ITextStructureNavigator _textStructureNavigator;
- ITextUndoHistory _undoHistory;
- IViewPrimitives _editorPrimitives;
- IEditorOptions _editorOptions;
- IMultiSelectionBroker _multiSelectionBroker;
+ readonly ITextView3 _textView;
+ readonly EditorOperationsFactoryService _factory;
+ readonly ITextDocument _textDocument;
+ readonly ITextStructureNavigator _textStructureNavigator;
+ readonly ITextUndoHistory _undoHistory;
+ readonly IViewPrimitives _editorPrimitives;
+ readonly IEditorOptions _editorOptions;
+ readonly IMultiSelectionBroker _multiSelectionBroker;
private ITrackingSpan _immProvisionalComposition;
@@ -98,7 +96,7 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
if (factory == null)
throw new ArgumentNullException(nameof(factory));
- _textView = textView;
+ _textView = (Microsoft.VisualStudio.Text.Editor.ITextView3)textView;
_factory = factory;
_multiSelectionBroker = _textView.GetMultiSelectionBroker();
_editorPrimitives = factory.EditorPrimitivesProvider.GetViewPrimitives(textView);
@@ -1083,30 +1081,29 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
}
else
{
- //Next we test for surrogate pairs and newline:
- ITextSnapshot snapshot = edit.Snapshot;
int previousPosition = selection.InsertionPoint.Position.Position - 1;
+ //If span length == 1 it's no brainer to delete just 1 char
+ if (previousElementSpan.Length == 1)
+ return edit.Delete(new Span(previousPosition, 1));
- int index = previousPosition;
- char currentCharacter = snapshot[previousPosition];
+ ITextSnapshot snapshot = edit.Snapshot;
- // By default VS (and many other apps) will delete only the last character
- // of a combining character sequence. The one exception to this rule is
- // surrogate pais which we are handling here.
- if (char.GetUnicodeCategory(currentCharacter) == UnicodeCategory.Surrogate)
+ //Handle deleting both characters of Windows new line
+ if (snapshot[previousPosition] == '\n' &&
+ snapshot[previousPosition - 1] == '\r')
{
- index--;
+ return edit.Delete(new Span(previousPosition - 1, 2));
}
- if ((index > 0) &&
- (currentCharacter == '\n') &&
- (snapshot[previousPosition - 1] == '\r'))
+ // Check if it's emoji or other kind of multichar unicode that should be deleted at once
+ if (char.GetUnicodeCategory(snapshot[previousPosition]) == UnicodeCategory.Surrogate)
{
- index--;
+ return edit.Delete(new Span(selection.InsertionPoint.Position.Position - previousElementSpan.Length, previousElementSpan.Length));
}
- // With index moved back in the cases of newline and surrogate pairs, this delete should handle all other cases.
- return edit.Delete(new Span(index, previousPosition - index + 1));
+ // This is also multichar unicode, but we don't want to delete it at once but char by char
+ // because thats what user expects when doing chinese or arabic input
+ return edit.Delete(new Span(previousPosition, 1));
}
}
@@ -1347,7 +1344,7 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
/// </summary>
public void SelectAll()
{
- _editorPrimitives.Selection.SelectAll();
+ _editorPrimitives.Selection.SelectAll(_editorOptions.ShouldMoveCaretOnSelectAll());
}
/// <summary>
@@ -2774,7 +2771,6 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
// Clipboard may throw exceptions, so enclose Clipboard calls in a try-catch block
try
{
-#if WINDOWS
IDataObject dataObj = Clipboard.GetDataObject();
if (dataObj == null || !dataObj.GetDataPresent(typeof(string)))
@@ -2790,7 +2786,6 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
dataHasLineCutCopyTag = dataObj.GetDataPresent(_clipboardLineBasedCutCopyTag);
dataHasBoxCutCopyTag = dataObj.GetDataPresent(_boxSelectionCutCopyTag);
-#endif
}
catch (System.Runtime.InteropServices.ExternalException)
{
@@ -2886,11 +2881,7 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
// Clipboard may throw exceptions, so enclose Clipboard calls in a try-catch block
try
{
-#if WINDOWS
return Clipboard.ContainsText() && !_textView.TextSnapshot.TextBuffer.IsReadOnly(_editorPrimitives.Caret.CurrentPosition);
-#else
- return false;
-#endif
}
catch (System.Runtime.InteropServices.ExternalException)
{
@@ -3196,26 +3187,14 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
public void ScrollColumnLeft()
{
-#if WINDOWS
- IWpfTextView wpfTextView = _textView as IWpfTextView;
- if (wpfTextView != null)
- {
- // A column is defined as the width of a space in the default font
- _textView.ViewScroller.ScrollViewportHorizontallyByPixels(wpfTextView.FormattedLineSource.ColumnWidth * -1.0);
- }
-#endif
+ // A column is defined as the width of a space in the default font
+ _textView.ViewScroller.ScrollViewportHorizontallyByPixels(_textView.FormattedLineSource.ColumnWidth * -1.0);
}
public void ScrollColumnRight()
{
-#if WINDOWS
- IWpfTextView wpfTextView = _textView as IWpfTextView;
- if (wpfTextView != null)
- {
- // A column is defined as the width of a space in the default font
- _textView.ViewScroller.ScrollViewportHorizontallyByPixels(wpfTextView.FormattedLineSource.ColumnWidth);
- }
-#endif
+ // A column is defined as the width of a space in the default font
+ _textView.ViewScroller.ScrollViewportHorizontallyByPixels(_textView.FormattedLineSource.ColumnWidth);
}
public void ScrollLineBottom()
@@ -3249,45 +3228,52 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
_undoHistory.CurrentTransaction.AddUndo(beforeTextBufferChangeUndoPrimitive);
}
+ public bool CanZoomIn => CanZoomTo && _textView.ZoomLevel < ZoomConstants.MaxZoom;
+
public void ZoomIn()
{
-#if WINDOWS
- IWpfTextView wpfTextView = _textView as IWpfTextView;
- if (wpfTextView != null && wpfTextView.Roles.Contains(PredefinedTextViewRoles.Zoomable))
+ if (CanZoomIn)
{
- double zoomLevel = wpfTextView.ZoomLevel * ZoomConstants.ScalingFactor;
+ double zoomLevel = Math.Min(_textView.ZoomLevel * ZoomConstants.ScalingFactor, ZoomConstants.MaxZoom);
if (zoomLevel < ZoomConstants.MaxZoom || Math.Abs(zoomLevel - ZoomConstants.MaxZoom) < 0.00001)
{
- wpfTextView.Options.GlobalOptions.SetOptionValue(DefaultWpfViewOptions.ZoomLevelId, zoomLevel);
+ _textView.Options.GlobalOptions.SetOptionValue(DefaultTextViewOptions.ZoomLevelId, zoomLevel);
}
}
-#endif
}
+ public bool CanZoomOut => CanZoomTo && _textView.ZoomLevel > ZoomConstants.MinZoom;
+
public void ZoomOut()
{
-#if WINDOWS
- IWpfTextView wpfTextView = _textView as IWpfTextView;
- if (wpfTextView != null && wpfTextView.Roles.Contains(PredefinedTextViewRoles.Zoomable))
+ if (CanZoomOut)
{
- double zoomLevel = wpfTextView.ZoomLevel / ZoomConstants.ScalingFactor;
+ double zoomLevel = Math.Max(_textView.ZoomLevel / ZoomConstants.ScalingFactor, ZoomConstants.MinZoom);
if (zoomLevel > ZoomConstants.MinZoom || Math.Abs(zoomLevel - ZoomConstants.MinZoom) < 0.00001)
{
- wpfTextView.Options.GlobalOptions.SetOptionValue(DefaultWpfViewOptions.ZoomLevelId, zoomLevel);
+ _textView.Options.GlobalOptions.SetOptionValue(DefaultTextViewOptions.ZoomLevelId, zoomLevel);
}
}
-#endif
}
+ public bool CanZoomTo => _textView.Roles.Contains(PredefinedTextViewRoles.Zoomable);
+
public void ZoomTo(double zoomLevel)
{
-#if WINDOWS
- IWpfTextView wpfTextView = _textView as IWpfTextView;
- if (wpfTextView != null && wpfTextView.Roles.Contains(PredefinedTextViewRoles.Zoomable))
+ if (CanZoomTo)
+ {
+ _textView.Options.GlobalOptions.SetOptionValue(DefaultTextViewOptions.ZoomLevelId, zoomLevel);
+ }
+ }
+
+ public bool CanZoomReset => CanZoomTo && _textView.ZoomLevel != ZoomConstants.DefaultZoom;
+
+ public void ZoomReset()
+ {
+ if (CanZoomReset)
{
- wpfTextView.Options.GlobalOptions.SetOptionValue(DefaultWpfViewOptions.ZoomLevelId, zoomLevel);
+ ZoomTo(ZoomConstants.DefaultZoom);
}
-#endif
}
#endregion // IEditorOperations Members
@@ -3874,7 +3860,6 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
// Clipboard may throw exceptions, so enclose Clipboard calls in a try-catch block
try
{
-#if WINDOWS
DataObject dataObject = new DataObject();
//set plain text format
@@ -3906,7 +3891,6 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
// which confuse applications that try to synchronize clipboard data between multiple machines such
// as MagicMouse or remote desktop.
Clipboard.SetDataObject(dataObject, false);
-#endif
return true;
}
@@ -3919,32 +3903,28 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
private string GenerateRtf(NormalizedSnapshotSpanCollection spans)
{
-#if WINDOWS
- if (_textView.Options.GetOptionValue(EnableRtfCopy.OptionKey))
- {
- //Don't generate RTF for large spans (since it is expensive and probably not wanted).
- int length = spans.Sum((span) => span.Length);
- if (length < _textView.Options.GetOptionValue(MaxRtfCopyLength.OptionKey))
- {
- if (_textView.Options.GetOptionValue(UseAccurateClassificationForRtfCopy.OptionKey))
- {
- using (var dialog = WaitHelper.Wait(_factory.WaitIndicator, Strings.WaitTitle, Strings.WaitMessage))
- {
- return ((IRtfBuilderService2)(_factory.RtfBuilderService)).GenerateRtf(spans, dialog.CancellationToken);
- }
- }
- else
- {
- return _factory.RtfBuilderService.GenerateRtf(spans);
- }
- }
- else
- return null;
- }
+ //TODO:MAC
+ //if (_textView.Options.GetOptionValue(EnableRtfCopy.OptionKey))
+ //{
+ // //Don't generate RTF for large spans (since it is expensive and probably not wanted).
+ // int length = spans.Sum((span) => span.Length);
+ // if (length < _textView.Options.GetOptionValue(MaxRtfCopyLength.OptionKey))
+ // {
+ // if (_textView.Options.GetOptionValue(UseAccurateClassificationForRtfCopy.OptionKey))
+ // {
+ // using (var dialog = WaitHelper.Wait(_factory.WaitIndicator, Strings.WaitTitle, Strings.WaitMessage))
+ // {
+ // return ((IRtfBuilderService2)(_factory.RtfBuilderService)).GenerateRtf(spans, dialog.CancellationToken);
+ // }
+ // }
+ // else
+ // {
+ // return _factory.RtfBuilderService.GenerateRtf(spans);
+ // }
+ // }
+ //}
-#else
return null;
-#endif
}
private string GenerateRtf(SnapshotSpan span)
diff --git a/src/Editor/Text/Impl/EditorOperations/EditorOperationsFactoryService.cs b/src/Editor/Text/Impl/EditorOperations/EditorOperationsFactoryService.cs
index a61fee1..b58c2ca 100644
--- a/src/Editor/Text/Impl/EditorOperations/EditorOperationsFactoryService.cs
+++ b/src/Editor/Text/Impl/EditorOperations/EditorOperationsFactoryService.cs
@@ -14,9 +14,7 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
using Microsoft.VisualStudio.Text.Formatting;
using Microsoft.VisualStudio.Utilities;
using Microsoft.VisualStudio.Text.Outlining;
-#if WINDOWS
using Microsoft.VisualStudio.Language.Intellisense.Utilities;
-#endif
[Export(typeof(IEditorOperationsFactoryService))]
internal sealed class EditorOperationsFactoryService : IEditorOperationsFactoryService
@@ -27,11 +25,9 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
[Import]
internal ITextStructureNavigatorSelectorService TextStructureNavigatorFactory { get; set; }
-#if WINDOWS
// This service should be optional: it is implemented on the VS side and other hosts may not implement it.
[Import(AllowDefault = true)]
internal IWaitIndicator WaitIndicator { get; set; }
-#endif
[Import]
internal ITextSearchService TextSearchService { get; set; }
@@ -48,11 +44,9 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation
[Import]
internal IEditorOptionsFactoryService EditorOptionsProvider { get; set; }
-#if WINDOWS
- [Import(AllowDefault = true)]
- internal IRtfBuilderService RtfBuilderService { get; set; }
+ //[Import]
+ //internal IRtfBuilderService RtfBuilderService { get; set; }
-#endif
[Import]
internal ISmartIndentationService SmartIndentationService { get; set; }
diff --git a/src/Editor/Text/Impl/EditorOperations/EditorOperationsImpl.csproj b/src/Editor/Text/Impl/EditorOperations/EditorOperationsImpl.csproj
new file mode 100644
index 0000000..a1b2caf
--- /dev/null
+++ b/src/Editor/Text/Impl/EditorOperations/EditorOperationsImpl.csproj
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.UI.Text.EditorOperations.Implementation</AssemblyName>
+ <RootNamespace>Microsoft.VisualStudio.UI.Text.EditorOperations.Implementation</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\Def\TextUIWpf\TextUIWpf.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Util\TextLogicUtil\TextLogicUtil.csproj" />
+ <ProjectReference Include="..\..\Util\TextUIUtil\TextUIUtil.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="Strings.resx">
+ <CustomToolNamespace>Microsoft.VisualStudio.Text.Operations.Implementation</CustomToolNamespace>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="Strings.Designer.cs">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/EditorOperations/Strings.Designer.cs b/src/Editor/Text/Impl/EditorOperations/Strings.Designer.cs
index fd4a317..bff20d9 100644
--- a/src/Editor/Text/Impl/EditorOperations/Strings.Designer.cs
+++ b/src/Editor/Text/Impl/EditorOperations/Strings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Text.Impl.EditorOperations.Strings", typeof(Strings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.UI.Text.EditorOperations.Implementation.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Text/Impl/EditorOptions/AssemblyInfo.cs b/src/Editor/Text/Impl/EditorOptions/AssemblyInfo.cs
new file mode 100644
index 0000000..a729e20
--- /dev/null
+++ b/src/Editor/Text/Impl/EditorOptions/AssemblyInfo.cs
@@ -0,0 +1,30 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.EditorOptions.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+
diff --git a/src/Editor/Text/Impl/EditorOptions/EditorOptionsImpl.csproj b/src/Editor/Text/Impl/EditorOptions/EditorOptionsImpl.csproj
new file mode 100644
index 0000000..0e9700c
--- /dev/null
+++ b/src/Editor/Text/Impl/EditorOptions/EditorOptionsImpl.csproj
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.EditorOptions.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\Def\TextUIWpf\TextUIWpf.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/EditorPrimitives/AssemblyInfo.cs b/src/Editor/Text/Impl/EditorPrimitives/AssemblyInfo.cs
new file mode 100644
index 0000000..1d3e387
--- /dev/null
+++ b/src/Editor/Text/Impl/EditorPrimitives/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.EditorPrimitives.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
diff --git a/src/Editor/Text/Impl/EditorPrimitives/DefaultSelectionPrimitive.cs b/src/Editor/Text/Impl/EditorPrimitives/DefaultSelectionPrimitive.cs
index d9ce555..b55b5b1 100644
--- a/src/Editor/Text/Impl/EditorPrimitives/DefaultSelectionPrimitive.cs
+++ b/src/Editor/Text/Impl/EditorPrimitives/DefaultSelectionPrimitive.cs
@@ -58,11 +58,11 @@ namespace Microsoft.VisualStudio.Text.EditorPrimitives.Implementation
this.SelectRange(selectionStart.CurrentPosition, selectionEnd.CurrentPosition);
}
- public override void SelectAll()
+ public override void SelectAll(bool moveCaret = true)
{
// For select all, the selection always goes back to stream mode.
this.AdvancedSelection.Mode = TextSelectionMode.Stream;
- this.SelectRange(0, TextView.AdvancedTextView.TextSnapshot.Length);
+ this.SelectRange(0, TextView.AdvancedTextView.TextSnapshot.Length, moveCaret);
}
public override void ExtendSelection(TextPoint newEnd)
@@ -87,7 +87,7 @@ namespace Microsoft.VisualStudio.Text.EditorPrimitives.Implementation
this.SelectRange(selectionStart, selectionEnd);
}
- private void SelectRange(int selectionStart, int selectionEnd)
+ private void SelectRange(int selectionStart, int selectionEnd, bool moveCaret = true)
{
SnapshotPoint startPoint = new SnapshotPoint(TextView.AdvancedTextView.TextSnapshot, selectionStart);
SnapshotPoint endPoint = new SnapshotPoint(TextView.AdvancedTextView.TextSnapshot, selectionEnd);
@@ -97,11 +97,14 @@ namespace Microsoft.VisualStudio.Text.EditorPrimitives.Implementation
ITextViewLine textViewLine = TextView.AdvancedTextView.GetTextViewLineContainingBufferPosition(endPoint);
PositionAffinity affinity = (textViewLine.IsLastTextViewLineForSnapshotLine || (endPoint != textViewLine.End)) ? PositionAffinity.Successor : PositionAffinity.Predecessor;
- Caret.MoveTo(endPoint, affinity);
- TextView.AdvancedTextView.ViewScroller.EnsureSpanVisible(TextSelection.StreamSelectionSpan.SnapshotSpan,
- (selectionStart <= selectionEnd)
- ? EnsureSpanVisibleOptions.MinimumScroll
- : (EnsureSpanVisibleOptions.MinimumScroll | EnsureSpanVisibleOptions.ShowStart));
+ if (moveCaret)
+ {
+ Caret.MoveTo(endPoint, affinity);
+ TextView.AdvancedTextView.ViewScroller.EnsureSpanVisible(TextSelection.StreamSelectionSpan.SnapshotSpan,
+ (selectionStart <= selectionEnd)
+ ? EnsureSpanVisibleOptions.MinimumScroll
+ : (EnsureSpanVisibleOptions.MinimumScroll | EnsureSpanVisibleOptions.ShowStart));
+ }
}
public override void Clear()
diff --git a/src/Editor/Text/Impl/EditorPrimitives/EditorPrimitivesImpl.csproj b/src/Editor/Text/Impl/EditorPrimitives/EditorPrimitivesImpl.csproj
new file mode 100644
index 0000000..d913718
--- /dev/null
+++ b/src/Editor/Text/Impl/EditorPrimitives/EditorPrimitivesImpl.csproj
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.UI.Text.EditorPrimitives.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="Strings.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="Strings.Designer.cs">
+ <DesignTime>true</DesignTime>
+ <AutoGen>true</AutoGen>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/EditorPrimitives/FxCopSupressions.cs b/src/Editor/Text/Impl/EditorPrimitives/FxCopSupressions.cs
new file mode 100644
index 0000000..d09e3dd
--- /dev/null
+++ b/src/Editor/Text/Impl/EditorPrimitives/FxCopSupressions.cs
@@ -0,0 +1,49 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+#if CODE_ANALYSIS_BASELINE
+using System.Diagnostics.CodeAnalysis;
+
+[module: SuppressMessage("Microsoft.Performance","CA1822:MarkMembersAsStatic", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.EditorPrimitivesFactoryService.#GetBufferPrimitives(Microsoft.VisualStudio.Text.ITextBuffer)")]
+[module: SuppressMessage("Microsoft.Usage","CA1801:ReviewUnusedParameters", MessageId="textBuffer", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.EditorPrimitivesFactoryService.#GetBufferPrimitives(Microsoft.VisualStudio.Text.ITextBuffer)")]
+[module: SuppressMessage("Microsoft.Performance","CA1812:AvoidUninstantiatedInternalClasses", Scope="type", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultBufferPrimitivesFactoryService", Justification="Component model instantiates these classes")]
+[module: SuppressMessage("Microsoft.Performance","CA1812:AvoidUninstantiatedInternalClasses", Scope="type", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultViewPrimitivesFactoryService", Justification="Component model instantiates these classes")]
+[module: SuppressMessage("Microsoft.Performance","CA1812:AvoidUninstantiatedInternalClasses", Scope="type", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultBufferPrimitivesFactoryService", Justification="Component model instantiates these classes")]
+[module: SuppressMessage("Microsoft.Performance","CA1812:AvoidUninstantiatedInternalClasses", Scope="type", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultViewPrimitivesFactoryService", Justification="Component model instantiates these classes")]
+
+//ToDo: To be looked at
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultBufferPrimitivesFactoryService.#CreateTextBuffer(Microsoft.VisualStudio.Text.ITextBuffer)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultBufferPrimitivesFactoryService.#CreateTextPoint(Microsoft.VisualStudio.Text.Editor.TextBuffer,System.Int32)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultDisplayTextPointPrimitive.#GetDisplayTextRange(Microsoft.VisualStudio.Text.Editor.DisplayTextPoint)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultDisplayTextRangePrimitive.#MoveTo(Microsoft.VisualStudio.Text.Editor.TextRange)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultSelectionPrimitive.#ExtendSelection(Microsoft.VisualStudio.Text.Editor.TextPoint)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultSelectionPrimitive.#ReplaceText(System.String)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultSelectionPrimitive.#SelectRange(Microsoft.VisualStudio.Text.Editor.TextPoint,Microsoft.VisualStudio.Text.Editor.TextPoint)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="1", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultSelectionPrimitive.#SelectRange(Microsoft.VisualStudio.Text.Editor.TextPoint,Microsoft.VisualStudio.Text.Editor.TextPoint)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultSelectionPrimitive.#SelectRange(Microsoft.VisualStudio.Text.Editor.TextRange)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultSelectionPrimitive.#SetStart(Microsoft.VisualStudio.Text.Editor.TextPoint)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultTextPointPrimitive.#FindAll(System.String,Microsoft.VisualStudio.Text.Operations.FindOptions)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="2", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultTextPointPrimitive.#FindAll(System.String,Microsoft.VisualStudio.Text.Operations.FindOptions,Microsoft.VisualStudio.Text.Editor.TextPoint)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultTextRangePrimitive.#MoveTo(Microsoft.VisualStudio.Text.Editor.TextRange)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultTextRangePrimitive.#SetEnd(Microsoft.VisualStudio.Text.Editor.TextPoint)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultTextRangePrimitive.#SetStart(Microsoft.VisualStudio.Text.Editor.TextPoint)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultTextViewPrimitive.#GetTextPoint(Microsoft.VisualStudio.Text.Editor.TextPoint)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultTextViewPrimitive.#Show(Microsoft.VisualStudio.Text.Editor.DisplayTextPoint,Microsoft.VisualStudio.Text.Editor.HowToShow)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultTextViewPrimitive.#Show(Microsoft.VisualStudio.Text.Editor.DisplayTextRange,Microsoft.VisualStudio.Text.Editor.HowToShow)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultViewPrimitivesFactoryService.#CreateCaret(Microsoft.VisualStudio.Text.Editor.TextView)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultViewPrimitivesFactoryService.#CreateDisplayTextPoint(Microsoft.VisualStudio.Text.Editor.TextView,System.Int32)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultViewPrimitivesFactoryService.#CreateSelection(Microsoft.VisualStudio.Text.Editor.TextView)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Design","CA1062:Validate arguments of public methods", MessageId="0", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultViewPrimitivesFactoryService.#CreateTextView(Microsoft.VisualStudio.Text.Editor.ITextView)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Performance","CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultBufferPrimitivesFactoryService.#set_EditorOptionsFactoryService(Microsoft.VisualStudio.Text.Editor.IEditorOptionsFactoryService)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Performance","CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultBufferPrimitivesFactoryService.#set_TextSearchService(Microsoft.VisualStudio.Text.Operations.ITextSearchService)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Performance","CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultBufferPrimitivesFactoryService.#set_TextStructureNavigatorSelectorService(Microsoft.VisualStudio.Text.Operations.ITextStructureNavigatorSelectorService)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Performance","CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultViewPrimitivesFactoryService.#set_BufferPrimitivesFactoryService(Microsoft.VisualStudio.Text.Editor.IBufferPrimitivesFactoryService)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Performance","CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.DefaultViewPrimitivesFactoryService.#set_EditorOptionsFactoryService(Microsoft.VisualStudio.Text.Editor.IEditorOptionsFactoryService)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Performance","CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.EditorPrimitivesFactoryService.#set_BufferPrimitivesFactory(Microsoft.VisualStudio.Text.Editor.IBufferPrimitivesFactoryService)", Justification="ToDo: To be looked at")]
+[module: SuppressMessage("Microsoft.Performance","CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Microsoft.VisualStudio.Text.EditorPrimitives.Implementation.EditorPrimitivesFactoryService.#set_ViewPrimitivesFactory(Microsoft.VisualStudio.Text.Editor.IViewPrimitivesFactoryService)", Justification="ToDo: To be looked at")]
+
+#endif \ No newline at end of file
diff --git a/src/Editor/Text/Impl/EditorPrimitives/Strings.Designer.cs b/src/Editor/Text/Impl/EditorPrimitives/Strings.Designer.cs
index c129dcf..20bf087 100644
--- a/src/Editor/Text/Impl/EditorPrimitives/Strings.Designer.cs
+++ b/src/Editor/Text/Impl/EditorPrimitives/Strings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.Text.EditorPrimitives.Implementation {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Text.Impl.EditorPrimitives.Strings", typeof(Strings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.UI.Text.EditorPrimitives.Implementation.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Text/Impl/Navigation/AssemblyInfo.cs b/src/Editor/Text/Impl/Navigation/AssemblyInfo.cs
new file mode 100644
index 0000000..449c7b6
--- /dev/null
+++ b/src/Editor/Text/Impl/Navigation/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Navigation.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
diff --git a/src/Editor/Text/Impl/Navigation/NavigationImpl.csproj b/src/Editor/Text/Impl/Navigation/NavigationImpl.csproj
new file mode 100644
index 0000000..e9010a1
--- /dev/null
+++ b/src/Editor/Text/Impl/Navigation/NavigationImpl.csproj
@@ -0,0 +1,22 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Logic.Text.Navigation.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.ComponentModel.Composition" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Text/Impl/Outlining/AssemblyInfo.cs b/src/Editor/Text/Impl/Outlining/AssemblyInfo.cs
new file mode 100644
index 0000000..ae543d4
--- /dev/null
+++ b/src/Editor/Text/Impl/Outlining/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Outlining.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
diff --git a/src/Editor/Text/Impl/Outlining/Outlining.cd b/src/Editor/Text/Impl/Outlining/Outlining.cd
deleted file mode 100644
index 77173b5..0000000
--- a/src/Editor/Text/Impl/Outlining/Outlining.cd
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Class Name="Microsoft.VisualStudio.Text.Outlining.Collapsible">
- <Position X="2.25" Y="0.75" Width="2" />
- <TypeIdentifier>
- <HashCode>AwAAgAAIQAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAg=</HashCode>
- <FileName>Out.cs</FileName>
- </TypeIdentifier>
- <Lollipop Position="0.2" />
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Outlining.OutlineManager">
- <Position X="5.75" Y="0.75" Width="2.5" />
- <TypeIdentifier>
- <HashCode>AQAAgAQAAAAAAAABAIAAAAAAAAAAAAEAAAAAAAgAAAE=</HashCode>
- <FileName>Out.cs</FileName>
- </TypeIdentifier>
- <ShowAsAssociation>
- <Field Name="elisionBuffer" />
- <Field Name="subjectBuffer" />
- </ShowAsAssociation>
- <ShowAsCollectionAssociation>
- <Field Name="regions" />
- </ShowAsCollectionAssociation>
- <Lollipop Position="0.2" />
- </Class>
- <Interface Name="Microsoft.VisualStudio.Text.Projection.IElisionBuffer" Collapsed="true">
- <Position X="10.25" Y="2" Width="1.5" />
- <TypeIdentifier />
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.ITextBuffer" Collapsed="true">
- <Position X="10.25" Y="0.75" Width="1.5" />
- <TypeIdentifier />
- </Interface>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/Outlining/Outlining.csproj b/src/Editor/Text/Impl/Outlining/Outlining.csproj
new file mode 100644
index 0000000..89a80a2
--- /dev/null
+++ b/src/Editor/Text/Impl/Outlining/Outlining.csproj
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.Outlining.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="UIAutomationClient" />
+ <Reference Include="UIAutomationProvider" />
+ <Reference Include="UIAutomationTypes" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.VisualStudio.Threading" />
+ <PackageReference Include="Microsoft.VisualStudio.Validation" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\Def\TextUIWpf\TextUIWpf.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Outlining.cd" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/PatternMatching/AssemblyInfo.cs b/src/Editor/Text/Impl/PatternMatching/AssemblyInfo.cs
new file mode 100644
index 0000000..301908d
--- /dev/null
+++ b/src/Editor/Text/Impl/PatternMatching/AssemblyInfo.cs
@@ -0,0 +1,24 @@
+//********************************************************************************
+// Copyright (c) Microsoft Corporation. All rights reserved
+//********************************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+#pragma warning disable CS0436 // ThisAssembly is internal, yet InternalsVisibleTo conflates them across assemblies
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.PatternMatching.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+#pragma warning restore CS0436
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+#pragma warning disable 618
+[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Impl/PatternMatching/PatternMatchingImpl.csproj b/src/Editor/Text/Impl/PatternMatching/PatternMatchingImpl.csproj
new file mode 100644
index 0000000..eb6809d
--- /dev/null
+++ b/src/Editor/Text/Impl/PatternMatching/PatternMatchingImpl.csproj
@@ -0,0 +1,28 @@
+<Project ToolsVersion="15.0">
+ <PropertyGroup>
+ <!-- workaround for https://github.com/NuGet/Home/issues/5894 -->
+ <OriginalProjectName>PatternMatchingImpl</OriginalProjectName>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.PatternMatching.Implementation</AssemblyName>
+ <RootNamespace>Microsoft.VisualStudio.Text.PatternMatching.Implementation</RootNamespace>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Runtime" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="System.Collections.Immutable" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ </ItemGroup>
+ <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
+</Project>
diff --git a/src/Editor/Text/Impl/StandaloneUndo/AssemblyInfo.cs b/src/Editor/Text/Impl/StandaloneUndo/AssemblyInfo.cs
new file mode 100644
index 0000000..f954c19
--- /dev/null
+++ b/src/Editor/Text/Impl/StandaloneUndo/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("StandaloneUndo.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.BufferUndoManager.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+#pragma warning disable 618
+[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Impl/StandaloneUndo/StandaloneUndoImpl.csproj b/src/Editor/Text/Impl/StandaloneUndo/StandaloneUndoImpl.csproj
new file mode 100644
index 0000000..321131a
--- /dev/null
+++ b/src/Editor/Text/Impl/StandaloneUndo/StandaloneUndoImpl.csproj
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.Implementation.StandaloneUndo</AssemblyName>
+ <RootNamespace>Microsoft.VisualStudio.Text.Operations.Standalone</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <!-- The following four properties result in packaging this project and pushing it to the internal vs-impl feed -->
+ <PushToPublicFeed>true</PushToPublicFeed>
+ <NonSDKPackage>true</NonSDKPackage>
+ <NoRefAssembly>true</NoRefAssembly>
+ <IsPackable>true</IsPackable>
+ <NonShipping>false</NonShipping>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Xaml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Text/Impl/TagAggregator/AssemblyInfo.cs b/src/Editor/Text/Impl/TagAggregator/AssemblyInfo.cs
new file mode 100644
index 0000000..d5f296b
--- /dev/null
+++ b/src/Editor/Text/Impl/TagAggregator/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Tagging.Aggregator.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("ComponentModel, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Impl/TagAggregator/TagAggregator.cs b/src/Editor/Text/Impl/TagAggregator/TagAggregator.cs
index 90005ff..2e39ff9 100644
--- a/src/Editor/Text/Impl/TagAggregator/TagAggregator.cs
+++ b/src/Editor/Text/Impl/TagAggregator/TagAggregator.cs
@@ -8,17 +8,14 @@
namespace Microsoft.VisualStudio.Text.Tagging.Implementation
{
using System;
- using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
- using System.Threading.Tasks;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Projection;
using Microsoft.VisualStudio.Text.Tagging;
using Microsoft.VisualStudio.Text.Utilities;
- using Microsoft.VisualStudio.Threading;
using Microsoft.VisualStudio.Utilities;
/// <summary>
@@ -31,9 +28,9 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
internal sealed class TagAggregator<T> : IAccurateTagAggregator<T> where T : ITag
{
internal TagAggregatorFactoryService TagAggregatorFactoryService { get; private set; }
- internal IDictionary<ITextBuffer, IList<ITagger<T>>> taggers;
+ internal readonly IDictionary<ITextBuffer, BufferState> bufferStates = new Dictionary<ITextBuffer, BufferState>();
private readonly TagAggregatorOptions options;
- private List<Tuple<ITagger<T>, int>> uniqueTaggers;
+ private readonly IDictionary<ITagger<T>, BoxedInt> uniqueTaggers = new Dictionary<ITagger<T>, BoxedInt>();
internal ITextView textView; // can be null
internal JoinableTaskHelper joinableTaskHelper;
@@ -41,7 +38,7 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
internal bool disposed;
internal bool initialized;
-
+ internal int versionNumber = 0;
public TagAggregator(TagAggregatorFactoryService factory, ITextView textView, IBufferGraph bufferGraph, TagAggregatorOptions options)
{
@@ -56,9 +53,6 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
textView.Closed += this.OnTextView_Closed;
}
- taggers = new Dictionary<ITextBuffer, IList<ITagger<T>>>();
- uniqueTaggers = new List<Tuple<ITagger<T>, int>>();
-
if (((TagAggregatorOptions2)options).HasFlag(TagAggregatorOptions2.DeferTaggerCreation))
{
this.joinableTaskHelper.RunOnUIThread((Action)(this.EnsureInitialized));
@@ -67,27 +61,11 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
{
this.Initialize();
}
-
- this.BufferGraph.GraphBufferContentTypeChanged += new EventHandler<GraphBufferContentTypeChangedEventArgs>(BufferGraph_GraphBufferContentTypeChanged);
- this.BufferGraph.GraphBuffersChanged += new EventHandler<GraphBuffersChangedEventArgs>(BufferGraph_GraphBuffersChanged);
}
private void Initialize()
{
- if (((TagAggregatorOptions2)this.options).HasFlag(TagAggregatorOptions2.NoProjection))
- {
- this.taggers[this.BufferGraph.TopBuffer] = GatherTaggers(this.BufferGraph.TopBuffer);
- }
- else
- {
- //Construct our initial list of taggers by getting taggers for every textBuffer in the graph
- this.BufferGraph.GetTextBuffers(delegate (ITextBuffer buffer)
- {
- this.taggers[buffer] = GatherTaggers(buffer);
- return false;
- });
- }
-
+ this.RegisterBufferGraph();
this.initialized = true;
}
@@ -115,14 +93,12 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
if (this.disposed)
throw new ObjectDisposedException("TagAggregator");
- if (this.uniqueTaggers.Count == 0)
- {
- return Enumerable.Empty<IMappingTagSpan<T>>();
- }
- else
+ if (initialized && (uniqueTaggers.Count > 0))
{
return InternalGetTags(new NormalizedSnapshotSpanCollection(span), cancel: null);
}
+
+ return Enumerable.Empty<IMappingTagSpan<T>>();
}
public IEnumerable<IMappingTagSpan<T>> GetTags(IMappingSpan span)
@@ -133,14 +109,12 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
if (this.disposed)
throw new ObjectDisposedException("TagAggregator");
- if (this.uniqueTaggers.Count == 0)
- {
- return Enumerable.Empty<IMappingTagSpan<T>>();
- }
- else
+ if (initialized && (uniqueTaggers.Count > 0))
{
return InternalGetTags(span, cancel: null);
}
+
+ return Enumerable.Empty<IMappingTagSpan<T>>();
}
public IEnumerable<IMappingTagSpan<T>> GetTags(NormalizedSnapshotSpanCollection snapshotSpans)
@@ -148,14 +122,12 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
if (this.disposed)
throw new ObjectDisposedException("TagAggregator");
- if ((this.uniqueTaggers.Count > 0) && (snapshotSpans.Count > 0))
+ if (initialized && (uniqueTaggers.Count > 0) && (snapshotSpans.Count > 0))
{
return InternalGetTags(snapshotSpans, cancel: null);
}
- else
- {
- return Enumerable.Empty<IMappingTagSpan<T>>();
- }
+
+ return Enumerable.Empty<IMappingTagSpan<T>>();
}
public event EventHandler<TagsChangedEventArgs> TagsChanged;
@@ -172,15 +144,10 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
throw new ObjectDisposedException("TagAggregator");
this.EnsureInitialized();
-
- if (this.uniqueTaggers.Count == 0)
- {
- return Enumerable.Empty<IMappingTagSpan<T>>();
- }
- else
- {
+ if (uniqueTaggers.Count > 0)
return InternalGetTags(new NormalizedSnapshotSpanCollection(span), cancel);
- }
+
+ return Enumerable.Empty<IMappingTagSpan<T>>();
}
public IEnumerable<IMappingTagSpan<T>> GetAllTags(IMappingSpan span, CancellationToken cancel)
@@ -192,15 +159,10 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
throw new ObjectDisposedException("TagAggregator");
this.EnsureInitialized();
-
- if (this.uniqueTaggers.Count == 0)
- {
- return Enumerable.Empty<IMappingTagSpan<T>>();
- }
- else
- {
+ if (uniqueTaggers.Count > 0)
return InternalGetTags(span, cancel);
- }
+
+ return Enumerable.Empty<IMappingTagSpan<T>>();
}
public IEnumerable<IMappingTagSpan<T>> GetAllTags(NormalizedSnapshotSpanCollection snapshotSpans, CancellationToken cancel)
@@ -210,14 +172,12 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
this.EnsureInitialized();
- if ((this.uniqueTaggers.Count > 0) && (snapshotSpans.Count > 0))
+ if ((uniqueTaggers.Count > 0) && (snapshotSpans.Count > 0))
{
return InternalGetTags(snapshotSpans, cancel);
}
- else
- {
- return Enumerable.Empty<IMappingTagSpan<T>>();
- }
+
+ return Enumerable.Empty<IMappingTagSpan<T>>();
}
#endregion
@@ -232,18 +192,20 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
if (this.textView != null)
this.textView.Closed -= this.OnTextView_Closed;
- this.BufferGraph.GraphBufferContentTypeChanged -= BufferGraph_GraphBufferContentTypeChanged;
- this.BufferGraph.GraphBuffersChanged -= BufferGraph_GraphBuffersChanged;
+ foreach (var bufferAndTaggers in bufferStates)
+ {
+ this.UnregisterBuffer(bufferAndTaggers.Key, bufferAndTaggers.Value);
+ }
- this.DisposeAllTaggers();
+ Debug.Assert(this.uniqueTaggers.Count == 0);
}
finally
{
- this.taggers = null;
+ this.bufferStates.Clear();
+ this.uniqueTaggers.Clear();
this.TagAggregatorFactoryService = null;
this.BufferGraph = null;
this.textView = null;
- this.uniqueTaggers = null;
disposed = true;
}
@@ -370,50 +332,6 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
}
}
- /// <summary>
- /// When buffers are added or removed from the buffer graph, we (1) dispose all
- /// the removed buffers' taggers (if they are disposable) and (2) collect all
- /// taggers on the new buffers.
- /// </summary>
- void BufferGraph_GraphBuffersChanged(object sender, GraphBuffersChangedEventArgs e)
- {
- if (this.disposed || (!this.initialized) || (((TagAggregatorOptions2)this.options).HasFlag(TagAggregatorOptions2.NoProjection)))
- return;
-
- foreach (ITextBuffer buffer in e.RemovedBuffers)
- {
- DisposeAllTaggersOverBuffer(buffer);
- taggers.Remove(buffer);
- }
-
- foreach (ITextBuffer buffer in e.AddedBuffers)
- {
- taggers[buffer] = GatherTaggers(buffer);
- }
- }
-
- /// <summary>
- /// If the content type of any of the source buffers changes, we need to dispose
- /// all the taggers on the buffer that we have cached (if they are disposable) and get
- /// new ones.
- /// </summary>
- void BufferGraph_GraphBufferContentTypeChanged(object sender, GraphBufferContentTypeChangedEventArgs e)
- {
- if (this.disposed || !this.initialized || (((TagAggregatorOptions2)this.options).HasFlag(TagAggregatorOptions2.NoProjection) && (e.TextBuffer != this.BufferGraph.TopBuffer)))
- return;
-
- DisposeAllTaggersOverBuffer(e.TextBuffer);
- taggers[e.TextBuffer] = GatherTaggers(e.TextBuffer);
-
- // Send out an event to say that tags have changed over the entire text buffer, to
- // be safe.
- ITextSnapshot snapshot = e.TextBuffer.CurrentSnapshot;
- SnapshotSpan entireSnapshot = new SnapshotSpan(snapshot, 0, snapshot.Length);
- IMappingSpan span = this.BufferGraph.CreateMappingSpan(entireSnapshot, SpanTrackingMode.EdgeInclusive);
-
- this.RaiseEvents(this, span);
- }
-
private void OnTextView_Closed(object sender, EventArgs args)
{
this.Dispose();
@@ -421,15 +339,27 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
#endregion
#region Helpers
- private IEnumerable<IMappingTagSpan<T>> GetTagsForBuffer(KeyValuePair<ITextBuffer, IList<ITagger<T>>> bufferAndTaggers,
- NormalizedSnapshotSpanCollection snapshotSpans,
+ private IEnumerable<IMappingTagSpan<T>> GetTagsForBuffer(NormalizedSnapshotSpanCollection snapshotSpans,
ITextSnapshot root, CancellationToken? cancel)
{
ITextSnapshot snapshot = snapshotSpans[0].Snapshot;
+ if (this.bufferStates.TryGetValue(snapshot.TextBuffer, out BufferState taggersForBuffer))
+ {
+ return this.GetTagsForBuffer(snapshotSpans, taggersForBuffer, root, cancel);
+ }
+ else
+ {
+ return Array.Empty<IMappingTagSpan<T>>();
+ }
+ }
- for (int t = 0; t < bufferAndTaggers.Value.Count; ++t)
+ private IEnumerable<IMappingTagSpan<T>> GetTagsForBuffer(NormalizedSnapshotSpanCollection snapshotSpans,
+ BufferState taggersForBuffer, ITextSnapshot root, CancellationToken? cancel)
+ {
+ ITextSnapshot snapshot = snapshotSpans[0].Snapshot;
+ for (int t = 0; t < taggersForBuffer.Taggers.Count; ++t)
{
- ITagger<T> tagger = bufferAndTaggers.Value[t];
+ ITagger<T> tagger = taggersForBuffer.Taggers[t];
IEnumerator<ITagSpan<T>> tags = null;
try
{
@@ -522,81 +452,121 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
private IEnumerable<IMappingTagSpan<T>> InternalGetTags(NormalizedSnapshotSpanCollection snapshotSpans, CancellationToken? cancel)
{
- ITextSnapshot targetSnapshot = snapshotSpans[0].Snapshot;
-
bool mapByContentType = (options & TagAggregatorOptions.MapByContentType) != 0;
+ var sourceSnapshot = snapshotSpans[0].Snapshot as IProjectionSnapshot;
+ if ((sourceSnapshot != null) && ((!mapByContentType) || sourceSnapshot.TextBuffer.ContentType.IsOfType("projection")))
+ {
+ var allSpans = new Dictionary<ITextSnapshot, IList<Span>>();
+ allSpans.Add(sourceSnapshot, (NormalizedSpanCollection)snapshotSpans);
+
+ for (int i = 0; (i < snapshotSpans.Count); ++i)
+ {
+ ExtendSourceMap(sourceSnapshot, snapshotSpans[i], mapByContentType, allSpans);
+ }
+
+ return this.GetTagsForBuffers(allSpans, sourceSnapshot, cancel);
+ }
+ else
+ {
+ return this.GetTagsForBuffer(snapshotSpans, snapshotSpans[0].Snapshot, cancel);
+ }
+ }
- foreach (var bufferAndTaggers in taggers)
+ private static void ExtendSourceMap(IProjectionSnapshot sourceSnapshot, Span sourceSpan, bool mapByContentType, Dictionary<ITextSnapshot, IList<Span>> allSpans)
+ {
+ var childSpans = sourceSnapshot.MapToSourceSnapshots(sourceSpan);
+ for (int c = 0; (c < childSpans.Count); ++c)
{
- if (bufferAndTaggers.Value.Count > 0)
+ var childSpan = childSpans[c];
+ if (!allSpans.TryGetValue(childSpan.Snapshot, out IList<Span> spans))
{
- FrugalList<SnapshotSpan> targetSpans = new FrugalList<SnapshotSpan>();
- for (int s = 0; s < snapshotSpans.Count; ++s)
- {
- MappingHelper.MapDownToBufferNoTrack(snapshotSpans[s], bufferAndTaggers.Key, targetSpans, mapByContentType);
- }
+ spans = new FrugalList<Span>();
+ allSpans.Add(childSpan.Snapshot, spans);
+ }
- if (targetSpans.Count > 0)
- {
- NormalizedSnapshotSpanCollection targetSpanCollection =
- new NormalizedSnapshotSpanCollection(targetSpans);
+ spans.Add(childSpan);
- foreach (var tagSpan in this.GetTagsForBuffer(bufferAndTaggers, targetSpanCollection, targetSnapshot, cancel))
- {
- yield return tagSpan;
- }
- }
+ if ((childSpan.Snapshot is IProjectionSnapshot childProjectionSnapshot) &&
+ (!mapByContentType || childProjectionSnapshot.TextBuffer.ContentType.IsOfType("projection")))
+ {
+ ExtendSourceMap(childProjectionSnapshot, childSpan, mapByContentType, allSpans);
}
}
}
+ private IEnumerable<IMappingTagSpan<T>> GetTagsForBuffers(Dictionary<ITextSnapshot, IList<Span>> allSpans, ITextSnapshot root, CancellationToken? cancel)
+ {
+ foreach (var kvp in allSpans)
+ {
+ var spans = new NormalizedSnapshotSpanCollection(kvp.Key, kvp.Value);
+ foreach (var t in this.GetTagsForBuffer(spans, root, cancel))
+ yield return t;
+
+ if (cancel.HasValue && cancel.Value.IsCancellationRequested)
+ yield break;
+ }
+ }
+
private IEnumerable<IMappingTagSpan<T>> InternalGetTags(IMappingSpan mappingSpan, CancellationToken? cancel)
{
- foreach (var bufferAndTaggers in taggers)
+ foreach (var bufferAndState in bufferStates)
{
- if (bufferAndTaggers.Value.Count > 0)
+ if (bufferAndState.Value.Taggers.Count > 0)
{
- NormalizedSnapshotSpanCollection spans = mappingSpan.GetSpans(bufferAndTaggers.Key);
-
+ var spans = mappingSpan.GetSpans(bufferAndState.Key);
if (spans.Count > 0)
{
- foreach (var tagSpan in this.GetTagsForBuffer(bufferAndTaggers, spans, null, cancel))
+ foreach (var tag in this.GetTagsForBuffer(spans, bufferAndState.Value, null, cancel))
{
- yield return tagSpan;
+ yield return tag;
}
+
+ if (cancel.HasValue && cancel.Value.IsCancellationRequested)
+ yield break;
}
}
}
}
- void DisposeAllTaggers()
+ void DisposeAllTaggersOverBuffer(IList<ITagger<T>> taggersOnBuffer)
{
- foreach (var bufferAndTaggers in taggers)
+ foreach (ITagger<T> tagger in taggersOnBuffer)
{
- DisposeAllTaggersOverBuffer(bufferAndTaggers.Value);
+ this.UnregisterTagger(tagger);
}
}
- void DisposeAllTaggersOverBuffer(ITextBuffer buffer)
- {
- DisposeAllTaggersOverBuffer(taggers[buffer]);
- }
-
- void DisposeAllTaggersOverBuffer(IList<ITagger<T>> taggersOnBuffer)
+ internal void RegisterBuffer(ITextBuffer textBuffer)
{
- foreach (ITagger<T> tagger in taggersOnBuffer)
+ if (this.bufferStates.TryGetValue(textBuffer, out BufferState state))
{
- this.UnregisterTagger(tagger);
+ // The buffer is already registered, bumps its version number to the current version.
+ state.VersionNumber = this.versionNumber;
+ }
+ else
+ {
+ textBuffer.ContentTypeChanged += OnContentTypeChanged;
+ if (textBuffer is IProjectionBuffer projection)
+ {
+ projection.SourceBuffersChanged += OnSourceBuffersChanged;
+ }
+
+ this.bufferStates.Add(textBuffer, new BufferState(this.versionNumber, this.GatherTaggers(textBuffer)));
}
}
internal IList<ITagger<T>> GatherTaggers(ITextBuffer textBuffer)
{
- List<ITagger<T>> newTaggers = new List<ITagger<T>>();
+ var newTaggers = new List<ITagger<T>>();
+ this.AddTaggers(textBuffer, newTaggers);
+ return newTaggers;
+ }
+ internal void AddTaggers(ITextBuffer textBuffer, IList<ITagger<T>> newTaggers)
+ {
var bufferTaggerFactories = this.TagAggregatorFactoryService.GuardedOperations.FindEligibleFactories(this.TagAggregatorFactoryService.GetBufferTaggersForType(textBuffer.ContentType, typeof(T)),
- textBuffer.ContentType,
- this.TagAggregatorFactoryService.ContentTypeRegistryService);
+ textBuffer.ContentType,
+ this.TagAggregatorFactoryService.ContentTypeRegistryService);
foreach (var factory in bufferTaggerFactories)
{
@@ -643,29 +613,128 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
this.RegisterTagger(tagger, newTaggers);
}
}
+ }
+
+ internal void UnregisterAndRemoveBuffer(ITextBuffer buffer)
+ {
+ if (this.bufferStates.TryGetValue(buffer, out BufferState t))
+ {
+ this.bufferStates.Remove(buffer);
+ this.UnregisterBuffer(buffer, t);
+ }
+ }
- return newTaggers;
+ internal void UnregisterBuffer(ITextBuffer buffer, BufferState state)
+ {
+ buffer.ContentTypeChanged -= OnContentTypeChanged;
+ if (buffer is IProjectionBuffer projection)
+ {
+ projection.SourceBuffersChanged -= OnSourceBuffersChanged;
+ }
+
+ foreach (var tagger in state.Taggers)
+ {
+ this.UnregisterTagger(tagger);
+ }
+ state.Taggers.Clear();
}
- private void UnregisterTagger(ITagger<T> tagger)
+ private void OnSourceBuffersChanged(object sender, ProjectionSourceBuffersChangedEventArgs e)
{
- int taggerIndex = uniqueTaggers.FindIndex((tuple) => object.ReferenceEquals(tuple.Item1, tagger));
+ // This is something of a hack. We can't use the buffer graph events for tracking when buffers are added
+ // or removed from the projection stack (the buffer events are fired after the corresponding text changed
+ // events so people getting tags inside the text change event would not see any tags on the newly added
+ // buffers). Instead, we update our buffer states by traversing the entire buffer graph whenever the
+ // source buffers for any projection buffer in the graph changes.
+ //
+ // This should be rare.
+
+ // Bump our version number so we can tell which BufferStates are unused.
+ ++(this.versionNumber);
- if (taggerIndex != -1)
+ this.RegisterBufferGraph();
+
+ // Now that all living buffers have been registerd (and had their version numbers bumped), find any stale buffers
+ // that have an old version number and remove them.
+ List<ITextBuffer> deadBuffers = null;
+ foreach (var kvp in this.bufferStates)
{
- Tuple<ITagger<T>, int> taggerData = this.uniqueTaggers[taggerIndex];
+ if (kvp.Value.VersionNumber != this.versionNumber)
+ {
+ if (deadBuffers == null)
+ deadBuffers = new List<ITextBuffer>(this.bufferStates.Count);
+ deadBuffers.Add(kvp.Key);
+ }
+ }
- // Is there only one reference remaining for this item?
- if (taggerData.Item2 == 1)
+ if (deadBuffers != null)
+ {
+ foreach (var b in deadBuffers)
{
- tagger.TagsChanged -= SourceTaggerTagsChanged;
+ this.UnregisterAndRemoveBuffer(b);
+ }
+ }
+ }
- this.uniqueTaggers.RemoveAt(taggerIndex);
+ private void RegisterBufferGraph()
+ {
+ if (((TagAggregatorOptions2)this.options).HasFlag(TagAggregatorOptions2.NoProjection))
+ {
+ this.RegisterBuffer(this.BufferGraph.TopBuffer);
+ }
+ else
+ {
+ //Construct our initial list of taggers by getting taggers for every textBuffer in the graph
+ this.RegisterSnapshotAndChildren(this.BufferGraph.TopBuffer.CurrentSnapshot);
+ }
+ }
+
+ private void RegisterSnapshotAndChildren(ITextSnapshot snapshot)
+ {
+ this.RegisterBuffer(snapshot.TextBuffer);
+ if (snapshot is IProjectionSnapshot projection)
+ {
+ foreach (var child in projection.SourceSnapshots)
+ {
+ this.RegisterSnapshotAndChildren(child);
+ }
+ }
+ }
+
+ private void OnContentTypeChanged(object sender, ContentTypeChangedEventArgs e)
+ {
+ // It is possible we have a situation where we are contained in another tagger. We both subscribe to the buffers content type changed event
+ // but the other tagger is disposed of first (and it disposes of us) so we need to guard against handling the event after being disposed of.
+ if (!this.disposed)
+ {
+ if (this.bufferStates.TryGetValue(e.After.TextBuffer, out BufferState state))
+ {
+ foreach (var tagger in state.Taggers)
+ {
+ this.UnregisterTagger(tagger);
+ }
+
+ state.Taggers.Clear();
+ this.AddTaggers(e.After.TextBuffer, state.Taggers);
}
- else
+
+ // Send out an event to say that tags have changed over the entire text buffer, to
+ // be safe.
+ SnapshotSpan entireSnapshot = new SnapshotSpan(e.After, 0, e.After.Length);
+ IMappingSpan span = this.BufferGraph.CreateMappingSpan(entireSnapshot, SpanTrackingMode.EdgeInclusive);
+
+ this.RaiseEvents(this, span);
+ }
+ }
+
+ private void UnregisterTagger(ITagger<T> tagger)
+ {
+ if (this.uniqueTaggers.TryGetValue(tagger, out var count))
+ {
+ if (--(count.Value) == 0)
{
- // Decrease the ref count of the tagger by 1
- this.uniqueTaggers[taggerIndex] = Tuple.Create(tagger, taggerData.Item2 - 1);
+ tagger.TagsChanged -= SourceTaggerTagsChanged;
+ this.uniqueTaggers.Remove(tagger);
}
}
else
@@ -673,6 +742,9 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
Debug.Fail("The tagger should still be in the list of unique taggers.");
}
+ // Note we are intentionally disposing of the object even if it continues to live on in uniqueTaggers. We'd only
+ // get that situation if two different tagger providers returned the same tagger (and, if that tagger implements
+ // IDisposable, then the expectation is that Dispose would be called for one for each time the tagger was "created").
IDisposable disposable = tagger as IDisposable;
if (disposable != null)
{
@@ -685,24 +757,36 @@ namespace Microsoft.VisualStudio.Text.Tagging.Implementation
if (tagger != null)
{
newTaggers.Add(tagger);
-
- int taggerIndex = this.uniqueTaggers.FindIndex((tuple) => object.ReferenceEquals(tuple.Item1, tagger));
-
- // Only subscribe to the event if we've never seen this tagger before
- if (taggerIndex == -1)
+ if (!this.uniqueTaggers.TryGetValue(tagger, out var count))
{
- tagger.TagsChanged += SourceTaggerTagsChanged;
+ count = new BoxedInt();
+ this.uniqueTaggers.Add(tagger, count);
- uniqueTaggers.Add(Tuple.Create(tagger, 1));
- }
- else
- {
- // Increase the reference count for the existing tagger
- uniqueTaggers[taggerIndex] = Tuple.Create(tagger, uniqueTaggers[taggerIndex].Item2 + 1);
+ // We only want to subscribe once to the tags changed event
+ // (even if we get multiple instances of the same tagger).
+ tagger.TagsChanged += SourceTaggerTagsChanged;
}
+
+ ++(count.Value);
}
}
+ class BoxedInt
+ {
+ public int Value;
+ }
+
+ internal class BufferState
+ {
+ public int VersionNumber;
+ public IList<ITagger<T>> Taggers;
+
+ public BufferState(int versionNumber, IList<ITagger<T>> taggers)
+ {
+ this.VersionNumber = versionNumber;
+ this.Taggers = taggers;
+ }
+ }
#endregion
}
}
diff --git a/src/Editor/Text/Impl/TagAggregator/TagAggregatorImpl.csproj b/src/Editor/Text/Impl/TagAggregator/TagAggregatorImpl.csproj
new file mode 100644
index 0000000..1fbb91d
--- /dev/null
+++ b/src/Editor/Text/Impl/TagAggregator/TagAggregatorImpl.csproj
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Logic.Text.Tagging.Aggregator.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Runtime" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.VisualStudio.Threading" />
+ <PackageReference Include="Microsoft.VisualStudio.Validation" />
+ <PackageReference Include="System.Collections.Immutable" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ <ProjectReference Include="..\..\Util\TextLogicUtil\TextLogicUtil.csproj" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/TextBufferUndoManager/AssemblyInfo.cs b/src/Editor/Text/Impl/TextBufferUndoManager/AssemblyInfo.cs
new file mode 100644
index 0000000..b2263a2
--- /dev/null
+++ b/src/Editor/Text/Impl/TextBufferUndoManager/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.BufferUndoManager.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
diff --git a/src/Editor/Text/Impl/TextBufferUndoManager/Strings.Designer.cs b/src/Editor/Text/Impl/TextBufferUndoManager/Strings.Designer.cs
index 1f71b36..75dcf7e 100644
--- a/src/Editor/Text/Impl/TextBufferUndoManager/Strings.Designer.cs
+++ b/src/Editor/Text/Impl/TextBufferUndoManager/Strings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.Text.BufferUndoManager.Implementation {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Text.Impl.TextBufferUndoManager.Strings", typeof(Strings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Logic.Text.BufferUndoManager.Implementation.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferChangeUndoPrimitive.cs b/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferChangeUndoPrimitive.cs
index 28b5233..1900492 100644
--- a/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferChangeUndoPrimitive.cs
+++ b/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferChangeUndoPrimitive.cs
@@ -15,7 +15,7 @@ namespace Microsoft.VisualStudio.Text.BufferUndoManager.Implementation
/// <summary>
/// The UndoPrimitive for a text buffer change operation.
/// </summary>
- public class TextBufferChangeUndoPrimitive : TextUndoPrimitive, IEditOnlyTextUndoPrimitive
+ internal class TextBufferChangeUndoPrimitive : TextUndoPrimitive, IEditOnlyTextUndoPrimitive
{
#region Private Data Members
diff --git a/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferUndoManager.cs b/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferUndoManager.cs
index 646a47e..430046e 100644
--- a/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferUndoManager.cs
+++ b/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferUndoManager.cs
@@ -214,6 +214,8 @@ namespace Microsoft.VisualStudio.Text.BufferUndoManager.Implementation
public void Dispose()
{
+ UnregisterUndoHistory();
+
if (_textBuffer != null)
{
_textBuffer.PostChanged -= TextBufferPostChanged;
diff --git a/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferUndoManagerImpl.csproj b/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferUndoManagerImpl.csproj
new file mode 100644
index 0000000..2dac099
--- /dev/null
+++ b/src/Editor/Text/Impl/TextBufferUndoManager/TextBufferUndoManagerImpl.csproj
@@ -0,0 +1,39 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Logic.Text.BufferUndoManager.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Data" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Util\TextLogicUtil\TextLogicUtil.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="Strings.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="Strings.Designer.cs">
+ <DesignTime>true</DesignTime>
+ <AutoGen>true</AutoGen>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Text/Impl/TextModel/AssemblyInfo.cs b/src/Editor/Text/Impl/TextModel/AssemblyInfo.cs
new file mode 100644
index 0000000..4366ca1
--- /dev/null
+++ b/src/Editor/Text/Impl/TextModel/AssemblyInfo.cs
@@ -0,0 +1,25 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.UnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Model.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Classification.Projection.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("ComponentModel, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Impl/TextModel/BaseBuffer.cs b/src/Editor/Text/Impl/TextModel/BaseBuffer.cs
index a318a35..d8b9690 100644
--- a/src/Editor/Text/Impl/TextModel/BaseBuffer.cs
+++ b/src/Editor/Text/Impl/TextModel/BaseBuffer.cs
@@ -1039,11 +1039,8 @@ namespace Microsoft.VisualStudio.Text.Implementation
}
},
CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
-
-#if WINDOWS
// Now register pending task with task tracker to ensure it's completed when editor host is shutdown
this.guardedOperations.NonJoinableTaskTracker?.Register(_lastChangeOnBackgroundRaisedEvent);
-#endif
}
if (medHandler != null)
{
diff --git a/src/Editor/Text/Impl/TextModel/Diagrams/StringRebuilder.cd b/src/Editor/Text/Impl/TextModel/Diagrams/StringRebuilder.cd
deleted file mode 100644
index bd17675..0000000
--- a/src/Editor/Text/Impl/TextModel/Diagrams/StringRebuilder.cd
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
- <Class Name="Microsoft.VisualStudio.Text.Implementation.BaseStringRebuilder">
- <Position X="3.5" Y="0.5" Width="2.25" />
- <Members>
- <Method Name="Assemble" Hidden="true" />
- <Method Name="CompareTo" Hidden="true" />
- <Method Name="CopyTo" Hidden="true" />
- <Method Name="Delete" Hidden="true" />
- <Method Name="Equals" Hidden="true" />
- <Method Name="GetEnumerator" Hidden="true" />
- <Method Name="GetLineFromLineNumber" Hidden="true" />
- <Method Name="GetLineNumberFromPosition" Hidden="true" />
- <Method Name="GetText" Hidden="true" />
- <Method Name="IEnumerable.GetEnumerator" Hidden="true" />
- <Method Name="Insert" Hidden="true" />
- <Property Name="Length" Hidden="true" />
- <Property Name="LineBreakCount" Hidden="true" />
- <Method Name="Replace" Hidden="true" />
- <Method Name="Substring" Hidden="true" />
- <Property Name="this" Hidden="true" />
- <Method Name="ToCharArray" Hidden="true" />
- <Method Name="Write" Hidden="true" />
- </Members>
- <NestedTypes>
- <Class Name="Microsoft.VisualStudio.Text.Implementation.BaseStringRebuilder.RebuilderEnumerator" Collapsed="true">
- <TypeIdentifier>
- <NewMemberFileName>StringRebuilder\BaseStringRebuilder.cs</NewMemberFileName>
- </TypeIdentifier>
- <Lollipop Position="0.2" />
- </Class>
- </NestedTypes>
- <TypeIdentifier>
- <HashCode>AAAAAMAAAEAAABQJiAAAAABAAAEAAAQECAAAAAEAKCA=</HashCode>
- <FileName>StringRebuilder\BaseStringRebuilder.cs</FileName>
- </TypeIdentifier>
- <Lollipop Position="0.2" />
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder">
- <Position X="1.5" Y="2.5" Width="2.25" />
- <Members>
- <Field Name="_crlf" Hidden="true" />
- <Field Name="_depth" Hidden="true" />
- <Field Name="_left" Hidden="true" />
- <Field Name="_length" Hidden="true" />
- <Field Name="_lineBreakCount" Hidden="true" />
- <Field Name="_maxCharactersToConsolidate" Hidden="true" />
- <Field Name="_maxLinesToConsolidate" Hidden="true" />
- <Field Name="_right" Hidden="true" />
- </Members>
- <Compartments>
- <Compartment Name="Nested Types" Collapsed="false" />
- </Compartments>
- <NestedTypes>
- <Class Name="Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder.SimpleTreeNode" Collapsed="true">
- <TypeIdentifier>
- <NewMemberFileName>StringRebuilder\BinaryStringRebuilder.cs</NewMemberFileName>
- </TypeIdentifier>
- <Lollipop Position="0.2" />
- </Class>
- </NestedTypes>
- <TypeIdentifier>
- <HashCode>AAAMAAAAAEQAGMQNCAgAAABAACAAAUwgBAAAAAEAKAA=</HashCode>
- <FileName>StringRebuilder\BinaryStringRebuilder.cs</FileName>
- </TypeIdentifier>
- <Lollipop Position="0.2" />
- </Class>
- <Class Name="Microsoft.VisualStudio.Text.Implementation.SimpleStringRebuilder">
- <Position X="5" Y="2.5" Width="2.75" />
- <Members>
- <Field Name="_empty" Hidden="true" />
- <Field Name="_lineBreakSpans" Hidden="true" />
- <Field Name="_source" Hidden="true" />
- <Field Name="_span" Hidden="true" />
- </Members>
- <Compartments>
- <Compartment Name="Nested Types" Collapsed="false" />
- </Compartments>
- <NestedTypes>
- <Class Name="Microsoft.VisualStudio.Text.Implementation.SimpleStringRebuilder.LineBreak" Collapsed="true">
- <TypeIdentifier>
- <NewMemberFileName>StringRebuilder\SimpleStringRebuilder.cs</NewMemberFileName>
- </TypeIdentifier>
- </Class>
- </NestedTypes>
- <TypeIdentifier>
- <HashCode>AAAAAAAAAEAACMQNCAABAABAAAAAAEQgACAAAAEAKAA=</HashCode>
- <FileName>StringRebuilder\SimpleStringRebuilder.cs</FileName>
- </TypeIdentifier>
- <Lollipop Position="0.2" />
- </Class>
- <Interface Name="Microsoft.VisualStudio.Text.Implementation.IStringRebuilder">
- <Position X="8.5" Y="0.5" Width="2.25" />
- <TypeIdentifier>
- <HashCode>AAAAAMAAAEAAAAQJCAAAAABAAAEAAAQAAAAAAAEAKCA=</HashCode>
- <FileName>StringRebuilder\IStringRebuilder.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Interface Name="Microsoft.VisualStudio.Text.Implementation.ITreeNode">
- <Position X="11.5" Y="0.5" Width="1.5" />
- <TypeIdentifier>
- <HashCode>AAAAAAAAAAAACMAAAAAAAAAAAAAAAAAgAAAAAAAAAAA=</HashCode>
- <FileName>StringRebuilder\ITreeNode.cs</FileName>
- </TypeIdentifier>
- </Interface>
- <Font Name="Segoe UI" Size="9" />
-</ClassDiagram> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/TextModel/FileUtilities.cs b/src/Editor/Text/Impl/TextModel/FileUtilities.cs
index a770837..42f8a39 100644
--- a/src/Editor/Text/Impl/TextModel/FileUtilities.cs
+++ b/src/Editor/Text/Impl/TextModel/FileUtilities.cs
@@ -179,28 +179,41 @@ namespace Microsoft.VisualStudio.Text.Implementation
try
{
originalFileStream = new FileStream(filePath, FileMode.Open, FileAccess.ReadWrite, FileShare.None);
-
- //Even thoug SafeFileHandle is an IDisposable, we don't dispose of it since that closes the strem.
+ //Even though SafeFileHandle is an IDisposable, we don't dispose of it since that closes the stream.
var safeHandle = originalFileStream.SafeFileHandle;
if (!(safeHandle.IsClosed || safeHandle.IsInvalid))
{
- try
+ uint numberOfHardLinks = 1;
+ bool statWasSuccessful = false;
+
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
- BY_HANDLE_FILE_INFORMATION fi;
- if (NativeMethods.GetFileInformationByHandle(safeHandle, out fi))
+ if (NativeMethods.GetFileInformationByHandle(safeHandle, out var fi))
{
- if (fi.NumberOfLinks <= 1)
- {
- // The file we're trying to write to doesn't have any hard links ... clear out the originalFileStream
- // as a clue.
- originalFileStream.Dispose();
- originalFileStream = null;
- }
+ statWasSuccessful = true;
+ numberOfHardLinks = fi.NumberOfLinks;
}
}
- catch (EntryPointNotFoundException)
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ if (NativeMethods.DarwinStat((int)safeHandle.DangerousGetHandle(), out var statbuf) == 0)
+ {
+ statWasSuccessful = true;
+ numberOfHardLinks = statbuf.st_nlink;
+ }
+ }
+ else
+ {
+ throw new PlatformNotSupportedException("Implement fstat support for Linux");
+ }
+
+ if (!statWasSuccessful)
+ throw new InvalidOperationException("Unable to determine if file has any hard links");
+
+ if (numberOfHardLinks <= 1)
{
- // The code is being executed on a non-Windows platform, assume all is good
+ // The file we're trying to write to doesn't have any hard links...
+ // clear out the originalFileStream as a clue.
originalFileStream.Dispose();
originalFileStream = null;
}
diff --git a/src/Editor/Text/Impl/TextModel/NativeMethods.cs b/src/Editor/Text/Impl/TextModel/NativeMethods.cs
index 78d507b..08bf7b5 100644
--- a/src/Editor/Text/Impl/TextModel/NativeMethods.cs
+++ b/src/Editor/Text/Impl/TextModel/NativeMethods.cs
@@ -24,5 +24,14 @@ namespace Microsoft.VisualStudio.Text.Implementation
Microsoft.Win32.SafeHandles.SafeFileHandle hFile,
out BY_HANDLE_FILE_INFORMATION lpFileInformation
);
+
+ [DllImport("libc", EntryPoint = "fstat")]
+ internal static extern int DarwinStat(int fd, out darwin_stat_t buf);
+
+ [StructLayout(LayoutKind.Explicit, Size = 144)]
+ internal struct darwin_stat_t
+ {
+ [FieldOffset(10)] public ushort st_nlink;
+ }
}
-}
+} \ No newline at end of file
diff --git a/src/Editor/Text/Impl/TextModel/Strings.Designer.cs b/src/Editor/Text/Impl/TextModel/Strings.Designer.cs
index 1c572e8..47ec6fd 100644
--- a/src/Editor/Text/Impl/TextModel/Strings.Designer.cs
+++ b/src/Editor/Text/Impl/TextModel/Strings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.Text.Implementation {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Text.Impl.TextModel.Strings", typeof(Strings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Text/Impl/TextModel/TextDocumentFactoryService.cs b/src/Editor/Text/Impl/TextModel/TextDocumentFactoryService.cs
index 67c75f9..bd78514 100644
--- a/src/Editor/Text/Impl/TextModel/TextDocumentFactoryService.cs
+++ b/src/Editor/Text/Impl/TextModel/TextDocumentFactoryService.cs
@@ -17,6 +17,7 @@ namespace Microsoft.VisualStudio.Text.Implementation
using Microsoft.VisualStudio.Utilities;
using System.Diagnostics;
using Microsoft.VisualStudio.Text.Editor;
+ using System.Runtime.InteropServices;
[Export(typeof(ITextDocumentFactoryService))]
internal sealed partial class TextDocumentFactoryService : ITextDocumentFactoryService
@@ -35,6 +36,7 @@ namespace Microsoft.VisualStudio.Text.Implementation
#endregion
internal static Encoding DefaultEncoding = Encoding.Default; // Exposed for unit tests.
+ static Encoding UTF8WithoutBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);
#region ITextDocumentFactoryService Members
@@ -141,7 +143,15 @@ namespace Microsoft.VisualStudio.Text.Implementation
// Valid UTF8 but no extended characters, so it's valid ASCII.
// We don't use ASCII here because of the following scenario:
// The user with a non-ENU system encoding opens a code file with ASCII-only contents
- chosenEncoding = DefaultEncoding;
+ if (RuntimeInformation.IsOSPlatform (OSPlatform.Windows))
+ chosenEncoding = DefaultEncoding;
+ else
+ // To get to this line, it means file doesn't have BOM
+ // On Windows DefaultEncoding is "ASCII" which doesn't have BOM
+ // On non-Windows systems DefaultEncoding is UTF8 which emits BOM on save
+ // which is something we don't want(on file that didn't have BOM to save BOM)
+ // So instead we use "new UTF8Encoding (encoderShouldEmitUTF8Identifier: false)", which means don't emit BOM when saving.
+ chosenEncoding = UTF8WithoutBOM;
}
}
catch (DecoderFallbackException)
diff --git a/src/Editor/Text/Impl/TextModel/TextModelImpl.csproj b/src/Editor/Text/Impl/TextModel/TextModelImpl.csproj
new file mode 100644
index 0000000..149a39a
--- /dev/null
+++ b/src/Editor/Text/Impl/TextModel/TextModelImpl.csproj
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.Model.Implementation</AssemblyName>
+ <RootNamespace>Microsoft.VisualStudio.Text.Implementation</RootNamespace>
+ <NoWarn>649;436;618$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Runtime" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.VisualStudio.Threading" />
+ <PackageReference Include="Microsoft.VisualStudio.Validation" />
+ <PackageReference Include="System.Collections.Immutable" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Diagrams\StringRebuilder.cd" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="Strings.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="Strings.Designer.cs">
+ <DesignTime>true</DesignTime>
+ <AutoGen>true</AutoGen>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/TextSearch/AssemblyInfo.cs b/src/Editor/Text/Impl/TextSearch/AssemblyInfo.cs
new file mode 100644
index 0000000..5cff641
--- /dev/null
+++ b/src/Editor/Text/Impl/TextSearch/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.UnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Logic.Text.Find.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
diff --git a/src/Editor/Text/Impl/TextSearch/BackgroundSearch.cs b/src/Editor/Text/Impl/TextSearch/BackgroundSearch.cs
deleted file mode 100644
index 3bbe3ec..0000000
--- a/src/Editor/Text/Impl/TextSearch/BackgroundSearch.cs
+++ /dev/null
@@ -1,451 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-//
-// This file contain implementations details that are subject to change without notice.
-// Use at your own risk.
-//
-namespace Microsoft.VisualStudio.Text.Find.Implementation
-{
- using Microsoft.VisualStudio.Text.Operations;
- using Microsoft.VisualStudio.Text.Tagging;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Threading;
- using System.Threading.Tasks;
-
- /// <summary>
- /// Performs text searches on lowest priority background threads and caches the results.
- /// </summary>
- /// <remarks>
- /// The goal here is to be completely thread-safe: searches can be requested from any thread (and actually happen on background threads).
- ///
- /// Another goal is to never search more than we need to:
- /// Once we've searched a section of the buffer we don't search it again unless it is modified.
- /// Even if we get multiple, nearly simultaneous requests to search a section of the buffer, we only search it once.
- /// </remarks>
- internal sealed class BackgroundSearch<T> : IDisposable where T : ITag
- {
- private ITextBuffer _buffer;
- private readonly ITextSearchService2 _textSearchService;
- private readonly string _searchTerm;
- private readonly FindOptions _options;
- public readonly Func<SnapshotSpan, T> TagFactory;
- private readonly Action<ITextSnapshot, NormalizedSpanCollection> _callback;
- private bool _isDisposed;
-
- //This is used for locks so it can never be deleted/recreated. Internal for unit tests.
- internal readonly Queue<NormalizedSnapshotSpanCollection> _requestQueue = new Queue<NormalizedSnapshotSpanCollection>();
-
- //This needs to update atomically and is internal so unit tests can (more) easily test edge cases.
- internal SearchResults _results;
-
- public BackgroundSearch(ITextSearchService2 textSearchService, ITextBuffer buffer, string searchTerm, FindOptions options,
- Func<SnapshotSpan, T> tagFactory, Action<ITextSnapshot, NormalizedSpanCollection> callback)
- {
- _textSearchService = textSearchService;
- _buffer = buffer;
-
- _searchTerm = searchTerm;
- _options = options & ~FindOptions.SearchReverse; //The tagger ignores the reversed flag.
- this.TagFactory = tagFactory;
- _callback = callback;
-
- _results = new SearchResults(_buffer.CurrentSnapshot, NormalizedSpanCollection.Empty, NormalizedSpanCollection.Empty);
- }
-
- public NormalizedSnapshotSpanCollection Results
- {
- get
- {
- var results = _results; //Snapshot results to avoid taking a lock.
- return new NormalizedSnapshotSpanCollection(results.Snapshot, results.Matches);
- }
- }
-
- /// <summary>
- /// Kick off a background search if we don't have current results. Do nothing otherwise.
- /// </summary>
- /// <remarks>
- /// This method can be called from any thread (though it will generally only be called from the UI thread).
- /// </remarks>
- public void QueueSearch(NormalizedSnapshotSpanCollection requestedSnapshotSpans)
- {
- Debug.Assert(requestedSnapshotSpans.Count > 0);
-
- //Check to see if we have completely searched the current version of the text buffer
- //and quickly abort since there is no point in queuing up another search if we have.
- var results = _results; //Snapshot results to avoid taking a lock.
- if (results.Snapshot == _buffer.CurrentSnapshot)
- {
- if ((results.SearchedSpans.Count == 1) && (results.SearchedSpans[0].Start == 0) && (results.SearchedSpans[0].Length == results.Snapshot.Length))
- {
- //We've searched the entire snapshot.
- return;
- }
-
- if (requestedSnapshotSpans[0].Snapshot == results.Snapshot)
- {
- NormalizedSpanCollection unsearchedRequest = NormalizedSpanCollection.Difference(requestedSnapshotSpans, results.SearchedSpans);
- if (unsearchedRequest.Count == 0)
- {
- return;
- }
- }
- }
-
- lock (_requestQueue)
- {
- _requestQueue.Enqueue(requestedSnapshotSpans);
- if (_requestQueue.Count != 1)
- {
- //Request has been queued & we already have an active thread processing requests.
- return;
- }
- }
-
- Task.Factory.StartNew(this.ProcessQueue, CancellationToken.None, TaskCreationOptions.PreferFairness, TaskScheduler.Default);
- }
-
- #region Private Helpers
- internal void ProcessQueue()
- {
- // Ensure the thread that is doing the work is both low priority and also background
- try
- {
- Thread.CurrentThread.Priority = ThreadPriority.Lowest;
-
- //Only one instance of this thread is running at a time, so we don't need to put locks around the bits that update
- //our state (only the bits that play with the results queue).
- while (true)
- {
- if (_isDisposed)
- return;
-
- NormalizedSnapshotSpanCollection request;
- lock (_requestQueue)
- {
- //Do not dequeue the result here ... if a new request comes in while we are processing this request,
- //we do not want to start a new thread.
- request = _requestQueue.Peek();
- }
-
- //Always do searches on the current snapshot of the buffer, migrating results to that snapshot
- //if needed.
- ITextSnapshot snapshot = this.AdvanceToCurrentSnapshot();
-
- NormalizedSpanCollection requestedSpans;
- if (_options.HasFlag(FindOptions.Multiline))
- {
- //Multi-line searches are all or nothing.
- if (_results.SearchedSpans.Count == 0)
- {
- requestedSpans = new NormalizedSpanCollection(new Span(0, snapshot.Length));
- }
- else
- {
- Debug.Assert((_results.SearchedSpans.Count == 1) && (_results.SearchedSpans[0].Start == 0) && (_results.SearchedSpans[0].End == snapshot.Length));
- requestedSpans = NormalizedSpanCollection.Empty;
- }
- }
- else
- {
- requestedSpans = BackgroundSearch<T>.TranslateToAndExtend(request[0].Snapshot, request, snapshot);
-
- if (_results.SearchedSpans.Count > 0)
- {
- if ((_results.SearchedSpans.Count == 1) && (_results.SearchedSpans[0].Start == 0) && (_results.SearchedSpans[0].End == snapshot.Length))
- {
- //We've already got results for the entire buffer.
- requestedSpans = NormalizedSpanCollection.Empty;
- }
- else
- {
- requestedSpans = NormalizedSpanCollection.Difference(requestedSpans, _results.SearchedSpans);
- }
- }
- }
-
- bool dequeueRequest = true;
- if (requestedSpans.Count > 0)
- {
- IList<Span> newMatches = this.FindAll(snapshot, requestedSpans);
-
- if (_isDisposed)
- return;
-
- if (snapshot == _buffer.CurrentSnapshot)
- {
- //The search completed without the buffer changing out from under us, add in the new results.
- //Remove any stale results in the places we searched (since we do not remove potentially stale results
- //on a text change, we have to remove them here) and then add in the results we found.
- if (_options.HasFlag(FindOptions.Multiline))
- {
- //Multiline searches are always whole buffer searches, so we can skip the set operations.
- Debug.Assert(requestedSpans.Count == 1);
- Debug.Assert(requestedSpans[0].Start == 0);
- Debug.Assert(requestedSpans[0].Length == snapshot.Length);
-
- _results = new SearchResults(snapshot,
- new NormalizedSpanCollection(newMatches),
- new NormalizedSpanCollection(new Span(0, snapshot.Length)));
- }
- else
- {
- //Remove the stale results.
- NormalizedSpanCollection m = NormalizedSpanCollection.Difference(_results.Matches, requestedSpans);
-
- //Add in the new results.
- if (newMatches.Count > 0)
- {
- m = NormalizedSpanCollection.Union(m, new NormalizedSpanCollection(newMatches));
- }
-
- //Save the results
- _results = new SearchResults(snapshot,
- m,
- NormalizedSpanCollection.Union(_results.SearchedSpans, requestedSpans));
- }
-
- //We completed the search & updated the results ... have the tagger to raise the appropriate changed event
- //on the span we just searched.
- //
- //We can't raise the tags changed on just the results since we also need to signal that stale results have
- //been removed.
- _callback(snapshot, requestedSpans);
- }
- else
- {
- //The buffer changed so we can't trust the results we just got (the search may not have completed).
- //Don't dequeue the request and we'll repeat the process (but on the correct snapshot).
- dequeueRequest = false;
- }
- }
-
- if (dequeueRequest)
- {
- lock (_requestQueue)
- {
- //Nothing should have moved the request out of the queue.
- Debug.Assert(object.ReferenceEquals(request, _requestQueue.Peek()));
-
- _requestQueue.Dequeue();
-
- if (_requestQueue.Count == 0)
- {
- //No more requests are pending, release the worker thread.
- return;
- }
- }
- }
- }
- }
- finally
- {
- Thread.CurrentThread.Priority = ThreadPriority.Normal;
- }
- }
-
- internal ITextSnapshot AdvanceToCurrentSnapshot()
- {
- //We don't need to take a snapshot of the results because the results are only modified on this thread.
- ITextSnapshot oldSnapshot = _results.Snapshot;
- ITextSnapshot newSnapshot = _buffer.CurrentSnapshot;
-
- if (oldSnapshot != newSnapshot)
- {
- //The results are all on an old snapshot. We need to project them forward (even though that might cause some stale and incorrect
- //results).
- NormalizedSpanCollection newMatches = TextSearchNavigator.TranslateTo(oldSnapshot, _results.Matches, newSnapshot);
- NormalizedSpanCollection newSearchedSpans = NormalizedSpanCollection.Empty;
-
- if ((_results.SearchedSpans.Count != 0) && !_options.HasFlag(FindOptions.Multiline))
- {
- //Advance our record of the spans that have already been searched to the new snapshot as well.
- newSearchedSpans = BackgroundSearch<T>.TranslateToAndExtend(oldSnapshot, _results.SearchedSpans, newSnapshot);
-
- //But remove anything on a TextSnapshotLine that was modified by the change.
- List<Span> changedSpansOnNewSnapshot = new List<Span>();
- ITextVersion version = oldSnapshot.Version;
- while (version != newSnapshot.Version)
- {
- foreach (var change in version.Changes)
- {
- changedSpansOnNewSnapshot.Add(BackgroundSearch<T>.Extend(newSnapshot, Tracking.TrackSpanForwardInTime(SpanTrackingMode.EdgeInclusive, change.NewSpan,
- version.Next, newSnapshot.Version)));
- }
-
- version = version.Next;
- }
-
- if (changedSpansOnNewSnapshot.Count > 0)
- {
- NormalizedSpanCollection changes = new NormalizedSpanCollection(changedSpansOnNewSnapshot);
-
- //Remove the spans touched by changes from the spans we've searched
- newSearchedSpans = NormalizedSpanCollection.Difference(newSearchedSpans, changes);
- }
- }
-
- _results = new SearchResults(newSnapshot, newMatches, newSearchedSpans);
- }
-
- return newSnapshot;
- }
-
- public static NormalizedSpanCollection TranslateToAndExtend(ITextSnapshot currentSnapshot, NormalizedSpanCollection currentSpans, ITextSnapshot targetSnapshot)
- {
- if (currentSpans.Count == 0)
- {
- return currentSpans;
- }
-
- List<Span> spans = new List<Span>(currentSpans.Count);
- foreach (var s in currentSpans)
- {
- spans.Add(BackgroundSearch<T>.Extend(targetSnapshot, Tracking.TrackSpanForwardInTime(SpanTrackingMode.EdgeNegative,
- s,
- currentSnapshot.Version, targetSnapshot.Version)));
- }
-
- return new NormalizedSpanCollection(spans);
- }
-
- //Grow a snapshot span so that it includes all of the TextSnapshotLines that overlap the span (but always return at least one
- //complete line).
- public static Span Extend(ITextSnapshot snapshot, Span span)
- {
- ITextSnapshotLine start = snapshot.GetLineFromPosition(span.Start);
- if (span.End <= start.EndIncludingLineBreak.Position)
- {
- //source.End is on the same line (or possibly the start of the next line) ... return just this line.
- return start.ExtentIncludingLineBreak;
- }
- else
- {
- ITextSnapshotLine end = snapshot.GetLineFromPosition(span.End);
-
- //if source.End is at the start of the line, only return up to the start of the line, otherwise
- //include the entire line).
- return Span.FromBounds(start.Start,
- (end.Start.Position == span.End)
- ? end.Start
- : end.EndIncludingLineBreak);
- }
- }
-
- /// <summary>
- /// Simulates a search on the range where the user is performing a series of find next operations, buts aborts quickly
- /// when either the BackgroundSearch advances to a new snapshot or is disposed.
- /// </summary>
- private IList<Span> FindAll(ITextSnapshot snapshot, NormalizedSpanCollection spans)
- {
- IList<Span> matches = new List<Span>();
-
- int start = int.MinValue;
- int end = int.MinValue;
-
- foreach (var span in spans)
- {
- //All the spans are normalized to conver entire text snapshot lines.
- Debug.Assert(snapshot.GetLineFromPosition(span.Start).Start == span.Start);
- Debug.Assert((span.End == snapshot.Length) || (snapshot.GetLineFromPosition(span.End).Start == span.End));
-
- if (span.Length > 0)
- {
- SnapshotSpan searchRange = new SnapshotSpan(snapshot, span);
- SnapshotPoint startingPosition = searchRange.Start;
-
- while (true)
- {
- if (_isDisposed || (snapshot != _buffer.CurrentSnapshot))
- {
- //We've been disposed of or the buffer has advanced to a new snapshot. Either way, abort the search.
- return matches;
- }
-
- SnapshotSpan? match = _textSearchService.Find(searchRange, startingPosition, _searchTerm, _options);
-
- if (match.HasValue)
- {
- if (match.Value.Start > end)
- {
- //The current match is disjoint from the last match, add it to the list of matches.
- if (end != int.MinValue)
- {
- matches.Add(Span.FromBounds(start, end));
-
- //Avoid problems when there are so many matches (e.g. searching for 'a' in a 300MB file) that
- //we run out of memory tracking results.
- //
- //The effect of this cut-out isn't exactly predictable (doing several smaller searches will
- //allow the total number of results maintained by the background search class to grow past
- //the limit but a large search will hit the limit and miss results).
- if (matches.Count > 5000)
- return matches;
- }
-
- start = match.Value.Start;
- end = match.Value.End;
- }
- else
- {
- //The new match overlaps the old. Simple extend the existing matched span.
- end = Math.Max(end, match.Value.End); //With an RE, the new match could end before the end of the previous match.
- }
-
- startingPosition = match.Value.Start;
-
- if (startingPosition >= span.End)
- {
- break;
- }
- else
- {
- startingPosition += 1;
- }
- }
- else
- {
- break;
- }
- }
- }
- }
-
- if (end != int.MinValue)
- {
- matches.Add(Span.FromBounds(start, end));
- }
-
- return matches;
- }
-
- #endregion
-
- #region IDisposable Members
-
- public void Dispose()
- {
- _isDisposed = true;
- GC.SuppressFinalize(this);
- }
-
- #endregion
-
- internal class SearchResults
- {
- public readonly ITextSnapshot Snapshot;
- public readonly NormalizedSpanCollection Matches;
- public readonly NormalizedSpanCollection SearchedSpans;
-
- public SearchResults(ITextSnapshot snapshot, NormalizedSpanCollection matches, NormalizedSpanCollection searchedSpans)
- {
- this.Snapshot = snapshot;
- this.Matches = matches;
- this.SearchedSpans = searchedSpans;
- }
- }
- }
-}
diff --git a/src/Editor/Text/Impl/TextSearch/TextSearchImpl.csproj b/src/Editor/Text/Impl/TextSearch/TextSearchImpl.csproj
new file mode 100644
index 0000000..c454b92
--- /dev/null
+++ b/src/Editor/Text/Impl/TextSearch/TextSearchImpl.csproj
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Logic.Text.Find.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Impl/TextSearch/TextSearchTagger.cs b/src/Editor/Text/Impl/TextSearch/TextSearchTagger.cs
deleted file mode 100644
index 150a67b..0000000
--- a/src/Editor/Text/Impl/TextSearch/TextSearchTagger.cs
+++ /dev/null
@@ -1,281 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-//
-// This file contain implementations details that are subject to change without notice.
-// Use at your own risk.
-//
-namespace Microsoft.VisualStudio.Text.Find.Implementation
-{
- using Microsoft.VisualStudio.Text;
- using Microsoft.VisualStudio.Text.Operations;
- using Microsoft.VisualStudio.Text.Tagging;
- using System;
- using System.Collections.Generic;
-
- /// <summary>
- /// A general tagger that takes a search term and tags all matching occurences of it.
- /// </summary>
- /// <remarks>
- /// This tagger -- like most others -- will not raise a TagsChanged event when the buffer changes.
- /// </remarks>
- internal sealed class TextSearchTagger<T> : ITextSearchTagger<T> where T : ITag
- {
- // search service to use for doing the real search
- ITextSearchService2 _searchService;
-
- // list of items to search for and tag
- internal IList<BackgroundSearch<T>> _searchTerms = new List<BackgroundSearch<T>>();
-
- // buffer over which search is being performed
- ITextBuffer _buffer;
-
- public TextSearchTagger(ITextSearchService2 searchService, ITextBuffer buffer)
- {
- _searchService = searchService;
- _buffer = buffer;
- }
-
- #region Private Helpers
-
- private void InvalidateTags(SnapshotSpan span)
- {
- EventHandler<SnapshotSpanEventArgs> tagsChangedListeners = this.TagsChanged;
-
- if (tagsChangedListeners != null)
- {
- tagsChangedListeners.Invoke(this, new SnapshotSpanEventArgs(span));
- }
- }
-
- private void InvalidateTags()
- {
- this.InvalidateTags(new SnapshotSpan(_buffer.CurrentSnapshot, 0, _buffer.CurrentSnapshot.Length));
- }
-
- internal void ResultsCalculated(ITextSnapshot snapshot, NormalizedSpanCollection spans)
- {
- if (spans.Count > 0)
- {
- SnapshotSpan changedSpan = new SnapshotSpan(snapshot, Span.FromBounds(spans[0].Start, spans[spans.Count - 1].End));
- this.InvalidateTags(changedSpan);
- }
- }
-
- #endregion
-
- #region ITextSearchTagger<T> Members
-
- private NormalizedSnapshotSpanCollection _searchSpans;
- public NormalizedSnapshotSpanCollection SearchSpans
- {
- get
- {
- return _searchSpans;
- }
- set
- {
- if (value != null)
- {
- if (value.Count == 0)
- {
- //Treat an empty collection as if it were null.
- value = null;
- }
- else if (value[0].Snapshot.TextBuffer != _buffer)
- {
- throw new ArgumentException("The provided SearchSpan value must belong to the same buffer as the tagger itself.");
- }
- }
-
- if (value == _searchSpans)
- {
- return;
- }
-
- _searchSpans = value;
-
- this.InvalidateTags();
- }
- }
-
- public void TagTerm(string searchTerm, FindOptions searchOptions, Func<SnapshotSpan, T> tagFactory)
- {
- if ((searchOptions & FindOptions.SearchReverse) == FindOptions.SearchReverse)
- {
- throw new ArgumentException("FindOptions.SearchReverse is invalid as searches are performed forwards to ensure all matches in a requested search span are found.", nameof(searchOptions));
- }
-
- if ((searchOptions & FindOptions.Wrap) == FindOptions.Wrap)
- {
- throw new ArgumentException("FindOptions.Wrap is invalid as searches are performed forwards with no wrapping to ensure all matches in a requested span are found.", nameof(searchOptions));
- }
-
- _searchTerms.Add(new BackgroundSearch<T>(_searchService, _buffer, searchTerm, searchOptions, tagFactory, this.ResultsCalculated));
-
- this.InvalidateTags();
- }
-
- public void ClearTags()
- {
- if (_searchTerms.Count == 0)
- {
- return;
- }
-
- ITextSnapshot snapshot = _buffer.CurrentSnapshot;
- int start = int.MaxValue;
- int end = int.MinValue;
-
- foreach (BackgroundSearch<T> search in _searchTerms)
- {
- // Abort any ongoing background search operation since we no longer are interested in the results
- NormalizedSnapshotSpanCollection results = search.Results;
-
- if ((results != null) && (results.Count > 0))
- {
- int s = results[0].Start.TranslateTo(snapshot, PointTrackingMode.Negative);
- if (s < start)
- start = s;
-
- int e = results[results.Count - 1].End.TranslateTo(snapshot, PointTrackingMode.Positive);
- if (e > end)
- end = e;
- }
-
- search.Dispose();
- }
-
- // Clear all currently tagging search terms
- _searchTerms.Clear();
-
- // Notify listeners of changed tags over the span where we had any results.
- if (start < end)
- this.InvalidateTags(new SnapshotSpan(snapshot, start, end - start));
- }
-
- #endregion
-
- #region ITagger<T> Members
-
- public IEnumerable<ITagSpan<T>> GetTags(NormalizedSnapshotSpanCollection requestedSpans)
- {
- //We should always be called with a non-empty span.
- if (requestedSpans != null && requestedSpans.Count > 0)
- {
- ITextSnapshot searchSnapshot = _buffer.CurrentSnapshot;
- requestedSpans = new NormalizedSnapshotSpanCollection(searchSnapshot, TextSearchNavigator.TranslateTo(requestedSpans[0].Snapshot, requestedSpans, searchSnapshot));
-
- if ((_searchSpans != null) && (_searchSpans.Count > 0))
- {
- //The search has been narrowed via _searchSpan ... limit the request to the search range (after making sure it is on the correct snapshot).
- if (_searchSpans[0].Snapshot != searchSnapshot)
- {
- NormalizedSpanCollection newSpans = TextSearchNavigator.TranslateTo(_searchSpans[0].Snapshot, _searchSpans, searchSnapshot);
- _searchSpans = new NormalizedSnapshotSpanCollection(searchSnapshot, newSpans);
- }
-
- requestedSpans = new NormalizedSnapshotSpanCollection(searchSnapshot, NormalizedSpanCollection.Intersection(requestedSpans, _searchSpans));
-
- if (requestedSpans.Count == 0)
- {
- yield break;
- }
- }
-
- foreach (var search in _searchTerms)
- {
- //Queue up a search if we need one.
- search.QueueSearch(requestedSpans);
-
- //Report any results from the search (if we've got them)
- var results = search.Results;
- if (results.Count > 0)
- {
- //Results could be on an old snapshot (and, if so, a new search has already been queued up) but we need to get the results on the current snapshot.
- if (results[0].Snapshot != searchSnapshot)
- {
- results = new NormalizedSnapshotSpanCollection(searchSnapshot, TextSearchNavigator.TranslateTo(results[0].Snapshot, results, searchSnapshot));
- }
-
- if (_searchSpans != null)
- {
- results = new NormalizedSnapshotSpanCollection(searchSnapshot, NormalizedSpanCollection.Intersection(results, _searchSpans));
- }
-
- int start = 0;
- foreach (var span in requestedSpans)
- {
- start = TextSearchTagger<T>.IndexOfContainingSpan(results, span.Start, start, false);
- if (start >= results.Count)
- break; //All done.
-
- int end = TextSearchTagger<T>.IndexOfContainingSpan(results, span.End, start, true);
-
- while (start < end)
- {
- T tag = search.TagFactory.Invoke(results[start]);
-
- if (tag != null)
- {
- yield return new TagSpan<T>(results[start], tag);
- }
-
- start++;
- }
- }
- }
- }
- }
- }
-
- /// <summary>
- /// Search spans from [start ... spans.Count-1] for a span that contains point.
- /// If a span does contain point, return the index + 1
- /// If a span does not contain point, return the index of the first span that starts after point (or spans.Count if there are none).
- /// </summary>
- private static int IndexOfContainingSpan(NormalizedSpanCollection spans, int point, int start, bool isEndPoint)
- {
- int lo = start;
- int hi = spans.Count;
- while (lo < hi)
- {
- int mid = (lo + hi) / 2;
- Span s = spans[mid];
-
- if (s.End < point)
- {
- lo = mid + 1;
- }
- else if (s.Start > point)
- {
- hi = mid;
- }
- else
- {
- //We know s.Start <= point <= s.End
- //
- //If point is an endPoint
- // we want to return mid + 1 if a span ending at point overlaps s (== point != s.Start). Otherwise return mid.
- //
- //If point is a startPoint
- // we want to return mid if a span starting at point overlaps s (== point == s.End). Otherwise return mid + 1.
- if (isEndPoint)
- {
- return (point != s.Start) ? (mid + 1) : mid;
- }
- else
- {
- return (point == s.End) ? (mid + 1) : mid;
- }
- }
- }
-
- return lo;
- }
-
- public event EventHandler<SnapshotSpanEventArgs> TagsChanged;
-
- #endregion
- }
-}
diff --git a/src/Editor/Text/Impl/TextSearch/TextSearchTaggerFactoryService.cs b/src/Editor/Text/Impl/TextSearch/TextSearchTaggerFactoryService.cs
deleted file mode 100644
index 711fda8..0000000
--- a/src/Editor/Text/Impl/TextSearch/TextSearchTaggerFactoryService.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-//
-// This file contain implementations details that are subject to change without notice.
-// Use at your own risk.
-//
-namespace Microsoft.VisualStudio.Text.Find.Implementation
-{
- using System;
- using System.ComponentModel.Composition;
-
- using Microsoft.VisualStudio.Text.Operations;
- using Microsoft.VisualStudio.Text.Tagging;
-
- [Export(typeof(ITextSearchTaggerFactoryService))]
- class TextSearchTaggerFactoryService : ITextSearchTaggerFactoryService
- {
- [Import]
- private ITextSearchService2 TextSearchService = null;
-
- #region ITextSearchTaggerFactoryService Members
-
- public ITextSearchTagger<T> CreateTextSearchTagger<T>(ITextBuffer buffer) where T : ITag
- {
- if (buffer == null)
- {
- throw new ArgumentNullException(nameof(buffer));
- }
-
- // Don't return singleton instances since multiple taggers can exist per buffer
- return new TextSearchTagger<T>(this.TextSearchService, buffer);
- }
-
- #endregion
- }
-}
diff --git a/src/Editor/Text/Impl/XPlat/MultiCaretImpl/AssemblyInfo.cs b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/AssemblyInfo.cs
new file mode 100644
index 0000000..9c6d0bd
--- /dev/null
+++ b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/AssemblyInfo.cs
@@ -0,0 +1,31 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+
+#pragma warning disable CS0436 // Type conflicts with imported type
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.UnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+#pragma warning restore CS0436 // Type conflicts with imported type
+
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+#pragma warning disable 618
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+#pragma warning restore 618
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Impl/XPlat/MultiCaretImpl/MultiCaretImpl.csproj b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/MultiCaretImpl.csproj
new file mode 100644
index 0000000..0049cb8
--- /dev/null
+++ b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/MultiCaretImpl.csproj
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.MultiCaret.Implementation</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\..\Util\TextUIUtil\TextUIUtil.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="System.ComponentModel.Composition" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="Strings.Designer.cs">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="Strings.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Text/Impl/XPlat/MultiCaretImpl/MultiSelectionBroker.cs b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/MultiSelectionBroker.cs
index 5beff03..389c1e2 100644
--- a/src/Editor/Text/Impl/XPlat/MultiCaretImpl/MultiSelectionBroker.cs
+++ b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/MultiSelectionBroker.cs
@@ -34,6 +34,12 @@ namespace Microsoft.VisualStudio.Text.MultiSelection.Implementation
{
Factory = factory;
_textView = textView;
+
+ if (textView.ToString().Contains("ExtensibleTextEditor"))
+ {
+ IsOldEditor = true;
+ }
+
_currentSnapshot = _textView.TextSnapshot;
var documentStart = new VirtualSnapshotPoint(_textView.TextSnapshot, 0);
_primaryTransformer = new SelectionTransformer(this, new Selection(documentStart));
@@ -46,6 +52,8 @@ namespace Microsoft.VisualStudio.Text.MultiSelection.Implementation
_textView.Closed += OnTextViewClosed;
}
+ internal bool IsOldEditor { get; set; }
+
private IEditorOptions EditorOptions
{
get
@@ -60,37 +68,43 @@ namespace Microsoft.VisualStudio.Text.MultiSelection.Implementation
private void OnTextViewLayoutChanged(object sender, TextViewLayoutChangedEventArgs e)
{
- if (CurrentSnapshot != e.NewSnapshot)
- {
- CurrentSnapshot = e.NewSnapshot;
- }
- //using (var batchOp = BeginBatchOperation())
- //{
- // // If we get a text change, we need to go through all the selections and update them to be in the
- // // new snapshot. If there is just a visual change, we could still need to update selections because
- // // word wrap or collapsed regions might have moved around.
- // if (CurrentSnapshot != e.NewSnapshot)
- // {
- // CurrentSnapshot = e.NewSnapshot;
- // }
- // else if (e.NewViewState.VisualSnapshot != e.OldViewState.VisualSnapshot)
- // {
- // // Box selection is special. Moving _boxSelection is easy, but InnerSetBoxSelection will totally
- // // reset all the selections. It's easier to go a different path here than it is to special case
- // // NormalizeSelections, which is also called when adding an individual selection.
- // if (IsBoxSelection)
- // {
- // // MapToSnapshot does take the visual buffer into account as well. Calling it here should do the right thing
- // // for collapsed regions and word wrap.
- // _boxSelection.Selection = _boxSelection.Selection.MapToSnapshot(_currentSnapshot, _textView);
- // InnerSetBoxSelection();
- // }
- // else
- // {
- // NormalizeSelections(true);
- // }
- // }
- //}
+ if (IsOldEditor)
+ {
+ if (CurrentSnapshot != e.NewSnapshot)
+ {
+ CurrentSnapshot = e.NewSnapshot;
+ }
+
+ return;
+ }
+
+ using (var batchOp = BeginBatchOperation())
+ {
+ // If we get a text change, we need to go through all the selections and update them to be in the
+ // new snapshot. If there is just a visual change, we could still need to update selections because
+ // word wrap or collapsed regions might have moved around.
+ if (CurrentSnapshot != e.NewSnapshot)
+ {
+ CurrentSnapshot = e.NewSnapshot;
+ }
+ else if (e.NewViewState.VisualSnapshot != e.OldViewState.VisualSnapshot)
+ {
+ // Box selection is special. Moving _boxSelection is easy, but InnerSetBoxSelection will totally
+ // reset all the selections. It's easier to go a different path here than it is to special case
+ // NormalizeSelections, which is also called when adding an individual selection.
+ if (IsBoxSelection)
+ {
+ // MapToSnapshot does take the visual buffer into account as well. Calling it here should do the right thing
+ // for collapsed regions and word wrap.
+ _boxSelection.Selection = _boxSelection.Selection.MapToSnapshot(_currentSnapshot, _textView);
+ InnerSetBoxSelection();
+ }
+ else
+ {
+ NormalizeSelections(true);
+ }
+ }
+ }
}
private void OnTextViewClosed(object sender, EventArgs e)
@@ -413,8 +427,11 @@ namespace Microsoft.VisualStudio.Text.MultiSelection.Implementation
private void FireSessionUpdated()
{
- //var changesFromNormalization = NormalizeSelections();
- //_fireEvents = _fireEvents || changesFromNormalization;
+ if (!IsOldEditor)
+ {
+ var changesFromNormalization = NormalizeSelections();
+ _fireEvents = _fireEvents || changesFromNormalization;
+ }
// Perform merges as late as possible so that each region can act independently for operations.
MergeSelections();
diff --git a/src/Editor/Text/Impl/XPlat/MultiCaretImpl/SelectionTransformer.cs b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/SelectionTransformer.cs
index 489fa18..08ece69 100644
--- a/src/Editor/Text/Impl/XPlat/MultiCaretImpl/SelectionTransformer.cs
+++ b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/SelectionTransformer.cs
@@ -436,12 +436,18 @@ namespace Microsoft.VisualStudio.Text.MultiSelection.Implementation
{
var newSelection = new Selection(point, select ? _selection.AnchorPoint : point, point, insertionPointAffinity);
- // Using the ternary here to shortcut out if the snapshots are the same. There's a similar check in the
- // MapSelectionToCurrentSnapshot method to avoid doing unneeded work, but even spinning up the method call can be expensive.
- //_selection = (newSelection.InsertionPoint.Position.Snapshot == this.CurrentSnapshot)
- // ? newSelection
- // : MapSelectionToCurrentSnapshot(newSelection);
- _selection = newSelection;
+ if (_broker.IsOldEditor)
+ {
+ _selection = newSelection;
+ }
+ else
+ {
+ // Using the ternary here to shortcut out if the snapshots are the same. There's a similar check in the
+ // MapSelectionToCurrentSnapshot method to avoid doing unneeded work, but even spinning up the method call can be expensive.
+ _selection = (newSelection.InsertionPoint.Position.Snapshot == this.CurrentSnapshot)
+ ? newSelection
+ : MapSelectionToCurrentSnapshot(newSelection);
+ }
_broker.QueueCaretUpdatedEvent(this);
}
diff --git a/src/Editor/Text/Impl/XPlat/MultiCaretImpl/Strings.Designer.cs b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/Strings.Designer.cs
index 7455ad8..64e1297 100644
--- a/src/Editor/Text/Impl/XPlat/MultiCaretImpl/Strings.Designer.cs
+++ b/src/Editor/Text/Impl/XPlat/MultiCaretImpl/Strings.Designer.cs
@@ -39,7 +39,7 @@ namespace Microsoft.VisualStudio.Text.MultiSelection.Implementation {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.Implementation.Text.Impl.XPlat.MultiCaretImpl.Strings", typeof(Strings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.MultiSelection.Implementation.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/Editor/Text/Util/TextDataUtil/AssemblyInfo.cs b/src/Editor/Text/Util/TextDataUtil/AssemblyInfo.cs
new file mode 100644
index 0000000..ea93b49
--- /dev/null
+++ b/src/Editor/Text/Util/TextDataUtil/AssemblyInfo.cs
@@ -0,0 +1,82 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Logic.Utilities, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.UI.Utilities, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Model.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.View.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.TextAndAdornmentSequencer.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.FormattedTextSource.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Classification.Aggregator.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.Classification.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.DragDrop.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.GlyphMargin.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.AdornmentLibrary.TextMarker.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.AdornmentLibrary.Squiggles.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.AdornmentLibrary.VisibleWhitespace.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Tagging.Aggregator.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Navigation.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.Input.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Navigation.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.EditorOptions.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.IntraTextAdornmentSupport.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.BraceCompletion.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.BraceCompletion.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.OverviewMargin.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Differencing.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.DifferenceBuffer.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.DifferenceViewer.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.DataUtil.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.UI.Utilities.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Model.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextAndAdornmentSequencer.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.WpfEditor.IntegrationTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("EditorTestApp, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.UnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Classification.Aggregator.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Navigation.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.View.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Differencing.DifferenceViewer.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.UnitTest.UI.Text.Wpf.Classification.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.DragDrop.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.FormattedTextSource.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.OverviewMargin.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Tagging.Aggregator.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.EditorOptions.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Outlining.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.Input.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Differencing.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Differencing.DifferenceBuffer.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.UrlTagger.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.UrlTagger.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Classification.LookUp.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.ChangeTagger.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.TableControl.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.TableManager.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.TableManager.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.TableControl.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.TableControl.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Structure, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.PatternMatching.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.PatternMatching.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Commanding.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Commanding.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.MultiSelection.Implementation.UI.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Cocoa.View.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Util/TextDataUtil/GuardedOperations.cs b/src/Editor/Text/Util/TextDataUtil/GuardedOperations.cs
index 98a6d40..92a8ad8 100644
--- a/src/Editor/Text/Util/TextDataUtil/GuardedOperations.cs
+++ b/src/Editor/Text/Util/TextDataUtil/GuardedOperations.cs
@@ -19,7 +19,7 @@ namespace Microsoft.VisualStudio.Text.Utilities
[Export]
[Export(typeof(IGuardedOperations))]
[PartCreationPolicy(CreationPolicy.Shared)]
- public sealed class GuardedOperations : IGuardedOperations
+ internal sealed class GuardedOperations : IGuardedOperations
{
[ImportMany]
private List<Lazy<IExtensionErrorHandler>> _errorHandlerExports = null;
@@ -30,11 +30,9 @@ namespace Microsoft.VisualStudio.Text.Utilities
[Import]
private JoinableTaskContext _joinableTaskContext;
-#if WINDOWS
[Import(AllowDefault = true)]
internal INonJoinableTaskTrackerInternal NonJoinableTaskTracker; // Optional in scenarios other than in VS process.
-#endif
private FrugalList<IExtensionErrorHandler> _errorHandlers;
private FrugalList<IExtensionPerformanceTracker> _perfTrackers;
@@ -772,7 +770,7 @@ namespace Microsoft.VisualStudio.Text.Utilities
{
if (BreakOnFailures && Debugger.IsAttached)
Debugger.Break();
- Debug.Fail(message);
+ Debug.Fail(message);
}
}
}
diff --git a/src/Editor/Text/Util/TextDataUtil/MappingHelper.cs b/src/Editor/Text/Util/TextDataUtil/MappingHelper.cs
index add43f2..44f5d4b 100644
--- a/src/Editor/Text/Util/TextDataUtil/MappingHelper.cs
+++ b/src/Editor/Text/Util/TextDataUtil/MappingHelper.cs
@@ -6,6 +6,7 @@ namespace Microsoft.VisualStudio.Text.Utilities
{
using System;
using System.Collections.Generic;
+ using System.Linq;
using Microsoft.VisualStudio.Text.Projection;
internal static class MappingHelper
@@ -271,5 +272,46 @@ namespace Microsoft.VisualStudio.Text.Utilities
}
return position;
}
+
+ /// <summary>
+ /// Finds points on buffers in the <paramref name="bufferGraph"/> which are available at <paramref name="location"/>,
+ /// including when <paramref name="location"/> is on a buffer seam.
+ /// </summary>
+ /// <param name="location">Location where we look for points on other buffers</param>
+ /// <param name="rootSnapshot">Top snapshot from which we map down to other snapshots.
+ /// Typically it's the snapshot of <paramref name="location"/>, but you may provide a different snapshot
+ /// to work around incorrectly built buffer graphs.</param>
+ /// <returns>Enumeration of <see cref="SnapshotPoint"/>s that exist at given <paramref name="location"/>, mapped to buffers of the <paramref name="bufferGraph"/></returns>
+ internal static IEnumerable<SnapshotPoint> GetPointsAtLocation(SnapshotPoint location, ITextSnapshot rootSnapshot)
+ {
+ if (location.Snapshot != rootSnapshot)
+ {
+ // In Roslyn debugger text view case, location is not on the root. We need to map up
+ var locationAtRoot = MappingPointSnapshot.MapUpToSnapshotNoTrack(rootSnapshot, location, PositionAffinity.Predecessor);
+ location = locationAtRoot ?? location;
+ }
+ return GetProjectedPoints(location);
+ }
+
+ /// <summary>
+ /// Maps <paramref name="location"/> down to all projected <see cref="ITextSnapshot"/>s.
+ /// </summary>
+ /// <param name="location">Location which will be mapped down</param>
+ /// <returns></returns>
+ internal static IEnumerable<SnapshotPoint> GetProjectedPoints(SnapshotPoint location)
+ {
+ if (location.Snapshot is IProjectionSnapshot projection)
+ {
+ var span = new SnapshotSpan(location, 0);
+ foreach (var s in projection.MapToSourceSnapshots(span))
+ {
+ foreach (var child in GetProjectedPoints(s.Start))
+ {
+ yield return child;
+ }
+ }
+ }
+ yield return location;
+ }
}
}
diff --git a/src/Editor/Text/Util/TextDataUtil/StableContentTypeComparer.cs b/src/Editor/Text/Util/TextDataUtil/StableContentTypeComparer.cs
index 19ed88d..e961fa1 100644
--- a/src/Editor/Text/Util/TextDataUtil/StableContentTypeComparer.cs
+++ b/src/Editor/Text/Util/TextDataUtil/StableContentTypeComparer.cs
@@ -1,61 +1,97 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Runtime.CompilerServices;
+using Microsoft.VisualStudio.Text.Utilities;
namespace Microsoft.VisualStudio.Utilities
{
/// <summary>
/// Custom comparer for sorting lists of content types that preserves original order of unrelated content types.
/// </summary>
+ /// <remarks>Note that this class (as a typical comparer) is intended to be used as a long lived instance.
+ /// It's expensive to create, but is immutable and very efficient when used.</remarks>
internal class StableContentTypeComparer : IComparer<IEnumerable<string>>
{
- private readonly IContentTypeRegistryService _contentTypeRegistryService;
+ private readonly Dictionary<string, int> _contentTypeRanks;
+ /// <summary>
+ /// Build a forest of all content types and associate a rank with each content type,
+ /// indicating number of ancestors in the forest. E.g. any gets rank 0, text - 1,
+ /// projection - 1, code - 2, inert - 0.
+ /// </summary>
public StableContentTypeComparer(IContentTypeRegistryService contentTypeRegistryService)
{
- _contentTypeRegistryService = contentTypeRegistryService ?? throw new ArgumentNullException(nameof(contentTypeRegistryService));
- }
+ _contentTypeRanks = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
- public int Compare(IEnumerable<string> x, IEnumerable<string> y)
- {
- if (x.SequenceEqual(y))
+ contentTypeRegistryService = contentTypeRegistryService ?? throw new ArgumentNullException(nameof(contentTypeRegistryService));
+
+ var unprocessedBaseTypes = new Dictionary<IContentType, int>();
+ var derivedTypes = new Dictionary<IContentType, FrugalList<IContentType>>();
+
+ foreach (IContentType curContentType in contentTypeRegistryService.ContentTypes)
{
- return 0;
+ unprocessedBaseTypes[curContentType] = curContentType.BaseTypes.Count();
+ derivedTypes[curContentType] = new FrugalList<IContentType>();
}
- foreach (var contentTypeXStr in x)
+ foreach (IContentType curContentType in contentTypeRegistryService.ContentTypes)
{
- var contentTypeX = _contentTypeRegistryService.GetContentType(contentTypeXStr);
- if (contentTypeX != null)
+ foreach (IContentType baseContentType in curContentType.BaseTypes)
{
- foreach (var contentTypeYStr in y)
- {
- if (contentTypeX.IsOfType(contentTypeYStr))
- {
- return -1;
- }
- }
+ FrugalList<IContentType> baseDerivedContentTypes = derivedTypes[baseContentType];
+ baseDerivedContentTypes.Add(curContentType);
}
}
- foreach (var contentTypeYStr in y)
+ int groupRank = 0;
+ while (unprocessedBaseTypes.Count > 0)
{
- var contentTypeY = _contentTypeRegistryService.GetContentType(contentTypeYStr);
- if (contentTypeY != null)
+ IEnumerable<IContentType> contentTypesWithoutBase = unprocessedBaseTypes.Where(kvp => kvp.Value == 0).Select(kvp => kvp.Key).ToList();
+ foreach (IContentType curContentTypeWithoutBase in contentTypesWithoutBase)
{
- foreach (var contentTypeXStr in x)
+ _contentTypeRanks[curContentTypeWithoutBase.TypeName] = groupRank;
+
+ unprocessedBaseTypes.Remove(curContentTypeWithoutBase);
+ foreach (IContentType curDerivedType in derivedTypes[curContentTypeWithoutBase])
{
- if (contentTypeY.IsOfType(contentTypeXStr))
- {
- return 1;
- }
+ unprocessedBaseTypes[curDerivedType] = unprocessedBaseTypes[curDerivedType] - 1;
}
}
+
+ groupRank++;
+ }
+ }
+
+ public int Compare(IEnumerable<string> x, IEnumerable<string> y)
+ {
+ if (x == null && y == null)
+ {
+ return 0;
+ }
+
+ if (x == null)
+ {
+ return -1;
+ }
+
+ if (y == null)
+ {
+ return 1;
}
- // Content types are unrelated, there is no way resolve the tie so
- // let's consider them equal to preserve original order.
- return 0;
+ int xRank = x.Select(ct => GetRank(ct)).Max();
+ int yRank = y.Select(ct => GetRank(ct)).Max();
+
+ return yRank.CompareTo(xRank);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private int GetRank(string contentType)
+ {
+ _contentTypeRanks.TryGetValue(contentType, out int result);
+ return result;
}
}
}
+
diff --git a/src/Editor/Text/Util/TextDataUtil/StableOrderer.cs b/src/Editor/Text/Util/TextDataUtil/StableOrderer.cs
index ae9ee8f..d40d471 100644
--- a/src/Editor/Text/Util/TextDataUtil/StableOrderer.cs
+++ b/src/Editor/Text/Util/TextDataUtil/StableOrderer.cs
@@ -21,6 +21,11 @@ namespace Microsoft.VisualStudio.Utilities
return true;
}
+ if (x.Metadata.After?.Contains (DefaultOrderings.Lowest) == true)
+ {
+ return true;
+ }
+
return false;
}
diff --git a/src/Editor/Text/Util/TextDataUtil/TextDataUtil.csproj b/src/Editor/Text/Util/TextDataUtil/TextDataUtil.csproj
new file mode 100644
index 0000000..e8b9348
--- /dev/null
+++ b/src/Editor/Text/Util/TextDataUtil/TextDataUtil.csproj
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.Data.Utilities</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+
+ <!-- Need to have a TargetFramework tag for VS to recognize this as an SDK project. Just use the shared one. -->
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+
+ <NoWarn>649;436;618$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Runtime" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.VisualStudio.Threading" />
+ <PackageReference Include="Microsoft.VisualStudio.Validation" />
+ <PackageReference Include="System.Collections.Immutable" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Util/TextLogicUtil/AssemblyInfo.cs b/src/Editor/Text/Util/TextLogicUtil/AssemblyInfo.cs
new file mode 100644
index 0000000..40ee336
--- /dev/null
+++ b/src/Editor/Text/Util/TextLogicUtil/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.UI.Utilities, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.Tagging.Aggregator.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.GlyphMargin.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.EditorOperations.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.OverviewMargin.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Logic.Text.BufferUndoManager.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Outlining.UndoManager.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.EditorOperations.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Util/TextLogicUtil/TextLogicUtil.csproj b/src/Editor/Text/Util/TextLogicUtil/TextLogicUtil.csproj
new file mode 100644
index 0000000..0160652
--- /dev/null
+++ b/src/Editor/Text/Util/TextLogicUtil/TextLogicUtil.csproj
@@ -0,0 +1,20 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.Logic.Utilities</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;618$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\TextDataUtil\TextDataUtil.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/src/Editor/Text/Util/TextLogicUtil/TextUndoPrimitive.cs b/src/Editor/Text/Util/TextLogicUtil/TextUndoPrimitive.cs
index 59f2ac1..b9e7f60 100644
--- a/src/Editor/Text/Util/TextLogicUtil/TextUndoPrimitive.cs
+++ b/src/Editor/Text/Util/TextLogicUtil/TextUndoPrimitive.cs
@@ -4,7 +4,7 @@
//
namespace Microsoft.VisualStudio.Text.Operations
{
- public abstract class TextUndoPrimitive : ITextUndoPrimitive
+ internal abstract class TextUndoPrimitive : ITextUndoPrimitive
{
private ITextUndoTransaction parent;
diff --git a/src/Editor/Text/Util/TextUIUtil/AssemblyInfo.cs b/src/Editor/Text/Util/TextUIUtil/AssemblyInfo.cs
new file mode 100644
index 0000000..4567dde
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/AssemblyInfo.cs
@@ -0,0 +1,42 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+using System.Security.Permissions;
+
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.View.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.Input.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.Classification.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.DragDrop.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.AdornmentLibrary.TextMarker.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.AdornmentLibrary.ToolTip.Wpf.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.TextMarkerAdornment.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.CurrentLineHighlighter.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.GlyphMargin.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.DifferenceViewer.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.OverviewMargin.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.OverviewMargin.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.UI.Utilities.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.TextViewUnitTestHelper, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.View.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Wpf.Input.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Differencing.DifferenceViewer.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Language.Intellisense.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Commanding.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Commanding.Implementation.UnitTests, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.Text.Editor.PrintingService.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("EditorTestApp, PublicKey=" + ThisAssembly.PublicKey)]
+[assembly: InternalsVisibleTo("Microsoft.VisualStudio.UI.Text.Cocoa.View.Implementation, PublicKey=" + ThisAssembly.PublicKey)]
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
+[assembly: ReliabilityContract(Consistency.MayCorruptProcess, Cer.MayFail)]
diff --git a/src/Editor/Text/Util/TextUIUtil/BaseProxyService.cs b/src/Editor/Text/Util/TextUIUtil/BaseProxyService.cs
index 0062990..c2467a4 100644
--- a/src/Editor/Text/Util/TextUIUtil/BaseProxyService.cs
+++ b/src/Editor/Text/Util/TextUIUtil/BaseProxyService.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
@@ -32,4 +32,4 @@ namespace Microsoft.VisualStudio.Utilities
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/ChangeBrushes.cs b/src/Editor/Text/Util/TextUIUtil/ChangeBrushes.cs
new file mode 100644
index 0000000..e527d11
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/ChangeBrushes.cs
@@ -0,0 +1,34 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ using System.Collections.Generic;
+ using Microsoft.VisualStudio.Text.Document;
+ using Microsoft.VisualStudio.Text.Tagging;
+
+ internal static class ChangeBrushes
+ {
+ public static NormalizedSnapshotSpanCollection[] GetUnifiedChanges(ITextSnapshot snapshot, IEnumerable<IMappingTagSpan<ChangeTag>> tags)
+ {
+ List<Span>[] unnormalizedChanges = new List<Span>[4] { null,
+ new List<Span>(),
+ new List<Span>(),
+ new List<Span>()
+ };
+ foreach (IMappingTagSpan<ChangeTag> change in tags)
+ {
+ int type = (int)(change.Tag.ChangeTypes & (ChangeTypes.ChangedSinceOpened | ChangeTypes.ChangedSinceSaved));
+ if (type != 0)
+ unnormalizedChanges[type].AddRange((NormalizedSpanCollection)(change.Span.GetSpans(snapshot)));
+ }
+
+ NormalizedSnapshotSpanCollection[] changes = new NormalizedSnapshotSpanCollection[4];
+ for (int i = 1; (i <= 3); ++i)
+ changes[i] = new NormalizedSnapshotSpanCollection(snapshot, unnormalizedChanges[i]);
+
+ return changes;
+ }
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/DefaultStatusBarService.cs b/src/Editor/Text/Util/TextUIUtil/DefaultStatusBarService.cs
new file mode 100644
index 0000000..f604b55
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/DefaultStatusBarService.cs
@@ -0,0 +1,15 @@
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ [ExportImplementation(typeof(IStatusBarService))]
+ [Name("default")]
+ internal class DefaultStatusBarService : IStatusBarService
+ {
+ public Task SetTextAsync(string text)
+ {
+ return Task.CompletedTask;
+ }
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/DefaultUIThreadOperationExecutor.cs b/src/Editor/Text/Util/TextUIUtil/DefaultUIThreadOperationExecutor.cs
index c6c349d..4067a15 100644
--- a/src/Editor/Text/Util/TextUIUtil/DefaultUIThreadOperationExecutor.cs
+++ b/src/Editor/Text/Util/TextUIUtil/DefaultUIThreadOperationExecutor.cs
@@ -37,4 +37,4 @@ namespace Microsoft.VisualStudio.UI.Text.Commanding.Implementation
{
}
}
-} \ No newline at end of file
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/DifferenceBrushManager.cs b/src/Editor/Text/Util/TextUIUtil/DifferenceBrushManager.cs
new file mode 100644
index 0000000..8773c20
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/DifferenceBrushManager.cs
@@ -0,0 +1,119 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+using System;
+using System.Linq;
+using System.Windows.Media;
+using Microsoft.VisualStudio.Text.Classification;
+using Microsoft.VisualStudio.Text.Editor;
+
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ class DifferenceBrushManager
+ {
+ public static DifferenceBrushManager GetBrushManager(ITextView3 view, IEditorFormatMapService formatMapService)
+ {
+ return view.Properties.GetOrCreateSingletonProperty(() => new DifferenceBrushManager(view, formatMapService.GetEditorFormatMap(view)));
+ }
+
+ public static DifferenceBrushManager GetBrushManager(ITextView3 view, IEditorFormatMap formatMap)
+ {
+ return view.Properties.GetOrCreateSingletonProperty(() => new DifferenceBrushManager(view, formatMap));
+ }
+
+ // internal for unit testing
+ internal static readonly SolidColorBrush _defaultRemovedLineBrush = Brushes.PaleVioletRed;
+ internal static readonly SolidColorBrush _defaultAddedLineBrush = Brushes.LightYellow;
+ internal static readonly SolidColorBrush _defaultRemovedWordBrush = Brushes.Red;
+ internal static readonly SolidColorBrush _defaultAddedWordBrush = Brushes.Yellow;
+
+ IEditorFormatMap _formatMap;
+
+ #region Public properties (brushes) and changed event
+
+ public Brush RemovedLineBrush { get; private set; }
+ public Brush AddedLineBrush { get; private set; }
+
+ public Brush RemovedWordBrush { get; private set; }
+ public Brush RemovedWordForegroundBrush { get; private set; }
+ public Pen RemovedWordForegroundPen { get; private set; }
+ public Brush AddedWordBrush { get; private set; }
+ public Brush AddedWordForegroundBrush { get; private set; }
+ public Pen AddedWordForegroundPen { get; private set; }
+
+ public Brush ViewportBrush { get; private set; }
+ public Pen ViewportPen { get; private set; }
+ public Brush OverviewBrush { get; private set; }
+
+ public event EventHandler<EventArgs> BrushesChanged;
+
+ #endregion
+
+ internal DifferenceBrushManager(ITextView3 view, IEditorFormatMap formatMap)
+ {
+ _formatMap = formatMap;
+
+ InitializeBrushes();
+
+ _formatMap.FormatMappingChanged += FormatMapChanged;
+ view.Closed += (s,a) => { _formatMap.FormatMappingChanged -= FormatMapChanged; };
+ }
+
+ void InitializeBrushes()
+ {
+ RemovedLineBrush = GetBrushValue("deltadiff.remove.line", _defaultRemovedLineBrush);
+ RemovedWordBrush = GetBrushValue("deltadiff.remove.word", _defaultRemovedWordBrush);
+ RemovedWordForegroundBrush = GetBrushValue("deltadiff.remove.word", _defaultRemovedWordBrush, EditorFormatDefinition.ForegroundBrushId);
+ RemovedWordForegroundPen = new Pen(RemovedWordForegroundBrush, 2.0);
+ RemovedWordForegroundPen.Freeze();
+
+ AddedLineBrush = GetBrushValue("deltadiff.add.line", _defaultAddedLineBrush);
+ AddedWordBrush = GetBrushValue("deltadiff.add.word", _defaultAddedWordBrush);
+ AddedWordForegroundBrush = GetBrushValue("deltadiff.add.word", _defaultAddedWordBrush, EditorFormatDefinition.ForegroundBrushId);
+ AddedWordForegroundPen = new Pen(AddedWordForegroundBrush, 2.0);
+ AddedWordForegroundPen.Freeze();
+
+ ViewportBrush = GetBrushValue("deltadiff.overview.color", Brushes.DarkGray, EditorFormatDefinition.ForegroundBrushId);
+ ViewportPen = new Pen(ViewportBrush, 2.0);
+ ViewportPen.Freeze();
+
+ OverviewBrush = GetBrushValue("deltadiff.overview.color", Brushes.Gray);
+
+ var temp = BrushesChanged;
+ if (temp != null)
+ temp(this, EventArgs.Empty);
+ }
+
+ Brush GetBrushValue(string formatName, Brush defaultValue, string resource = EditorFormatDefinition.BackgroundBrushId)
+ {
+ var formatProperties = _formatMap.GetProperties(formatName);
+ if (formatProperties != null && formatProperties.Contains(resource))
+ {
+ var brushValue = formatProperties[resource] as Brush;
+ if (brushValue != null)
+ return brushValue;
+ }
+
+ return defaultValue;
+ }
+
+ void FormatMapChanged(object sender, FormatItemsEventArgs e)
+ {
+ bool updateRequired = e.ChangedItems.Any(item =>
+ string.Equals(item, "deltadiff.add.word", System.StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(item, "deltadiff.add.line", System.StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(item, "deltadiff.remove.word", System.StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(item, "deltadiff.remove.line", System.StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(item, "deltadiff.overview.color", System.StringComparison.OrdinalIgnoreCase));
+
+ if (updateRequired)
+ {
+ InitializeBrushes();
+ }
+ }
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/ExtensionMethods.cs b/src/Editor/Text/Util/TextUIUtil/ExtensionMethods.cs
index 4d93bce..9c1ba00 100644
--- a/src/Editor/Text/Util/TextUIUtil/ExtensionMethods.cs
+++ b/src/Editor/Text/Util/TextUIUtil/ExtensionMethods.cs
@@ -81,7 +81,7 @@ namespace Microsoft.VisualStudio.Text.MultiSelection
//The indentation specified by the smart indent service is desired column position of the caret. Find out how much virtual space
//need to be at the end of the line to satisfy that.
// TODO: need a way to determine column width in xplat scenarios, bug https://devdiv.visualstudio.com/DevDiv/_workitems/edit/637741
- double columnWidth = 7;
+ double columnWidth = (textView is ITextView3 textView3) ? textView3.FormattedLineSource.ColumnWidth : throw new NotSupportedException();
indentationWidth = Math.Max(0.0, (((double)indentation.Value) * columnWidth - textLine.TextWidth));
// if the coordinate is specified by the user and the user has selected a coordinate to the left
diff --git a/src/Editor/Text/Util/TextUIUtil/IDragDropMouseProcessor.cs b/src/Editor/Text/Util/TextUIUtil/IDragDropMouseProcessor.cs
new file mode 100644
index 0000000..185f0a8
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/IDragDropMouseProcessor.cs
@@ -0,0 +1,27 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ using System.Windows;
+ using System.Windows.Input;
+
+ /// <summary>
+ /// This interface is a used as an abstraction of the DragDropMouseProcessor so that it can be called from the left margin
+ /// to handle drag/drop.
+ /// </summary>
+ public interface IDragDropMouseProcessor
+ {
+ void DoPreprocessMouseLeftButtonDown(MouseButtonEventArgs e, Point position);
+ void DoPreprocessMouseLeftButtonUp(MouseButtonEventArgs e, Point position);
+ void DoPostprocessMouseLeftButtonUp(MouseButtonEventArgs e, Point position);
+ void DoPreprocessMouseMove(MouseEventArgs e, Point position);
+ void DoPreprocessDrop(DragEventArgs e, Point position);
+ void DoPreprocessDragEnter(DragEventArgs e, Point position);
+ void DoPreprocessDragLeave(DragEventArgs e);
+ void DoPreprocessDragOver(DragEventArgs e, Point position);
+ void DoPreprocessQueryContinueDrag(QueryContinueDragEventArgs e);
+ void DoPostprocessMouseLeave(MouseEventArgs e);
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Util/TextUIUtil/IOrderableContentTypeAndTextViewRoleMetadata.cs b/src/Editor/Text/Util/TextUIUtil/IOrderableContentTypeAndTextViewRoleMetadata.cs
new file mode 100644
index 0000000..8f24867
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/IOrderableContentTypeAndTextViewRoleMetadata.cs
@@ -0,0 +1,15 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ /// <summary>
+ /// Metadata which includes Ordering, Content Types and Text View Roles
+ /// </summary>
+ public interface IOrderableContentTypeAndTextViewRoleMetadata : IContentTypeAndTextViewRoleMetadata, IOrderable
+ {
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/IScrollMap2.cs b/src/Editor/Text/Util/TextUIUtil/IScrollMap2.cs
new file mode 100644
index 0000000..3f02d06
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/IScrollMap2.cs
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ using Microsoft.VisualStudio.Text.Editor;
+
+ /// <summary>
+ /// <para>Defines the mapping between character positions and scrollmap coordinates. This is not
+ /// the same as the coordinate system in which the scrollbar is rendered.</para>
+ /// </summary>
+ /// <remarks>
+ /// <para>Valid text positions range are [0...TextView.TextSnapshot.Length].</para>
+ /// <para>Corresponding scrollmap coordinates are [0.0 ... CoordinateOfBufferEnd].</para>
+ /// <para>Not every buffer position will have a distinct scrollmap coordinate. For example, every character on the same line of text will,
+ /// generally, have the same scrollmap coordinate.</para>
+ /// <para>Different scrollmap coordinates may map to the same buffer position. For example, scrollmap coordinates in the range [0.0, 1.0) will, generally,
+ /// map to the first character of the buffer.</para>
+ /// </remarks>
+ public interface IScrollMap2 : IScrollMap
+ {
+ void GetThumbTopAndBottom(out double thumbTop, out double thumbBottom);
+
+ void ScrollToCoordinate(double coordinate);
+ void CenterOnCoordinate(double coordinate);
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/Markers.cs b/src/Editor/Text/Util/TextUIUtil/Markers.cs
new file mode 100644
index 0000000..186c0a3
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/Markers.cs
@@ -0,0 +1,78 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics;
+ using System.Windows;
+ using System.Windows.Media;
+ using Microsoft.VisualStudio.Text;
+ using Microsoft.VisualStudio.Text.Editor;
+ using Microsoft.VisualStudio.Text.Formatting;
+
+ internal static class Markers
+ {
+ // pad the bottom part by 1 pixel to take advantage of the extra 1 pixel that's available in the default
+ // line transform at the bottom of each line
+ public readonly static Thickness SingleLinePadding = new Thickness(0.0, 0.0, 0.0, 1.0);
+ public readonly static Thickness MultiLinePadding = new Thickness(0.0);
+
+ public static bool MarkerGeometrySpansMultipleLines(ITextViewLineCollection collection, SnapshotSpan bufferSpan)
+ {
+ ITextViewLine start = collection.GetTextViewLineContainingBufferPosition(bufferSpan.Start);
+
+ return (start == null || bufferSpan.End > start.EndIncludingLineBreak);
+ }
+
+
+ //use double.MinValue/double.MaxValue for leftClip & rightClip to avoid clipping.
+ public static IList<Rect> GetRectanglesFromBounds(IList<TextBounds> bounds, Thickness padding, double leftClip, double rightClip, bool useTextBounds)
+ {
+ Debug.Assert(bounds != null);
+
+ List<Rect> newBounds = new List<Rect>(bounds.Count);
+ foreach (var b in bounds)
+ {
+ double x1 = Math.Max(leftClip, b.Left - padding.Left);
+ double x2 = Math.Min(rightClip, b.Right + padding.Right);
+ if (x1 < x2)
+ {
+ double y1 = (useTextBounds ? b.TextTop : b.Top) - padding.Top;
+ double y2 = (useTextBounds ? b.TextBottom : b.Bottom) + padding.Bottom;
+
+ newBounds.Add(new Rect(x1, y1, x2 - x1, y2 - y1));
+ }
+ }
+
+ return newBounds;
+ }
+
+ public static Geometry GetMarkerGeometryFromRectangles(IList<Rect> rectangles)
+ {
+ Debug.Assert(rectangles != null);
+
+ if (rectangles.Count == 0)
+ return null;
+
+ // Set up the initial geometry
+ PathGeometry geometry = new PathGeometry();
+ geometry.FillRule = FillRule.Nonzero;
+
+ foreach (var rectangle in rectangles)
+ {
+ geometry.AddGeometry(new RectangleGeometry(rectangle));
+ }
+ geometry.Freeze();
+
+ if (rectangles.Count > 1)
+ {
+ geometry = geometry.GetOutlinedPathGeometry();
+ geometry.Freeze();
+ }
+ return geometry;
+ }
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/MultiSelectionMouseState.cs b/src/Editor/Text/Util/TextUIUtil/MultiSelectionMouseState.cs
new file mode 100644
index 0000000..a18587c
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/MultiSelectionMouseState.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Text.Editor;
+using Microsoft.VisualStudio.Text.MultiSelection;
+
+namespace Microsoft.VisualStudio.Text.UI.Utilities
+{
+ public class MultiSelectionMouseState
+ {
+ public static MultiSelectionMouseState GetStateForView(ITextView textView)
+ {
+ return textView.Properties.GetOrCreateSingletonProperty(() =>
+ {
+ return new MultiSelectionMouseState(textView);
+ });
+ }
+
+ private MultiSelectionMouseState(ITextView textView)
+ {
+ _textView = textView;
+ textView.LayoutChanged += OnLayoutChanged;
+ }
+
+ private void OnLayoutChanged(object sender, TextViewLayoutChangedEventArgs e)
+ {
+ if (_provisionalSelection != Selection.Invalid)
+ {
+ _provisionalSelection = _provisionalSelection.MapToSnapshot(e.NewSnapshot, _textView);
+ }
+ }
+
+ private Selection _provisionalSelection = Selection.Invalid;
+ private ITextView _textView;
+
+ public Selection ProvisionalSelection
+ {
+ get
+ {
+ return _provisionalSelection;
+ }
+ set
+ {
+ if (_provisionalSelection != value)
+ {
+ _provisionalSelection = value;
+ FireProvisionalSelectionChanged();
+ }
+ }
+ }
+
+ public event EventHandler ProvisionalSelectionChanged;
+
+ private void FireProvisionalSelectionChanged()
+ {
+ ProvisionalSelectionChanged?.Invoke(this, EventArgs.Empty);
+ }
+
+ public bool UserIsDraggingSelection { get; set; } = false;
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/PerformanceBlockMarker.cs b/src/Editor/Text/Util/TextUIUtil/PerformanceBlockMarker.cs
new file mode 100644
index 0000000..13dd4fc
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/PerformanceBlockMarker.cs
@@ -0,0 +1,72 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ [Export]
+ [PartCreationPolicy(CreationPolicy.Shared)]
+ internal sealed class PerformanceBlockMarker
+ {
+ [ImportMany]
+ private List<Lazy<IPerformanceMarkerBlockProvider>> _performanceMarkerBlockProviders = null;
+
+ internal IDisposable CreateBlock(string blockName)
+ {
+ // Unit tests case
+ if (_performanceMarkerBlockProviders == null || _performanceMarkerBlockProviders.Count == 0)
+ {
+ return new Block();
+ }
+
+ // Optimize for the most common case
+ if (_performanceMarkerBlockProviders.Count == 1)
+ {
+ IDisposable block = _performanceMarkerBlockProviders[0].Value?.CreateBlock(blockName);
+ if (block != null)
+ {
+ return block;
+ }
+ }
+
+ var providedBlocks = new FrugalList<IDisposable>();
+ for (int i = 0; i < _performanceMarkerBlockProviders.Count; i++)
+ {
+ providedBlocks.Add(_performanceMarkerBlockProviders[i].Value?.CreateBlock(blockName));
+ }
+
+ return new Block(providedBlocks);
+ }
+
+ private class Block : IDisposable
+ {
+ private readonly FrugalList<IDisposable> _markers;
+
+ public Block(FrugalList<IDisposable> markers)
+ {
+ _markers = markers;
+ }
+
+ public Block()
+ {
+ }
+
+ public void Dispose()
+ {
+ if (_markers == null)
+ {
+ return;
+ }
+
+ foreach (var marker in _markers)
+ {
+ marker?.Dispose();
+ }
+ }
+ }
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/StatusBarService.cs b/src/Editor/Text/Util/TextUIUtil/StatusBarService.cs
new file mode 100644
index 0000000..77b6b23
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/StatusBarService.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Microsoft.VisualStudio.Text.UI.Utilities
+{
+ [Export(typeof(IStatusBarService))]
+ internal class StatusBarService : BaseProxyService<IStatusBarService>, IStatusBarService
+ {
+ [ImportImplementations(typeof(IStatusBarService))]
+ protected override IEnumerable<Lazy<IStatusBarService, IOrderable>> UnorderedImplementations { get; set; }
+
+ public Task SetTextAsync(string text)
+ {
+ return BestImplementation.SetTextAsync(text);
+ }
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/Strings.Designer.cs b/src/Editor/Text/Util/TextUIUtil/Strings.Designer.cs
new file mode 100644
index 0000000..938895a
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/Strings.Designer.cs
@@ -0,0 +1,279 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Microsoft.VisualStudio.Text.Utilities {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ public class Strings {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Strings() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.VisualStudio.Text.UI.Utilities.Strings", typeof(Strings).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to backslash.
+ /// </summary>
+ public static string Backslash {
+ get {
+ return ResourceManager.GetString("Backslash", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to capital.
+ /// </summary>
+ public static string Capital {
+ get {
+ return ResourceManager.GetString("Capital", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to We don&apos;t support child elements in Text yet..
+ /// </summary>
+ public static string ChildElementsNotSupported {
+ get {
+ return ResourceManager.GetString("ChildElementsNotSupported", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to colon.
+ /// </summary>
+ public static string Colon {
+ get {
+ return ResourceManager.GetString("Colon", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to comma.
+ /// </summary>
+ public static string Comma {
+ get {
+ return ResourceManager.GetString("Comma", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to double quote.
+ /// </summary>
+ public static string DoubleQuote {
+ get {
+ return ResourceManager.GetString("DoubleQuote", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to empty line.
+ /// </summary>
+ public static string EmptyLine {
+ get {
+ return ResourceManager.GetString("EmptyLine", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The Visual Studio text editor only supports movements by word, character, document and line..
+ /// </summary>
+ public static string InvalidTextMovementUnit {
+ get {
+ return ResourceManager.GetString("InvalidTextMovementUnit", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to left angled bracket.
+ /// </summary>
+ public static string LeftAngledBracket {
+ get {
+ return ResourceManager.GetString("LeftAngledBracket", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to left curly brace.
+ /// </summary>
+ public static string LeftCurlyBrace {
+ get {
+ return ResourceManager.GetString("LeftCurlyBrace", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to left parenthesis.
+ /// </summary>
+ public static string LeftParenthesis {
+ get {
+ return ResourceManager.GetString("LeftParenthesis", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to left square bracket.
+ /// </summary>
+ public static string LeftSquareBracket {
+ get {
+ return ResourceManager.GetString("LeftSquareBracket", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to period.
+ /// </summary>
+ public static string Period {
+ get {
+ return ResourceManager.GetString("Period", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to question mark.
+ /// </summary>
+ public static string QuestionMark {
+ get {
+ return ResourceManager.GetString("QuestionMark", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Supplied range is not valid..
+ /// </summary>
+ public static string RangeNotValid {
+ get {
+ return ResourceManager.GetString("RangeNotValid", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to right angled bracket.
+ /// </summary>
+ public static string RightAngledBracket {
+ get {
+ return ResourceManager.GetString("RightAngledBracket", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to right curly brace.
+ /// </summary>
+ public static string RightCurlyBrace {
+ get {
+ return ResourceManager.GetString("RightCurlyBrace", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to right parenthesis.
+ /// </summary>
+ public static string RightParenthesis {
+ get {
+ return ResourceManager.GetString("RightParenthesis", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to right square bracket.
+ /// </summary>
+ public static string RightSquareBracket {
+ get {
+ return ResourceManager.GetString("RightSquareBracket", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to semicolon.
+ /// </summary>
+ public static string Semicolon {
+ get {
+ return ResourceManager.GetString("Semicolon", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to single quote.
+ /// </summary>
+ public static string SingleQuote {
+ get {
+ return ResourceManager.GetString("SingleQuote", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to slash.
+ /// </summary>
+ public static string Slash {
+ get {
+ return ResourceManager.GetString("Slash", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Supplied target range is not valid..
+ /// </summary>
+ public static string TargetRangeNotValid {
+ get {
+ return ResourceManager.GetString("TargetRangeNotValid", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The Visual Studio text editor does not support search based on text formatting attributes..
+ /// </summary>
+ public static string UnsupportedSearchBasedOnTextFormatted {
+ get {
+ return ResourceManager.GetString("UnsupportedSearchBasedOnTextFormatted", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/Strings.resx b/src/Editor/Text/Util/TextUIUtil/Strings.resx
new file mode 100644
index 0000000..1811dbb
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/Strings.resx
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="Backslash" xml:space="preserve">
+ <value>backslash</value>
+ <comment>Used to represent \ in code for accessibility readers</comment>
+ </data>
+ <data name="Capital" xml:space="preserve">
+ <value>capital</value>
+ <comment>Used to signify an upper case letter, e.g. C as capital c, used for accessibility readers</comment>
+ </data>
+ <data name="ChildElementsNotSupported" xml:space="preserve">
+ <value>We don't support child elements in Text yet.</value>
+ </data>
+ <data name="Colon" xml:space="preserve">
+ <value>colon</value>
+ <comment>Used to represent : in code for accessibility readers</comment>
+ </data>
+ <data name="Comma" xml:space="preserve">
+ <value>comma</value>
+ <comment>Used to represent , in code for accessibility readers</comment>
+ </data>
+ <data name="DoubleQuote" xml:space="preserve">
+ <value>double quote</value>
+ <comment>Used to represent " in code for accessibility readers</comment>
+ </data>
+ <data name="EmptyLine" xml:space="preserve">
+ <value>empty line</value>
+ <comment>Used for screen readers to read "empty line" when the line is empty or contains white spaces only</comment>
+ </data>
+ <data name="InvalidTextMovementUnit" xml:space="preserve">
+ <value>The Visual Studio text editor only supports movements by word, character, document and line.</value>
+ <comment>Error message shown to the user when they try to move the caret by a text unit other than word, line, document or character using automation clients.</comment>
+ </data>
+ <data name="LeftAngledBracket" xml:space="preserve">
+ <value>left angled bracket</value>
+ <comment>Used to represent &lt; in code for accessibility readers</comment>
+ </data>
+ <data name="LeftCurlyBrace" xml:space="preserve">
+ <value>left curly brace</value>
+ <comment>Used to represent { in code for accessibility readers</comment>
+ </data>
+ <data name="LeftParenthesis" xml:space="preserve">
+ <value>left parenthesis</value>
+ <comment>Used to represent ( in code for accessibility readers</comment>
+ </data>
+ <data name="LeftSquareBracket" xml:space="preserve">
+ <value>left square bracket</value>
+ <comment>Used to represent [ in code for accessibility readers</comment>
+ </data>
+ <data name="Period" xml:space="preserve">
+ <value>dot</value>
+ <comment>Used to represent . in code for accessibility readers</comment>
+ </data>
+ <data name="QuestionMark" xml:space="preserve">
+ <value>question mark</value>
+ <comment>Used to represent ? in code for accessibility readers</comment>
+ </data>
+ <data name="RangeNotValid" xml:space="preserve">
+ <value>Supplied range is not valid.</value>
+ </data>
+ <data name="RightAngledBracket" xml:space="preserve">
+ <value>right angled bracket</value>
+ <comment>Used to represent &gt; in code for accessibility readers</comment>
+ </data>
+ <data name="RightCurlyBrace" xml:space="preserve">
+ <value>right curly brace</value>
+ <comment>Used to represent } in code for accessibility readers</comment>
+ </data>
+ <data name="RightParenthesis" xml:space="preserve">
+ <value>right parenthesis</value>
+ <comment>Used to represent ) in code for accessibility readers</comment>
+ </data>
+ <data name="RightSquareBracket" xml:space="preserve">
+ <value>right square bracket</value>
+ <comment>Used to represent ] in code for accessibility readers</comment>
+ </data>
+ <data name="Semicolon" xml:space="preserve">
+ <value>semicolon</value>
+ <comment>Used to represent ; in code for accessibility readers</comment>
+ </data>
+ <data name="SingleQuote" xml:space="preserve">
+ <value>single quote</value>
+ <comment>Used to represent ' in code for accessibility readers</comment>
+ </data>
+ <data name="Slash" xml:space="preserve">
+ <value>slash</value>
+ <comment>Used to represent / in code for accessibility readers</comment>
+ </data>
+ <data name="TargetRangeNotValid" xml:space="preserve">
+ <value>Supplied target range is not valid.</value>
+ </data>
+ <data name="UnsupportedSearchBasedOnTextFormatted" xml:space="preserve">
+ <value>The Visual Studio text editor does not support search based on text formatting attributes.</value>
+ <comment>Error message shown to the user when they try to search for some text based on its formatting attributes through an automation client.</comment>
+ </data>
+</root> \ No newline at end of file
diff --git a/src/Editor/Text/Util/TextUIUtil/TelemetryLogger.cs b/src/Editor/Text/Util/TextUIUtil/TelemetryLogger.cs
new file mode 100644
index 0000000..55871e4
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/TelemetryLogger.cs
@@ -0,0 +1,126 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using System.ComponentModel.Composition;
+using System.Windows.Threading;
+
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ [Export]
+ [PartCreationPolicy(CreationPolicy.Shared)]
+ internal sealed class TelemetryLogger
+ {
+ // This import may fail if we are running outside of VS, in scenarios such as CodeFlow. That is ok
+ // and this logging code should gracefully no-op in that case.
+ [Import(AllowDefault = true)]
+ private ILoggingServiceInternal LoggingService { get; set; }
+
+ public const string VSEditorKey = "VS/Editor";
+
+ DispatcherTimer _touchZoomTimer = null;
+ DispatcherTimer _touchScrollTimer = null;
+ DispatcherTimer _zoomTimer = null;
+ DispatcherTimer _scrollTimer = null;
+
+ uint _lastZoomLevel = 0;
+ readonly TimeSpan _timeout = TimeSpan.FromMilliseconds(1000.0);
+
+ public void LogTouchZoom()
+ {
+ if (LoggingService != null)
+ {
+ if (_touchZoomTimer == null)
+ {
+ _touchZoomTimer = new DispatcherTimer();
+ _touchZoomTimer.Interval = _timeout;
+ _touchZoomTimer.Tick += (s, e) =>
+ {
+ _touchZoomTimer.Stop();
+ LoggingService.AdjustCounter(TelemetryLogger.VSEditorKey, "TouchZoom", delta: 1);
+ };
+ }
+
+ // Restart timer
+ _touchZoomTimer.Stop();
+ _touchZoomTimer.Start();
+ }
+ }
+
+ public void LogZoom(uint finalZoomLevel)
+ {
+ if (LoggingService != null)
+ {
+ if (_zoomTimer == null)
+ {
+ _zoomTimer = new DispatcherTimer();
+ _zoomTimer.Interval = _timeout;
+ _zoomTimer.Tick += (s, e) =>
+ {
+ _zoomTimer.Stop();
+ LoggingService.PostEvent("VS/Editor/Zoom", "VS.Editor.Zoom.LastZoomLevel", _lastZoomLevel);
+ };
+ }
+
+ // Restart timer
+ _zoomTimer.Stop();
+
+ // Set _lastZoomLevel between stop and start out of paranoia regarding race conditions that shouldn't
+ // actually occur while using DispatcherTimer, since it runs all on the same thread. However, if the
+ // underlying timer get's changed, and this set were above the stop, there's a chance that we could
+ // occasionally log incorrect data if the set happened, and then tick occurred before the stop.
+ _lastZoomLevel = finalZoomLevel;
+
+ _zoomTimer.Start();
+ }
+ }
+
+ public void LogTouchScroll()
+ {
+ if (LoggingService != null)
+ {
+ if (_touchScrollTimer == null)
+ {
+ _touchScrollTimer = new DispatcherTimer();
+ _touchScrollTimer.Interval = _timeout;
+ _touchScrollTimer.Tick += (s, e) =>
+ {
+ _touchScrollTimer.Stop();
+ LoggingService.AdjustCounter(TelemetryLogger.VSEditorKey, "TouchScroll", delta: 1);
+ };
+ }
+
+ // Restart timer
+ _touchScrollTimer.Stop();
+ _touchScrollTimer.Start();
+ }
+ }
+
+ public void LogScroll()
+ {
+ if (LoggingService != null)
+ {
+ if (_scrollTimer == null)
+ {
+ _scrollTimer = new DispatcherTimer();
+ _scrollTimer.Interval = _timeout;
+ _scrollTimer.Tick += (s, e) =>
+ {
+ _scrollTimer.Stop();
+ LoggingService.AdjustCounter(TelemetryLogger.VSEditorKey, "Scroll", delta: 1);
+ };
+ }
+
+ // Restart timer
+ _scrollTimer.Stop();
+ _scrollTimer.Start();
+ }
+ }
+
+ public void PostCounters()
+ {
+ LoggingService.PostCounters();
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Editor/Text/Util/TextUIUtil/TextUIUtil.csproj b/src/Editor/Text/Util/TextUIUtil/TextUIUtil.csproj
new file mode 100644
index 0000000..91594fb
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/TextUIUtil.csproj
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyName>Microsoft.VisualStudio.Text.UI.Utilities</AssemblyName>
+ <RootNamespace>$(AssemblyName)</RootNamespace>
+ <NoWarn>649;436;618;8073;$(NoWarn)</NoWarn>
+ <AssemblyAttributeClsCompliant>true</AssemblyAttributeClsCompliant>
+ <TargetFramework>$(TargetFramework)</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Runtime" />
+ <Reference Include="UIAutomationClient" />
+ <Reference Include="UIAutomationProvider" />
+ <Reference Include="UIAutomationTypes" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="System.Collections.Immutable" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Core\Def\CoreUtility.csproj" />
+ <ProjectReference Include="..\..\Def\TextData\TextData.csproj" />
+ <ProjectReference Include="..\..\Def\TextLogic\TextLogic.csproj" />
+ <ProjectReference Include="..\..\Def\TextUI\TextUI.csproj" />
+ <ProjectReference Include="..\..\Def\TextUIWpf\TextUIWpf.csproj" />
+ <ProjectReference Include="..\..\Def\Internal\Internal.csproj" />
+ <ProjectReference Include="..\..\Util\TextDataUtil\TextDataUtil.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Update="Strings.resx">
+ <Generator>PublicResXFileCodeGenerator</Generator>
+ <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Update="Strings.Designer.cs">
+ <DesignTime>true</DesignTime>
+ <AutoGen>true</AutoGen>
+ <DependentUpon>Strings.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/Editor/Text/Util/TextUIUtil/TransformedDispatcherCollection.cs b/src/Editor/Text/Util/TextUIUtil/TransformedDispatcherCollection.cs
new file mode 100644
index 0000000..e6cebc6
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/TransformedDispatcherCollection.cs
@@ -0,0 +1,268 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Threading;
+
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ internal class TransformedDispatcherCollection<TSourceCollection, TSourceElement, TTargetElement> : ReadOnlyCollection<TTargetElement>, INotifyCollectionChanged, INotifyPropertyChanged, IWeakEventListener, IDisposable
+ where TSourceCollection : class, IEnumerable<TSourceElement>, INotifyCollectionChanged
+ {
+ #region Fields
+ private readonly Dispatcher dispatcher;
+ private readonly TSourceCollection sourceCollection;
+ private readonly Func<TSourceElement, TTargetElement> setup;
+ private readonly Action<TTargetElement> teardown;
+ private bool disposed;
+ #endregion
+
+ #region Constructors
+ /// <summary>
+ /// Creates a new transformed collection wrapping a source collection.
+ /// </summary>
+ /// <param name="sourceCollection">The source collection that this collection wraps.</param>
+ /// <param name="setup">The logic for creating a transformed element from a source element.</param>
+ /// <param name="teardown">The logic for destroying a transformed element when removed from the transformed collection.</param>
+ public TransformedDispatcherCollection(Dispatcher dispatcher, TSourceCollection sourceCollection, Func<TSourceElement, TTargetElement> setup, Action<TTargetElement> teardown = null) :
+ base(new List<TTargetElement>(sourceCollection.Select(setup)))
+ {
+ ArgumentValidation.NotNull(dispatcher, "dispatcher");
+ ArgumentValidation.NotNull(sourceCollection, "sourceCollection");
+ ArgumentValidation.NotNull(setup, "setup");
+
+ this.setup = setup;
+ this.teardown = teardown;
+
+ this.dispatcher = dispatcher;
+ this.sourceCollection = sourceCollection;
+ CollectionChangedEventManager.AddListener(this.sourceCollection, this);
+ }
+ #endregion
+
+ #region Events
+ /// <summary>
+ /// Occurs when the collection changes.
+ /// </summary>
+ public event NotifyCollectionChangedEventHandler CollectionChanged;
+
+ /// <summary>
+ /// Occurs when a property changes.
+ /// </summary>
+ public event PropertyChangedEventHandler PropertyChanged;
+ #endregion
+
+ #region Public Methods
+ /// <summary>
+ /// Tears down all elements of the transformed collection, clears the transformed collection, and stops listening to change events on the source collection.
+ /// </summary>
+ public void Dispose()
+ {
+ this.Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ bool IWeakEventListener.ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
+ {
+ if (!this.ReceiveWeakEvent(managerType, sender, e))
+ {
+ Debug.Fail("Weak event was not handled");
+ return false;
+ }
+
+ return true;
+ }
+ #endregion
+
+ #region Protected Methods
+ protected TSourceCollection SourceCollection
+ {
+ get
+ {
+ return this.sourceCollection;
+ }
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!this.disposed)
+ {
+ if (disposing)
+ {
+ // Cleanup managed resources
+ CollectionChangedEventManager.RemoveListener(this.sourceCollection, this);
+
+ if (this.teardown != null)
+ {
+ foreach (var target in this.Items)
+ {
+ this.teardown(target);
+ }
+ }
+
+ this.Items.Clear();
+ }
+
+ // Cleanup unmanaged resources
+
+ // Mark the object as disposed
+ this.disposed = true;
+ }
+ }
+
+ protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
+ {
+ if (this.CollectionChanged != null)
+ {
+ this.CollectionChanged(this, e);
+ }
+ }
+
+ protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
+ {
+ if (this.PropertyChanged != null)
+ {
+ this.PropertyChanged(this, e);
+ }
+ }
+
+ protected virtual bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
+ {
+ if (object.ReferenceEquals(sender, this.sourceCollection))
+ {
+ var collectionChangedEventArgs = e as NotifyCollectionChangedEventArgs;
+ if (collectionChangedEventArgs != null)
+ {
+ this.OnSourceCollectionChanged(sender, collectionChangedEventArgs);
+ return true;
+ }
+ }
+
+ return false;
+ }
+ #endregion
+
+ #region Private Methods
+
+ private async void OnSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+ {
+ TSourceElement[] snapshot = null;
+ if (e.Action == NotifyCollectionChangedAction.Reset)
+ {
+ snapshot = this.sourceCollection.ToArray();
+ }
+
+ await CheckAccessInvokeAsync(() => UpdateCollectionOnDispatcherThread(e, snapshot)).ConfigureAwait(false);
+ }
+
+ private void UpdateCollectionOnDispatcherThread(NotifyCollectionChangedEventArgs e, TSourceElement[] newElementsSnapshot)
+ {
+ NotifyCollectionChangedEventArgs collectionChangedEventArgs = null;
+
+ if (e.Action == NotifyCollectionChangedAction.Reset)
+ {
+ if (this.teardown != null)
+ {
+ foreach (var target in this.Items)
+ {
+ this.teardown(target);
+ }
+ }
+
+ this.Items.Clear();
+
+ foreach (var source in newElementsSnapshot)
+ {
+ this.Items.Add(this.setup(source));
+ }
+
+ collectionChangedEventArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset);
+ }
+ else
+ {
+ List<object> oldItems = null;
+ if (e.OldItems != null)
+ {
+ oldItems = new List<object>();
+ for (int i = 0; i < e.OldItems.Count; i++)
+ {
+ TTargetElement target = this.Items[e.OldStartingIndex];
+ oldItems.Add(target);
+
+ if (this.teardown != null)
+ {
+ this.teardown(target);
+ }
+
+ this.Items.RemoveAt(e.OldStartingIndex);
+ }
+ }
+
+ List<object> newItems = null;
+ if (e.NewItems != null)
+ {
+ newItems = new List<object>();
+ for (int i = 0; i < e.NewItems.Count; i++)
+ {
+ TTargetElement target = this.setup((TSourceElement)e.NewItems[i]);
+ newItems.Add(target);
+ this.Items.Insert(i + e.NewStartingIndex, target);
+ }
+ }
+
+ if (e.Action == NotifyCollectionChangedAction.Remove)
+ {
+ collectionChangedEventArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, oldItems, e.OldStartingIndex);
+ }
+ else if (e.Action == NotifyCollectionChangedAction.Add)
+ {
+ collectionChangedEventArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, newItems, e.NewStartingIndex);
+ }
+ else if (e.Action == NotifyCollectionChangedAction.Move)
+ {
+ collectionChangedEventArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, newItems, e.NewStartingIndex, e.OldStartingIndex);
+ }
+ else if (e.Action == NotifyCollectionChangedAction.Replace)
+ {
+ collectionChangedEventArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, newItems, oldItems, e.NewStartingIndex);
+ }
+ }
+
+ this.OnPropertyChanged(new PropertyChangedEventArgs("Count"));
+ this.OnPropertyChanged(new PropertyChangedEventArgs("Item[]"));
+
+ this.OnCollectionChanged(collectionChangedEventArgs);
+ }
+
+ /// <summary>
+ /// Executes the specified action on a thread associated with object's dispatcher.
+ /// This invokes a InvokeAsync on the Dispatcher, does not wait for the action
+ /// to complete -- returns immediately.
+ /// </summary>
+ /// <param name="action">An action to execute.</param>
+ /// <returns>A task that completes when action has completed.</returns>
+ private async Task CheckAccessInvokeAsync(Action action)
+ {
+ ArgumentValidation.NotNull(action, "action");
+
+ if (this.dispatcher.CheckAccess())
+ {
+ action();
+ }
+ else
+ {
+ await this.dispatcher.InvokeAsync(action, DispatcherPriority.Normal);
+ }
+ }
+ #endregion
+ }
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/UIExtensionSelector.cs b/src/Editor/Text/Util/TextUIUtil/UIExtensionSelector.cs
index 124c4e8..db336d1 100644
--- a/src/Editor/Text/Util/TextUIUtil/UIExtensionSelector.cs
+++ b/src/Editor/Text/Util/TextUIUtil/UIExtensionSelector.cs
@@ -12,7 +12,7 @@ namespace Microsoft.VisualStudio.Text.Utilities
/// <summary>
/// Helper class to perform ContentType and TextViewRole match against a set of extensions.
/// </summary>
- public static class UIExtensionSelector
+ internal static class UIExtensionSelector
{
/// <summary>
/// Given a list of extensions that provide text view roles, filter the list and return that
@@ -70,7 +70,7 @@ namespace Microsoft.VisualStudio.Text.Utilities
ITextViewRoleSet viewRoles,
Func<TExtensionFactory, TExtensionInstance> getter,
IContentTypeRegistryService contentTypeRegistryService,
- GuardedOperations guardedOperations,
+ IGuardedOperations guardedOperations,
object errorSource)
where TMetadataView : IContentTypeAndTextViewRoleMetadata // both content type and text view role are required
where TExtensionFactory : class
diff --git a/src/Editor/Text/Util/TextUIUtil/UIThreadOperationExecutor.cs b/src/Editor/Text/Util/TextUIUtil/UIThreadOperationExecutor.cs
index 592c814..3e068fd 100644
--- a/src/Editor/Text/Util/TextUIUtil/UIThreadOperationExecutor.cs
+++ b/src/Editor/Text/Util/TextUIUtil/UIThreadOperationExecutor.cs
@@ -31,4 +31,4 @@ namespace Microsoft.VisualStudio.Text.Utilities
return BestImplementation.Execute(executionOptions, action);
}
}
-} \ No newline at end of file
+}
diff --git a/src/Editor/Text/Util/TextUIUtil/VacuousTextViewModel.cs b/src/Editor/Text/Util/TextUIUtil/VacuousTextViewModel.cs
index baf84fa..f7ea58e 100644
--- a/src/Editor/Text/Util/TextUIUtil/VacuousTextViewModel.cs
+++ b/src/Editor/Text/Util/TextUIUtil/VacuousTextViewModel.cs
@@ -14,7 +14,7 @@ namespace Microsoft.VisualStudio.Text.Utilities
/// is the same as the edit buffer, which is in turn the same as the data buffer if no edit buffer is specified.
/// This is the default if no view model provider is specified or if the specified one declines to build a model.
/// </summary>
- public class VacuousTextViewModel : ITextViewModel
+ internal class VacuousTextViewModel : ITextViewModel
{
private ITextDataModel dataModel;
private ITextBuffer editBuffer;
diff --git a/src/Editor/Text/Util/TextUIUtil/WpfHelper.cs b/src/Editor/Text/Util/TextUIUtil/WpfHelper.cs
new file mode 100644
index 0000000..65219ac
--- /dev/null
+++ b/src/Editor/Text/Util/TextUIUtil/WpfHelper.cs
@@ -0,0 +1,853 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+#pragma warning disable 1634, 1691
+
+namespace Microsoft.VisualStudio.Text.Utilities
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics;
+ using System.IO;
+ using System.Runtime.InteropServices;
+ using System.Security;
+ using System.Text;
+ using System.Windows;
+ using System.Windows.Input;
+ using System.Windows.Interop;
+ using System.Windows.Media;
+
+ /// <summary>
+ /// Helpful utilities related to WPF and the windows platform, including input method editor support.
+ /// </summary>
+ public static class WpfHelper
+ {
+ public const int WM_IME_STARTCOMPOSITION = 0x010D;
+ public const int WM_IME_ENDCOMPOSITION = 0x010E;
+ public const int WM_IME_COMPOSITION = 0x010F;
+ public const int WM_IME_SETCONTEXT = 0x0281;
+ public const int WM_IME_NOTIFY = 0x0282;
+ public const int WM_IME_CONTROL = 0x0283;
+ public const int WM_IME_COMPOSITIONFULL = 0x0284;
+ public const int WM_IME_SELECT = 0x0285;
+ public const int WM_IME_CHAR = 0x0286;
+ public const int WM_IME_REQUEST = 0x0288;
+ public const int WM_IME_KEYDOWN = 0x0290;
+
+ public const int WM_KEYDOWN = 0x0100;
+
+ public const int GCS_COMPSTR = 0x0008;
+ public const int GCS_RESULTSTR = 0x0800;
+
+ public const int VK_HANJA = 0x19;
+
+ public const int IMR_RECONVERTSTRING = 0x0004;
+ public const int IMR_CONFIRMRECONVERTSTRING = 0x0005;
+
+ public const int LCID_KOREAN = 1042;
+
+ [ThreadStatic] //Unit tests run each test in its own thread and we can't reused thread managers across threads.
+ static NativeMethods.ITfThreadMgr _threadMgr;
+
+ [ThreadStatic]
+ static bool _threadMgrFailed = false;
+
+ public static readonly double DeviceScaleX;
+ public static readonly double DeviceScaleY;
+
+#pragma warning disable CA1810 // Initialize reference type static fields inline
+ static WpfHelper()
+#pragma warning restore CA1810 // Initialize reference type static fields inline
+ {
+ //Get the device DPI (which can only be changed via a restart so we
+ //can save the result in a static).
+ IntPtr dc = NativeMethods.GetDC(IntPtr.Zero);
+ if (dc != IntPtr.Zero)
+ {
+ const double LogicalDpi = 96.0;
+ DeviceScaleX = LogicalDpi / NativeMethods.GetDeviceCaps(dc, NativeMethods.LOGPIXELSX);
+ DeviceScaleY = LogicalDpi / NativeMethods.GetDeviceCaps(dc, NativeMethods.LOGPIXELSY);
+
+ NativeMethods.ReleaseDC(IntPtr.Zero, dc);
+ }
+ else
+ {
+ DeviceScaleX = 1.0;
+ DeviceScaleY = 1.0;
+ }
+ }
+
+#if false
+ /// <summary>
+ /// Given a point relative to a visual, gets the Screen co-ordinates
+ /// </summary>
+ public static Point GetScreenCoordinates(Point point, Visual relativeTo)
+ {
+ // Validate
+ if (relativeTo == null)
+ throw new ArgumentNullException("relativeTo");
+
+ Visual root = GetRootVisual(relativeTo);
+ Point rootTranslatedPoint = relativeTo.TransformToAncestor(root).Transform(point);
+
+ // Get the Hwnd for this visual
+ HwndSource hwndSource = GetHwndSource(relativeTo);
+ if (hwndSource != null)
+ {
+ NativeMethods.POINT pt = new NativeMethods.POINT();
+ pt.x = (int)rootTranslatedPoint.X;
+ pt.y = (int)rootTranslatedPoint.Y;
+ NativeMethods.ClientToScreen(hwndSource.Handle, ref pt);
+ return new Point(pt.x, pt.y);
+ }
+
+ return rootTranslatedPoint;
+ }
+
+ /// <summary>
+ /// Gets the screen rectangle that contains the point relative to the given visual
+ /// </summary>
+ public static Rect GetScreenRect(Point pt, Visual relativeTo)
+ {
+ // Validate
+ if (relativeTo == null)
+ throw new ArgumentNullException("relativeTo");
+
+ Point screenCoordinates = GetScreenCoordinates(pt, relativeTo);
+ NativeMethods.POINT screenPoint = new NativeMethods.POINT();
+ screenPoint.x = (int)screenCoordinates.X;
+ screenPoint.y = (int)screenCoordinates.Y;
+ IntPtr monitor = NativeMethods.MonitorFromPoint(screenPoint, NativeMethods.MONITOR_DEFAULTTONEAREST);
+
+ NativeMethods.MONITORINFO monitorInfo = new NativeMethods.MONITORINFO();
+ monitorInfo.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(monitorInfo);
+ if (NativeMethods.GetMonitorInfo(monitor, ref monitorInfo))
+ return new Rect(new Point(monitorInfo.rcWork.left, monitorInfo.rcWork.top), new Point(monitorInfo.rcWork.right, monitorInfo.rcWork.bottom));
+ else
+ return SystemParameters.WorkArea;
+ }
+#endif
+ /// <summary>
+ /// Gets the screen rectangle that contains given screen point.
+ /// </summary>
+ public static Rect GetScreenRect(Point screenCoordinates)
+ {
+ NativeMethods.POINT screenPoint = new NativeMethods.POINT();
+ screenPoint.x = (int)screenCoordinates.X;
+ screenPoint.y = (int)screenCoordinates.Y;
+ IntPtr monitor = NativeMethods.MonitorFromPoint(screenPoint, NativeMethods.MONITOR_DEFAULTTONEAREST);
+
+ NativeMethods.MONITORINFO monitorInfo = new NativeMethods.MONITORINFO();
+ monitorInfo.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(monitorInfo);
+ if (NativeMethods.GetMonitorInfo(monitor, ref monitorInfo))
+ return new Rect(new Point(monitorInfo.rcWork.left, monitorInfo.rcWork.top), new Point(monitorInfo.rcWork.right, monitorInfo.rcWork.bottom));
+ else
+ return SystemParameters.WorkArea;
+ }
+
+ /// <summary>
+ /// Determine whether two brushes are equal.
+ /// </summary>
+ /// <param name="brush">The first brush.</param>
+ /// <param name="other">The second brush.</param>
+ /// <returns><c>true</c> if the two are equal, <c>false</c> otherwise.</returns>
+ /// <remarks>internal for testability</remarks>
+ public static bool BrushesEqual(Brush brush, Brush other)
+ {
+ if (brush == null || other == null)
+ {
+ return object.ReferenceEquals(brush, other);
+ }
+ else
+ {
+ if (brush.Opacity == 0 && other.Opacity == 0)
+ return true;
+
+ SolidColorBrush colorBrush1 = brush as SolidColorBrush;
+ SolidColorBrush colorBrush2 = other as SolidColorBrush;
+
+ // If both brushes are SolidColorBrushes check the color of each
+ if (colorBrush1 != null && colorBrush2 != null)
+ {
+ if (colorBrush1.Color.A == 0 && colorBrush2.Color.A == 0)
+ return true;
+
+ return colorBrush1.Color == colorBrush2.Color &&
+ Math.Abs(colorBrush1.Opacity - colorBrush2.Opacity) < 0.01;
+ }
+
+ // as a last resort try brush.Equals (which pretty much is the equivalent of returning false here since
+ // it doesn't compare any of the core properties of brushes)
+ return brush.Equals(other);
+ }
+ }
+
+ public static string GetImmCompositionString(IntPtr immContext, int dwIndex)
+ {
+ if (immContext == IntPtr.Zero)
+ return null;
+
+ // get buffer size
+ int size = NativeMethods.ImmGetCompositionStringW(immContext, dwIndex, null, 0);
+ if (size <= 0)
+ {
+ //If there is no composition string we return
+ return null;
+ }
+
+ //Get the string in an appropriately sized buffer
+ StringBuilder result = new StringBuilder(size / 2); //We get the size in bytes.
+ size = NativeMethods.ImmGetCompositionStringW(immContext, dwIndex, result, size);
+ if (size <= 0)
+ {
+ Debug.Assert(false); //This should never happen? why did we succeed the first time?
+
+ //But handle it gracefully.
+ return null;
+ }
+
+ return result.ToString().Substring(0, size / 2);
+ }
+
+ public static bool ImmNotifyIME(IntPtr immContext, int dwAction, int dwIndex, int dwValue)
+ {
+ return NativeMethods.ImmNotifyIME(immContext, dwAction, dwIndex, dwValue);
+ }
+
+ public static bool HanjaConversion(IntPtr context, IntPtr keyboardLayout, char selection)
+ {
+ const int IME_ESC_HANJA_MODE = 0x1008;
+
+ if (context != IntPtr.Zero)
+ {
+ IntPtr charsPtr = Marshal.StringToHGlobalUni(new string(selection, 1));
+
+ IntPtr hr = NativeMethods.ImmEscapeW(keyboardLayout, context, IME_ESC_HANJA_MODE, charsPtr);
+
+ // Free the allocated memory
+ Marshal.FreeHGlobal(charsPtr);
+
+ if (hr != IntPtr.Zero)
+ return true;
+ }
+
+ return false;
+ }
+
+ private static SnapshotSpan GetSelectionContext(SnapshotSpan selection)
+ {
+ const int padding = 20; //Consistent with Win7 code.
+ SnapshotPoint start = new SnapshotPoint(selection.Snapshot,
+ Math.Max(0, selection.Start.Position - padding));
+ SnapshotPoint end = new SnapshotPoint(selection.Snapshot,
+ Math.Min(selection.Snapshot.Length, selection.End.Position + padding));
+ return new SnapshotSpan(start, end);
+
+ }
+
+ /// <summary>
+ /// Size or fill-in a RECONVERTSTRING structure that contains the selection (with padding)
+ /// </summary>
+ public static IntPtr ReconvertString(IntPtr lParam, SnapshotSpan selection)
+ {
+ SnapshotSpan selectionContext = GetSelectionContext(selection);
+ int sizeofRCS = Marshal.SizeOf(typeof(NativeMethods.RECONVERTSTRING));
+
+ if (lParam != IntPtr.Zero)
+ {
+ NativeMethods.RECONVERTSTRING reconvertString = (NativeMethods.RECONVERTSTRING)(Marshal.PtrToStructure(lParam, typeof(NativeMethods.RECONVERTSTRING)));
+
+ if (selection.Length >= ((reconvertString.dwSize - sizeofRCS) / 2))
+ {
+ //We didn't get space for all the characters we requested.
+ return IntPtr.Zero;
+ }
+
+ Marshal.WriteInt32((IntPtr)((long)lParam + (long)Marshal.OffsetOf(typeof(NativeMethods.RECONVERTSTRING), "dwStrLen")), selectionContext.Length);
+ Marshal.WriteInt32((IntPtr)((long)lParam + (long)Marshal.OffsetOf(typeof(NativeMethods.RECONVERTSTRING), "dwStrOffset")), sizeofRCS);
+
+ Marshal.WriteInt32((IntPtr)((long)lParam + (long)Marshal.OffsetOf(typeof(NativeMethods.RECONVERTSTRING), "dwCompStrLen")), selection.Length);
+ Marshal.WriteInt32((IntPtr)((long)lParam + (long)Marshal.OffsetOf(typeof(NativeMethods.RECONVERTSTRING), "dwCompStrOffset")), (selection.Start.Position - selectionContext.Start.Position) * 2);
+
+ Marshal.WriteInt32((IntPtr)((long)lParam + (long)Marshal.OffsetOf(typeof(NativeMethods.RECONVERTSTRING), "dwTargetStrLen")), selection.Length);
+ Marshal.WriteInt32((IntPtr)((long)lParam + (long)Marshal.OffsetOf(typeof(NativeMethods.RECONVERTSTRING), "dwTargetStrOffset")), (selection.Start.Position - selectionContext.Start.Position) * 2);
+
+ Marshal.Copy(selection.Snapshot.GetText(selectionContext).ToCharArray(), 0, (IntPtr)((long)lParam + (long)sizeofRCS), selectionContext.Length);
+ Marshal.WriteInt16((IntPtr)((long)lParam + (long)(sizeofRCS + (selectionContext.Length * 2))), 0);
+ }
+
+ return new IntPtr(sizeofRCS + ((selectionContext.Length + 1) * 2));
+ }
+
+ /// <summary>
+ /// Generate a selection from a RECONVERTSTRING block.
+ /// </summary>
+ public static SnapshotSpan ConfirmReconvertString(IntPtr lParam, SnapshotSpan selection)
+ {
+ if (lParam != IntPtr.Zero)
+ {
+ SnapshotSpan selectionContext = GetSelectionContext(selection);
+
+ NativeMethods.RECONVERTSTRING reconvertString = (NativeMethods.RECONVERTSTRING)(Marshal.PtrToStructure(lParam, typeof(NativeMethods.RECONVERTSTRING)));
+
+ return new SnapshotSpan(selectionContext.Start + (reconvertString.dwCompStrOffset / 2), reconvertString.dwCompStrLen);
+ }
+
+ return new SnapshotSpan(selection.Snapshot, 0, 0);
+ }
+
+ private static class CompositionFontMapper
+ {
+ private static IDictionary<int, LanguageFontMapping> _languageMap = new Dictionary<int, LanguageFontMapping>(9);
+ private static IDictionary<string, FontSizeMapping> _fontMap = new Dictionary<string, FontSizeMapping>(25);
+ private static IDictionary<string, FontSizeMapping> _consolasFontMap = new Dictionary<string, FontSizeMapping>(6);
+ private static IDictionary<string, FontSizeMapping> _courierNewFontMap = new Dictionary<string, FontSizeMapping>(6);
+
+ static CompositionFontMapper()
+ {
+ LanguageFontMapping simplifiedChinese = new LanguageFontMapping("SimSun", "Microsoft YaHei");
+ LanguageFontMapping traditionalChinese = new LanguageFontMapping("MingLiU", "Microsoft JhengHei");
+ LanguageFontMapping japanese = new LanguageFontMapping("MS Gothic", "Meiryo");
+
+ _languageMap.Add(0x0004, simplifiedChinese); //zh-CHS Chinese-China (Simplified)
+ _languageMap.Add(0x0804, simplifiedChinese); //zh-CN Chinese-China
+ _languageMap.Add(0x1004, simplifiedChinese); //zh-SG Chinese-Singapore
+
+ _languageMap.Add(0x7c04, traditionalChinese); //zh-CHT Chinese-China (Traditional)
+ _languageMap.Add(0x0c04, traditionalChinese); //zh-HK Chinese-Hong Kong SAR
+ _languageMap.Add(0x1404, traditionalChinese); //zh-MO Chinese-Macau
+ _languageMap.Add(0x0404, traditionalChinese); //zh-TW Chinese-Taiwan
+
+ _languageMap.Add(0x0011, japanese); //ja Japanese
+ _languageMap.Add(0x0411, japanese); //ja-JP Japanese - Japan
+
+ //This is a map of conversions from a Consolas base font to the specified composition font used in the composition window
+ _consolasFontMap.Add("SimSun", new FontSizeMapping(-2.0, 2.0, -2.0));
+ _consolasFontMap.Add("SimSun-ExtB", new FontSizeMapping(-2.0, 2.0, -2.0));
+ _consolasFontMap.Add("Microsoft YaHei", new FontSizeMapping(1.0, 2.0, 2.0));
+ _consolasFontMap.Add("MingLiU", new FontSizeMapping(-2.0, 2.0, -3.0));
+ _consolasFontMap.Add("Microsoft JhengHei", new FontSizeMapping(2.0, 2.0, 3.0));
+ _consolasFontMap.Add("MS Gothic", new FontSizeMapping(-1.0, 2.0, -2.0));
+ _consolasFontMap.Add("Meiryo", new FontSizeMapping(1.0, 2.0, 4.0));
+
+ //This is a map of conversions from a Courier New base font to the specified composition font used in the composition window
+ _courierNewFontMap.Add("SimSun", new FontSizeMapping(-2.0, 2.0, -3.0));
+ _courierNewFontMap.Add("SimSun-ExtB", new FontSizeMapping(-2.0, 2.0, -3.0));
+ _courierNewFontMap.Add("Microsoft YaHei", new FontSizeMapping(1.0, 2.0, 2.0));
+ _courierNewFontMap.Add("MingLiU", new FontSizeMapping(-2.0, 2.0, -4.0));
+ _courierNewFontMap.Add("Microsoft JhengHei", new FontSizeMapping(2.0, 2.0, 2.0));
+ _courierNewFontMap.Add("MS Gothic", new FontSizeMapping(-1.0, 2.0, -3.0));
+ _courierNewFontMap.Add("Meiryo", new FontSizeMapping(2.0, 2.0, 4.0));
+
+ //This is a map of conversion factors intended for use when the same font is used as the base font and in the composition window
+ //but we'll use it whenever the base font isn't Consola or Courier New.
+ _fontMap.Add("MS Gothic", new FontSizeMapping(0.0, 2.0, 0.0));
+ _fontMap.Add("MS PGothic", new FontSizeMapping(0.0, 2.0, 0.0));
+ _fontMap.Add("MS UI Gothic", new FontSizeMapping(0.0, 2.0, 0.0));
+ _fontMap.Add("Meiryo", new FontSizeMapping(0.0, 2.0, 0.0));
+ _fontMap.Add("Arial Unicode MS", new FontSizeMapping(0.0, 2.0, 0.0));
+ _fontMap.Add("MS Mincho", new FontSizeMapping(0.0, 2.0, 0.0));
+ _fontMap.Add("MS PMincho", new FontSizeMapping(0.0, 2.0, 0.0));
+
+ _fontMap.Add("Dotum", new FontSizeMapping(0.0, 2.0, 1.0));
+ _fontMap.Add("DotumChe", new FontSizeMapping(0.0, 2.0, 1.0));
+ _fontMap.Add("Malgun Gothic", new FontSizeMapping(1.0, 2.0, 0.0));
+ _fontMap.Add("Batang", new FontSizeMapping(0.0, 2.0, -1.0));
+ _fontMap.Add("BatangChe", new FontSizeMapping(0.0, 2.0, -1.0));
+ _fontMap.Add("Gulim", new FontSizeMapping(-1.0, 2.0, -1.0));
+ _fontMap.Add("GulimChe", new FontSizeMapping(-1.0, 2.0, -1.0));
+ _fontMap.Add("Gungsuh", new FontSizeMapping(-1.0, 2.0, -1.0));
+ _fontMap.Add("GungsuhChe", new FontSizeMapping(-1.0, 2.0, -1.0));
+
+ _fontMap.Add("SimSun", new FontSizeMapping(-1.0, 2.0, -2.0));
+ _fontMap.Add("SimSun-ExtB", new FontSizeMapping(-1.0, 2.0, -2.0));
+ _fontMap.Add("NSimSun", new FontSizeMapping(-1.0, 2.0, -2.0));
+ _fontMap.Add("Microsoft YaHei", new FontSizeMapping(-1.0, 2.0, 0.0));
+ _fontMap.Add("SimHei", new FontSizeMapping(-1.0, 2.0, -2.0));
+ _fontMap.Add("KaiTi", new FontSizeMapping(-1.0, 2.0, -1.0));
+ _fontMap.Add("FangSong", new FontSizeMapping(-1.0, 2.0, -2.0));
+
+ _fontMap.Add("MingLiU", new FontSizeMapping(-2.0, 1.0, -3.0));
+ _fontMap.Add("PMingLiU", new FontSizeMapping(-2.0, 1.0, -3.0));
+ _fontMap.Add("Microsoft JhengHei", new FontSizeMapping(-1.0, 2.0, 0.0));
+ }
+
+ public static void GetSizeAdjustments(string baseFont, string compositionFont, out double topPadding, out double bottomPadding, out double heightPadding)
+ {
+ IDictionary<string, FontSizeMapping> map;
+ if (string.Equals(baseFont, "Consolas", StringComparison.Ordinal))
+ map = _consolasFontMap;
+ else if (string.Equals(baseFont, "Courier New", StringComparison.Ordinal))
+ map = _courierNewFontMap;
+ else
+ map = _fontMap;
+
+ FontSizeMapping mapping;
+ if (map.TryGetValue(compositionFont, out mapping))
+ {
+ topPadding = mapping.TopPadding;
+ bottomPadding = mapping.BottomPadding;
+ heightPadding = mapping.HeightPadding;
+ }
+ else
+ {
+ topPadding = 0.0;
+ bottomPadding = 2.0;
+ heightPadding = -2.0;
+ }
+ }
+
+ private struct FontSizeMapping
+ {
+ public readonly double TopPadding;
+ public readonly double BottomPadding;
+ public readonly double HeightPadding;
+
+ public FontSizeMapping(double topPadding, double bottomPadding, double unadjustedHeightPadding)
+ {
+ this.TopPadding = topPadding;
+ this.BottomPadding = bottomPadding;
+ this.HeightPadding = unadjustedHeightPadding - (topPadding + bottomPadding);
+ }
+ }
+
+ private class LanguageFontMapping
+ {
+ public readonly string OldFallbackFont;
+ public readonly string NewFallbackFont;
+
+ public LanguageFontMapping(string oldFallbackFont, string newFallbackFont)
+ {
+ this.OldFallbackFont = oldFallbackFont;
+ this.NewFallbackFont = newFallbackFont;
+ }
+
+ public string GetCompositionFont(int majorVersion)
+ {
+ return (majorVersion >= 6) ? this.NewFallbackFont : this.OldFallbackFont;
+ }
+ }
+ }
+
+ public static IntPtr GetDefaultIMEWnd()
+ {
+ return NativeMethods.ImmGetDefaultIMEWnd(IntPtr.Zero);
+ }
+
+ public static IntPtr GetImmContext(IntPtr hwnd)
+ {
+ if (hwnd != IntPtr.Zero)
+ return NativeMethods.ImmGetContext(hwnd);
+ else
+ return IntPtr.Zero;
+ }
+
+ /// <summary>
+ /// Release the IMM Context.
+ /// </summary>
+ public static bool ReleaseContext(IntPtr hwnd, IntPtr immContext)
+ {
+ if ((hwnd != IntPtr.Zero) && (immContext != IntPtr.Zero))
+ return NativeMethods.ImmReleaseContext(hwnd, immContext);
+ else
+ return false;
+ }
+
+ public static void EnableImmComposition()
+ {
+
+ if (!_threadMgrFailed)
+ {
+ // Create a Thread manager if it doesn't exist
+ if (_threadMgr == null)
+ {
+#pragma warning disable CA1806 // Do not ignore method results
+ NativeMethods.TF_CreateThreadMgr(out _threadMgr);
+#pragma warning restore CA1806 // Do not ignore method results
+ if (_threadMgr == null)
+ {
+ _threadMgrFailed = true;
+ return;
+ }
+ }
+
+ _threadMgr.SetFocus(IntPtr.Zero);
+ }
+ }
+
+ public static IntPtr GetKeyboardLayout()
+ {
+ return NativeMethods.GetKeyboardLayout(0);
+ }
+
+ public static bool ImmIsIME(IntPtr hkl)
+ {
+ return NativeMethods.ImmIsIME(hkl);
+ }
+
+ /// <summary>
+ /// Generate a new FileStream with a unique random name.
+ /// </summary>
+ /// <param name="fileDirectory">Directory where the file will live.</param>
+ /// <param name="filePath">Path to the file created.</param>
+ /// <returns>A file stream with a random file name.</returns>
+ private static FileStream GetRandomFileNameStream(string fileDirectory, out string filePath)
+ {
+ int count = 0;
+ filePath = string.Empty;
+ while (count++ < 2)
+ {
+ string fileName = Path.GetRandomFileName();
+ filePath = Path.Combine(fileDirectory, fileName + "~"); //The ~ suffix hides the temporary file from GIT.
+ if (!File.Exists(filePath))
+ {
+ try
+ {
+ return new FileStream(filePath, FileMode.CreateNew, FileAccess.Write, FileShare.None);
+ }
+ catch (Exception)
+ {
+ Debug.Fail("Creating random file failed.");
+ }
+ }
+ }
+
+ throw new IOException(filePath + " exists");
+ }
+ }
+
+ /// <summary>
+ /// SafeHandle wrapper for the cursor image
+ /// </summary>
+ internal sealed class SafeCursor : SafeHandle
+ {
+ public SafeCursor()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public SafeCursor(IntPtr hCursor)
+ : base(hCursor, true)
+ {
+ }
+
+ public override bool IsInvalid
+ {
+ get
+ {
+ return this.handle == IntPtr.Zero;
+ }
+ }
+
+ protected override bool ReleaseHandle()
+ {
+ return NativeMethods.DestroyCursor(this.handle);
+ }
+ }
+
+
+ [SuppressUnmanagedCodeSecurity]
+ static class NativeMethods
+ {
+ public const int LOGPIXELSX = 88;
+ public const int LOGPIXELSY = 90;
+
+ #region Win32 Interop
+
+ /// <summary>
+ /// A point structure to match the Win32 POINT
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential)]
+ public struct POINT
+ {
+ public int x;
+ public int y;
+ };
+
+ /// <summary>
+ /// A rect structure to match the Win32 RECT
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential)]
+ public struct RECT
+ {
+ public int left;
+ public int top;
+ public int right;
+ public int bottom;
+ };
+
+ /// <summary>
+ /// Win32 MONITORINFO Struct
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential)]
+ public struct MONITORINFO
+ {
+ public int cbSize;
+ public RECT rcMonitor;
+ public RECT rcWork;
+ public int dwFlags;
+ };
+
+ /// <summary>
+ /// Win32 COMPOSITIONFORM struct
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential)]
+ public struct COMPOSITIONFORM
+ {
+ public int dwStyle;
+ public POINT ptCurrentPos;
+ public RECT rcArea;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct RECONVERTSTRING
+ {
+ public int dwSize;
+ public int dwVersion;
+ public int dwStrLen;
+ public int dwStrOffset;
+ public int dwCompStrLen;
+ public int dwCompStrOffset;
+ public int dwTargetStrLen;
+ public int dwTargetStrOffset;
+ }
+
+ /// <summary>
+ /// Win32 LOGFONT struct
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
+ public class LOGFONT
+ {
+ public int lfHeight;
+ public int lfWidth;
+ public int lfEscapement;
+ public int lfOrientation;
+ public int lfWeight;
+ public byte lfItalic;
+ public byte lfUnderline;
+ public byte lfStrikeOut;
+ public byte lfCharSet;
+ public byte lfOutPrecision;
+ public byte lfClipPrecision;
+ public byte lfQuality;
+ public byte lfPitchAndFamily;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string lfFaceName;
+ }
+
+ /// <summary>
+ /// Win32 WINDOWPOS struct
+ /// </summary>
+ [StructLayout(LayoutKind.Sequential)]
+ public class WINDOWPOS
+ {
+ public IntPtr hwnd;
+ public IntPtr hwndInsertAfter;
+ public int x;
+ public int y;
+ public int cx;
+ public int cy;
+ public uint flags;
+ }
+
+ /// <summary></summary>
+ [ComImport]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ [Guid("aa80e801-2021-11d2-93e0-0060b067b86e")]
+ internal interface ITfThreadMgr
+ {
+ // <summary></summary>
+ //HRESULT Activate([out] TfClientId *ptid);
+ /// <SecurityNote>
+ /// Critical: This code calls into an unmanaged COM function which is not
+ /// safe since it elevates
+ /// </SecurityNote>
+ [SecurityCritical]
+ [SuppressUnmanagedCodeSecurity]
+ void Activate(out int clientId);
+
+ // <summary></summary>
+ //HRESULT Deactivate();
+ /// <SecurityNote>
+ /// Critical: This code calls into an unmanaged COM function which is not
+ /// safe since it elevates
+ /// </SecurityNote>
+ [SecurityCritical]
+ [SuppressUnmanagedCodeSecurity]
+ void Deactivate();
+
+ // <summary></summary>
+ //HRESULT CreateDocumentMgr([out] ITfDocumentMgr **ppdim);
+ /// <SecurityNote>
+ /// Critical: This code calls into an unmanaged COM function which is not
+ /// safe since it elevates
+ /// </SecurityNote>
+ [SecurityCritical]
+ [SuppressUnmanagedCodeSecurity]
+ void CreateDocumentMgr(out object docMgr);
+
+ /// <summary></summary>
+ //HRESULT EnumDocumentMgrs([out] IEnumTfDocumentMgrs **ppEnum);
+ void EnumDocumentMgrs(out object enumDocMgrs);
+
+ /// <summary></summary>
+ //HRESULT GetFocus([out] ITfDocumentMgr **ppdimFocus);
+ void GetFocus(out IntPtr docMgr);
+
+ // <summary></summary>
+ //HRESULT SetFocus([in] ITfDocumentMgr *pdimFocus);
+ /// <SecurityNote>
+ /// Critical: This code calls into an unmanaged COM function which is not
+ /// safe since it elevates
+ /// </SecurityNote>
+ [SecurityCritical]
+ [SuppressUnmanagedCodeSecurity]
+ void SetFocus(IntPtr docMgr);
+
+ /// <summary></summary>
+ //HRESULT AssociateFocus([in] HWND hwnd,
+ // [in, unique] ITfDocumentMgr *pdimNew,
+ // [out] ITfDocumentMgr **ppdimPrev);
+ void AssociateFocus(IntPtr hwnd, object newDocMgr, out object prevDocMgr);
+
+ /// <summary></summary>
+ //HRESULT IsThreadFocus([out] BOOL *pfThreadFocus);
+ void IsThreadFocus([MarshalAs(UnmanagedType.Bool)] out bool isFocus);
+
+ //HRESULT GetFunctionProvider([in] REFCLSID clsid,
+ // [out] ITfFunctionProvider **ppFuncProv);
+ /// <summary></summary>
+ /// <SecurityNote>
+ /// Critical: This code calls into an unmanaged COM function which is not
+ /// safe since it elevates
+ /// </SecurityNote>
+ [SecurityCritical]
+ [SuppressUnmanagedCodeSecurity]
+ [PreserveSig]
+ int GetFunctionProvider(ref Guid classId, out object funcProvider);
+
+ /// <summary></summary>
+ //HRESULT EnumFunctionProviders([out] IEnumTfFunctionProviders **ppEnum);
+ void EnumFunctionProviders(out object enumProviders);
+
+ //HRESULT GetGlobalCompartment([out] ITfCompartmentMgr **ppCompMgr);
+ /// <summary></summary>
+ /// <SecurityNote>
+ /// Critical: This code calls into an unmanaged COM function which is not
+ /// safe since it elevates
+ /// </SecurityNote>
+ [SecurityCritical]
+ [SuppressUnmanagedCodeSecurity]
+ void GetGlobalCompartment(out object compartmentMgr);
+ }
+
+ [DllImport("user32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public static extern bool DestroyCursor(IntPtr hCursor);
+
+ [DllImport("user32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int flags);
+
+ [DllImport("User32.dll")]
+ public static extern IntPtr GetDC(IntPtr hwnd);
+
+ [DllImport("user32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool ReleaseDC(IntPtr hWnd, IntPtr hdc);
+
+ [DllImport("Gdi32.dll")]
+ public static extern int GetDeviceCaps(IntPtr hdc, int index);
+
+ [DllImport("user32.dll")]
+ public extern static IntPtr GetKeyboardLayout(int dwThread);
+
+ [DllImport("user32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public extern static bool ClientToScreen(IntPtr hWnd, ref POINT point);
+
+ [DllImport("user32.dll")]
+ public extern static IntPtr MonitorFromWindow(IntPtr hwnd, int dwFlags);
+
+ [DllImport("user32.dll")]
+ public extern static IntPtr MonitorFromPoint(POINT pt, int dwFlags);
+
+ [DllImport("user32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public extern static bool GetMonitorInfo(IntPtr hMonitor, ref MONITORINFO lpmi);
+
+ [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ public static extern IntPtr LoadImage(IntPtr hinst, string lpszName, IMAGE_TYPE uType, int cxDesired, int cyDesired, IMAGE_FORMAT_REQUEST fuLoad);
+
+ [DllImport("msctf.dll")]
+ internal static extern int TF_CreateThreadMgr(out ITfThreadMgr threadMgr);
+
+ [DllImport("imm32.dll")]
+ internal static extern IntPtr ImmGetDefaultIMEWnd(IntPtr hWnd);
+
+ [DllImport("imm32.dll")]
+ internal static extern IntPtr ImmGetContext(IntPtr hWnd);
+
+ [DllImport("imm32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool ImmSetCompositionWindow(IntPtr hIMC, IntPtr ptr);
+
+ [DllImport("imm32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool ImmReleaseContext(IntPtr hWnd, IntPtr hIMC);
+
+ [DllImport("imm32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool ImmSetCompositionFontW(IntPtr hIMC, IntPtr lplf);
+
+ [DllImport("imm32.dll", CharSet = CharSet.Unicode)]
+ [return: MarshalAs(UnmanagedType.I4)]
+ internal static extern int ImmGetCompositionStringW(IntPtr hIMC, int dwIndex, StringBuilder lpBuf, int dwBufLen);
+
+ [DllImport("imm32.dll", CharSet = CharSet.Unicode)]
+ [return: MarshalAs(UnmanagedType.I4)]
+ internal static extern int ImmSetCompositionStringW(IntPtr hIMC, int dwIndex, StringBuilder lpComp, int dwCompLen, StringBuilder lpBuf, int dwBufLen);
+
+ [DllImport("imm32.dll")]
+ internal static extern IntPtr ImmAssociateContext(IntPtr hWnd, IntPtr hIMC);
+
+ [DllImport("imm32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool ImmNotifyIME(IntPtr immContext, int dwAction, int dwIndex, int dwValue);
+
+ [DllImport("imm32.dll", CharSet = CharSet.Unicode)]
+ internal static extern IntPtr ImmEscapeW(IntPtr hkl, IntPtr himc, int esc, IntPtr lpBuf);
+
+ [DllImport("imm32.dll", CharSet = CharSet.Unicode)]
+ internal static extern bool ImmIsIME(IntPtr hkl);
+
+ public const int MONITOR_DEFAULTTONEAREST = 0x00000002;
+ public const int CFS_RECT = 0x0001;
+
+ public enum IMAGE_TYPE
+ {
+ IMAGE_BITMAP = 0,
+ IMAGE_ICON = 1,
+ IMAGE_CURSOR = 2,
+ IMAGE_ENHMETAFILE = 3
+ }
+
+ [Flags]
+ public enum IMAGE_FORMAT_REQUEST
+ {
+ LR_DEFAULTCOLOR = 0x0000,
+ LR_MONOCHROME = 0x0001,
+ LR_COPYRETURNORG = 0x0004,
+ LR_COPYDELETEORG = 0x0008,
+ LR_LOADFROMFILE = 0x0010,
+ LR_DEFAULTSIZE = 0x0040,
+ LR_LOADMAP3DCOLORS = 0x1000,
+ LR_CREATEDIBSECTION = 0x2000,
+ LR_COPYFROMRESOURCE = 0x4000,
+ LR_SHARED = 0x8000
+ }
+
+ #endregion // Win32 Interop
+ }
+}
diff --git a/src/FPF/PresentationCore/System.Windows.TextDecorationCollection.cs b/src/FPF/PresentationCore/System.Windows.TextDecorationCollection.cs
index ebc3301..8eab60f 100644
--- a/src/FPF/PresentationCore/System.Windows.TextDecorationCollection.cs
+++ b/src/FPF/PresentationCore/System.Windows.TextDecorationCollection.cs
@@ -1,6 +1,68 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+
namespace System.Windows
{
- public class TextDecorationCollection : System.Windows.Media.Animation.Animatable
- {
- }
+ public static class TextDecorations
+ {
+ public static TextDecoration Baseline { get; } = new TextDecoration();
+ public static TextDecoration Overline { get; } = new TextDecoration();
+ public static TextDecoration Strikethrough { get; } = new TextDecoration();
+ public static TextDecoration Underline { get; } = new TextDecoration();
+ }
+
+ public sealed class TextDecoration : Animatable
+ {
+ public Pen Pen { get; set; }
+ }
+
+ public sealed class TextDecorationCollection : Animatable, IList<TextDecoration>
+ {
+ readonly List<TextDecoration> textDecorations = new List<TextDecoration>();
+
+ public TextDecoration this[int index]
+ {
+ get => textDecorations[index];
+ set => textDecorations[index] = value;
+ }
+
+ public int Count => textDecorations.Count;
+
+ public bool IsReadOnly => false;
+
+ public void Add(IEnumerable<TextDecoration> textDecorations)
+ => this.textDecorations.AddRange(textDecorations);
+
+ public void Add(TextDecoration textDecoration)
+ => this.textDecorations.Add(textDecoration);
+
+ public void Clear()
+ => textDecorations.Clear();
+
+ public bool Contains(TextDecoration item)
+ => textDecorations.Contains(item);
+
+ public void CopyTo(TextDecoration[] array, int arrayIndex)
+ => textDecorations.CopyTo(array, arrayIndex);
+
+ public int IndexOf(TextDecoration item)
+ => textDecorations.IndexOf(item);
+
+ public void Insert(int index, TextDecoration item)
+ => textDecorations.Insert(index, item);
+
+ public bool Remove(TextDecoration item)
+ => textDecorations.Remove(item);
+
+ public void RemoveAt(int index)
+ => textDecorations.RemoveAt(index);
+
+ public IEnumerator<TextDecoration> GetEnumerator()
+ => ((IList<TextDecoration>)textDecorations).GetEnumerator();
+
+ IEnumerator IEnumerable.GetEnumerator()
+ => ((IList<TextDecoration>)textDecorations).GetEnumerator();
+ }
} \ No newline at end of file