Browse Source

clean up unused files/methods

pull/32/merge
Siegfried Pammer 12 years ago
parent
commit
df20343d1a
  1. 10
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/Extensions.cs
  2. 92
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/QualifiedNameWithLocation.cs
  3. 7
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlBinding.csproj
  4. 14
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionSettings.cs
  5. 54
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlExpressionContext.cs

10
src/AddIns/BackendBindings/XamlBinding/XamlBinding/Extensions.cs

@ -160,16 +160,6 @@ namespace ICSharpCode.XamlBinding @@ -160,16 +160,6 @@ namespace ICSharpCode.XamlBinding
return items.Concat(addItems);
}
public static QualifiedNameWithLocation ToQualifiedName(this AXmlAttribute thisValue)
{
return new QualifiedNameWithLocation(thisValue.LocalName, thisValue.Namespace, thisValue.Prefix, thisValue.StartOffset);
}
public static QualifiedNameWithLocation ToQualifiedName(this AXmlElement thisValue)
{
return new QualifiedNameWithLocation(thisValue.LocalName, thisValue.Namespace, thisValue.Prefix, thisValue.StartOffset);
}
public static string GetWordBeforeCaretExtended(this ITextEditor editor)
{
IDocumentLine line = editor.Document.GetLine(editor.Caret.Line);

92
src/AddIns/BackendBindings/XamlBinding/XamlBinding/QualifiedNameWithLocation.cs

@ -1,92 +0,0 @@ @@ -1,92 +0,0 @@
// 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 ICSharpCode.XmlEditor;
using System;
using ICSharpCode.NRefactory;
namespace ICSharpCode.XamlBinding
{
/// <summary>
/// Description of QualifiedNameWithLocation.
/// </summary>
public class QualifiedNameWithLocation : IEquatable<QualifiedNameWithLocation> {
public QualifiedName QualifiedName { get; private set; }
public int Offset { get; private set; }
public string Name {
get {
return QualifiedName.Name;
}
}
public string Namespace {
get {
return QualifiedName.Namespace;
}
}
public string Prefix {
get {
return QualifiedName.Prefix;
}
}
public string FullXmlName {
get {
string name = Prefix;
if (!string.IsNullOrEmpty(name))
name += ":";
name += Name;
return name;
}
}
public QualifiedNameWithLocation(string localName, string namespaceName, string prefix, int offset) {
QualifiedName = new QualifiedName(localName, namespaceName, prefix);
Offset = offset;
}
public override bool Equals(object obj)
{
return Equals(obj as QualifiedNameWithLocation);
}
public override int GetHashCode()
{
return QualifiedName.GetHashCode() ^ Offset.GetHashCode();
}
public bool Equals(QualifiedNameWithLocation other)
{
if (other == null)
return false;
return other.QualifiedName == QualifiedName &&
other.Offset == Offset;
}
public static bool operator ==(QualifiedNameWithLocation lhs, QualifiedNameWithLocation rhs)
{
if ((object)lhs == null && (object)rhs == null)
return true;
if ((object)lhs == null)
return false;
return lhs.Equals(rhs);
}
public static bool operator !=(QualifiedNameWithLocation lhs, QualifiedNameWithLocation rhs)
{
return !(lhs == rhs);
}
public override string ToString()
{
return this.QualifiedName + " Offset: " + Offset;
}
}
}

7
src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlBinding.csproj

@ -46,10 +46,6 @@ @@ -46,10 +46,6 @@
<Reference Include="PresentationFramework">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="Rhino.Mocks">
<HintPath>..\..\..\..\Libraries\RhinoMocks\Rhino.Mocks.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@ -104,16 +100,13 @@ @@ -104,16 +100,13 @@
<Compile Include="PropertyPathParser.cs" />
<Compile Include="PropertyPathSegment.cs" />
<Compile Include="PropertyPathTokenizer.cs" />
<Compile Include="QualifiedNameWithLocation.cs" />
<Compile Include="SegmentKind.cs" />
<Compile Include="Utils.cs">
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="XamlBehavior.cs" />
<Compile Include="XamlCompletionItemList.cs" />
<Compile Include="XamlCompletionSettings.cs" />
<Compile Include="XamlContext.cs" />
<Compile Include="XamlExpressionContext.cs" />
<Compile Include="MarkupExtensionParseException.cs">
</Compile>
<Compile Include="XamlLanguageBinding.cs" />

14
src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionSettings.cs

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
// 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 ICSharpCode.XamlBinding
{
public class XamlCompletionSettings
{
public XamlCompletionSettings()
{
}
}
}

54
src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlExpressionContext.cs

@ -1,54 +0,0 @@ @@ -1,54 +0,0 @@
// 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;
using System.Text;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.XmlEditor;
namespace ICSharpCode.XamlBinding
{
/// <summary>
/// Represents the context of a location in a XAML document.
/// </summary>
public sealed class XamlExpressionContext
{
public static readonly XamlExpressionContext Empty = new XamlExpressionContext(new XmlElementPath(), null, false);
public XmlElementPath ElementPath { get; private set; }
public string AttributeName { get; private set; }
public bool InAttributeValue { get; private set; }
public XamlExpressionContext(XmlElementPath elementPath, string attributeName, bool inAttributeValue)
{
if (elementPath == null)
throw new ArgumentNullException("elementPath");
this.ElementPath = elementPath;
this.AttributeName = attributeName;
this.InAttributeValue = inAttributeValue;
}
public override string ToString()
{
StringBuilder b = new StringBuilder();
b.Append("[XamlExpressionContext ");
for (int i = 0; i < ElementPath.Elements.Count; i++) {
if (i > 0) b.Append(">");
if (!string.IsNullOrEmpty(ElementPath.Elements[i].Prefix)) {
b.Append(ElementPath.Elements[i].Prefix);
b.Append(':');
}
b.Append(ElementPath.Elements[i].Name);
}
if (AttributeName != null) {
b.Append(" AttributeName=");
b.Append(AttributeName);
if (InAttributeValue) {
b.Append(" InAttributeValue");
}
}
b.Append("]");
return b.ToString();
}
}
}
Loading…
Cancel
Save