Skip to content

Commit

Permalink
Remove AvalonEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Jul 27, 2016
1 parent 59c0e4e commit 3d0e9a7
Show file tree
Hide file tree
Showing 45 changed files with 501 additions and 2,735 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
[submodule "Plugins/ILSpy.Decompiler/NRefactory"]
path = Plugins/ILSpy.Decompiler/NRefactory
url = https://github.com/0xd4d/nrefactory.git
[submodule "Libraries/ICSharpCode.AvalonEdit"]
path = Libraries/ICSharpCode.AvalonEdit
url = https://github.com/0xd4d/avalonedit.git
[submodule "Libraries/ICSharpCode.TreeView"]
path = Libraries/ICSharpCode.TreeView
url = git@bitbucket.org:0xd4d/icsharpcode.treeview.git
Expand Down
1 change: 0 additions & 1 deletion Libraries/ICSharpCode.AvalonEdit
Submodule ICSharpCode.AvalonEdit deleted from 88053f
4 changes: 0 additions & 4 deletions Plugins/Examples/Example1.Plugin/Example1.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@
<Project>{fdfc1237-143f-4919-8318-4926901f4639}</Project>
<Name>dnlib</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\dnSpy\dnSpy.Shared\dnSpy.Shared.csproj">
<Project>{7e7c2cf8-2057-4eaa-9dad-ab3022cf4037}</Project>
<Name>dnSpy.Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="project.json" />
Expand Down
4 changes: 0 additions & 4 deletions Plugins/Examples/Example2.Plugin/Example2.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
<Project>{fdfc1237-143f-4919-8318-4926901f4639}</Project>
<Name>dnlib</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\dnSpy\dnSpy.Shared\dnSpy.Shared.csproj">
<Project>{7e7c2cf8-2057-4eaa-9dad-ab3022cf4037}</Project>
<Name>dnSpy.Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Page Include="Themes\resourcedict.xaml">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@
<Project>{bb748e78-376f-429a-8d83-9a8946ec179f}</Project>
<Name>dnSpy.Contracts.Logic</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\dnSpy\dnSpy.Shared\dnSpy.Shared.csproj">
<Project>{7e7c2cf8-2057-4eaa-9dad-ab3022cf4037}</Project>
<Name>dnSpy.Shared</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Libraries\dnlib\src\dnlib.csproj">
<Project>{fdfc1237-143f-4919-8318-4926901f4639}</Project>
<Name>dnlib</Name>
Expand Down
4 changes: 0 additions & 4 deletions Plugins/dnSpy.Analyzer/dnSpy.Analyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@
<Project>{fdfc1237-143f-4919-8318-4926901f4639}</Project>
<Name>dnlib</Name>
</ProjectReference>
<ProjectReference Include="..\..\dnSpy\dnSpy.Shared\dnSpy.Shared.csproj">
<Project>{7e7c2cf8-2057-4eaa-9dad-ab3022cf4037}</Project>
<Name>dnSpy.Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Copy.png" />
Expand Down
4 changes: 0 additions & 4 deletions Plugins/dnSpy.AsmEditor/dnSpy.AsmEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@
<Project>{fdfc1237-143f-4919-8318-4926901f4639}</Project>
<Name>dnlib</Name>
</ProjectReference>
<ProjectReference Include="..\..\dnSpy\dnSpy.Shared\dnSpy.Shared.csproj">
<Project>{7e7c2cf8-2057-4eaa-9dad-ab3022cf4037}</Project>
<Name>dnSpy.Shared</Name>
</ProjectReference>
<ProjectReference Include="..\..\dnSpy\dnSpy.Languages\dnSpy.Languages.csproj">
<Project>{9265e4ea-eb00-4cb6-8a9a-608871e24fd0}</Project>
<Name>dnSpy.Languages</Name>
Expand Down
4 changes: 0 additions & 4 deletions Plugins/dnSpy.BamlDecompiler/dnSpy.BamlDecompiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@
<Project>{fdfc1237-143f-4919-8318-4926901f4639}</Project>
<Name>dnlib</Name>
</ProjectReference>
<ProjectReference Include="..\..\dnSpy\dnSpy.Shared\dnSpy.Shared.csproj">
<Project>{7e7c2cf8-2057-4eaa-9dad-ab3022cf4037}</Project>
<Name>dnSpy.Shared</Name>
</ProjectReference>
<ProjectReference Include="..\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj">
<Project>{984cc812-9470-4a13-aff9-cc44068d666c}</Project>
<Name>ICSharpCode.Decompiler</Name>
Expand Down
51 changes: 0 additions & 51 deletions Plugins/dnSpy.Debugger/dnSpy.Debugger/DebugCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -520,55 +520,4 @@ public IEnumerable<CreatedMenuItem> Create(IMenuItemContext context) {
}
}
}

