Reporter | Frank Munkert (fmu) |
---|---|
Created | Feb 29, 2012 3:40:21 PM |
Updated | Feb 29, 2012 11:27:50 PM |
Priority | Normal |
Type | Feature |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Unassigned |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
The behavior of Live Templates containing #regions should be changed as follows:
If a Live Template contains
#region Name
...
#endregion
and if a region with the same name already exists inside the current scope, then expanding the template should insert the text between #region and #endregion inside the already existing region. This also should work if the Live Template contains multiple regions.
For example:
Text of Live Template:
After expanding the template twice:
Regards
If a Live Template contains
#region Name
...
#endregion
and if a region with the same name already exists inside the current scope, then expanding the template should insert the text between #region and #endregion inside the already existing region. This also should work if the Live Template contains multiple regions.
For example:
Text of Live Template:
Template
#region Private Fields private $TYPE$ _$FIELD$; #endregion #region Public Fields public $TYPE$ $NAME$ { get { return _$FIELD$; } set { if (_$FIELD$ != value) { _$FIELD$ = value; NotifyPropertyChanged("$NAME$"); } } } #endregion
After expanding the template twice:
Expanded
#region Private Fields private double _left; private double _top; #endregion #region Public Fields public double Left { get { return _left; } set { if (_left != value) { _left = value; NotifyPropertyChanged("Left"); } } } public double Top { get { return _top; } set { if (_top != value) { _top = value; NotifyPropertyChanged("Top"); } } } #endregion
Regards
- Frank