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

COVERAGE SUMMARY FOR SOURCE FILE [ComponentParameterEditHelperAdvice.java]

nameclass, %method, %block, %line, %
ComponentParameterEditHelperAdvice.java0%   (0/1)0%   (0/2)0%   (0/39)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ComponentParameterEditHelperAdvice0%   (0/1)0%   (0/2)0%   (0/39)0%   (0/13)
ComponentParameterEditHelperAdvice (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getAfterConfigureCommand (ConfigureRequest): ICommand 0%   (0/1)0%   (0/36)0%   (0/12)

1package de.uka.ipd.sdq.pcm.gmf.repository.helper;
2 
3import org.eclipse.gmf.runtime.common.core.command.ICommand;
4import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
5import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
6import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
7import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
8import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
9import org.eclipse.ui.PlatformUI;
10 
11import de.uka.ipd.sdq.pcm.dialogs.variablenames.SetOutputVariableNameDialog;
12import de.uka.ipd.sdq.pcm.parameter.ParameterPackage;
13import de.uka.ipd.sdq.stoex.AbstractNamedReference;
14 
15public class ComponentParameterEditHelperAdvice extends
16                AbstractEditHelperAdvice implements IEditHelperAdvice {
17 
18        @Override
19        protected ICommand getAfterConfigureCommand(ConfigureRequest request) {
20                SetOutputVariableNameDialog dialog = new SetOutputVariableNameDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
21                dialog.open();
22                
23                String enteredName = dialog.getResult();
24                if (enteredName == null){
25                        return new CanceledCommand();
26                }
27                
28                AbstractNamedReference namedReference = 
29                        dialog.getOutputVariableReference();
30 
31                ICommand cmd = new SetValueCommand(new SetRequest(request
32                                .getElementToConfigure(), ParameterPackage.eINSTANCE
33                                .getVariableUsage_NamedReference__VariableUsage(),
34                                namedReference));
35                return cmd;
36        }
37 
38}

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