[Export(typeof(IIconBarCommand))]
sealed class BreakpointCommand : IIconBarCommand {
readonly Lazy<IBreakpointManager> breakpointManager;

[ImportingConstructor]
BreakpointCommand(Lazy<IBreakpointManager> breakpointManager) {
this.breakpointManager = breakpointManager;
}

public bool IsEnabled(IIconBarCommandContext context) => true;
public void Execute(IIconBarCommandContext context) { }//TODO: => breakpointManager.Value.Toggle(context.DocumentViewer, context.Line);
}

abstract class IconBarCommand : MenuItemBase<ILCodeBreakpoint> {
protected sealed override object CachedContextKey => ContextKey;
static readonly object ContextKey = new object();

protected sealed override ILCodeBreakpoint CreateContext(IMenuItemContext context) {
if (context.CreatorObject.Guid != new Guid(MenuConstants.GUIDOBJ_TEXTEDITOR_ICONBAR_GUID))
return null;
return context.Find<ILCodeBreakpoint>();
}
}

[ExportMenuItem(OwnerGuid = MenuConstants.TEXTEDITOR_ICONBAR_GUID, Header = "res:DeleteBreakpointCommand", Icon = "BreakpointMenu", Group = MenuConstants.GROUP_TEXTEDITOR_ICONBAR_DEBUG_BPS, Order = 0)]
sealed class DeleteBreakpointCommand : IconBarCommand {
readonly Lazy<IBreakpointManager> breakpointManager;

[ImportingConstructor]
DeleteBreakpointCommand(Lazy<IBreakpointManager> breakpointManager) {
this.breakpointManager = breakpointManager;
}

public override void Execute(ILCodeBreakpoint context) => breakpointManager.Value.Remove(context);
}

[ExportMenuItem(OwnerGuid = MenuConstants.TEXTEDITOR_ICONBAR_GUID, InputGestureText = "res:ShortCutKeyCtrlF9", Group = MenuConstants.GROUP_TEXTEDITOR_ICONBAR_DEBUG_BPS, Order = 10)]
sealed class EnableAndDisableBreakpointCommand : IconBarCommand {
readonly IImageManager imageManager;

[ImportingConstructor]
EnableAndDisableBreakpointCommand(IImageManager imageManager) {
this.imageManager = imageManager;
}

public override void Execute(ILCodeBreakpoint context) => context.IsEnabled = !context.IsEnabled;
public override bool IsEnabled(ILCodeBreakpoint context) => EnableDisableBreakpointDebugCtxMenuCommand.IsMenuItemEnabledInternal(1);
public override string GetHeader(ILCodeBreakpoint context) => EnableDisableBreakpointDebugCtxMenuCommand.GetHeaderInternal(context.IsEnabled, 1);
public override ImageReference? GetIcon(ILCodeBreakpoint context) => EnableDisableBreakpointDebugCtxMenuCommand.GetIconInternal();
}
}
74 changes: 0 additions & 74 deletions Plugins/dnSpy.Debugger/dnSpy.Debugger/MarkedTextLine.cs

This file was deleted.

