diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/FoldingVisitor.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/FoldingVisitor.cs index f8fa067f79..f7fb32cd51 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/FoldingVisitor.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/FoldingVisitor.cs @@ -180,6 +180,8 @@ namespace CSharpBinding.Parser #region Comments public override void VisitComment(Comment comment) { + if (comment.CommentType == CommentType.InactiveCode) + return; // don't fold the inactive code comment; instead fold the preprocessor directives if (AreTwoSinglelineCommentsInConsecutiveLines(comment.PrevSibling as Comment, comment)) return; // already handled by previous comment Comment lastComment = comment; @@ -203,9 +205,6 @@ namespace CSharpBinding.Parser case CommentType.Documentation: folding.Name = "/// ..."; break; - case CommentType.InactiveCode: - folding.Name = "inactive code"; - break; case CommentType.MultiLineDocumentation: folding.Name = "/** ... */"; break; diff --git a/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs b/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs index 0a3b73edd2..a4d35e5dca 100644 --- a/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs +++ b/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs @@ -119,6 +119,8 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring void ProcessParameter(ParameterDeclaration parameter, AstNode rootResolutionNode, TypeCriteriaCollector collector) { var localResolveResult = ctx.Resolve(parameter) as LocalResolveResult; + if (localResolveResult == null) + return; var variable = localResolveResult.Variable; var typeKind = variable.Type.Kind; if (!(typeKind == TypeKind.Class || diff --git a/src/Libraries/NRefactory/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs b/src/Libraries/NRefactory/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs index 4e086b6edc..e822db3d5e 100644 --- a/src/Libraries/NRefactory/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs +++ b/src/Libraries/NRefactory/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs @@ -270,17 +270,17 @@ namespace ICSharpCode.NRefactory.Editor void IDocument.Insert(int offset, ITextSource text) { - throw new NotImplementedException(); + throw new NotSupportedException(); } void IDocument.Insert(int offset, ITextSource text, AnchorMovementType defaultAnchorMovementType) { - throw new NotImplementedException(); + throw new NotSupportedException(); } void IDocument.Replace(int offset, int length, ITextSource newText) { - throw new NotImplementedException(); + throw new NotSupportedException(); } void IDocument.StartUndoableAction() diff --git a/src/Libraries/NRefactory/ICSharpCode.NRefactory/Utils/LazyInit.cs b/src/Libraries/NRefactory/ICSharpCode.NRefactory/Utils/LazyInit.cs index a4f5a6593b..ac84cb5fc5 100644 --- a/src/Libraries/NRefactory/ICSharpCode.NRefactory/Utils/LazyInit.cs +++ b/src/Libraries/NRefactory/ICSharpCode.NRefactory/Utils/LazyInit.cs @@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.Utils } /// - /// Atomatically performs the following operation: + /// Atomically performs the following operation: /// - If target is null: stores newValue in target and returns newValue. /// - If target is not null: returns target. ///