<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -222,6 +222,18 @@ public class GroupInSubprocessCommand extends AbstractTransactionalCommand {
         final Node spview = (Node) ((IAdaptable) 
                 ((List) req.getNewObject()).get(0)).getAdapter(Node.class);
         _createdSubprocessProxyId = EMFCoreUtil.getProxyID(spview.getElement());
+        
+        // collecting semantic elements:
+        final List&lt;EObject&gt; semantic = new LinkedList&lt;EObject&gt;(); 
+        for (GraphicalEditPart part : editParts) {
+            semantic.add(part.resolveSemanticElement());
+            if (part.resolveSemanticElement() instanceof Activity) {
+                Graph graph = ((Activity) part.resolveSemanticElement()).getGraph();
+                graph.getVertices().remove(part.resolveSemanticElement());
+                ((Activity) part.resolveSemanticElement()).setGraph(null);
+            }
+        }
+        
 //       retargeting connections.
 
         for (SequenceEdgeEditPart part : externalSrcConnections) {
@@ -260,12 +272,11 @@ public class GroupInSubprocessCommand extends AbstractTransactionalCommand {
         }
 
 
-        final List&lt;EObject&gt; semantic = new LinkedList&lt;EObject&gt;(); 
+        
         Location sploc = (Location) spview.getLayoutConstraint();
         
         for (GraphicalEditPart part : editParts) {
             View v = (View) part.getModel();
-            semantic.add(part.resolveSemanticElement());
             compartmentView.insertChild(v);
             
             if (v instanceof Node) {
@@ -326,9 +337,6 @@ public class GroupInSubprocessCommand extends AbstractTransactionalCommand {
         //second move the activities:               
         for (EObject obj : semantic) {
             if (obj instanceof Activity) {
-                Graph graph = ((Activity) obj).getGraph();
-                graph.getVertices().remove(obj);
-                ((Activity) obj).setGraph(null);
                 ((Activity) obj).setGraph((Graph) spview.getElement());
             }
         }</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/diagram/actions/GroupInSubprocessCommand.java</filename>
    </modified>
    <modified>
      <diff>@@ -96,7 +96,7 @@ public class BPMNProcessGenerator implements IProcessGenerator {
 	}
 	/**
 	 * @see BPMNProcessGenerator#BPMNProcessGenerator(IPath, boolean)
-	 * @param path
+	 * @param path. The full path in the workspace where the diagram is generated.
 	 */
 	public BPMNProcessGenerator(IPath path) {
 		this(path, false);</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/diagram/generation/impl/BPMNProcessGenerator.java</filename>
    </modified>
    <modified>
      <diff>@@ -91,7 +91,9 @@ public class BPMNVisual2ProcessGenerator extends BPMNProcessGenerator {
 	}
 	/**
 	 * Will create a new diagram on the new file.
-	 * @param path the path - it'd better be ending with bpmn_diagram.
+	 * @param path. The full path in the workspace where the diagram is generated.
+	 * recommended to end with bpmn_diagram to be opened by default
+	 * by the bpmn editor later.
 	 */
 	public BPMNVisual2ProcessGenerator(IPath path) {
 		super(path);</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/diagram/generation/impl/BPMNVisual2ProcessGenerator.java</filename>
    </modified>
    <modified>
      <diff>@@ -274,12 +274,12 @@ public class BpmnEAnnotationDecoratorProvider extends AbstractProvider
 					// there might be no decorator for the annotation
 					if (decorator != null) {
 					    if (decorator instanceof IEAnnotationDecorator) {
-					        ImageDescriptor descriptor = ((IEAnnotationDecorator) decorator)
-                                .getImageDescriptor(editPart, elt, ann);
+					        Image image = ((IEAnnotationDecorator) decorator)
+                                .getImage(editPart, elt, ann);
 					        Direction direction = 
                                 ((IEAnnotationDecorator) decorator).getDirection(editPart, elt, ann);
 					        IFigure tooltip = ((IEAnnotationDecorator) decorator).getToolTip(editPart, elt, ann);
-					        decorate(descriptor, tooltip, direction, editPart, elt, ann, view);
+					        decorate(image, tooltip, direction, editPart, elt, ann, view);
 					    } else if (decorator instanceof IEAnnotationDecorator2) {
 					        Collection&lt;IEAnnotationDecoratorData&gt; decs = ((IEAnnotationDecorator2) decorator).getDecorators(editPart, elt, ann);
 					        if (decs == null) {
@@ -289,10 +289,10 @@ public class BpmnEAnnotationDecoratorProvider extends AbstractProvider
 					            if (data == null) { 
 					                continue; 
 					            }
-					            ImageDescriptor descriptor = data.getImageDescriptor();
+					            Image image = data.getImage();
 					            Direction direction = data.getDirection();
 					            IFigure tooltip = data.getToolTip();
-					            decorate(descriptor, tooltip, direction, editPart, elt, ann, view);
+					            decorate(image, tooltip, direction, editPart, elt, ann, view);
 					        }
 					    }
 						if (editPart instanceof GraphicalEditPart) {
@@ -303,16 +303,11 @@ public class BpmnEAnnotationDecoratorProvider extends AbstractProvider
 			}
 		}
 
-		private void decorate(ImageDescriptor descriptor, IFigure tooltip, 
+		private void decorate(Image image, IFigure tooltip, 
 		        Direction direction, EditPart editPart, EModelElement elt, 
 		        EAnnotation ann, View view) {
 	        // there might be no descriptor for the decoration as well.
-	        if (descriptor != null) {
-	            Image image = images.get(descriptor);
-	            if (image == null) {
-	                image = descriptor.createImage();
-	                images.put(descriptor, image);
-	            }
+	        if (image != null) {
 	            IFigure parentFigure = ((GraphicalEditPart)
 	                    decoratorTarget.
 	                    getAdapter(GraphicalEditPart.class))</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/diagram/providers/BpmnEAnnotationDecoratorProvider.java</filename>
    </modified>
    <modified>
      <diff>@@ -13,12 +13,15 @@
  */
 package org.eclipse.stp.bpmn.diagram.ui;
 
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.swt.widgets.Control;
+
 /**
- * @author atoulme
  * an interface used by the PopupMenuWithDisableSupport.
  * If an item of the popup menu implements this interface,
  * it enables it to be shown as disabled when the popup menu 
  * is created.
+ * @author atoulme
  */
 public interface IMenuItemWithDisableSupport {
 
@@ -28,4 +31,10 @@ public interface IMenuItemWithDisableSupport {
 	 * on the popup menu.
 	 */
 	public boolean isEnabled();
+	
+	/**
+	 * @param parent The control where the tooltip is displayed
+	 * @return The tooltip to use for this menu item
+	 */
+	public ToolTip getToolTip(Control parent);
 }</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/diagram/ui/IMenuItemWithDisableSupport.java</filename>
    </modified>
    <modified>
      <diff>@@ -14,16 +14,24 @@
  */
 package org.eclipse.stp.bpmn.diagram.ui;
 
+import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.gef.EditPartViewer;
 import org.eclipse.gmf.runtime.diagram.ui.menus.PopupMenu;
-import org.eclipse.jface.util.Assert;
 import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.window.ToolTip;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.MenuItem;
 
@@ -52,27 +60,86 @@ public class PopupMenuWithDisableSupport extends PopupMenu {
             return subMenu;
         }
     }
+    
+    private TooltipManager _tooltip;
+    private Point _locationInTheDisplay;
+    private Control _parent;
+    Menu _rootMenu;
+    
     public PopupMenuWithDisableSupport(List aContent, 
             ILabelProvider aLabelProvider) {
         super(aContent, aLabelProvider);
     }
+    
+    /**
+     * 
+     * @param aContent
+     * @param aLabelProvider
+     * @param location The location according to the drop request
+     * @param The edit part viewer used to translate
+     * the location to the display's coords.
+     */
+    public PopupMenuWithDisableSupport(List&lt;?&gt; aContent, 
+            ILabelProvider aLabelProvider, org.eclipse.draw2d.geometry.Point location,
+            EditPartViewer viewer) {
+        super(aContent, aLabelProvider);
+        _locationInTheDisplay = viewer.getControl().toDisplay(location.x, location.y);
+    }
+    
+    
+	/**
+	 * Shows the popup menu and sets the resultList selected by the user.
+	 * 
+	 * @param parent
+	 *            menu will be shown in this parent Control
+	 * @return true if this succeeded, false otherwise (e.g. if the user
+	 *         cancelled the gesture).
+	 */
+	public boolean show(Control parent) {
+		_parent = parent;
+		boolean res = super.show(parent);
+		if (_tooltip != null) {
+			_tooltip.dispose();
+		}
+		return res;
+	}
+	
+	/**
+	 * The location in the Display coords. Suitable to compute where to place
+	 * the tooltip.
+	 * @return
+	 */
+	protected Point getLocationInTheDisplay() {
+		return _locationInTheDisplay;
+	}
 
     /**
-     * exactly the same as the parent, except that the menu item
+     * Exactly the same as the parent, except that the menu item
      * is given a chance to be set as disabled.
+     * It also support tooltips
      */
-    @Override
+    @SuppressWarnings(&quot;unchecked&quot;)
+	@Override
     protected void createMenuItems(Menu parentMenu, PopupMenu root,
             final List resultThusFar) {
+    	if (_rootMenu == null) {
+    		_rootMenu = parentMenu;
+    	}
+    	
         final PopupMenuWithDisableSupport rootMenu = 
             (PopupMenuWithDisableSupport) root;
+        
         Assert.isNotNull(getContent());
         Assert.isNotNull(getLabelProvider());
-
-        for (Iterator iter = getContent().iterator(); iter.hasNext();) {
+        
+        if (_locationInTheDisplay != null) {
+        	//if we are not doing a D&amp;D, we don't care for tooltips. for now.
+        	_tooltip = new TooltipManager(rootMenu, _parent);
+        }
+        for (Iterator&lt;?&gt; iter = getContent().iterator(); iter.hasNext();) {
             Object contentObject = iter.next();
 
-            MenuItem menuItem;
+            final MenuItem menuItem;
 
             if (contentObject instanceof CascadingMenuWithDisableSupport) {
                 PopupMenuWithDisableSupport subMenu = 
@@ -83,7 +150,7 @@ public class PopupMenuWithDisableSupport extends PopupMenu {
                     menuItem = new MenuItem(parentMenu, SWT.NONE);
                     menuItem.setEnabled(false);
                 } else {
-                    List thisResult = new ArrayList(resultThusFar);
+                    List&lt;Object&gt; thisResult = new ArrayList&lt;Object&gt;(resultThusFar);
                     thisResult.add(contentObject);
                     menuItem = new MenuItem(parentMenu, SWT.CASCADE);
                     menuItem.setMenu(new Menu(parentMenu));
@@ -116,6 +183,73 @@ public class PopupMenuWithDisableSupport extends PopupMenu {
                     rootMenu.setResult(resultThusFar);
                 }
             });
+            
+            if (_tooltip != null) {
+	            menuItem.addListener(SWT.Arm, new Listener() {
+					public void handleEvent(Event event) {
+						_tooltip.showTooltip(event, menuItem,
+								(IMenuItemWithDisableSupport)fContentObject);
+					}
+	            });
+            }
         }
     }
+    
+}
+class TooltipManager {
+
+    private static Method Menu_Get_Bound = null;
+    /**
+     * Is there a better way to compute the width of the popup menu?
+     * currently we do an ugly introspection trick...
+     * @param menu
+     * @return
+     */
+    static int getMenuWidth(Menu menu) {
+    	try {
+    		if (Menu_Get_Bound == null) {
+    			Menu_Get_Bound = Menu.class.getDeclaredMethod(&quot;getBounds&quot;); //$NON-NLS-1$
+    			Menu_Get_Bound.setAccessible(true);
+    		}
+    		Rectangle rect = (Rectangle)Menu_Get_Bound.invoke(menu, new Object[] {});
+    		return rect.width;
+    	} catch (Throwable t) {
+//    		t.printStackTrace();
+    	}
+    	return 0;
+    }
+
+	private PopupMenuWithDisableSupport _rootMenu;
+	private ToolTip _currentToolTip;
+	private Control _parent;
+	
+	TooltipManager(PopupMenuWithDisableSupport rootMenu, Control parent) {
+		_rootMenu = rootMenu;
+		_parent = parent;
+	}
+	
+
+	void showTooltip(Event event, MenuItem item, Object content) {
+		if (!(content instanceof IMenuItemWithDisableSupport)) {
+			return;
+		}
+		IMenuItemWithDisableSupport tooltip = (IMenuItemWithDisableSupport)content;
+		
+		_currentToolTip = tooltip.getToolTip(_parent);
+		if (_currentToolTip == null) {
+			return;
+		}
+		
+		int menuWidth = getMenuWidth(_rootMenu._rootMenu);
+		_currentToolTip.show(
+				new Point(_rootMenu.getLocationInTheDisplay().x + menuWidth,
+				_rootMenu.getLocationInTheDisplay().y));
+	}
+	
+	void dispose() {
+		if (_currentToolTip != null) {
+			_currentToolTip.deactivate();
+		}
+	}
+		
 }</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/diagram/ui/PopupMenuWithDisableSupport.java</filename>
    </modified>
    <modified>
      <diff>@@ -15,8 +15,8 @@ package org.eclipse.stp.bpmn.dnd;
 
 import org.eclipse.draw2d.IFigure;
 import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
-import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.stp.bpmn.dnd.IEAnnotationDecorator2.IEAnnotationDecoratorData;
+import org.eclipse.swt.graphics.Image;
 
 /**
  * @see IEAnnotationDecoratorData
@@ -28,7 +28,7 @@ import org.eclipse.stp.bpmn.dnd.IEAnnotationDecorator2.IEAnnotationDecoratorData
 public class EAnnotationDecoratorData implements IEAnnotationDecoratorData {
 
     private Direction _direction;
-    private ImageDescriptor _imageDescriptor;
+    private Image _image;
     private IFigure _tooltip;
 
     public void setDirection(Direction dir) {
@@ -43,15 +43,15 @@ public class EAnnotationDecoratorData implements IEAnnotationDecoratorData {
         return _direction;
     }
 
-    public void setImageDescriptor(ImageDescriptor desc) {
-        _imageDescriptor = desc;
+    public void setImage(Image desc) {
+        _image = desc;
     }
     
     /**
      * @return the image
      */
-    public ImageDescriptor getImageDescriptor() {
-        return _imageDescriptor;
+    public Image getImage() {
+        return _image;
     }
 
     public void setTooltip(IFigure fig) {</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/dnd/EAnnotationDecoratorData.java</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,9 @@ package org.eclipse.stp.bpmn.dnd;
 import org.eclipse.draw2d.geometry.Point;
 import org.eclipse.gef.commands.Command;
 import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.jface.window.ToolTip;
 import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Control;
 
 /**
  * The IDnDHandler interface specifies how the modeler handles the 
@@ -102,4 +104,19 @@ public interface IDnDHandler {
 	 *
 	 */
 	public void dispose();
+	
+	/**
+	 * IDnDHandler that also implement this interface can provide tooltips when
+	 * the user interacts with the drop-down menu.
+	 */
+	public interface IToolTipProvider {
+		/**
+		 * @param parent The control where the tooltip is displayed
+		 * @param hoverPart The current edit part
+		 * @param index The index in the menu items
+		 * @return The tooltip to use for this menu item. It is recreated every time.
+		 */
+		public ToolTip getMenuItemToolTip(Control parent, IGraphicalEditPart hoverPart, int index);
+	}
+	
 }</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/dnd/IDnDHandler.java</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EAnnotation;
 import org.eclipse.emf.ecore.EModelElement;
 import org.eclipse.gef.EditPart;
 import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
 
 /**
  * Interface used in the extension point associated with a key (String)
@@ -40,7 +40,7 @@ public interface IEAnnotationDecorator {
 	 * @return an image descriptor according to the element 
 	 * and the annotation associated with it.
 	 */
-	public ImageDescriptor getImageDescriptor(EditPart part, EModelElement element,
+	public Image getImage(EditPart part, EModelElement element,
 			EAnnotation annotation);
 	
 	/**</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/dnd/IEAnnotationDecorator.java</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@ import org.eclipse.emf.ecore.EAnnotation;
 import org.eclipse.emf.ecore.EModelElement;
 import org.eclipse.gef.EditPart;
 import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
 
 /**
 * Interface used in the extension point associated with a key (String)
@@ -64,7 +64,7 @@ public interface IEAnnotationDecorator2 {
         /**
          * @return the image
          */
-        public ImageDescriptor getImageDescriptor();
+        public Image getImage();
         
         /**
          * @return the tooltip.</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/dnd/IEAnnotationDecorator2.java</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,9 @@ import org.eclipse.gef.EditPart;
 import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.stp.bpmn.diagram.part.BpmnDiagramEditorPlugin;
 import org.eclipse.stp.bpmn.dnd.IEAnnotationDecorator;
+import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.model.IWorkbenchAdapter;
@@ -60,12 +62,12 @@ public class FileEAnnotationDecorator implements IEAnnotationDecorator {
 	/* (non-Javadoc)
 	 * @see org.eclipse.stp.bpmn.dnd.IEAnnotationDecorator#getImage(org.eclipse.gef.EditPart, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EAnnotation)
 	 */
-	public ImageDescriptor getImageDescriptor(EditPart part, EModelElement element,
+	public Image getImage(EditPart part, EModelElement element,
 			EAnnotation annotation) {
 		if (element == null) {
 			if (PlatformUI.isWorkbenchRunning()) {
 				return PlatformUI.getWorkbench().
-					getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
+					getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
 			} else {
 				return null;
 			}
@@ -93,16 +95,30 @@ public class FileEAnnotationDecorator implements IEAnnotationDecorator {
 			Platform.getAdapterManager()
                     .getAdapter(ourResource, ImageRegistry.class);
 		if (customizer != null) {
-			return customizer.getDescriptor(ourResource.getFileExtension());
+			return customizer.get(ourResource.getFileExtension());
 		}
 		IWorkbenchAdapter adapter = (IWorkbenchAdapter) 
 		    Platform.getAdapterManager()
                     .getAdapter(ourResource, IWorkbenchAdapter.class);
 		if (adapter == null) {
 			return PlatformUI.getWorkbench().
-				getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
+				getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
 		} else {
-			return adapter.getImageDescriptor(ourResource);
+		    ImageDescriptor desc = adapter.getImageDescriptor(ourResource);
+		    if (desc != null) {
+		        // an attempt at avoiding recreating the image every time.
+		        // this certainly will prove leaky.
+		        Image img = BpmnDiagramEditorPlugin.getInstance().getImageRegistry().
+		            get(desc.toString());
+		        if (img == null) {
+		            BpmnDiagramEditorPlugin.getInstance().getImageRegistry().put(
+		                    desc.toString(), desc);
+		            img = BpmnDiagramEditorPlugin.getInstance().getImageRegistry().
+                        get(desc.toString());
+		        }
+		        return img;
+		    }
+			return null;
 		}
 	}
 </diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/dnd/file/FileEAnnotationDecorator.java</filename>
    </modified>
    <modified>
      <diff>@@ -65,6 +65,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
 import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.ToolTip;
 import org.eclipse.stp.bpmn.diagram.BpmnDiagramMessages;
 import org.eclipse.stp.bpmn.diagram.edit.parts.AssociationEditPart;
 import org.eclipse.stp.bpmn.diagram.edit.parts.MessagingEdgeEditPart;
@@ -117,62 +118,6 @@ public class BpmnDragDropEditPolicy extends GraphicalEditPolicy {
     private EditPolicy previousEditPolicy;
     
     /**
-     * Dummy class used to store the handler and associate it
-     * an index.
-     * @author atoulme
-     *
-     */
-    private class DnDHandlerMenuItemData 
-    	implements IMenuItemWithDisableSupport {
-    	
-    	public IDnDHandler handler;
-    	
-    	public int index;
-
-    	/**
-    	 * simple implementation of the isEnabled() method
-    	 * that delegates to the handler.
-    	 */
-		public boolean isEnabled() {
-			return handler.isEnabled(
-					(IGraphicalEditPart) getHost(), 
-					index);
-		}
-    }
-    
-    /**
-     * Label provider that provides a label and an image to
-     * the popup menu items of the popup menu that the user
-     * chooses from.
-     * It delegates its calls to the IDnDHandler.
-     * @author atoulme
-     *
-     */
-    private class DnDHandlerDelegateLabelProvider extends LabelProvider {
-
-        public Image getImage(Object element) {
-        	if (element instanceof DnDHandlerMenuItemData) {
-        		DnDHandlerMenuItemData data = 
-        				(DnDHandlerMenuItemData) element;
-        		return data.handler.getMenuItemImage(
-        				(IGraphicalEditPart) getHost(), data.index);
-        	}
-            return null;
-        }
-
-        public String getText(Object element) {
-        	if (element instanceof DnDHandlerMenuItemData) {
-        		DnDHandlerMenuItemData data = 
-        				(DnDHandlerMenuItemData) element;
-        		return data.handler.getMenuItemLabel(
-        				(IGraphicalEditPart) getHost(), data.index);
-        	}
-            return null;
-        }
-    }
-    
-
-    /**
      * @return true if the request is of the type 
      * {@link RequestConstants#REQ_DROP_OBJECTS}
      * and that the request's objects' collection isn't empty.
@@ -196,6 +141,7 @@ public class BpmnDragDropEditPolicy extends GraphicalEditPolicy {
         }
         
         final DropObjectsRequest dropRequest = (DropObjectsRequest) request;
+        
         // cache the eobjects produced on this part
         List&lt;IDnDHandler&gt; dndHandlers = null;
 //        final List&lt;IStatus&gt; messages = null;
@@ -270,59 +216,29 @@ public class BpmnDragDropEditPolicy extends GraphicalEditPolicy {
             protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) 
             throws ExecutionException {
             	try {
-            		// we ain't need no balloon no more.
-//          		List&lt;IStatus&gt; messages = accept(handlers, dropRequest);
-
-//          		if (!messages.isEmpty()) {
-//          		if (_balloon == null) {
-//          		_balloon = new PopupBalloon((IGraphicalEditPart) getHost());
-//          		_balloon.setDisappearanceDelay(3000);
-//          		// showing the balloon longer as it is shown
-//          		// only once per edit part.
-//          		} 
-//          		if (_balloon.isShowing() &amp;&amp; !_balloon.showsOnThisEditPart(getHost())) {
-//          		_balloon.hide();
-//          		}
-////        		the message has already been shown once
-//          		// on this edit part and this edit part was the last
-//          		// one on which it was shown.
-//          		// do nothing.
-//          		if (!_balloon.isShowing() &amp;&amp; !_balloon.showsOnThisEditPart(getHost())) {
-//          		for (IStatus descriptor : messages){
-//          		_balloon.addPopupBarDescriptor(descriptor.getMessage(),
-//          		descriptor.getSeverity());
-//          		}
-
-//          		_balloon.showBalloon(
-//          		getBalloonPosition(dropRequest.getLocation().getCopy()), 
-//          		getHost());
-//          		}
-//          		}
-
-//          		if (descriptors.size() == 1) {
-//          		drop(descriptors.get(0), dropRequest);
-//          		} else {
             		// we create a popup command to get one view
-            		ILabelProvider provider = 
-            			new DnDHandlerDelegateLabelProvider();
+            		IGraphicalEditPart gHost = (IGraphicalEditPart)getHost();
+            		ILabelProvider provider = new DnDHandlerDelegateLabelProvider(gHost);
 
             		// build the menu items
             		List&lt;DnDHandlerMenuItemData&gt; items = 
             			new ArrayList&lt;DnDHandlerMenuItemData&gt;();
             		for (IDnDHandler handler : handlers) {
             		    int itemCount = handler instanceof IDnDHandler2 ?
-            		            ((IDnDHandler2) handler).getItemCount((IGraphicalEditPart) getHost())
+            		            ((IDnDHandler2) handler).getItemCount(gHost)
             		            : handler.getItemCount();
             			for (int i = 0 ; i &lt; itemCount; i++) {
-            				DnDHandlerMenuItemData data = new DnDHandlerMenuItemData();
+            				DnDHandlerMenuItemData data = new DnDHandlerMenuItemData(handler, i, gHost);
             				data.handler = handler;
             				data.index = i;
             				items.add(data);
             			}
             		}
+//            		System.err.println(&quot;dropLoc.x = &quot; + dropLocation.x);
+            		
             		PopupMenuWithDisableSupport popupMenu = 
-            			new PopupMenuWithDisableSupport(items, 
-            					provider);
+            			new PopupMenuWithDisableSupport(items, provider,
+            					dropRequest.getLocation(), getHost().getViewer());
             		PopupMenuCommand popupCmd = new PopupMenuCommand(&quot;&quot;,  //$NON-NLS-1$
             				new Shell(), popupMenu);
             		popupCmd.execute(monitor, info);
@@ -592,3 +508,75 @@ public class BpmnDragDropEditPolicy extends GraphicalEditPolicy {
     }
     
 }
+/**
+ * Dummy class used to store the handler and associate it
+ * an index.
+ */
+class DnDHandlerMenuItemData implements IMenuItemWithDisableSupport {
+	
+	public IDnDHandler handler;
+	public int index;
+	private final IGraphicalEditPart _host;
+	
+	DnDHandlerMenuItemData(IDnDHandler handler, int index, IGraphicalEditPart host) {
+		this.handler = handler;
+		this.index = index;
+		_host = host;
+	}
+
+	/**
+	 * simple implementation of the isEnabled() method
+	 * that delegates to the handler.
+	 */
+	public boolean isEnabled() {
+		return handler.isEnabled(_host,	index);
+	}
+	
+	/**
+	 * @return The tooltip to use for this menu item
+	 */
+	public ToolTip getToolTip(Control parent) {
+		if (handler instanceof IDnDHandler.IToolTipProvider) {
+    		return ((IDnDHandler.IToolTipProvider) handler)
+    			.getMenuItemToolTip(parent, _host, index);
+    	}
+		return null;
+
+	}
+}
+
+/**
+ * Label provider that provides a label and an image to
+ * the popup menu items of the popup menu that the user
+ * chooses from.
+ * It delegates its calls to the IDnDHandler.
+ */
+class DnDHandlerDelegateLabelProvider extends LabelProvider {
+	
+	private final IGraphicalEditPart _host;
+	
+	DnDHandlerDelegateLabelProvider(IGraphicalEditPart host) {
+		_host = host;
+	}
+
+    public Image getImage(Object element) {
+    	if (element instanceof DnDHandlerMenuItemData) {
+    		DnDHandlerMenuItemData data = 
+    				(DnDHandlerMenuItemData) element;
+    		return data.handler.getMenuItemImage(_host, data.index);
+    	}
+        return null;
+    }
+
+    public String getText(Object element) {
+    	if (element instanceof DnDHandlerMenuItemData) {
+    		DnDHandlerMenuItemData data = 
+    				(DnDHandlerMenuItemData) element;
+    		return data.handler.getMenuItemLabel(_host, data.index);
+    	}
+        return null;
+    }
+    
+
+}
+</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/policies/BpmnDragDropEditPolicy.java</filename>
    </modified>
    <modified>
      <diff>@@ -370,6 +370,9 @@ public class MultipleShapesMoveTool extends SimpleDragTracker {
      * the right or the left.
      */
     protected void showSourceFeedback() {
+        if (_container == null) {
+            return;
+        }
         if (guideline.getParent() == null) {
             addFeedback(guideline);
         }</diff>
      <filename>org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/tools/MultipleShapesMoveTool.java</filename>
    </modified>
    <modified>
      <diff>@@ -28,4 +28,5 @@ pool_label = Pool
 sequence_flow_label = Sequence Flow
 message_flow_label = Message Flow
 association_label = Association
-propertyTab_label = Annotations
\ No newline at end of file
+propertyTab_label = Annotations
+filter.name.0 = File Attachment
\ No newline at end of file</diff>
      <filename>org.eclipse.stp.bpmn.diagram/plugin.properties</filename>
    </modified>
    <modified>
      <diff>@@ -1233,7 +1233,7 @@
       &lt;filter
             icon=&quot;icons/obj16/file_obj.gif&quot;
             id=&quot;org.eclipse.stp.bpmn.diagram.filter.genericFileFilter&quot;
-            name=&quot;File Attachment&quot;
+            name=&quot;%filter.name.0&quot;
             onByDefault=&quot;false&quot;&gt;
          &lt;source value=&quot;genericFile&quot;/&gt;
       &lt;/filter&gt;</diff>
      <filename>org.eclipse.stp.bpmn.diagram/plugin.xml</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,21 @@
 &lt;?xml version='1.0' encoding='UTF-8'?&gt;
 &lt;!-- Schema file written by PDE --&gt;
-&lt;schema targetNamespace=&quot;org.eclipse.stp.bpmn.diagram&quot;&gt;
+&lt;schema targetNamespace=&quot;org.eclipse.stp.bpmn.diagram&quot; xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
 &lt;annotation&gt;
-      &lt;appInfo&gt;
+      &lt;appinfo&gt;
          &lt;meta.schema plugin=&quot;org.eclipse.stp.bpmn.diagram&quot; id=&quot;DecorationFilter&quot; name=&quot;DecorationFilter&quot;/&gt;
-      &lt;/appInfo&gt;
+      &lt;/appinfo&gt;
       &lt;documentation&gt;
          The decoration filter filters the decorators tied to a particular EAnnotation source and/or a particular marker type. Several EAnnotation sources and marker types can be defined.
       &lt;/documentation&gt;
    &lt;/annotation&gt;
 
    &lt;element name=&quot;extension&quot;&gt;
+      &lt;annotation&gt;
+         &lt;appinfo&gt;
+            &lt;meta.element /&gt;
+         &lt;/appinfo&gt;
+      &lt;/annotation&gt;
       &lt;complexType&gt;
          &lt;sequence minOccurs=&quot;1&quot; maxOccurs=&quot;unbounded&quot;&gt;
             &lt;element ref=&quot;filter&quot;/&gt;
@@ -34,9 +39,9 @@
                &lt;documentation&gt;
                   
                &lt;/documentation&gt;
-               &lt;appInfo&gt;
+               &lt;appinfo&gt;
                   &lt;meta.attribute translatable=&quot;true&quot;/&gt;
-               &lt;/appInfo&gt;
+               &lt;/appinfo&gt;
             &lt;/annotation&gt;
          &lt;/attribute&gt;
       &lt;/complexType&gt;
@@ -65,6 +70,9 @@
                &lt;documentation&gt;
                   The name of the filter that will be shown in the toolbar menu.
                &lt;/documentation&gt;
+               &lt;appinfo&gt;
+                  &lt;meta.attribute translatable=&quot;true&quot;/&gt;
+               &lt;/appinfo&gt;
             &lt;/annotation&gt;
          &lt;/attribute&gt;
          &lt;attribute name=&quot;icon&quot; type=&quot;string&quot;&gt;
@@ -72,9 +80,9 @@
                &lt;documentation&gt;
                   The image of the icon that will be shown in the toolbar menu.
                &lt;/documentation&gt;
-               &lt;appInfo&gt;
+               &lt;appinfo&gt;
                   &lt;meta.attribute kind=&quot;resource&quot;/&gt;
-               &lt;/appInfo&gt;
+               &lt;/appinfo&gt;
             &lt;/annotation&gt;
          &lt;/attribute&gt;
          &lt;attribute name=&quot;onByDefault&quot; type=&quot;boolean&quot; use=&quot;required&quot;&gt;
@@ -129,18 +137,18 @@
    &lt;/element&gt;
 
    &lt;annotation&gt;
-      &lt;appInfo&gt;
+      &lt;appinfo&gt;
          &lt;meta.section type=&quot;since&quot;/&gt;
-      &lt;/appInfo&gt;
+      &lt;/appinfo&gt;
       &lt;documentation&gt;
          April 30, 2007
       &lt;/documentation&gt;
    &lt;/annotation&gt;
 
    &lt;annotation&gt;
-      &lt;appInfo&gt;
+      &lt;appinfo&gt;
          &lt;meta.section type=&quot;examples&quot;/&gt;
-      &lt;/appInfo&gt;
+      &lt;/appinfo&gt;
       &lt;documentation&gt;
          &amp;lt;extension point=&amp;quot;org.eclipse.stp.bpmn.diagram.DecorationFilter&amp;quot;&amp;gt;
       &amp;lt;filter icon=&amp;quot;icons/obj16/file_obj.gif&amp;quot;
@@ -153,28 +161,12 @@
       &lt;/documentation&gt;
    &lt;/annotation&gt;
 
-   &lt;annotation&gt;
-      &lt;appInfo&gt;
-         &lt;meta.section type=&quot;apiInfo&quot;/&gt;
-      &lt;/appInfo&gt;
-      &lt;documentation&gt;
-         
-      &lt;/documentation&gt;
-   &lt;/annotation&gt;
 
-   &lt;annotation&gt;
-      &lt;appInfo&gt;
-         &lt;meta.section type=&quot;implementation&quot;/&gt;
-      &lt;/appInfo&gt;
-      &lt;documentation&gt;
-         
-      &lt;/documentation&gt;
-   &lt;/annotation&gt;
 
    &lt;annotation&gt;
-      &lt;appInfo&gt;
+      &lt;appinfo&gt;
          &lt;meta.section type=&quot;copyright&quot;/&gt;
-      &lt;/appInfo&gt;
+      &lt;/appinfo&gt;
       &lt;documentation&gt;
          Copyright (c) 2007, Intalio Inc.
  All rights reserved. This program and the accompanying materials</diff>
      <filename>org.eclipse.stp.bpmn.diagram/schema/DecorationFilter.exsd</filename>
    </modified>
    <modified>
      <diff>@@ -32,8 +32,8 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
 import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
 import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
 import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
 import org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
 import org.eclipse.gmf.runtime.notation.Edge;
 import org.eclipse.gmf.runtime.notation.IdentityAnchor;
 import org.eclipse.gmf.runtime.notation.NotationPackage;
@@ -167,10 +167,10 @@ public class MessagingEdgeEditPart extends ConnectionNodeEditPart {
         public ConnectionMessageFigure() {
             this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_CUSTOM);
             this.setLineDash(DASHES);
-            this.setForegroundColor(FigureUtilities.integerToColor(
-                    FigureUtilities.RGBToInteger(
+            this.setForegroundColor(
+            		DiagramColorRegistry.getInstance().getColor(
                             PreferenceConverter.getColor(BpmnDiagramEditorPlugin.PREF_STORE,
-                                    BpmnDiagramPreferenceInitializer.PREF_MSG_LINE_COLOR))));
+                                    BpmnDiagramPreferenceInitializer.PREF_MSG_LINE_COLOR)));
             setSourceDecoration(createSourceDecoration());
             setTargetDecoration(createTargetDecoration());
         }</diff>
      <filename>org.eclipse.stp.bpmn.diagram/src/org/eclipse/stp/bpmn/diagram/edit/parts/MessagingEdgeEditPart.java</filename>
    </modified>
    <modified>
      <diff>@@ -35,6 +35,7 @@ import org.eclipse.gmf.runtime.common.core.command.CommandResult;
 import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
 import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
 import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.stp.bpmn.Activity;
 import org.eclipse.stp.bpmn.MessagingEdge;
 import org.eclipse.stp.bpmn.SequenceEdge;
 import org.eclipse.stp.bpmn.SubProcess;
@@ -123,7 +124,7 @@ public class SubProcessGraphicalNodeEditPolicy extends
 			}};
 		Collections.sort(points, comparator);
 		// now applies the command that will do the job.
-		final SubProcess target = ((SubProcess) ((IGraphicalEditPart) moving.getTarget()).resolveSemanticElement());
+		final Activity target = ((Activity) ((IGraphicalEditPart) moving.getTarget()).resolveSemanticElement());
 		CompoundCommand compound = new CompoundCommand();
 		
 		AbstractTransactionalCommand command = </diff>
      <filename>org.eclipse.stp.bpmn.diagram/src/org/eclipse/stp/bpmn/diagram/edit/policies/SubProcessGraphicalNodeEditPolicy.java</filename>
    </modified>
    <modified>
      <diff>@@ -314,18 +314,18 @@ public class BpmnDiagramEditorPlugin extends AbstractUIPlugin {
     /**
      * Finds the image for a particular annotation source.
      */
-    public ImageDescriptor findAnnotationImage(EModelElement elt, String annotationSource) {
+    public Image findAnnotationImage(EModelElement elt, String annotationSource) {
         Object deco = BpmnDiagramEditorPlugin.getInstance().
             getEAnnotationDecorator(annotationSource);
         if (deco instanceof IEAnnotationDecorator) {
-            return ((IEAnnotationDecorator) deco).getImageDescriptor(null, elt,
+            return ((IEAnnotationDecorator) deco).getImage(null, elt,
                     elt.getEAnnotation(annotationSource));
         } else if (deco instanceof IEAnnotationDecorator2) {
             Collection&lt;IEAnnotationDecoratorData&gt; decorators = 
                 ((IEAnnotationDecorator2) deco).getDecorators(null,elt,
                     elt.getEAnnotation(annotationSource));
             if (!decorators.isEmpty()) {
-                return decorators.iterator().next().getImageDescriptor();
+                return decorators.iterator().next().getImage();
             }
         }
         return null;</diff>
      <filename>org.eclipse.stp.bpmn.diagram/src/org/eclipse/stp/bpmn/diagram/part/BpmnDiagramEditorPlugin.java</filename>
    </modified>
    <modified>
      <diff>@@ -204,6 +204,7 @@ public class BpmnDiagramPreferenceInitializer extends
         internalSetDefaultFontPref(getPreferenceStore());
         internalSetFillColorPref(getPreferenceStore());
         
+        getPreferenceStore().setDefault(IPreferenceConstants.PREF_SNAP_TO_GRID, false);
         getPreferenceStore().setDefault(IPreferenceConstants.PREF_SNAP_TO_GEOMETRY, true);
         getPreferenceStore().setDefault(PREF_SNAP_TO_GEOMETRY, true);
         getPreferenceStore().setDefault(PREF_CONN_DIAG_ASSISTANT_DELAY_MS, 0);</diff>
      <filename>org.eclipse.stp.bpmn.diagram/src/org/eclipse/stp/bpmn/diagram/part/BpmnDiagramPreferenceInitializer.java</filename>
    </modified>
    <modified>
      <diff>@@ -27,4 +27,7 @@ constraintProvider.description.0 = Detects violations of the BPMN specification.
 providerName = Eclipse.org
 constraint.name.7 = Gateway Gates Validity
 constraint.description.7 = This constraint warns the user if no default gate is defined on forking XOR and OR gateways. Such gateways may throw errors at runtime if no gate is chosen.
-constraint.message.7 = {0}
\ No newline at end of file
+constraint.message.7 = {0}
+constraint.name.8 = Controlled flows
+constraint.description.8 = This constraint applies to default and conditional flows. Default flows only may be used when conditional flows are present, and conditional flows may only be shown when their source isn't a gateway and that there is more than one flow going out of their source.
+filter.name.0 = BPMN validation
\ No newline at end of file</diff>
      <filename>org.eclipse.stp.bpmn.validation/plugin.properties</filename>
    </modified>
    <modified>
      <diff>@@ -146,7 +146,7 @@
                   id=&quot;org.eclipse.stp.bpmn.validation.controlledFlows&quot;
                   lang=&quot;java&quot;
                   mode=&quot;Batch&quot;
-                  name=&quot;Controlled flows&quot;
+                  name=&quot;%constraint.name.8&quot;
                   severity=&quot;ERROR&quot;
                   statusCode=&quot;1&quot;&gt;
                &lt;message&gt;
@@ -156,7 +156,7 @@
                      class=&quot;SequenceEdge&quot;&gt;
                &lt;/target&gt;
                &lt;description&gt;
-                  This constraint applies to default and conditional flows. Default flows only may be used when conditional flows are present, and conditional flows may only be shown when their source isn't a gateway and that there is more than one flow going out of their source.
+                  %constraint.description.8
                &lt;/description&gt;
             &lt;/constraint&gt;
          &lt;/constraints&gt;
@@ -223,7 +223,7 @@
          point=&quot;org.eclipse.stp.bpmn.diagram.DecorationFilter&quot;&gt;
       &lt;filter
             id=&quot;org.eclipse.stp.bpmn.validation.filter.bpmnvalidationfilter&quot;
-            name=&quot;BPMN validation&quot;
+            name=&quot;%filter.name.0&quot;
             onByDefault=&quot;false&quot;&gt;
          &lt;marker
                code=&quot;1&quot;</diff>
      <filename>org.eclipse.stp.bpmn.validation/plugin.xml</filename>
    </modified>
    <modified>
      <diff>@@ -28,6 +28,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.emf.common.util.Diagnostic;
 import org.eclipse.emf.ecore.EObject;
@@ -39,13 +40,12 @@ import org.eclipse.stp.bpmn.validation.builder.ResourceImportersRegistry;
 import org.eclipse.stp.bpmn.validation.builder.ValidationMarkerCustomAttributes;
 import org.eclipse.stp.bpmn.validation.quickfixes.IBpmnMarkerResolutionProvider;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 
 /**
  * The Bpmn Diagram Editor activator.
  */
-public class BpmnValidationPlugin extends AbstractUIPlugin {
+public class BpmnValidationPlugin extends Plugin {
 
 	// The plug-in ID
 	public static final String PLUGIN_ID = &quot;org.eclipse.stp.bpmn.validation&quot;; //$NON-NLS-1$
@@ -159,17 +159,13 @@ public class BpmnValidationPlugin extends AbstractUIPlugin {
             }
 
             public void saving(ISaveContext context) throws CoreException {
-                Map&lt;String,IResourceImportersRegistry&gt; importIndexes =
-                    CACHE.get(context.getProject());
-                
-                if (importIndexes != null) {
-                    for (Entry&lt;String,IResourceImportersRegistry&gt; entry : 
-                                importIndexes.entrySet()) {
-                        entry.getValue().save(
-                                context.getProject(), entry.getKey(),
-                                new NullProgressMonitor());
-                    }
-                }
+            	IProject[] projects = context.getProject() == null
+            			? ResourcesPlugin.getWorkspace().getRoot().getProjects()
+            			: new IProject[] {context.getProject()};
+            	
+            	for (IProject proj : projects) {
+            		saveImportersRegistries(proj);
+            	}
             }
         };
         ResourcesPlugin.getWorkspace().addSaveParticipant(this, _saveParticipant);
@@ -212,6 +208,32 @@ java.lang.Exception: Generated exception.
         ResourcesPlugin.getWorkspace().removeSaveParticipant(this);
 		super.stop(context);
 	}
+	
+	/**
+	 * @param proj Save the importers registries for a given project.
+	 */
+	public void saveImportersRegistries(IProject proj) {
+		if (!proj.isAccessible()) {
+			return;
+		}
+        Map&lt;String,IResourceImportersRegistry&gt; importIndexes =
+            CACHE.get(proj);
+        
+        if (importIndexes != null) {
+            for (Entry&lt;String,IResourceImportersRegistry&gt; entry : 
+                        importIndexes.entrySet()) {
+            	if (entry.getValue().isDirty()) {
+            		try {
+						entry.getValue().save(
+						    proj, entry.getKey(),
+						    new NullProgressMonitor());
+					} catch (CoreException e) {
+						getLog().log(e.getStatus());
+					}
+            	}
+            }
+        }
+	}
 
 	/**
 	 * Returns the shared instance</diff>
      <filename>org.eclipse.stp.bpmn.validation/src/org/eclipse/stp/bpmn/validation/BpmnValidationPlugin.java</filename>
    </modified>
    <modified>
      <diff>@@ -157,12 +157,13 @@ public class BatchValidationBuilder extends IncrementalProjectBuilder {
 				incrementalBuild(delta, monitor);
 			}
 		}
-        IResourceImportersRegistry rep = BpmnValidationPlugin
-            .getResourceImportersRegistry(getProject(),
-                    GENERIC_FILE_IMPORT_INDEX_CATEGORY_ID, monitor);
-        if (rep.isDirty()) {
-            rep.save(getProject(), GENERIC_FILE_IMPORT_INDEX_CATEGORY_ID, monitor);
-        }
+		//no need the save participant is working now finally.
+//        IResourceImportersRegistry rep = BpmnValidationPlugin
+//            .getResourceImportersRegistry(getProject(),
+//                    GENERIC_FILE_IMPORT_INDEX_CATEGORY_ID, monitor);
+//        if (rep.isDirty()) {
+//            rep.save(getProject(), GENERIC_FILE_IMPORT_INDEX_CATEGORY_ID, monitor);
+//        }
 		return null;
 	}
     </diff>
      <filename>org.eclipse.stp.bpmn.validation/src/org/eclipse/stp/bpmn/validation/builder/BatchValidationBuilder.java</filename>
    </modified>
    <modified>
      <diff>@@ -198,6 +198,7 @@ public class ResourceImportersRegistry implements IResourceImportersRegistry {
             
         } catch (Throwable t) {
             //mark this object as a clean build required?
+        	t.printStackTrace();
         } finally {
             if (contents != null) {
                 try {
@@ -271,7 +272,7 @@ public class ResourceImportersRegistry implements IResourceImportersRegistry {
         try {
             //StringWriter writer = new StringWriter();
             ByteArrayOutputStream out = new ByteArrayOutputStream();
-            String topComment = &quot;# index of importer -&gt; set(imports)&quot;; //$NON-NLS-1$
+            String topComment = &quot;# index of importer -&gt; set(imports)\n&quot;; //$NON-NLS-1$
             props.store(out, null); //$NON-NLS-1$
             
             //now remove the timestamp that java inserted at the top:</diff>
      <filename>org.eclipse.stp.bpmn.validation/src/org/eclipse/stp/bpmn/validation/builder/ResourceImportersRegistry.java</filename>
    </modified>
    <modified>
      <diff>@@ -39,7 +39,7 @@ public class GatewayEdgesConstraint extends AbstractModelConstraint {
                 String named = gateway.getName() == null ? &quot;&quot; : //$NON-NLS-1$
                 	BpmnValidationMessages.bind(BpmnValidationMessages.GatewayEdgesConstraint_named,
                         gateway.getName());
-                return ctx.createFailureStatus(new String[] {named});
+                return ctx.createFailureStatus(new Object[] {named});
             }
         }
         return ctx.createSuccessStatus();</diff>
      <filename>org.eclipse.stp.bpmn.validation/src/org/eclipse/stp/bpmn/validation/specification/GatewayEdgesConstraint.java</filename>
    </modified>
    <modified>
      <diff>@@ -61,9 +61,9 @@ BpmnDiagramImpl_name=, name:
 BpmnDiagramImpl_ncname=, ncname: 
 BpmnDiagramImpl_author=, author: 
 BpmnFactoryImpl_theClass=The class '{0}
-BpmnFactoryImpl_datatype_invalid_classifier=The datatype '{0}' is not a valid classifier
+BpmnFactoryImpl_datatype_invalid_classifier=The datatype ''{0}'' is not a valid classifier
 BpmnDiagramImpl_title=, title: 
-BpmnFactoryImpl_value_invalidEnumerator=The value '{0}' is not a valid enumerator of '{1}'
+BpmnFactoryImpl_value_invalidEnumerator=The value ''{0}'' is not a valid enumerator of ''{1}''
 SubProcessImpl_isTransaction=\ (isTransaction: 
 SubProcessImpl_unset=&lt;unset&gt;
 GraphImpl_doc=\ (documentation: </diff>
      <filename>org.eclipse.stp.bpmn/src/org/eclipse/stp/bpmn/bpmnmessages.properties</filename>
    </modified>
    <modified>
      <diff>@@ -19,8 +19,8 @@ import org.eclipse.emf.ecore.EAnnotation;
 import org.eclipse.emf.ecore.EModelElement;
 import org.eclipse.gef.EditPart;
 import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
-import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.stp.bpmn.dnd.IEAnnotationDecorator;
+import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
 
@@ -50,10 +50,10 @@ public class AnnotationDecorator implements IEAnnotationDecorator {
     /* (non-Javadoc)
      * @see org.eclipse.stp.bpmn.dnd.IEAnnotationDecorator#getImageDescriptor(org.eclipse.gef.EditPart, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EAnnotation)
      */
-    public ImageDescriptor getImageDescriptor(EditPart part,
+    public Image getImage(EditPart part,
             EModelElement element, EAnnotation annotation) {
         return PlatformUI.getWorkbench().getSharedImages().
-            getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
+            getImage(ISharedImages.IMG_OBJ_FILE);
     }
 
     /* (non-Javadoc)</diff>
      <filename>samples/org.eclipse.stp.bpmn.sample.annotationDecoration/src/org/eclipse/stp/bpmn/sample/annotationdecoration/AnnotationDecorator.java</filename>
    </modified>
    <modified>
      <diff>@@ -19,10 +19,10 @@ import org.eclipse.emf.ecore.EAnnotation;
 import org.eclipse.emf.ecore.EModelElement;
 import org.eclipse.gef.EditPart;
 import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
-import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.stp.bpmn.dnd.IEAnnotationDecorator;
 import org.eclipse.stp.bpmn.sample.bugDnD.BugDnDPlugin;
 import org.eclipse.stp.bpmn.sample.bugDnD.dnd.BugDnDHandler;
+import org.eclipse.swt.graphics.Image;
 
 /**
  * The bug annotation decorator.
@@ -42,9 +42,12 @@ public class BugAnnotationDecorator implements IEAnnotationDecorator {
         return Direction.SOUTH_WEST;
     }
 
-    public ImageDescriptor getImageDescriptor(EditPart part,
+    public Image getImage(EditPart part,
             EModelElement element, EAnnotation annotation) {
-        return BugDnDPlugin.imageDescriptorFromPlugin(BugDnDPlugin.PLUGIN_ID, &quot;icons/bug_decorator.gif&quot;);
+        
+        //leaky! don't do this at home!
+        return BugDnDPlugin.imageDescriptorFromPlugin(BugDnDPlugin.PLUGIN_ID, 
+                &quot;icons/bug_decorator.gif&quot;).createImage();
     }
 
     public IFigure getToolTip(EditPart part, EModelElement element,</diff>
      <filename>samples/org.eclipse.stp.bpmn.sample.bugDnD/src/org/eclipse/stp/bpmn/sample/bugDnD/decorator/BugAnnotationDecorator.java</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.stp.bpmn.dnd.IEAnnotationDecorator;
 import org.eclipse.stp.bpmn.sample.participantView.ParticipantViewPlugin;
 import org.eclipse.stp.bpmn.sample.participantView.participant.ParticipantConstants;
+import org.eclipse.swt.graphics.Image;
 
 /**
  * Decorator for participants.
@@ -56,11 +57,12 @@ public class ParticipantDecorator implements IEAnnotationDecorator {
 		return new Label(&quot;Performed by &quot; + name + &quot; (&quot; + role + &quot;)&quot;);
 	}
 
-    public ImageDescriptor getImageDescriptor(EditPart part,
+    public Image getImage(EditPart part,
             EModelElement element, EAnnotation annotation) {
         ImageDescriptor desc = ParticipantViewPlugin.imageDescriptorFromPlugin(
                 ParticipantViewPlugin.PLUGIN_ID, &quot;icons/participant.gif&quot;);
-        return desc;
+        // leaky! don't do this at home!
+        return desc.createImage();
     }
 
 }</diff>
      <filename>samples/org.eclipse.stp.bpmn.sample.participantView/src/org/eclipse/stp/bpmn/sample/participantView/participant/drop/ParticipantDecorator.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bc925b18c50cebab5b6221bdc183e1f078b8aa41</id>
    </parent>
  </parents>
  <author>
    <name>atoulme</name>
    <email>atoulme@6d33e942-f73d-0410-a51d-8b4d3eaff046</email>
  </author>
  <url>http://github.com/atoulme/bpmn-modeler/commit/054ec2e8cae075689c562c7f12dcb23ed81dd77b</url>
  <id>054ec2e8cae075689c562c7f12dcb23ed81dd77b</id>
  <committed-date>2009-03-10T09:01:57-07:00</committed-date>
  <authored-date>2009-03-10T09:01:57-07:00</authored-date>
  <message>we change our API for the EAnnotationDecorators. We also change a few things in the GroupInSubprocessCommand to avoid invalid states, and we fixed some bugs in the ResourceImportersRegistry

git-svn-id: http://dev.eclipse.org/svnroot/stp/org.eclipse.stp.bpmn-modeler/org.eclipse.stp.bpmn/trunk@2878 6d33e942-f73d-0410-a51d-8b4d3eaff046</message>
  <tree>249234febf7481eacafba96ca1d42f7b4d8b3f2a</tree>
  <committer>
    <name>atoulme</name>
    <email>atoulme@6d33e942-f73d-0410-a51d-8b4d3eaff046</email>
  </committer>
</commit>