9 changes: 0 additions & 9 deletions Plugins/dnSpy.Debugger/dnSpy.Debugger/dnSpy.Debugger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
<Compile Include="Locals\ValuePrinter.cs" />
<Compile Include="Locals\ValueStringParser.cs" />
<Compile Include="Locals\ValueVM.cs" />
<Compile Include="MarkedTextLine.cs" />
<Compile Include="Memory\Commands.cs" />
<Compile Include="Memory\MemoryContent.cs" />
<Compile Include="Memory\MemoryControl.xaml.cs">
Expand Down Expand Up @@ -294,10 +293,6 @@
<Project>{BB748E78-376F-429A-8D83-9A8946EC179F}</Project>
<Name>dnSpy.Contracts.Logic</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Libraries\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj">
<Project>{6c55b776-26d4-4db3-a6ab-87e783b2f3d1}</Project>
<Name>ICSharpCode.AvalonEdit</Name>
</ProjectReference>
<ProjectReference Include="..\dndbg\dndbg.csproj">
<Project>{989a5c51-8c4c-4f4d-90a2-042cd1846075}</Project>
<Name>dndbg</Name>
Expand All @@ -306,10 +301,6 @@
<Project>{fdfc1237-143f-4919-8318-4926901f4639}</Project>
<Name>dnlib</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\dnSpy\dnSpy.Shared\dnSpy.Shared.csproj">
<Project>{7e7c2cf8-2057-4eaa-9dad-ab3022cf4037}</Project>
<Name>dnSpy.Shared</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Libraries\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj">
<Project>{dde2a481-8271-4eac-a330-8fa6a38d13d1}</Project>
<Name>ICSharpCode.TreeView</Name>
Expand Down
4 changes: 0 additions & 4 deletions Plugins/dnSpy.Scripting.Roslyn/dnSpy.Scripting.Roslyn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@
<Project>{844EEF8A-C7B6-4299-8CF0-4BD21DDDD4A8}</Project>
<Name>dnSpy.Roslyn.Shared</Name>
</ProjectReference>
<ProjectReference Include="..\..\dnSpy\dnSpy.Shared\dnSpy.Shared.csproj">
<Project>{7e7c2cf8-2057-4eaa-9dad-ab3022cf4037}</Project>
<Name>dnSpy.Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\dnSpy.Scripting.Roslyn.Resources.resx">
Expand Down
15 changes: 0 additions & 15 deletions dnSpy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dnSpy.Console", "dnSpy\dnSp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dnSpy.Languages", "dnSpy\dnSpy.Languages\dnSpy.Languages.csproj", "{9265E4EA-EB00-4CB6-8A9A-608871E24FD0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dnSpy.Shared", "dnSpy\dnSpy.Shared\dnSpy.Shared.csproj", "{7E7C2CF8-2057-4EAA-9DAD-AB3022CF4037}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dnlib", "Libraries\dnlib\src\dnlib.csproj", "{FDFC1237-143F-4919-8318-4926901F4639}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "Libraries\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "Libraries\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dndbg", "Plugins\dnSpy.Debugger\dndbg\dndbg.csproj", "{989A5C51-8C4C-4F4D-90A2-042CD1846075}"
Expand Down Expand Up @@ -91,19 +87,10 @@ Global
{9265E4EA-EB00-4CB6-8A9A-608871E24FD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9265E4EA-EB00-4CB6-8A9A-608871E24FD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9265E4EA-EB00-4CB6-8A9A-608871E24FD0}.Release|Any CPU.Build.0 = Release|Any CPU
{7E7C2CF8-2057-4EAA-9DAD-AB3022CF4037}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E7C2CF8-2057-4EAA-9DAD-AB3022CF4037}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E7C2CF8-2057-4EAA-9DAD-AB3022CF4037}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{7E7C2CF8-2057-4EAA-9DAD-AB3022CF4037}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E7C2CF8-2057-4EAA-9DAD-AB3022CF4037}.Release|Any CPU.Build.0 = Release|Any CPU
{FDFC1237-143F-4919-8318-4926901F4639}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDFC1237-143F-4919-8318-4926901F4639}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDFC1237-143F-4919-8318-4926901F4639}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDFC1237-143F-4919-8318-4926901F4639}.Release|Any CPU.Build.0 = Release|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Any CPU.ActiveCfg = Debug|Net40
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Any CPU.Build.0 = Debug|Net40
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Any CPU.ActiveCfg = Release|Net40
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Any CPU.Build.0 = Release|Net40
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -196,9 +183,7 @@ Global
{722257A9-1B14-4D63-B886-18A4229AF4EB} = {293F0A13-6653-4580-9116-1D255F4C4E69}
{DA111693-97C8-413B-9102-4DCBEE8885B7} = {293F0A13-6653-4580-9116-1D255F4C4E69}
{9265E4EA-EB00-4CB6-8A9A-608871E24FD0} = {293F0A13-6653-4580-9116-1D255F4C4E69}
{7E7C2CF8-2057-4EAA-9DAD-AB3022CF4037} = {293F0A13-6653-4580-9116-1D255F4C4E69}
{FDFC1237-143F-4919-8318-4926901F4639} = {1CE427B9-B8B2-4B92-9FAB-708C51C99098}
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {1CE427B9-B8B2-4B92-9FAB-708C51C99098}
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {1CE427B9-B8B2-4B92-9FAB-708C51C99098}
{989A5C51-8C4C-4F4D-90A2-042CD1846075} = {29E1907A-9C87-4F6E-961C-1C45273EFAFA}
{52995BD1-DB91-4654-89B7-1DEB3B0D3155} = {29E1907A-9C87-4F6E-961C-1C45273EFAFA}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ You should have received a copy of the GNU General Public License
using System.Windows;
using System.Windows.Controls;
using dnSpy.Contracts.Text;
using ICSharpCode.AvalonEdit.Utils;

