introduce configurations as platforms: Net35, Net40 and WithNRefactory

This commit is contained in:
Siegfried Pammer 2014-04-12 14:17:30 +02:00
Родитель 9d5fcfdc13
Коммит a9dc9b7dae
41 изменённых файлов: 184 добавлений и 176 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -3,4 +3,5 @@ obj/
bin/
/Documentation/Help
/packages/AvalonEdit
/packages/AvalonEdit.Sample
/packages/AvalonEdit.Sample
/packages/NUnit.2.6.3

Просмотреть файл

@ -3,7 +3,7 @@
<PropertyGroup>
<ProjectGuid>{13A5B497-BA12-45AE-9033-22620C3153FB}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">Net35</Platform>
<OutputType>WinExe</OutputType>
<RootNamespace>AvalonEdit.Sample</RootNamespace>
<AssemblyName>ICSharpCode.AvalonEdit.Sample</AssemblyName>
@ -16,26 +16,32 @@
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<BaseAddress>4194304</BaseAddress>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'Net35' ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'Net40' ">
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<DefineConstants>DOTNET4</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'WithNRefactory' ">
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<DefineConstants>NREFACTORY</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE;DOTNET4</DefineConstants>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<DefineDebug/>
<DefineTrace/>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
@ -43,29 +49,14 @@
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE;DOTNET4</DefineConstants>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'DebugNet35' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseNet35' ">
<OutputPath>bin\Release\</OutputPath>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<DefineTrace/>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\NRefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj" Condition="$(DefineConstants.Contains('NREFACTORY'))">
<Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
<Name>ICSharpCode.NRefactory</Name>
</ProjectReference>
<Reference Include="PresentationCore">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>

Просмотреть файл

@ -19,11 +19,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
#if NREFACTORY
using ICSharpCode.NRefactory.Editor;
#else
using ICSharpCode.AvalonEdit.Document;
#endif
using ICSharpCode.NRefactory.Editor;
using NUnit.Framework;
namespace ICSharpCode.AvalonEdit.Highlighting

Просмотреть файл

