Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 9e7341ad8b708f6fba4348e97206c66ab9856a54 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*******************************************************************************
 * Copyright (c) 2012 CEA LIST.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package org.eclipse.papyrus.uml.diagram.timing.custom;

import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.diagram.timing.custom.edit.commands.SwitchLifelineCommand;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;

public class SwitchLifelineAction implements IObjectActionDelegate {

	public final static String ID = "org.eclipse.papyrus.uml.diagram.timing.custom.SwitchLifelineActionID"; //$NON-NLS-1$

	public void run(final IAction action) {
		final SwitchLifelineCommand handler = new SwitchLifelineCommand();
		try {
			handler.execute(null);
		} catch (final ExecutionException e) {
			Activator.log.error("Error switching lifeline", e); //$NON-NLS-1$
		}

	}

	public void selectionChanged(final IAction action, final ISelection selection) {
		// nothing

	}

	public void setActivePart(final IAction action, final IWorkbenchPart targetPart) {
		// nothing
	}

}

Back to the top