diff --git a/ICSharpCode.Editor/ICSharpCode.Editor.csproj b/ICSharpCode.Editor/ICSharpCode.Editor.csproj
index f3baf10f7b..f1a8ec8a87 100644
--- a/ICSharpCode.Editor/ICSharpCode.Editor.csproj
+++ b/ICSharpCode.Editor/ICSharpCode.Editor.csproj
@@ -10,7 +10,7 @@
v4.0
Client
Properties
- False
+ True
False
OnBuildSuccess
bin\Debug\ICSharpCode.Editor.xml
@@ -19,6 +19,8 @@
4
false
False
+ ..\ICSharpCode.NRefactory.snk
+ File
x86
diff --git a/ICSharpCode.Editor/IDocument.cs b/ICSharpCode.Editor/IDocument.cs
index 925eaee669..71cc6f8acc 100644
--- a/ICSharpCode.Editor/IDocument.cs
+++ b/ICSharpCode.Editor/IDocument.cs
@@ -10,7 +10,7 @@ namespace ICSharpCode.Editor
/// Line and column counting starts at 1.
/// Offset counting starts at 0.
///
- public interface IDocument : ITextSource, IServiceProvider
+ public interface IDocument : ITextSource
{
///
/// Gets/Sets the text of the whole document..
@@ -18,20 +18,41 @@ namespace ICSharpCode.Editor
new string Text { get; set; } // hides TextBuffer.Text to add the setter
///
- /// Is raised when the Text property changes.
+ /// This event is called directly before a change is applied to the document.
+ ///
+ ///
+ /// It is invalid to modify the document within this event handler.
+ /// Aborting the change (by throwing an exception) is likely to cause corruption of data structures
+ /// that listen to the Changing and Changed events.
+ ///
+ event EventHandler TextChanging;
+
+ ///
+ /// This event is called directly after a change is applied to the document.
+ ///
+ ///
+ /// It is invalid to modify the document within this event handler.
+ /// Aborting the event handler (by throwing an exception) is likely to cause corruption of data structures
+ /// that listen to the Changing and Changed events.
+ ///
+ event EventHandler TextChanged;
+
+ ///
+ /// This event is called after a group of changes is completed.
///
- event EventHandler TextChanged;
+ ///
+ event EventHandler ChangeCompleted;
///
- /// Gets the total number of lines in the document.
+ /// Gets the number of lines in the document.
///
- int TotalNumberOfLines { get; }
+ int LineCount { get; }
///
/// Gets the document line with the specified number.
///
/// The number of the line to retrieve. The first line has number 1.
- IDocumentLine GetLine(int lineNumber);
+ IDocumentLine GetLineByNumber(int lineNumber);
///
/// Gets the document line that contains the specified offset.
@@ -117,25 +138,5 @@ namespace ICSharpCode.Editor
///
///
ITextAnchor CreateAnchor(int offset);
-
- ///
- /// This event is called directly before a change is applied to the document.
- ///
- ///
- /// It is invalid to modify the document within this event handler.
- /// Aborting the change (by throwing an exception) is likely to cause corruption of data structures
- /// that listen to the Changing and Changed events.
- ///
- event EventHandler Changing;
-
- ///
- /// This event is called directly after a change is applied to the document.
- ///
- ///
- /// It is invalid to modify the document within this event handler.
- /// Aborting the event handler (by throwing an exception) is likely to cause corruption of data structures
- /// that listen to the Changing and Changed events.
- ///
- event EventHandler Changed;
}
}
diff --git a/ICSharpCode.Editor/Properties/AssemblyInfo.cs b/ICSharpCode.Editor/Properties/AssemblyInfo.cs
index 7d06f87441..abb12cbf6c 100644
--- a/ICSharpCode.Editor/Properties/AssemblyInfo.cs
+++ b/ICSharpCode.Editor/Properties/AssemblyInfo.cs
@@ -29,3 +29,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
+
+[assembly: CLSCompliant(true)]
diff --git a/ICSharpCode.Editor/ReadOnlyDocument.cs b/ICSharpCode.Editor/ReadOnlyDocument.cs
index d175cea82a..2cdb7556ac 100644
--- a/ICSharpCode.Editor/ReadOnlyDocument.cs
+++ b/ICSharpCode.Editor/ReadOnlyDocument.cs
@@ -48,7 +48,7 @@ namespace ICSharpCode.Editor
}
///
- public IDocumentLine GetLine(int lineNumber)
+ public IDocumentLine GetLineByNumber(int lineNumber)
{
if (lineNumber < 1 || lineNumber > lines.Length)
throw new ArgumentOutOfRangeException("lineNumber", lineNumber, "Value must be between 1 and " + lines.Length);
@@ -121,7 +121,7 @@ namespace ICSharpCode.Editor
///
public IDocumentLine GetLineByOffset(int offset)
{
- return GetLine(GetLineNumberForOffset(offset));
+ return GetLineByNumber(GetLineNumberForOffset(offset));
}
int GetLineNumberForOffset(int offset)
@@ -168,7 +168,7 @@ namespace ICSharpCode.Editor
}
///
- public int TotalNumberOfLines {
+ public int LineCount {
get { return lines.Length; }
}
@@ -181,11 +181,11 @@ namespace ICSharpCode.Editor
get { return textSource.TextLength; }
}
- event EventHandler IDocument.Changing { add {} remove {} }
+ event EventHandler IDocument.TextChanging { add {} remove {} }
- event EventHandler IDocument.Changed { add {} remove {} }
+ event EventHandler IDocument.TextChanged { add {} remove {} }
- event EventHandler IDocument.TextChanged { add {} remove {} }
+ event EventHandler IDocument.ChangeCompleted { add {} remove {} }
void IDocument.Insert(int offset, string text)
{
diff --git a/ICSharpCode.NRefactory.snk b/ICSharpCode.NRefactory.snk
new file mode 100644
index 0000000000..c07767c3cf
Binary files /dev/null and b/ICSharpCode.NRefactory.snk differ
diff --git a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj
index 1fad1819d5..05a7b75d92 100644
--- a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj
+++ b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj
@@ -17,6 +17,10 @@
1591,0618
False
-Microsoft.Design#CA1026;-Microsoft.Security#CA2104
+ True
+ ..\ICSharpCode.NRefactory.snk
+ False
+ File
AnyCPU
@@ -407,10 +411,6 @@
{D68133BD-1E63-496E-9EDE-4FBDBF77B486}
Mono.Cecil
-
- {F054A788-B591-4561-A8BA-AE745BBEB817}
- ICSharpCode.Editor
-
\ No newline at end of file