@ -3,7 +3,7 @@
<PropertyGroup>
<ProjectGuid>{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Platform Condition=" '$(Platform)' == '' ">Net40</Platform>
<OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.AvalonEdit</RootNamespace>
<AssemblyName>ICSharpCode.AvalonEdit.Tests</AssemblyName>
@ -23,54 +23,48 @@
</TargetFrameworkProfile>
<NoWin32Manifest>False</NoWin32Manifest>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'Net35' ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'Net40' ">
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<DefineConstants>DOTNET4</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'WithNRefactory' ">
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<DefineConstants>NREFACTORY</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<DefineDebug/>
<DefineTrace/>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
<Prefer32Bit>False</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'DebugNet35' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseNet35' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<DefineTrace/>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<ProjectReference Include="..\..\NRefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj" Condition="$(DefineConstants.Contains('NREFACTORY'))">
<Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
<Name>ICSharpCode.NRefactory</Name>
</ProjectReference>
<Reference Include="nunit.framework">
<HintPath>..\..\..\Tools\NUnit\nunit.framework.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="PresentationCore">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
@ -126,4 +120,7 @@
<ItemGroup>
<Folder Include="Search" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>

Просмотреть файл

@ -51,3 +51,5 @@ using NUnit.Framework;
// Run unit tests on STA thread.
[assembly: RequiresSTA]
namespace ICSharpCode.NRefactory.Editor {}

Просмотреть файл

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.3" targetFramework="net45" />
</packages>

Просмотреть файл

@ -12,35 +12,49 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit.Samp
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
DebugNet35|Any CPU = DebugNet35|Any CPU
ReleaseNet35|Any CPU = ReleaseNet35|Any CPU
Debug|Net40 = Debug|Net40
Debug|Net35 = Debug|Net35
Debug|WithNRefactory = Debug|WithNRefactory
Release|Net40 = Release|Net40
Release|Net35 = Release|Net35
Release|WithNRefactory = Release|WithNRefactory
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Any CPU.Build.0 = Release|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.DebugNet35|Any CPU.ActiveCfg = DebugNet35|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.DebugNet35|Any CPU.Build.0 = DebugNet35|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.ReleaseNet35|Any CPU.ActiveCfg = ReleaseNet35|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.ReleaseNet35|Any CPU.Build.0 = ReleaseNet35|Any CPU
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Release|Any CPU.Build.0 = Release|Any CPU
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.DebugNet35|Any CPU.ActiveCfg = DebugNet35|Any CPU
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.DebugNet35|Any CPU.Build.0 = DebugNet35|Any CPU
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.ReleaseNet35|Any CPU.ActiveCfg = ReleaseNet35|Any CPU
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.ReleaseNet35|Any CPU.Build.0 = ReleaseNet35|Any CPU
{13A5B497-BA12-45AE-9033-22620C3153FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13A5B497-BA12-45AE-9033-22620C3153FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13A5B497-BA12-45AE-9033-22620C3153FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13A5B497-BA12-45AE-9033-22620C3153FB}.Release|Any CPU.Build.0 = Release|Any CPU
{13A5B497-BA12-45AE-9033-22620C3153FB}.DebugNet35|Any CPU.ActiveCfg = DebugNet35|Any CPU
{13A5B497-BA12-45AE-9033-22620C3153FB}.DebugNet35|Any CPU.Build.0 = DebugNet35|Any CPU
{13A5B497-BA12-45AE-9033-22620C3153FB}.ReleaseNet35|Any CPU.ActiveCfg = ReleaseNet35|Any CPU
{13A5B497-BA12-45AE-9033-22620C3153FB}.ReleaseNet35|Any CPU.Build.0 = ReleaseNet35|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Net40.ActiveCfg = Debug|Net40
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Net40.Build.0 = Debug|Net40
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Net35.ActiveCfg = Debug|Net35
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Net35.Build.0 = Debug|Net35
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|WithNRefactory.ActiveCfg = Debug|WithNRefactory
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|WithNRefactory.Build.0 = Debug|WithNRefactory
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Net40.ActiveCfg = Release|Net40
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Net40.Build.0 = Release|Net40
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Net35.ActiveCfg = Release|Net35
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Net35.Build.0 = Release|Net35
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|WithNRefactory.ActiveCfg = Release|WithNRefactory
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|WithNRefactory.Build.0 = Release|WithNRefactory
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Debug|Net40.ActiveCfg = Debug|Net40
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Debug|Net40.Build.0 = Debug|Net40
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Debug|Net35.ActiveCfg = Debug|Net35
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Debug|Net35.Build.0 = Debug|Net35
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Debug|WithNRefactory.ActiveCfg = Debug|WithNRefactory
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Debug|WithNRefactory.Build.0 = Debug|WithNRefactory
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Release|Net40.ActiveCfg = Release|Net40
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Release|Net40.Build.0 = Release|Net40
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Release|Net35.ActiveCfg = Release|Net35
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Release|Net35.Build.0 = Release|Net35
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Release|WithNRefactory.ActiveCfg = Release|WithNRefactory
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}.Release|WithNRefactory.Build.0 = Release|WithNRefactory
{13A5B497-BA12-45AE-9033-22620C3153FB}.Debug|Net40.ActiveCfg = Debug|Net40
{13A5B497-BA12-45AE-9033-22620C3153FB}.Debug|Net40.Build.0 = Debug|Net40
{13A5B497-BA12-45AE-9033-22620C3153FB}.Debug|Net35.ActiveCfg = Debug|Net35
{13A5B497-BA12-45AE-9033-22620C3153FB}.Debug|Net35.Build.0 = Debug|Net35
{13A5B497-BA12-45AE-9033-22620C3153FB}.Debug|WithNRefactory.ActiveCfg = Debug|WithNRefactory
{13A5B497-BA12-45AE-9033-22620C3153FB}.Debug|WithNRefactory.Build.0 = Debug|WithNRefactory
{13A5B497-BA12-45AE-9033-22620C3153FB}.Release|Net40.ActiveCfg = Release|Net40
{13A5B497-BA12-45AE-9033-22620C3153FB}.Release|Net40.Build.0 = Release|Net40
{13A5B497-BA12-45AE-9033-22620C3153FB}.Release|Net35.ActiveCfg = Release|Net35
{13A5B497-BA12-45AE-9033-22620C3153FB}.Release|Net35.Build.0 = Release|Net35
{13A5B497-BA12-45AE-9033-22620C3153FB}.Release|WithNRefactory.ActiveCfg = Release|WithNRefactory
{13A5B497-BA12-45AE-9033-22620C3153FB}.Release|WithNRefactory.Build.0 = Release|WithNRefactory
EndGlobalSection
EndGlobal

