public void SelectNode(XNode n)
        {
            MonoDevelop.Projects.Dom.DomRegion region = n.Region;

            XElement el = n as XElement;

            if (el != null && el.IsClosed && el.ClosingTag.Region.End > region.End)
            {
                region.End = el.ClosingTag.Region.End;
            }
            EditorSelect(region);
        }
        void SelectNode(XNode n)
        {
            MonoDevelop.Projects.Dom.DomRegion region = n.Region;

            XElement el = n as XElement;

            if (el != null && el.IsClosed && el.ClosingTag.Region.End > region.End)
            {
                region.End = el.ClosingTag.Region.End;
            }

            int s = Editor.GetPositionFromLineColumn(region.Start.Line, region.Start.Column);
            int e = Editor.GetPositionFromLineColumn(region.End.Line, region.End.Column);

            if (e > s && s > -1)
            {
                Editor.Select(s, e);
            }
        }
Esempio n. 3
0
 public DomType(ICompilationUnit compilationUnit, ClassType classType, string name, DomLocation location, string namesp, DomRegion region, List <IMember> members)
 {
     this.compilationUnit = compilationUnit;
     this.classType       = classType;
     this.Name            = name;
     this.Namespace       = namesp;
     this.BodyRegion      = region;
     this.Location        = location;
     foreach (IMember member in members)
     {
         AddChild(member);
         ((AbstractMember)member).DeclaringType = this;
     }
 }
Esempio n. 4
0
 public Tag(string key, string comment, DomRegion region)  : base(comment)
 {
     this.key    = key;
     base.Region = region;
 }
Esempio n. 5
0
 public Tag(string key, DomRegion region)
 {
     this.key    = key;
     base.Region = region;
 }
Esempio n. 6
0
 public DomProperty(string name, Modifiers getterModifier, Modifiers setterModifier, DomLocation location, DomRegion bodyRegion, IReturnType returnType)
 {
     base.Name           = name;
     this.GetterModifier = getterModifier;
     this.SetterModifier = setterModifier;
     this.Location       = location;
     this.BodyRegion     = bodyRegion;
     base.ReturnType     = returnType;
 }
Esempio n. 7
0
 public DomProperty(string name, Modifiers modifier, DomLocation location, DomRegion bodyRegion, IReturnType returnType)
     : this(name, modifier, modifier, location, bodyRegion, returnType)
 {
 }
Esempio n. 8
0
 public ExpressionResult(string expression, DomRegion region, IEnumerable <ExpressionContext> expressionContexts)
 {
     this.Expression         = expression;
     this.Region             = region;
     this.expressionContexts = new List <ExpressionContext> (expressionContexts);
 }
Esempio n. 9
0
 public FoldingRegion(string name, DomRegion region)
 {
     this.Name   = name ?? defaultName;
     this.Region = region;
 }
Esempio n. 10
0
 public DomMethod(string name, Modifiers modifiers, MethodModifier MethodModifier, DomLocation location, DomRegion bodyRegion, IReturnType returnType)
 {
     this.Name           = name;
     this.Modifiers      = modifiers;
     this.Location       = location;
     this.BodyRegion     = bodyRegion;
     this.ReturnType     = returnType;
     this.MethodModifier = MethodModifier;
 }
Esempio n. 11
0
 static bool IncompleteOrSingleLine(DomRegion region)
 {
     return(region.Start.Line < 0 || region.End.Line <= region.Start.Line);
 }
Esempio n. 12
0
 public FoldingRegion(DomRegion region, FoldType type) : this(null, region, type)
 {
 }
Esempio n. 13
0
 public FoldingRegion(string name, DomRegion region, FoldType type, bool isFoldedByDefault) : this(name, region)
 {
     this.Type = type;
     this.IsFoldedByDefault = isFoldedByDefault;
 }
Esempio n. 14
0
 public FoldingRegion(string name, DomRegion region, FoldType type) : this(name, region)
 {
     this.Type = type;
 }
Esempio n. 15
0
 public FoldingRegion(string name, DomRegion region, bool isFoldedByDefault) : this(name, region)
 {
     this.IsFoldedByDefault = isFoldedByDefault;
 }
Esempio n. 16
0
 public Error(ErrorType errorType, DomRegion region, string message)
 {
     this.ErrorType = errorType;
     this.Region    = region;
     this.Message   = message;
 }
Esempio n. 17
0
 public ExpressionResult(string expression, DomRegion region, ExpressionContext expressionContext) : this(expression, region, new [] { expressionContext })
 {
 }
Esempio n. 18
0
 public FoldingRegion(DomRegion region) : this(null, region)
 {
 }