Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'incoming/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CustomTimeObservationCreateCommand.java')
-rw-r--r--incoming/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CustomTimeObservationCreateCommand.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/incoming/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CustomTimeObservationCreateCommand.java b/incoming/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CustomTimeObservationCreateCommand.java
index 7940b48ed69..e0bc540df0d 100644
--- a/incoming/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CustomTimeObservationCreateCommand.java
+++ b/incoming/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/commands/CustomTimeObservationCreateCommand.java
@@ -37,19 +37,19 @@ public class CustomTimeObservationCreateCommand extends EditElementCommand {
@Override
protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
final TimeObservation timeObservation = UMLFactory.eINSTANCE.createTimeObservation();
- final CreateElementRequest request = (CreateElementRequest) getRequest();
- final EditPart originalTarget = (EditPart) request.getParameter(CustomPaletteFactory.ORIGINAL_TARGET);
- final NamedElement targetElement = (NamedElement) ((View) originalTarget.getModel()).getElement();
+ final CreateElementRequest request = (CreateElementRequest)getRequest();
+ final EditPart originalTarget = (EditPart)request.getParameter(CustomPaletteFactory.ORIGINAL_TARGET);
+ final NamedElement targetElement = (NamedElement)((View)originalTarget.getModel()).getElement();
// TODO: firstEvent depending on the click location relative to the originalTarget EditPart figure
final Package containingPackage = EcoreUtils.getContaining(request.getContainer(), Package.class);
- if (containingPackage == null) {
+ if(containingPackage == null) {
return CommandResult.newErrorCommandResult("The container must be in a Package"); //$NON-NLS-1$
}
containingPackage.getPackagedElements().add(timeObservation);
timeObservation.setEvent(targetElement);
- ((CreateElementRequest) getRequest()).setNewElement(timeObservation);
+ ((CreateElementRequest)getRequest()).setNewElement(timeObservation);
return CommandResult.newOKCommandResult(timeObservation);
}
}

Back to the top