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);
            }
        }
Ejemplo 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;
     }
 }
Ejemplo n.º 4
0
 public Tag(string key, string comment, DomRegion region)  : base(comment)
 {
     this.key    = key;
     base.Region = region;
 }
Ejemplo n.º 5
0
 public Tag(string key, DomRegion region)
 {
     this.key    = key;
     base.Region = region;
 }
Ejemplo 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;
 }
Ejemplo n.º 7
0
 public DomProperty(string name, Modifiers modifier, DomLocation location, DomRegion bodyRegion, IReturnType returnType)
     : this(name, modifier, modifier, location, bodyRegion, returnType)
 {
 }
Ejemplo n.º 8
0
 public ExpressionResult(string expression, DomRegion region, IEnumerable <ExpressionContext> expressionContexts)
 {
     this.Expression         = expression;
     this.Region             = region;
     this.expressionContexts = new List <ExpressionContext> (expressionContexts);
 }
Ejemplo n.º 9
0
 public FoldingRegion(string name, DomRegion region)
 {
     this.Name   = name ?? defaultName;
     this.Region = region;
 }
Ejemplo 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;
 }
Ejemplo n.º 11
0
 static bool IncompleteOrSingleLine(DomRegion region)
 {
     return(region.Start.Line < 0 || region.End.Line <= region.Start.Line);
 }
Ejemplo n.º 12
0
 public FoldingRegion(DomRegion region, FoldType type) : this(null, region, type)
 {
 }
Ejemplo n.º 13
0
 public FoldingRegion(string name, DomRegion region, FoldType type, bool isFoldedByDefault) : this(name, region)
 {
     this.Type = type;
     this.IsFoldedByDefault = isFoldedByDefault;
 }
Ejemplo n.º 14
0
 public FoldingRegion(string name, DomRegion region, FoldType type) : this(name, region)
 {
     this.Type = type;
 }
Ejemplo n.º 15
0
 public FoldingRegion(string name, DomRegion region, bool isFoldedByDefault) : this(name, region)
 {
     this.IsFoldedByDefault = isFoldedByDefault;
 }
Ejemplo n.º 16
0
 public Error(ErrorType errorType, DomRegion region, string message)
 {
     this.ErrorType = errorType;
     this.Region    = region;
     this.Message   = message;
 }
Ejemplo n.º 17
0
 public ExpressionResult(string expression, DomRegion region, ExpressionContext expressionContext) : this(expression, region, new [] { expressionContext })
 {
 }
Ejemplo n.º 18
0
 public FoldingRegion(DomRegion region) : this(null, region)
 {
 }