namespace dnSpy.Contracts.Controls {
/// <summary>
Expand Down Expand Up @@ -88,17 +87,16 @@ public FrameworkElement CreateResult(bool useEllipsis = false, bool filterOutNew
/// <summary>
/// Creates a <see cref="FrameworkElement"/> containing the resulting text
/// </summary>
/// <param name="newFormatter">true to use the new faster formatter, which has its limitations (doesn't support all characters, no word wrap support)</param>
/// <param name="useNewFormatter">true to use the new faster formatter, which has its limitations (doesn't support all characters, no word wrap support)</param>
/// <param name="useEllipsis">true to add <see cref="TextTrimming.CharacterEllipsis"/> to the <see cref="TextBlock"/></param>
/// <param name="filterOutNewLines">true to filter out newline characters</param>
/// <returns></returns>
public FrameworkElement CreateResultNewFormatter(bool newFormatter, bool useEllipsis = false, bool filterOutNewLines = true) {
var provider = newFormatter ? TextFormatterProvider.GlyphRunFormatter : TextFormatterProvider.BuiltIn;
public FrameworkElement CreateResultNewFormatter(bool useNewFormatter, bool useEllipsis = false, bool filterOutNewLines = true) {
if (colorizer != null)
return colorizer.Create(provider, useEllipsis, filterOutNewLines);
return colorizer.Create(useNewFormatter, useEllipsis, filterOutNewLines);

if (!useEllipsis && filterOutNewLines) {
return new FastTextBlock(provider) {
return new FastTextBlock(useNewFormatter) {
Text = ToString(output.ToString(), filterOutNewLines)
};
}
Expand Down
13 changes: 6 additions & 7 deletions dnSpy/dnSpy.Contracts.DnSpy/Controls/FastTextBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ THE SOFTWARE.
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.TextFormatting;
using ICSharpCode.AvalonEdit.Utils;

namespace dnSpy.Contracts.Controls {
sealed class FastTextBlock : FrameworkElement {
Expand All @@ -41,14 +40,14 @@ public string Text {
set { SetValue(TextProperty, value); }
}

readonly TextFormatterProvider provider;
readonly bool useNewFormatter;

public FastTextBlock(TextFormatterProvider provider)
: this(provider, new TextSrc()) {
public FastTextBlock(bool useNewFormatter)
: this(useNewFormatter, new TextSrc()) {
}

public FastTextBlock(TextFormatterProvider provider, IFastTextSource src) {
this.provider = provider;
public FastTextBlock(bool useNewFormatter, IFastTextSource src) {
this.useNewFormatter = useNewFormatter;
this.src = src;
}

Expand Down Expand Up @@ -186,7 +185,7 @@ Typeface GetTypeface() {

void MakeNewText() {
if (fmt == null)
fmt = TextFormatterFactory.Create(this, provider);
fmt = TextFormatterFactory.Create(this, useNewFormatter);

if (line != null)
line.Dispose();
Expand Down
Loading

0 comments on commit 3d0e9a7

Please sign in to comment.