aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Document/ILineTracker.cs
blob: c16128d63fa914ffef078aa13a3481030f4b106a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)

using System;

namespace Tango.Scripting.Editors.Document
{
	/// <summary>
	/// Allows for low-level line tracking.
	/// </summary>
	/// <remarks>
	/// The methods on this interface are called by the TextDocument's LineManager immediately after the document
	/// has changed, *while* the DocumentLineTree is updating.
	/// Thus, the DocumentLineTree may be in an invalid state when these methods are called.
	/// This interface should only be used to update per-line data structures like the HeightTree.
	/// Line trackers must not cause any events to be raised during an update to prevent other code from seeing
	/// the invalid state.
	/// Line trackers may be called while the TextDocument has taken a lock.
	/// You must be careful not to dead-lock inside ILineTracker callbacks.
	/// </remarks>
	public interface ILineTracker
	{
		/// <summary>
		/// Is called immediately before a document line is removed.
		/// </summary>
		void BeforeRemoveLine(DocumentLine line);
		
//		/// <summary>
//		/// Is called immediately after a document line is removed.
//		/// </summary>
//		void AfterRemoveLine(DocumentLine line);
		
		/// <summary>
		/// Is called immediately before a document line changes length.
		/// This method will be called whenever the line is changed, even when the length stays as it is.
		/// The method might be called multiple times for a single line because
		/// a replacement is internally handled as removal followed by insertion.
		/// </summary>
		void SetLineLength(DocumentLine line, int newTotalLength);
		
		/// <summary>
		/// Is called immediately after a line was inserted.
		/// </summary>
		/// <param name="newLine">The new line</param>
		/// <param name="insertionPos">The existing line before the new line</param>
		void LineInserted(DocumentLine insertionPos, DocumentLine newLine);
		
