public
Fork of olsonjeffery/boolangstudio
Description: Boo language integration for Visual Studio 2008
Homepage: http://www.codeplex.com/BooLangStudio
Clone URL: git://github.com/jagregory/boolangstudio.git
boolangstudio / Source / BooLangService / HandleSmartIndentAction.cs
44392911 » jagregory 2008-10-14 Added indentation tests and... 1 using BooLangService;
2 using Microsoft.VisualStudio.TextManager.Interop;
3
4 namespace Boo.BooLangService
5 {
6 public class HandleSmartIndentAction
7 {
8 private readonly IVsTextView view;
9 private readonly ILineIndenter indenter;
10
11 public HandleSmartIndentAction(ISource source, IVsTextView view)
12 {
13 this.view = view;
14 this.indenter = new LineIndenter(source, view);
15 }
16
17 public HandleSmartIndentAction(IVsTextView view, ILineIndenter indenter)
18 {
19 this.view = view;
20 this.indenter = indenter;
21 }
22
23 public bool Execute()
24 {
25 int line, col;
26
27 view.GetCaretPos(out line, out col);
28
29 indenter.SetIndentationForNextLine(line);
30
31 return false;
32 }
33 }
34 }