Clover coverage report - PMD - 3.3
Coverage timestamp: Thu Sep 15 2005 17:59:57 EDT
file stats: LOC: 44   Methods: 2
NCLOC: 20   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
XPathFragmentAddingItem.java - 0% 0% 0%
coverage
 1    package net.sourceforge.pmd.util.viewer.gui.menu;
 2   
 3    import net.sourceforge.pmd.util.viewer.model.ViewerModel;
 4   
 5    import javax.swing.*;
 6    import java.awt.event.ActionEvent;
 7    import java.awt.event.ActionListener;
 8   
 9   
 10    /**
 11    * adds the given path fragment to the XPath expression upon action
 12    *
 13    * @author Boris Gruschko ( boris at gruschko.org )
 14    * @version $Id: XPathFragmentAddingItem.java,v 1.7 2005/08/23 17:17:49 tomcopeland Exp $
 15    */
 16    public class XPathFragmentAddingItem
 17    extends JMenuItem
 18    implements ActionListener {
 19    private ViewerModel model;
 20    private String fragment;
 21   
 22    /**
 23    * constructs the item
 24    *
 25    * @param caption menu item's caption
 26    * @param model model to refer to
 27    * @param fragment XPath expression fragment to be added upon action
 28    */
 29  0 public XPathFragmentAddingItem(String caption, ViewerModel model, String fragment) {
 30  0 super(caption);
 31   
 32  0 this.model = model;
 33  0 this.fragment = fragment;
 34   
 35  0 addActionListener(this);
 36    }
 37   
 38    /**
 39    * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
 40    */
 41  0 public void actionPerformed(ActionEvent e) {
 42  0 model.appendToXPathExpression(fragment, this);
 43    }
 44    }