Browse Source

- fixed some FxCop warnings in VBNetBinding

- added missing documentation comment to Indentation member of SnippetSelectionElement

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6323 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Siegfried Pammer 16 years ago
parent
commit
721a546025
  1. 4
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/CompletionDataHelper.cs
  2. 2
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs
  3. 10
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetBracketSearcher.cs
  4. 3
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetSelectionElement.cs

4
src/AddIns/BackendBindings/VBNetBinding/Project/Src/CompletionDataHelper.cs

@ -89,7 +89,7 @@ namespace ICSharpCode.VBNetBinding @@ -89,7 +89,7 @@ namespace ICSharpCode.VBNetBinding
IClass c = GetCurrentClass(editor);
IMember m = GetCurrentMember(editor);
HandleKeyword(ref result, info, resolvedType, word, c, m, editor, pressedKey);
HandleKeyword(ref result, resolvedType, word, c, m, editor, pressedKey);
AddSpecialItems(ref result, info, resolvedType, word, m, expressionResult, editor);
@ -106,7 +106,7 @@ namespace ICSharpCode.VBNetBinding @@ -106,7 +106,7 @@ namespace ICSharpCode.VBNetBinding
return result;
}
static void HandleKeyword(ref VBNetCompletionItemList result, ParseInformation info, IReturnType resolvedType, string word, IClass c, IMember m, ITextEditor editor, char pressedKey)
static void HandleKeyword(ref VBNetCompletionItemList result, IReturnType resolvedType, string word, IClass c, IMember m, ITextEditor editor, char pressedKey)
{
if (pressedKey == ' ') {
if (word.Equals("return", StringComparison.InvariantCultureIgnoreCase) && m != null) {

2
src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs

@ -176,7 +176,7 @@ namespace ICSharpCode.VBNetBinding @@ -176,7 +176,7 @@ namespace ICSharpCode.VBNetBinding
bool? GetValue(string name, bool defaultVal)
{
string val = GetEvaluatedProperty("OptionInfer");
string val = GetEvaluatedProperty(name);
if (val == null)
return defaultVal;

10
src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetBracketSearcher.cs

@ -138,14 +138,14 @@ namespace ICSharpCode.VBNetBinding @@ -138,14 +138,14 @@ namespace ICSharpCode.VBNetBinding
#endregion
#region statement search
int FindBeginStatementAroundOffset(IDocument document, int offset, out VBStatement statement, out int length)
static int FindBeginStatementAroundOffset(IDocument document, int offset, out VBStatement statement, out int length)
{
length = 0;
statement = null;
return -1;
}
int FindEndStatementAroundOffset(IDocument document, int offset, out VBStatement statement)
static int FindEndStatementAroundOffset(IDocument document, int offset, out VBStatement statement)
{
IDocumentLine line = document.GetLineForOffset(offset);
@ -168,7 +168,7 @@ namespace ICSharpCode.VBNetBinding @@ -168,7 +168,7 @@ namespace ICSharpCode.VBNetBinding
return -1;
}
int FindBeginStatement(IDocument document, VBStatement statement, Location endLocation, out int length)
static int FindBeginStatement(IDocument document, VBStatement statement, Location endLocation, out int length)
{
ILexer lexer = ParserFactory.CreateLexer(SupportedLanguage.VBNet, document.CreateReader());
@ -226,13 +226,13 @@ namespace ICSharpCode.VBNetBinding @@ -226,13 +226,13 @@ namespace ICSharpCode.VBNetBinding
return -1;
}
int FindEndStatement(IDocument document, VBStatement statement)
static int FindEndStatement(IDocument document, VBStatement statement)
{
return -1;
}
#endregion
bool IsDeclaration(int kind)
static bool IsDeclaration(int kind)
{
return kind == Tokens.Sub || kind == Tokens.Function || kind == Tokens.Operator || VBNetFormattingStrategy.IsDeclaration(kind);
}

3
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Snippets/SnippetSelectionElement.cs

@ -18,6 +18,9 @@ namespace ICSharpCode.AvalonEdit.Snippets @@ -18,6 +18,9 @@ namespace ICSharpCode.AvalonEdit.Snippets
[Serializable]
public class SnippetSelectionElement : SnippetElement
{
/// <summary>
/// Gets/Sets the new indentation of the selected text.
/// </summary>
public int Indentation { get; set; }
/// <inheritdoc/>

Loading…
Cancel
Save