Author Topic: C# - attributes not considered part of blocks  (Read 2963 times)

asipe

  • Senior Community Member
  • Posts: 113
  • Hero Points: 4
C# - attributes not considered part of blocks
« 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


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2821
  • Hero Points: 426
Re: C# - attributes not considered part of blocks
« Reply #1 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.