EMMA Coverage Report (generated Wed May 28 22:30:35 PDT 2008)
[all classes][default package]

COVERAGE SUMMARY FOR SOURCE FILE [ExamExtension.java]

nameclass, %method, %block, %line, %
ExamExtension.java80%  (4/5)62%  (18/29)59%  (215/362)60%  (53.4/89)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MenuBuilder$EditAction0%   (0/1)0%   (0/2)0%   (0/14)0%   (0/5)
MenuBuilder$EditAction (MenuBuilder): void 0%   (0/1)0%   (0/10)0%   (0/3)
actionPerformed (ActionEvent): void 0%   (0/1)0%   (0/4)0%   (0/2)
     
class MenuBuilder100% (1/1)55%  (6/11)52%  (105/203)52%  (22.4/43)
access$100 (MenuBuilder): void 0%   (0/1)0%   (0/3)0%   (0/1)
addComment (): void 0%   (0/1)0%   (0/38)0%   (0/11)
getObjectMenuItem (BObject): JMenuItem 0%   (0/1)0%   (0/10)0%   (0/1)
notifyPostObjectMenu (BObject, JMenuItem): void 0%   (0/1)0%   (0/13)0%   (0/3)
notifyPostToolsMenu (BPackage, JMenuItem): void 0%   (0/1)0%   (0/13)0%   (0/3)
showCurrentStatus (String): void 100% (1/1)74%  (51/69)84%  (11.8/14)
notifyPostClassMenu (BClass, JMenuItem): void 100% (1/1)86%  (18/21)97%  (4.8/5)
MenuBuilder (): void 100% (1/1)100% (3/3)100% (2/2)
access$000 (MenuBuilder, String): void 100% (1/1)100% (4/4)100% (1/1)
getClassMenuItem (BClass): JMenuItem 100% (1/1)100% (19/19)100% (3/3)
getToolsMenuItem (BPackage): JMenuItem 100% (1/1)100% (10/10)100% (1/1)
     
class ExamExtension100% (1/1)70%  (7/10)63%  (46/73)64%  (14/22)
getDescription (): String 0%   (0/1)0%   (0/2)0%   (0/1)
getURL (): URL 0%   (0/1)0%   (0/19)0%   (0/4)
getVersion (): String 0%   (0/1)0%   (0/2)0%   (0/1)
packageOpened (PackageEvent): void 100% (1/1)81%  (17/21)60%  (3/5)
ExamExtension (): void 100% (1/1)100% (3/3)100% (1/1)
getName (): String 100% (1/1)100% (2/2)100% (1/1)
isCompatible (): boolean 100% (1/1)100% (2/2)100% (1/1)
packageClosing (PackageEvent): void 100% (1/1)100% (1/1)100% (1/1)
startup (BlueJ): void 100% (1/1)100% (17/17)100% (5/5)
terminate (): void 100% (1/1)100% (4/4)100% (2/2)
     
class Preferences100% (1/1)75%  (3/4)85%  (45/53)85%  (11/13)
saveValues (): void 0%   (0/1)0%   (0/8)0%   (0/2)
Preferences (BlueJ): void 100% (1/1)100% (33/33)100% (8/8)
getPanel (): JPanel 100% (1/1)100% (3/3)100% (1/1)
loadValues (): void 100% (1/1)100% (9/9)100% (2/2)
     
class MenuBuilder$SimpleAction100% (1/1)100% (2/2)100% (19/19)100% (6/6)
MenuBuilder$SimpleAction (MenuBuilder, String, String): void 100% (1/1)100% (13/13)100% (4/4)
actionPerformed (ActionEvent): void 100% (1/1)100% (6/6)100% (2/2)

1import bluej.extensions.*;
2import bluej.extensions.event.*;
3import bluej.extensions.editor.*;
4 
5import java.net.URL;
6import javax.swing.*;
7import java.awt.event.*;
8 
9/*
10 * This is the starting point of a BlueJ Extension. 
11 * Our extension displays a class menu item iff the class is compiled
12 */
13public class ExamExtension extends Extension implements PackageListener {
14    /*
15     * When this method is called, the extension may start its work.
16     */
17    public void startup (BlueJ bluej) {
18        // Register a generator for menu items
19        bluej.setMenuGenerator(new MenuBuilder());
20 
21        // Register a "preferences" panel generator
22        Preferences myPreferences = new Preferences(bluej);
23        bluej.setPreferenceGenerator(myPreferences);
24 
25        // Listen for BlueJ events at the "package" level
26        bluej.addPackageListener(this);
27    }
28 
29    /*
30     * A package has been opened. Print the name of the project it is part of.
31     * System.out is redirected to the BlueJ debug log file.
32     * The location of this file is given in the Help/About BlueJ dialog box.
33     */
34    public void packageOpened ( PackageEvent ev ) {
35        try {
36            System.out.println ("Project " + ev.getPackage().getProject().getName() + " opened.");
37        } catch (ExtensionException e) {
38            System.out.println("Project closed by BlueJ");
39        }
40    }  
41  
42    /*
43     * A package is closing.
44     */
45    public void packageClosing ( PackageEvent ev ) {
46    }  
47    
48    /*
49     * This method must decide if this Extension is compatible with the 
50     * current release of the BlueJ Extensions API
51     */
52    public boolean isCompatible () { 
53        return true; 
54    }
55 
56    /*
57     * Returns the version number of this extension
58     */
59    public String  getVersion () { 
60        return ("2004.09");  
61    }
62 
63    /*
64     * Returns the user-visible name of this extension
65     */
66    public String  getName () { 
67        return ("Exam Extension");  
68    }
69 
70    public void terminate() {
71        System.out.println ("Exam extension terminates");
72    }
73    
74    public String getDescription () {
75        return ("A simple extension for exam.");
76    }
77 
78    /*
79     * Returns a URL where you can find info on this extension.
80     * The real problem is making sure that the link will still be alive in three years...
81     */
82    public URL getURL () {
83        try {
233        }
234    }
235}

[all classes][default package]
EMMA 2.0.4217 (C) Vladimir Roubtsov