/*******************************************************************************
* Copyright (c) 2012, 2013 University of Mannheim: Chair for Software Engineering
* 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
*
* Contributors:
* Ralph Gerbig - initial API and implementation and initial documentation
*******************************************************************************/
package de.uni_mannheim.informatik.swt.models.plm.diagram.custom.popupbartools;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import de.uni_mannheim.informatik.swt.mlm.workbench.ExtensionPointService;
public class OpenTextualModelEditorOnModelElementCommand extends Command{
final private IGraphicalEditPart host;
/**
*
* @param host Element which shall be toggled
*/
public OpenTextualModelEditorOnModelElementCommand(IGraphicalEditPart host){
this.host = host;
}
@Override
public void execute() {
super.execute();
try {
ExtensionPointService.Instance().getActiveTextualVisualizationService().run(host);
} catch (CoreException e1) {
e1.printStackTrace();
}
}
}