EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.pcmbench.tabs.operations]

COVERAGE SUMMARY FOR SOURCE FILE [OperationDeleteCellValueListener.java]

nameclass, %method, %block, %line, %
OperationDeleteCellValueListener.java0%   (0/2)0%   (0/5)0%   (0/47)0%   (0/15)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class OperationDeleteCellValueListener0%   (0/1)0%   (0/3)0%   (0/32)0%   (0/12)
OperationDeleteCellValueListener (TableViewer): void 0%   (0/1)0%   (0/6)0%   (0/3)
widgetDefaultSelected (SelectionEvent): void 0%   (0/1)0%   (0/1)0%   (0/1)
widgetSelected (SelectionEvent): void 0%   (0/1)0%   (0/25)0%   (0/8)
     
class OperationDeleteCellValueListener$10%   (0/1)0%   (0/2)0%   (0/15)0%   (0/4)
OperationDeleteCellValueListener$1 (OperationDeleteCellValueListener, Transac... 0%   (0/1)0%   (0/10)0%   (0/2)
doExecute (): void 0%   (0/1)0%   (0/5)0%   (0/2)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.pcmbench.tabs.operations;
5 
6import org.eclipse.emf.transaction.RecordingCommand;
7import org.eclipse.emf.transaction.TransactionalEditingDomain;
8import org.eclipse.emf.transaction.util.TransactionUtil;
9import org.eclipse.jface.viewers.TableViewer;
10import org.eclipse.swt.events.SelectionEvent;
11import org.eclipse.swt.events.SelectionListener;
12 
13import de.uka.ipd.sdq.pcm.repository.OperationSignature;
14import de.uka.ipd.sdq.pcmbench.tabs.generic.SelectionChangedListener;
15 
16/**
17 * @author Roman Andrej
18 */
19public class OperationDeleteCellValueListener extends SelectionChangedListener implements SelectionListener {
20 
21 
22        private TableViewer viewer;
23        
24        /** Constructor */
25        public OperationDeleteCellValueListener(TableViewer viewer) {
26                this.viewer = viewer;
27        }
28 
29        /* (non-Javadoc)
30         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
31         */
32        public void widgetSelected(SelectionEvent e) {
33                
34                final OperationSignature signature = (OperationSignature) getSelectedElement();
35                
36                TransactionalEditingDomain editingDomain = TransactionUtil
37                                .getEditingDomain(signature);
38 
39                RecordingCommand recCommand = new RecordingCommand(editingDomain) {
40                        @Override
41                        protected void doExecute() {
42                                signature.setReturnType__OperationSignature(null);
43                        }
44                };
45 
46                recCommand.setDescription("Set void return type signature");
47                editingDomain.getCommandStack().execute(recCommand);
48                
49                viewer.refresh();
50        }
51 
52        /* (non-Javadoc)
53         * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
54         */
55        public void widgetDefaultSelected(SelectionEvent e) {
56                // The implementation is not necessary.
57        }
58}

[all classes][de.uka.ipd.sdq.pcmbench.tabs.operations]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov