| 1 | /** |
| 2 | * |
| 3 | */ |
| 4 | package de.uka.ipd.sdq.pcm.gmf.composite.edit.commands; |
| 5 | |
| 6 | import org.eclipse.gmf.runtime.common.core.command.CommandResult; |
| 7 | import org.eclipse.swt.SWT; |
| 8 | import org.eclipse.swt.widgets.MessageBox; |
| 9 | import org.eclipse.swt.widgets.Shell; |
| 10 | import org.eclipse.ui.PlatformUI; |
| 11 | |
| 12 | /**Utility functions for commands in composite package. |
| 13 | * @author groenda |
| 14 | * @generated not |
| 15 | */ |
| 16 | public class CompositeCommandsUtil { |
| 17 | |
| 18 | /**Notifies the user that re-orientation is not supported and cancels the current command. |
| 19 | * @return Result of cancel command. |
| 20 | */ |
| 21 | public static CommandResult displayReorientationError() { |
| 22 | Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() |
| 23 | .getShell(); |
| 24 | MessageBox messageBox = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR); |
| 25 | messageBox.setText("Notice"); |
| 26 | messageBox |
| 27 | .setMessage("Please delete the link and create a new one instead of reorienting it."); |
| 28 | messageBox.open(); |
| 29 | return CommandResult.newCancelledCommandResult(); |
| 30 | } |
| 31 | |
| 32 | |
| 33 | } |