Releng : Eclipse 4.4.1 (Luna SR1)
Releng : GEF 3.9.101 (Luna SR1)
Releng : WTP 3.6.1 (Luna SR1)
Releng : Mylyn 3.13
Releng : EGit 3.5
Releng : EMF 2.10.1 (Luna SR1)
Releng : Eclipse 4.4.1 (Luna SR1)
Releng : Skip switch for the FindBugs target
Enhancement : DND should not instantiate temporary elements

The current implementation of DND in forms (master-details editor page's
content outline and table property editor presentation) instantiates a
temporary element during the DND process. This can be problematic as
some elements have services that expect to run in the context of a model
where the element is expected to appear. While it is possible to
carefully write all services to account for this scenario and safely
degrade, this needlessly complicates the model and is difficult to fully
verify for correctness.

A better approach would be to use a different data structure to hold
element content during the DND process.

/**
 * A light-weight container for element content. It does not provide the rich facilities of an actual
 * element in a model, but can be useful when element content needs to be represented in memory without
 * adding it to a model (at least not immediately). 
 * 
 * @since 8.1
 */

public final class ElementData [new]
{
    /**
     * Creates a new {@link ElementData} object.
     * 
     * @param type the element type
     * @throws IllegalArgumentException if element type is null
     */
    
    public ElementData( ElementType type )
    
    /**
     * Returns the element type.
     */
    
    public ElementType type()
    
    /**
     * Reads a property.
     * 
     * @param property the property name
     * @return the property content or null
     * @throws IllegalArgumentException if property is null
     */
    
    public Object read( String property )
    
    /**
     * Writes a property.
     * 
     * @param property the property name
     * @param content the property content
     * @throws IllegalArgumentException if property is null
     */
    
    public void write( String property, Object content )
}

public interface Element [existing]
{
    /**
     * Copies all properties from the provided source element to this element. The source element does not
     * have to be of the same type as target. Only properties that match on name and type will be copied.
     * 
     * @param source the element to copy from
     * @throws IllegalArgumentException if source is null
     * @throws IllegalStateException if this element or the source element is already disposed
     */
    
    void copy( Element source ) [existing]
    
    /**
     * Copies all properties from the provided source element data to this element. The source element data
     * does not have to be of the same type as target. Any property that is not found in source or is of the wrong
     * type, will be cleared in target.
     * 
     * @since 8.1
     * @param source the element data to copy from
     * @throws IllegalArgumentException if source is null
     * @throws IllegalStateException if this element is already disposed
     */
    
    void copy( ElementData source ) [new]
}

public abstract class Property [existing]
{
    /**
     * Copies property content from the provided source element. The source element does not have to
     * be of the same type as target. The copy will happen if the source element has a property with
     * the same name and type as this property. Otherwise, no change will be performed.
     * 
     * @param source the element to copy from
     * @throws IllegalArgumentException if source is null
     * @throws UnsupportedOperationException if this property is read-only
     * @throws IllegalStateException if this property or the source element is already disposed
     */
    
    public abstract void copy( Element source ) [existing]
    
    /**
     * Copies property content from the provided source element data. The source element data does not
     * have to be of the same type as target. Any property that is not found in source or is of the wrong
     * type, will be cleared in target.
     * 
     * @since 8.1
     * @param source the element to copy from
     * @throws IllegalArgumentException if source is null
     * @throws UnsupportedOperationException if this property is read-only
     * @throws IllegalStateException if this property is already disposed
     */
    
    public abstract void copy( ElementData source ) [new]
}

Tests: ElementTests.CopyElementData
Bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=445912
Enhancement : DND should not instantiate temporary elements

Missing copyright.

Bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=445912
Releng : EGit 3.5.1
Releng : Eclipse 4.5 M2 (Mars)
Releng : GEF 3.10 M2 (Mars)
Releng : EMF 3.11 M2 (Mars)
Releng : WTP 3.7 M2 (Mars)
Releng : Orbit S20140917154621 (Mars)