Просмотреть файл

@ -28,6 +28,7 @@ using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Rendering;
using ICSharpCode.AvalonEdit.Utils;
using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.AvalonEdit.CodeCompletion
{

Просмотреть файл

@ -17,7 +17,8 @@
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.AvalonEdit.Utils;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.AvalonEdit.Document
{

Просмотреть файл

@ -20,6 +20,7 @@ using System;
namespace ICSharpCode.AvalonEdit.Document
{
#if !NREFACTORY
/// <summary>
/// A document representing a source code file for refactoring.
/// Line and column counting starts at 1.
@ -338,4 +339,5 @@ namespace ICSharpCode.AvalonEdit.Document
return new TextChangeEventArgs(offset, insertedText, removedText);
}
}
#endif
}

Просмотреть файл

@ -17,10 +17,11 @@
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.NRefactory;
namespace ICSharpCode.AvalonEdit.Document
{
#if !NREFACTORY
/// <summary>
/// The TextAnchor class references an offset (a position between two characters).
/// It automatically updates the offset when text is inserted/removed in front of the anchor.
@ -137,4 +138,5 @@ namespace ICSharpCode.AvalonEdit.Document
/// </summary>
AfterInsertion
}
#endif
}

Просмотреть файл

@ -17,12 +17,12 @@
// DEALINGS IN THE SOFTWARE.
using System.Collections.Generic;
using ICSharpCode.AvalonEdit.Utils;
using System;
using System.IO;
namespace ICSharpCode.AvalonEdit.Document
{
#if !NREFACTORY
/// <summary>
/// A read-only view on a (potentially mutable) text source.
/// The IDocument interface derives from this interface.
@ -353,4 +353,5 @@ namespace ICSharpCode.AvalonEdit.Document
return text.LastIndexOf(searchText, startIndex + count - 1, count, comparisonType);
}
}
#endif
}

Просмотреть файл

@ -16,11 +16,11 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using ICSharpCode.AvalonEdit.Utils;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.AvalonEdit.Document
{

Просмотреть файл

@ -18,10 +18,9 @@
using System;
using ICSharpCode.AvalonEdit.Utils;
#if NREFACTORY
using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.Editor;
#endif
using ICSharpCode.AvalonEdit.Document;
namespace ICSharpCode.AvalonEdit.Document
{

Просмотреть файл

@ -25,11 +25,8 @@ using System.Diagnostics;
using System.Globalization;
using System.Threading;
using ICSharpCode.AvalonEdit.Utils;
#if NREFACTORY
using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.NRefactory.Utils;
#endif
namespace ICSharpCode.AvalonEdit.Document
{

Просмотреть файл

@ -24,6 +24,7 @@ using ICSharpCode.AvalonEdit.Utils;
namespace ICSharpCode.AvalonEdit.Document
{
#if !NREFACTORY
/// <summary>
/// Provides ITextSourceVersion instances.
/// </summary>
@ -131,4 +132,5 @@ namespace ICSharpCode.AvalonEdit.Document
}
}
}
#endif
}

Просмотреть файл

