[215179] gmf_R_2_0_maintenance mariot.chauvin 090403 The way DiagramGenerator#findConnectionsToPaint(...) gets the view connections source will cause the image export to fail
diff --git a/org.eclipse.gmf.runtime.diagram.ui.render/META-INF/MANIFEST.MF b/org.eclipse.gmf.runtime.diagram.ui.render/META-INF/MANIFEST.MF index ef5e75a..e3c1cb3 100644 --- a/org.eclipse.gmf.runtime.diagram.ui.render/META-INF/MANIFEST.MF +++ b/org.eclipse.gmf.runtime.diagram.ui.render/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Plugin.name Bundle-SymbolicName: org.eclipse.gmf.runtime.diagram.ui.render; singleton:=true -Bundle-Version: 1.0.101.qualifier +Bundle-Version: 1.0.102.qualifier Bundle-Activator: org.eclipse.gmf.runtime.diagram.ui.render.internal.DiagramUIRenderPlugin Bundle-Vendor: %Plugin.providerName Bundle-Localization: plugin
diff --git a/org.eclipse.gmf.runtime.diagram.ui.render/src/org/eclipse/gmf/runtime/diagram/ui/render/clipboard/DiagramGenerator.java b/org.eclipse.gmf.runtime.diagram.ui.render/src/org/eclipse/gmf/runtime/diagram/ui/render/clipboard/DiagramGenerator.java index f364f9b..7611105 100644 --- a/org.eclipse.gmf.runtime.diagram.ui.render/src/org/eclipse/gmf/runtime/diagram/ui/render/clipboard/DiagramGenerator.java +++ b/org.eclipse.gmf.runtime.diagram.ui.render/src/org/eclipse/gmf/runtime/diagram/ui/render/clipboard/DiagramGenerator.java
@@ -1,12 +1,13 @@ /****************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. + * Copyright (c) 2002, 2008 IBM Corporation and others. * 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: - * IBM Corporation - initial API and implementation + * IBM Corporation - initial API and implementation + * Mariot Chauvin <mariot.chauvin@obeo.fr> - bug 215179 ****************************************************************************/ package org.eclipse.gmf.runtime.diagram.ui.render.clipboard; @@ -27,6 +28,7 @@ import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.draw2d.geometry.Translatable; import org.eclipse.gef.ConnectionEditPart; +import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPartViewer; import org.eclipse.gef.GraphicalEditPart; import org.eclipse.gef.LayerConstants; @@ -510,17 +512,17 @@ for (Iterator iter = editParts.iterator(); iter.hasNext();) { IGraphicalEditPart element = (IGraphicalEditPart) iter.next(); - // Get its view - View view = (View) element.getModel(); // If the view is a shape view... if (element instanceof ShapeEditPart) { // Get its connections source - List sourceConnections = view.getSourceEdges(); + List sourceConnections = element.getSourceConnections(); // For each source connection... for (int i = 0; i < sourceConnections.size(); i++) { - Edge edge = (Edge) sourceConnections.get(i); + EditPart part = (EditPart) sourceConnections.get(i); + Edge edge = (Edge) part.getModel(); + // Get the connections target View toView = (edge).getTarget();