/******************************************************************************* * 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.gef.EditPart; import org.eclipse.gef.Request; import org.eclipse.gef.commands.Command; import org.eclipse.gef.requests.CreateRequest; import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; import org.eclipse.gmf.runtime.diagram.ui.requests.ChangePropertyValueRequest; import org.eclipse.gmf.runtime.diagram.ui.tools.AbstractPopupBarTool; public class OpenTextualModelEditorPopupBarTool extends AbstractPopupBarTool{ public OpenTextualModelEditorPopupBarTool(EditPart epHost, CreateRequest theRequest) { super(epHost, theRequest); } @Override protected Request createTargetRequest() { ChangePropertyValueRequest req = new ChangePropertyValueRequest("open", "open"); return req; } @Override protected Command getCommand() { return new OpenTextualModelEditorOnModelElementCommand((IGraphicalEditPart)getHost()); } }