Project

General

Profile

Download (985 Bytes) Statistics
| Branch: | Tag: | Revision:
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.draw2d.graph;
12

    
13
/**
14
 * Inverts any edges which are marked as backwards or "feedback" edges.
15
 * 
16
 * @author Daniel Lee
17
 * @since 2.1.2
18
 */
19
class InvertEdges extends GraphVisitor {
20

    
21
	/**
22
	 * 
23
	 * @see GraphVisitor#visit(org.eclipse.draw2d.graph.DirectedGraph)
24
	 */
25
	public void visit(DirectedGraph g) {
26
		for (int i = 0; i < g.edges.size(); i++) {
27
			Edge e = g.edges.getEdge(i);
28
			if (e.isFeedback)
29
				e.invert();
30
		}
31
	}
32

    
33
}
(20-20/49)