SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: asipe on January 07, 2009, 10:17:18 pm

Title: C# - attributes not considered part of blocks
Post by: asipe on January 07, 2009, 10:17:18 pm
Just a quick bug report.

When using C#, the attributes associated with blocks are not included correctly when doing block operations.

You can reproduce this with a basic method:

Code: [Select]
   
    [Test]
    public void TestNothingSpecial() {
      Assert.IsTrue(true);
    }

Position the cursor on the last brace and hit 'select code block'.   The method is correctly selected, but the attribute(s) are not.  The same problem occurs when doing quick refactorings in C#.

Interestingly, the same problem doesn't occur when the block is a class.

Code: [Select]
namespace Blah.Blah {
  using NUnit.Framework;

  [TestFixture]
  [Serializable]
  public sealed class SomeTest {
    [Test]
    public void TestNothingSpecial() {
      Assert.IsTrue(true);
    }
  }
}

Position the cursor on the 2nd to last brace and doing a 'select code block' correctly selects both class level attributes.

-andy

Title: Re: C# - attributes not considered part of blocks
Post by: Dennis on January 20, 2009, 08:39:07 pm
Thanks for letting us know about this.  I have filed a defect in our tracking system so we can address this at a future time.