changcheng / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Add support for abstract group concept #519

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The idea would be the same as an abstract bean in Sping for example. The idea 
is to declare common files that a few groups will share without having to 
repeat those declarations. I understand that in a group I can already include 
another group however, that included group will be created unless we declare 
manually all the groups that matter to us (whitelist approach). Being able to 
declare a group as abstract would allow us to have a more "blacklist" approach 
where a group can be defined only for the purpose of being imported in other 
groups.

Original issue reported on code.google.com by alex.obj...@gmail.com on 12 Aug 2012 at 12:00

GoogleCodeExporter commented 9 years ago
Fixed in branch 1.4.x.

Now the group element has an optional attribute named "abstract" with a boolean 
value. Example:

<group name="abstractGroup" abstract="true"></group>

An abstract group won't be part of the model and can be used only to group the 
common parts of different groups.

Original comment by alex.obj...@gmail.com on 14 Aug 2012 at 9:14

GoogleCodeExporter commented 9 years ago
Hi Alex, is this supported in groovy as well ? I tried fooBlock(abstract:true) 
{} and it does not work.

Original comment by tlv...@gmail.com on 24 Sep 2012 at 5:01

GoogleCodeExporter commented 9 years ago
No, it is supported by XML DSL only. 
Create a feature request. 
Contribution are welcome ;)

Original comment by alex.obj...@gmail.com on 24 Sep 2012 at 5:04

GoogleCodeExporter commented 9 years ago
I will create a RFE, unfortunately my groovy kung fu is pretty weak, not sure I 
can help on that one...

Original comment by tlv...@gmail.com on 24 Sep 2012 at 5:20