Text on closing #endregion not displayed correctly?

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Grant Drake - Director, Kiwi Development Ltd
Version: 4.0.0246
Avatar
One of the "practices" we use when coding with #region/#endregion is to put the same name on the closing #endregion as the start (I wrote an add-in which does this amongst other things). It means that people scrolling back up through an expanded document know what the region above is when they see the closing tag.

However the Actipro control seems to not display this like VS.Net does (which ignores the text).

e.g.
#region Constructor

public MyClass()
{
}

#endregion Constructor

In the ActoPro SyntaxEditor SDI Editor example, this results in the word "Constructor" repeated and hanging out to the right if the outlining region is collapsed.

By design or not? I would have thought following the VS.Net model of any text after #endregion being hidden would be the sensible behaviour?

Absolutely brilliant control by the way - I have a bunch of projects I'm looking to use this with. I'm fed up with ICSharpCode, battled with Scintilla and this looks like the mutts nuts to me.

Regards,
Grant.

[Modified at 04/06/2007 12:13 PM]

Comments (4)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I like that phrase! Glad to have you as a convert.

On this problem, I'm thinking that you would need to modify the ActiproSoftware.CSharp.xml so that you give the end pattern for the scope that starts with a EndRegionPreProcessorDirectiveStartToken pattern a distinct token key like EndRegionPreProcessorDirectiveEndToken. Then back in the code-behind class for C# (CSharpDynamicSyntaxLanguage), in the GetTokenOutliningAction method, instead of ending a region on EndRegionPreProcessorDirectiveStartToken, end it on the distinct token key that you created. That seems to work when I do it here. It will be in the next maintenance release.


Actipro Software Support

Posted 17 years ago by Grant Drake - Director, Kiwi Development Ltd
Avatar
Thanks very much for the detailed workaround, I shall give that a go.

Incidentally, as a general rule how frequent are your maintenance releases? I looked in the "Announcements" forum and there doesnt seem to be a regular pattern - is it a case of if you have enough things to justify it you push one out as and when?

One further question related to that. If you don't purchase a support agreement, does that mean you cannot get any maintenance releases full stop? So even if some showstopper bug comes up thats it - you have to buy an upgrade (or support) license to get the bug-fixed version?

Regards,
Grant.
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Grant,

We don't like fixed schedules of releases and prefer to do them as we implement new features or make bug fixes. So as things accumulate up we make releases or if there is a bad bug that needs an immediate fix, we are able to get it out very quickly. This way, customers aren't stuck with the bug for a while.

Maintenance releases for the major/minor version you own are always free. So if you purchase a license you can get any 4.0.xxxx build free. Annual subscriptions let you get newer major/minor versions for free.


Actipro Software Support

Posted 17 years ago by Grant Drake - Director, Kiwi Development Ltd
Avatar
Thats brilliant, thanks very much for all your replies.
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.