<
aspect xmlns:src="
http://www.sdml.info/srcML/src"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns="
http://control.ee.ethz.ch/XWeaver/AspectX"
xsi:schemaLocation="
http://control.ee.ethz.ch/XWeaver/AspectX ../../../../src/xsd/aspectX.xsd"
name="
AddSingleLineAtAround">
<
description>
This aspect tests <
code>
block_around_codeFragment</
code>
weaving rule by
inserting one line comment at the beginning and another
one line comment at the end of a <
code>
block</
code>
. Thus the block
in the base code will be surrounded by inserted comments.
This aspect is an alternative to <
code>
AddSingleLineAtBeginAndEnd</
code>
.
<
author>
I. Birrer</
author>
<
see>
AddSingleLineAtBeginAndEnd</
see>
</
description>
<
advice type="
around"
name="
addSingleLineAround">
<
description>
Adds two single line comments in a block.</
description>
<
pointcut type="
src:block"
constraint="
not(parent::src:function) and not(.//src:block)" />
<
codeModifier type="
codeFragment">
<
text>
/** Inserted by aspect: AddSingleLineAround - Line 1 **/</
text>
<
text>
${blockBody}</
text>
<
text>
/** Inserted by aspect: AddSingleLineAround - Line 2 **/</
text>
</
codeModifier>
</
advice>
</
aspect>
v