Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2007 Anyware Technologies 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: Anyware Technologies - initial API and implementation $Id: EcoreReorientConnectionViewCommand.java,v 1.3 2009/02/02 08:39:07 jlescot Exp $ /
package org.eclipse.emf.ecoretools.diagram.edit.commands;
import  org.eclipse.core.runtime.IAdaptable;
import  org.eclipse.core.runtime.IProgressMonitor;
import  org.eclipse.gmf.runtime.common.core.command.CommandResult;
import  org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import  org.eclipse.gmf.runtime.notation.Edge;
import  org.eclipse.gmf.runtime.notation.View;

Generated:
public class EcoreReorientConnectionViewCommand extends AbstractTransactionalCommand {

Generated:
	private IAdaptable edgeAdaptor;

Generated:
		super(editingDomainlabelnull);
	}

Generated:
	public List getAffectedFiles() {
		View view = (View) .getAdapter(View.class);
		if (view != null) {
			return getWorkspaceFiles(view);
		}
		return super.getAffectedFiles();
	}

Generated:
	public IAdaptable getEdgeAdaptor() {
		return ;
	}

Generated:
	public void setEdgeAdaptor(IAdaptable edgeAdaptor) {
		this. = edgeAdaptor;
	}

Generated:
	protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) {
		assert null !=  : "Null child in EcoreReorientConnectionViewCommand"//$NON-NLS-1$
		Edge edge = (Edge) getEdgeAdaptor().getAdapter(Edge.class);
		assert null != edge : "Null edge in EcoreReorientConnectionViewCommand"//$NON-NLS-1$
		View tempView = edge.getSource();
		edge.setSource(edge.getTarget());
		edge.setTarget(tempView);
		return CommandResult.newOKCommandResult();
	}
New to GrepCode? Check out our FAQ X