Clover Coverage Report - XWiki Rendering - Parent POM 4.0-SNAPSHOT (Aggregated)
Coverage timestamp: Mon Mar 12 2012 18:03:13 CET
../../../../../../img/srcFileCovDistChart9.png 55% of files have more coverage
8   58   4   4
4   28   0.5   2
2     2  
1    
 
  BreakTagHandler       Line # 29 8 0% 4 2 85.7% 0.85714287
 
  (219)
 
1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.rendering.wikimodel.xhtml.handler;
21   
22    import org.xwiki.rendering.wikimodel.WikiParameters;
23    import org.xwiki.rendering.wikimodel.xhtml.impl.XhtmlHandler.TagStack.TagContext;
24   
25    /**
26    * @version $Id: 86bda78dbbd960241d81387c4c58d230be10b3bf $
27    * @since 4.0M1
28    */
 
29    public class BreakTagHandler extends TagHandler
30    {
 
31  309 toggle public BreakTagHandler()
32    {
33  309 super(false, false, false);
34    }
35   
 
36  78 toggle @Override
37    protected void begin(TagContext context)
38    {
39    // If we're inside a quotation line then a BR must close the current
40    // quotation line and start a new quotation line.
41  78 int quoteDepth = (Integer) context.getTagStack().getStackParameter(
42    QuoteTagHandler.QUOTEDEPTH);
43  78 if (quoteDepth > 0) {
44  7 context.getScannerContext().beginQuotLine(quoteDepth);
45   
46    // duplicate span on several quotation lines
47  7 WikiParameters spanParameters;
48  ? for (int i = 0; (spanParameters = (WikiParameters) context
49    .getTagStack().getStackParameter(
50    AbstractFormatTagHandler.FORMATPARAMETERS, i)) != null; ++i)
51    {
52  3 context.getScannerContext().beginFormat(spanParameters);
53    }
54    } else {
55  71 context.getScannerContext().onNewLine();
56    }
57    }
58    }