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

COVERAGE SUMMARY FOR SOURCE FILE [EntryLevelSystemCallConfigureCommand.java]

nameclass, %method, %block, %line, %
EntryLevelSystemCallConfigureCommand.java0%   (0/1)0%   (0/4)0%   (0/92)0%   (0/30)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EntryLevelSystemCallConfigureCommand0%   (0/1)0%   (0/4)0%   (0/92)0%   (0/30)
EntryLevelSystemCallConfigureCommand (ConfigureRequest, Signature, ProvidedRo... 0%   (0/1)0%   (0/22)0%   (0/8)
doExecuteWithResult (IProgressMonitor, IAdaptable): CommandResult 0%   (0/1)0%   (0/26)0%   (0/10)
setProvidedRoleEntryLevelSystemCall (IProgressMonitor, IAdaptable): CommandRe... 0%   (0/1)0%   (0/22)0%   (0/6)
setSignatureEntryLevelSystemCall (IProgressMonitor, IAdaptable): CommandResult 0%   (0/1)0%   (0/22)0%   (0/6)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.pcm.gmf.usage.helper;
5 
6import org.eclipse.core.commands.ExecutionException;
7import org.eclipse.core.runtime.IAdaptable;
8import org.eclipse.core.runtime.IProgressMonitor;
9import org.eclipse.gmf.runtime.common.core.command.CommandResult;
10import org.eclipse.gmf.runtime.common.core.command.ICommand;
11import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
12import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
13import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
14import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
15 
16import de.uka.ipd.sdq.pcm.repository.ProvidedRole;
17import de.uka.ipd.sdq.pcm.repository.Signature;
18import de.uka.ipd.sdq.pcm.usagemodel.UsagemodelPackage;
19 
20/**
21 * @author admin
22 *
23 */
24public class EntryLevelSystemCallConfigureCommand extends ConfigureElementCommand {
25 
26        private ConfigureRequest request = null;
27        private Signature signature = null;
28        private ProvidedRole providedRole = null;
29        
30        public EntryLevelSystemCallConfigureCommand(ConfigureRequest request,
31                        Signature signature, ProvidedRole providedRole) {
32                super(request);
33                this.request = request;
34                this.signature = signature;
35                this.providedRole = providedRole;
36        }
37 
38        /* (non-Javadoc)
39         * @see org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
40         */
41        @Override
42        protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
43                        IAdaptable info) throws ExecutionException {
44 
45                CommandResult commandResult = setSignatureEntryLevelSystemCall(monitor,
46                                info);
47                if (!isOK(commandResult)) {
48                        return CommandResult
49                                        .newErrorCommandResult("Set Signature for the EntryLevelSystemCall failed!");
50                }
51                commandResult = setProvidedRoleEntryLevelSystemCall(monitor, info);
52                if (!isOK(commandResult)) {
53                        return CommandResult
54                                        .newErrorCommandResult("Set ProvidedRole for the EntryLevelSystemCall failed!");
55                }
56                return CommandResult.newOKCommandResult();
57        }
58 
59        private CommandResult setSignatureEntryLevelSystemCall(
60                        IProgressMonitor monitor, IAdaptable info)
61                        throws ExecutionException {
62                
63                ICommand cmd = new SetValueCommand(new SetRequest(request
64                                .getElementToConfigure(), UsagemodelPackage.eINSTANCE
65                                .getEntryLevelSystemCall_OperationSignature__EntryLevelSystemCall(),
66                                signature));
67                
68                cmd.execute(monitor, info);
69                
70                return cmd.getCommandResult();
71        }
72 
73        private CommandResult setProvidedRoleEntryLevelSystemCall(
74                        IProgressMonitor monitor, IAdaptable info)
75                        throws ExecutionException {
76                
77                ICommand cmd = new SetValueCommand(new SetRequest(request
78                                .getElementToConfigure(), UsagemodelPackage.eINSTANCE
79                                .getEntryLevelSystemCall_ProvidedRole_EntryLevelSystemCall(),
80                                providedRole));
81                
82                cmd.execute(monitor, info);
83                
84                return cmd.getCommandResult();
85        }
86        
87        
88}

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