EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.pcm.gmf.allocation.part]

COVERAGE SUMMARY FOR SOURCE FILE [PcmSystemSelectorPage.java]

nameclass, %method, %block, %line, %
PcmSystemSelectorPage.java0%   (0/1)0%   (0/3)0%   (0/46)0%   (0/15)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SystemSelectorPage0%   (0/1)0%   (0/3)0%   (0/46)0%   (0/15)
SystemSelectorPage (System): void 0%   (0/1)0%   (0/14)0%   (0/5)
getSelectedSystem (): System 0%   (0/1)0%   (0/3)0%   (0/1)
validatePage (): boolean 0%   (0/1)0%   (0/29)0%   (0/9)

1package de.uka.ipd.sdq.pcm.gmf.allocation.part;
2 
3import de.uka.ipd.sdq.pcm.system.System;
4 
5/**
6 * This wizard page uses the regular resource selector page, but checks
7 * the type of the resource selected by the user to be a System.
8 */
9class SystemSelectorPage extends ResourceSelectorPage {
10 
11                private System mySystem;
12                
13                protected SystemSelectorPage(System selectedSystem) {
14                        super("Select system",selectedSystem);
15                        setTitle("Diagram system");
16                        setDescription("Select the system to be used for the diagram.");
17                        mySystem = selectedSystem;
18                }
19                
20                protected System getSelectedSystem() {
21                        return mySystem;
22                }
23 
24                @Override
25                protected boolean validatePage() {
26                        if (getResolvedObject() == null) {
27                                setErrorMessage("No system selected");
28                                return false;
29                        }
30 
31                        if (getResolvedObject() instanceof System) {
32                                mySystem = (System) getResolvedObject(); 
33                        }
34                        else {
35                                setErrorMessage("Wrong resource type selected");
36                                return false;
37                        }
38 
39                        setErrorMessage(null);
40                        return super.validatePage();
41                }
42        }

[all classes][de.uka.ipd.sdq.pcm.gmf.allocation.part]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov