blob: 4f37fa9433e3b52a7b9f568d619b54c9f0e047d4 [file] [log] [blame]
/*****************************************************************************
* 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 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Ansgar Radermacher (CEA LIST) - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.moka.tracepoint.service.handler;
import org.eclipse.emf.common.command.Command;
import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.moka.tracepoint.service.commands.ToggleTracepointActivationCommand;
/**
* Handler for toggling tracepoint activation. Delegates to associated command
*/
public class ToggleTracepointActivationHandler extends AbstractCommandHandler {
@Override
protected Command getCommand() {
// not useful to cache command, since selected element may change
return new GMFtoEMFCommandWrapper(new ToggleTracepointActivationCommand(getSelectedElement()));
}
}