		/// <summary>
		/// Indicates that there were changes to the document that the line tracker was not notified of.
		/// The document is in a consistent state (but the line trackers aren't), and line trackers should
		/// throw away their data and rebuild the document.
		/// </summary>
		void RebuildDocument();
	}
}
/TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> <IsCodedUITest>False</IsCodedUITest> <TestProjectType>UnitTest</TestProjectType> <NuGetPackageImportStamp> </NuGetPackageImportStamp> <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\Build\Core\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>0</WarningLevel> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <PlatformTarget>AnyCPU</PlatformTarget> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\Build\Core\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <HintPath>..\packages\Castle.Core.3.3.0\lib\net45\Castle.Core.dll</HintPath> </Reference> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <HintPath>..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath> </Reference> <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <HintPath>..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> </Reference> <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <HintPath>..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> </Reference> <Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL"> <EmbedInteropTypes>True</EmbedInteropTypes> </Reference> <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <HintPath>..\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath> </Reference> <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <HintPath>..\packages\MSTest.TestFramework.1.1.11\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath> </Reference> <Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.Core" /> <Reference Include="System.Data" /> <Reference Include="System.Data.Entity.Design" /> <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <HintPath>..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <HintPath>..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <HintPath>..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="TestStack.White, Version=0.13.0.0, Culture=neutral, PublicKeyToken=2672efbf3e161801, processorArchitecture=MSIL"> <HintPath>..\packages\TestStack.White.0.13.3\lib\net40\TestStack.White.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> <Compile Include="..\Versioning\GlobalVersionInfo.cs"> <Link>GlobalVersionInfo.cs</Link> </Compile> <Compile Include="ColorCatalogs_TST.cs" /> <Compile Include="DependencyInjection_TST.cs" /> <Compile Include="Logging_TST.cs" /> <Compile Include="MachineStudio_TST.cs" /> <Compile Include="RemoteRunner_TST.cs" /> <Compile Include="SQLExaminer_TST.cs" /> <Compile Include="Temporary_TST.cs" /> <Compile Include="TFS_TST.cs" /> <Compile Include="Outlook_TST.cs" /> <Compile Include="Scripting_TST.cs" /> <Compile Include="Embroidery_TST.cs" /> <Compile Include="Helper.cs" /> <Compile Include="Protobuf_TST.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="DAL_TST.cs" /> <Compile Include="Synchronization_TST.cs" /> <Compile Include="CodeGeneration_TST.cs" /> <Compile Include="ColorLib_TST.cs" /> </ItemGroup> <ItemGroup> <None Include="App.config" /> <None Include="packages.config" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\MachineStudio\Modules\Tango.MachineStudio.ColorLab\Tango.MachineStudio.ColorLab.csproj"> <Project>{4d183aca-552b-4135-ae81-7c5a8e5fc3b1}</Project> <Name>Tango.MachineStudio.ColorLab</Name> </ProjectReference> <ProjectReference Include="..\MachineStudio\Modules\Tango.MachineStudio.Logging\Tango.MachineStudio.Logging.csproj"> <Project>{1674f726-0e66-414f-b9fd-c6f20d7f07c7}</Project> <Name>Tango.MachineStudio.Logging</Name> </ProjectReference> <ProjectReference Include="..\MachineStudio\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj"> <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project> <Name>Tango.MachineStudio.Common</Name> </ProjectReference> <ProjectReference Include="..\Tango.BL\Tango.BL.csproj"> <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> <Name>Tango.BL</Name> </ProjectReference> <ProjectReference Include="..\Tango.CodeGeneration\Tango.CodeGeneration.csproj"> <Project>{caedae94-11ed-473c-888a-268a6d38cd20}</Project> <Name>Tango.CodeGeneration</Name> </ProjectReference> <ProjectReference Include="..\Tango.Core\Tango.Core.csproj"> <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> <Name>Tango.Core</Name> </ProjectReference> <ProjectReference Include="..\Tango.DAL.Local\Tango.DAL.Local.csproj"> <Project>{0e0eef3e-8f4e-4f23-9d19-479fd8d76c12}</Project> <Name>Tango.DAL.Local</Name> </ProjectReference> <ProjectReference Include="..\Tango.DAL.Remote\Tango.DAL.Remote.csproj"> <Project>{38197109-8610-4d3f-92b9-16d48df94d7c}</Project> <Name>Tango.DAL.Remote</Name> </ProjectReference> <ProjectReference Include="..\Tango.Documents\Tango.Documents.csproj"> <Project>{ca87a608-7b17-4c98-88f2-42abee10f4c1}</Project> <Name>Tango.Documents</Name> </ProjectReference> <ProjectReference Include="..\Tango.Integration\Tango.Integration.csproj"> <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project> <Name>Tango.Integration</Name> </ProjectReference> <ProjectReference Include="..\Tango.Logging\Tango.Logging.csproj"> <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project> <Name>Tango.Logging</Name> </ProjectReference> <ProjectReference Include="..\Tango.PMR\Tango.PMR.csproj"> <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> <Name>Tango.PMR</Name> </ProjectReference> <ProjectReference Include="..\Tango.Protobuf\Tango.Protobuf.csproj"> <Project>{40073806-914e-4e78-97ab-fa9639308ebe}</Project> <Name>Tango.Protobuf</Name> </ProjectReference> <ProjectReference Include="..\Tango.Scripting\Tango.Scripting.csproj"> <Project>{401989e7-ae1e-4002-b0ee-9a9f63740b97}</Project> <Name>Tango.Scripting</Name> </ProjectReference> <ProjectReference Include="..\Tango.Settings\Tango.Settings.csproj"> <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project> <Name>Tango.Settings</Name> </ProjectReference> <ProjectReference Include="..\Tango.SQLExaminer\Tango.SQLExaminer.csproj"> <Project>{e1e66ed9-597d-45fa-8048-de90a6930484}</Project> <Name>Tango.SQLExaminer</Name> </ProjectReference> <ProjectReference Include="..\Tango.Synchronization\Tango.Synchronization.csproj"> <Project>{7ada4e86-cad7-4968-a210-3a8a9e5153ab}</Project> <Name>Tango.Synchronization</Name> </ProjectReference> <ProjectReference Include="..\Tango.TFS\Tango.TFS.csproj"> <Project>{998f8471-dc1b-41b6-9d96-354e1b4e7a32}</Project> <Name>Tango.TFS</Name> </ProjectReference> <ProjectReference Include="..\Tango.Transport\Tango.Transport.csproj"> <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> <Name>Tango.Transport</Name> </ProjectReference> <ProjectReference Include="..\Utilities\Tango.DBObservablesGenerator.CLI\Tango.DBObservablesGenerator.CLI.csproj"> <Project>{ebb7cb9f-6af2-456b-a5dd-1b136b605d90}</Project> <Name>Tango.DBObservablesGenerator.CLI</Name> </ProjectReference> </ItemGroup> <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props'))" /> <Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets'))" /> <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" /> </Target> <Import Project="..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" /> <Import Project="..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" /> <ProjectExtensions> <VisualStudio> <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>