Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/vbnet@6190 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
12 changed files with 218 additions and 37 deletions
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Siegfried Pammer" email="siegfriedpammer@gmail.com"/>
|
||||
// <version>$Revision: 6077 $</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
|
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.NRefactory.Parser.VB; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Dom; |
||||
using ICSharpCode.SharpDevelop.Dom.NRefactoryResolver; |
||||
using ICSharpCode.SharpDevelop.Editor; |
||||
using ICSharpCode.SharpDevelop.Editor.CodeCompletion; |
||||
|
||||
namespace ICSharpCode.VBNetBinding |
||||
{ |
||||
public class VBNetCompletionItemList : NRefactoryCompletionItemList |
||||
{ |
||||
public ITextEditor Editor { get; set; } |
||||
|
||||
public ICompletionListWindow Window { get; set; } |
||||
|
||||
public override CompletionItemListKeyResult ProcessInput(char key) |
||||
{ |
||||
if (key == '?' && string.IsNullOrWhiteSpace(Editor.Document.GetText(Window.StartOffset, Window.EndOffset - Window.StartOffset))) |
||||
return CompletionItemListKeyResult.NormalKey; |
||||
|
||||
return base.ProcessInput(key); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,63 @@
@@ -0,0 +1,63 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Siegfried Pammer" email="siegfriedpammer@gmail.com" />
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Dom |
||||
{ |
||||
/// <summary>
|
||||
/// Description of DefaultOption.
|
||||
/// </summary>
|
||||
public class DefaultOption : AbstractFreezable, IOption |
||||
{ |
||||
OptionType type; |
||||
bool value; |
||||
DomRegion region; |
||||
|
||||
public DefaultOption(OptionType type) |
||||
: this(type, true) |
||||
{ |
||||
} |
||||
|
||||
public DefaultOption(OptionType type, bool value) |
||||
: this(type, value, DomRegion.Empty) |
||||
{ |
||||
} |
||||
|
||||
public DefaultOption(OptionType type, bool value, DomRegion region) |
||||
{ |
||||
this.type = type; |
||||
this.value = value; |
||||
this.region = region; |
||||
} |
||||
|
||||
protected override void FreezeInternal() |
||||
{ |
||||
base.FreezeInternal(); |
||||
} |
||||
|
||||
public DomRegion Region { |
||||
get { |
||||
return region; |
||||
} |
||||
} |
||||
|
||||
public OptionType Type { |
||||
get { |
||||
return type; |
||||
} |
||||
} |
||||
|
||||
public bool Value { |
||||
get { |
||||
if (type == OptionType.CompareBinary || type == OptionType.CompareText) |
||||
return true; |
||||
|
||||
return value; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Siegfried Pammer" email="siegfriedpammer@gmail.com" />
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Dom |
||||
{ |
||||
/// <summary>
|
||||
/// Description of IOption.
|
||||
/// </summary>
|
||||
public interface IOption : IFreezable |
||||
{ |
||||
DomRegion Region { |
||||
get; |
||||
} |
||||
|
||||
OptionType Type { |
||||
get; |
||||
} |
||||
|
||||
bool Value { |
||||
get; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Siegfried Pammer" email="siegfriedpammer@gmail.com" />
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
namespace ICSharpCode.SharpDevelop.Dom |
||||
{ |
||||
public enum OptionType { |
||||
None = ICSharpCode.NRefactory.Ast.OptionType.None, |
||||
Explicit = ICSharpCode.NRefactory.Ast.OptionType.Explicit, |
||||
Strict = ICSharpCode.NRefactory.Ast.OptionType.Strict, |
||||
CompareBinary = ICSharpCode.NRefactory.Ast.OptionType.CompareBinary, |
||||
CompareText = ICSharpCode.NRefactory.Ast.OptionType.CompareText, |
||||
Infer = ICSharpCode.NRefactory.Ast.OptionType.Infer |
||||
} |
||||
} |
Loading…
Reference in new issue