@ -20,11 +20,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.AvalonEdit.Document;
#if NREFACTORY
using ICSharpCode.NRefactory.Editor;
#else
using ICSharpCode.AvalonEdit.Utils;
#endif
namespace ICSharpCode.AvalonEdit.Editing
{

Просмотреть файл

@ -33,11 +33,8 @@ using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Indentation;
using ICSharpCode.AvalonEdit.Rendering;
using ICSharpCode.AvalonEdit.Utils;
#if NREFACTORY
using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.NRefactory.Utils;
#endif
namespace ICSharpCode.AvalonEdit.Editing
{

Просмотреть файл

@ -20,14 +20,9 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text.RegularExpressions;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Utils;
#if NREFACTORY
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.NRefactory.Utils;
#endif
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Utils;
using SpanStack = ICSharpCode.AvalonEdit.Utils.ImmutableStack<ICSharpCode.AvalonEdit.Highlighting.HighlightingSpan>;
namespace ICSharpCode.AvalonEdit.Highlighting

Просмотреть файл

@ -18,15 +18,12 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Utils;
#if NREFACTORY
using ICSharpCode.NRefactory.Editor;
#endif
namespace ICSharpCode.AvalonEdit.Highlighting
{

Просмотреть файл

@ -19,10 +19,10 @@
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Text;
using System.Windows;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.AvalonEdit.Highlighting
{

Просмотреть файл

@ -17,15 +17,13 @@
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Media;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Utils;
using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.AvalonEdit.Highlighting
{

Просмотреть файл

@ -18,10 +18,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Windows;
using System.Windows.Media;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Utils;

Просмотреть файл

@ -3,11 +3,10 @@
<PropertyGroup>
<ProjectGuid>{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Platform Condition=" '$(Platform)' == '' ">Net40</Platform>
<OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.AvalonEdit</RootNamespace>
<AssemblyName>ICSharpCode.AvalonEdit</AssemblyName>
<TargetFrameworkVersion Condition="'$(Configuration)' == '' ">v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
@ -24,58 +23,49 @@
</TargetFrameworkProfile>
<NoWin32Manifest>False</NoWin32Manifest>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>bin\Debug\ICSharpCode.AvalonEdit.xml</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE;DOTNET4</DefineConstants>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>bin\Release\ICSharpCode.AvalonEdit.xml</DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<DebugType>PdbOnly</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE;DOTNET4</DefineConstants>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'DebugNet35' ">
<PropertyGroup Condition=" '$(Platform)' == 'Net35' ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'Net40' ">
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<DefineConstants>DOTNET4</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'WithNRefactory' ">
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<DefineConstants>DOTNET4;NREFACTORY</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>bin\Debug\ICSharpCode.AvalonEdit.xml</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<DebugType>Full</DebugType>
<DefineDebug/>
<DefineTrace/>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseNet35' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>bin\Release\ICSharpCode.AvalonEdit.xml</DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<DebugType>PdbOnly</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<DebugType>Full</DebugType>
<DefineTrace/>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<ProjectReference Include="..\..\NRefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj" Condition="$(DefineConstants.Contains('NREFACTORY'))">
<Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
<Name>ICSharpCode.NRefactory</Name>
</ProjectReference>
<Reference Include="Microsoft.CSharp">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>

Просмотреть файл

@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
namespace ICSharpCode.AvalonEdit.Indentation

Просмотреть файл

@ -69,7 +69,8 @@ using System.Windows.Markup;
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly",
Justification = "AssemblyInformationalVersion does not need to be a parsable version")]
// DO NOT FORGET TO EDIT the GlobalAssemblyInfo.vb.template!
namespace ICSharpCode.NRefactory.Editor {}
internal static class RevisionClass
{
public const string Major = "5";

Просмотреть файл

@ -23,6 +23,7 @@ using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
using System.Windows.Media.TextFormatting;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Utils;

Просмотреть файл

@ -31,8 +31,8 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.TextFormatting;
using System.Windows.Threading;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Utils;
namespace ICSharpCode.AvalonEdit.Rendering

Просмотреть файл

@ -18,26 +18,33 @@
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
namespace ICSharpCode.AvalonEdit.Search
{
/// <summary>
/// A button that opens a drop-down menu when clicked.
/// </summary>
class DropDownButton : ButtonBase
public class DropDownButton : ButtonBase
{
/// <summary>
/// Identifies the <see cref="DropDownContentProperty" /> dependency property.
/// </summary>
public static readonly DependencyProperty DropDownContentProperty
= DependencyProperty.Register("DropDownContent", typeof(Popup),
typeof(DropDownButton), new FrameworkPropertyMetadata(null));
= DependencyProperty.Register("DropDownContent", typeof(Popup),
typeof(DropDownButton), new FrameworkPropertyMetadata(null));
/// <summary>
/// The key that identifies the <see cref="IsDropDownContentOpenProperty" /> dependency property.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
protected static readonly DependencyPropertyKey IsDropDownContentOpenPropertyKey
= DependencyProperty.RegisterReadOnly("IsDropDownContentOpen", typeof(bool),
typeof(DropDownButton), new FrameworkPropertyMetadata(false));
= DependencyProperty.RegisterReadOnly("IsDropDownContentOpen", typeof(bool),
typeof(DropDownButton), new FrameworkPropertyMetadata(false));
/// <summary>
/// Identifies the <see cref="IsDropDownContentOpenProperty" /> dependency property.
/// </summary>
public static readonly DependencyProperty IsDropDownContentOpenProperty = IsDropDownContentOpenPropertyKey.DependencyProperty;
static DropDownButton()
@ -45,16 +52,23 @@ namespace ICSharpCode.AvalonEdit.Search
DefaultStyleKeyProperty.OverrideMetadata(typeof(DropDownButton), new FrameworkPropertyMetadata(typeof(DropDownButton)));
}
/// <summary>
/// Gets/Sets the popup that is used as drop-down content.
/// </summary>
public Popup DropDownContent {
get { return (Popup)GetValue(DropDownContentProperty); }
set { SetValue(DropDownContentProperty, value); }
}
/// <summary>
/// Gets whether the drop-down is opened.
/// </summary>
public bool IsDropDownContentOpen {
get { return (bool)GetValue(IsDropDownContentOpenProperty); }
protected set { SetValue(IsDropDownContentOpenPropertyKey, value); }
}
/// <inheritdoc/>
protected override void OnClick()
{
if (DropDownContent != null && !IsDropDownContentOpen) {

Просмотреть файл

@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
namespace ICSharpCode.AvalonEdit.Search

Просмотреть файл

@ -22,8 +22,8 @@ using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Documents;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.AvalonEdit.Search
{

Просмотреть файл

@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
namespace ICSharpCode.AvalonEdit.Snippets

Просмотреть файл

@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.Windows;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
@ -69,7 +70,7 @@ namespace ICSharpCode.AvalonEdit.Snippets
/// <summary>
/// Gets the text document.
/// </summary>
public TextDocument Document { get; private set; }
public ICSharpCode.AvalonEdit.Document.TextDocument Document { get; private set; }
/// <summary>
/// Gets the text that was selected before the insertion of the snippet.
@ -97,7 +98,7 @@ namespace ICSharpCode.AvalonEdit.Snippets
public int InsertionPosition { get; set; }
readonly int startPosition;
AnchorSegment wholeSnippetAnchor;
ICSharpCode.AvalonEdit.Document.AnchorSegment wholeSnippetAnchor;
bool deactivateIfSnippetEmpty;
/// <summary>

Просмотреть файл

@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;

Просмотреть файл

@ -18,6 +18,7 @@
using System;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.AvalonEdit.Snippets
{

Просмотреть файл

@ -19,6 +19,7 @@
using System;
using System.Windows.Documents;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.AvalonEdit.Snippets
{

Просмотреть файл

@ -18,7 +18,7 @@
using System;
using System.Runtime.Serialization;
using System.Windows.Input;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
namespace ICSharpCode.AvalonEdit.Snippets

Просмотреть файл

@ -21,6 +21,7 @@ using System.Linq;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Media;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Rendering;

Просмотреть файл

@ -18,6 +18,7 @@
using System;
using System.Globalization;
using ICSharpCode.NRefactory;
using ICSharpCode.AvalonEdit.Document;
namespace ICSharpCode.AvalonEdit

Просмотреть файл

@ -18,16 +18,11 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Packaging;
using System.Printing;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Xps;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Highlighting;
namespace ICSharpCode.AvalonEdit.Utils

Просмотреть файл

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\ICSharpCode.AvalonEdit.Tests\packages.config" />
</repositories>