EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.reliability.solver.popup.actions]

COVERAGE SUMMARY FOR SOURCE FILE [CompareAction.java]

nameclass, %method, %block, %line, %
CompareAction.java0%   (0/1)0%   (0/4)0%   (0/36)0%   (0/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CompareAction0%   (0/1)0%   (0/4)0%   (0/36)0%   (0/12)
CompareAction (): void 0%   (0/1)0%   (0/6)0%   (0/3)
run (IAction): void 0%   (0/1)0%   (0/25)0%   (0/6)
selectionChanged (IAction, ISelection): void 0%   (0/1)0%   (0/4)0%   (0/2)
setActivePart (IAction, IWorkbenchPart): void 0%   (0/1)0%   (0/1)0%   (0/1)

1package de.uka.ipd.sdq.reliability.solver.popup.actions;
2 
3import org.eclipse.core.resources.IFile;
4import org.eclipse.jface.action.IAction;
5import org.eclipse.jface.viewers.ISelection;
6import org.eclipse.jface.viewers.IStructuredSelection;
7import org.eclipse.ui.IActionDelegate;
8import org.eclipse.ui.IObjectActionDelegate;
9import org.eclipse.ui.IWorkbenchPart;
10 
11import de.uka.ipd.sdq.reliability.solver.compare.MarkovComparator;
12import de.uka.ipd.sdq.reliability.solver.helper.LoggingHelper;
13 
14public class CompareAction implements IObjectActionDelegate {
15 
16        /**
17         * Supports logging functionality.
18         */
19        private LoggingHelper loggingHelper = LoggingHelper.getSingletonInstance();
20 
21        /**
22         * The user's selection.
23         */
24        private ISelection selection;
25 
26        /**
27         * Constructor for CompareAction.
28         */
29        public CompareAction() {
30                super();
31        }
32 
33        /**
34         * @see IActionDelegate#run(IAction)
35         */
36        public void run(IAction action) {
37 
38                // Setup logging:
39                loggingHelper.initializeLogging();
40 
41                // We assume exactly two *.markov files to be selected:
42                Object[] selectedObjects = ((IStructuredSelection) selection).toArray();
43                new MarkovComparator().compare(((IFile) selectedObjects[0])
44                                .getLocation().toString(), // first file
45                                ((IFile) selectedObjects[1]).getLocation().toString()); // second
46                // file
47        }
48 
49        /**
50         * @see IActionDelegate#selectionChanged(IAction, ISelection)
51         */
52        public void selectionChanged(IAction action, ISelection selection) {
53                this.selection = selection;
54        }
55 
56        /**
57         * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
58         */
59        public void setActivePart(IAction action, IWorkbenchPart targetPart) {
60 
61        }
62}

[all classes][de.uka.ipd.sdq.reliability.solver.popup.actions]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov