blob: d4d761bb55caadfa70f2b382d749583486cf50a8 [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.infra.services.tracepoints.handler;
import org.eclipse.emf.common.command.Command;
import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.infra.services.tracepoints.commands.ToggleBreakpointCommand;
/**
* Handler for toggling a break point. Delegates to associated command
*
* @author Ansgar Radermacher (CEA LIST)
*/
public class ToggleBreakpointHandler extends AbstractCommandHandler {
@Override
protected Command getCommand() {
// not useful to cache command, since selected element may change
return new GMFtoEMFCommandWrapper(new ToggleBreakpointCommand(getSelectedElement()));
}
}