Runtime

## org.eclipse.gmf.runtime.emf.core.clipboard
Class AbstractClipboardSupport

    java.lang.Object
      org.eclipse.gmf.runtime.emf.core.clipboard.AbstractClipboardSupport

All Implemented Interfaces:
  IClipboardSupport

public abstract class AbstractClipboardSupport
extends java.lang.Object
implements IClipboardSupport

A partial implementation of the `IClipboardSupport` interface that uses MSL facilities to implement some of the metamodel-specific hooks that MSL, itself, provides support for.

Constructor Summary
`AbstractClipboardSupport()` Initializes me.

Method Summary
`boolean` `canContain(EObject container, EReference reference, EClass containedType)` MSL has extensions for metamodels to implement containment conditions.
`java.lang.String` `getName(EObject eObject)` MSL has extensions for metamodels to get object names.
`XMLResource` `getResource(EObject eObject)` Obtains the resource containing an `eObject` or, if the `eObject` is to be copied but is not attached to a resource, the resource containing some related element that the detached `eObject` would otherwise have been in.
`boolean` `isNameable(EObject eObject)` MSL has extensions for metamodels to indicate which objects can have names.
`void` `sendCreateNotification(EObject eObject)` MSL implements creation notifications.
`void` `setName(EObject eObject, java.lang.String name)` MSL has extensions for metamodels to set object names.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.gmf.runtime.emf.clipboard.core.IClipboardSupport
`destroy, getExcludedCopyObjects, getOverrideChildPasteOperation, getOverrideCopyOperation, getPasteCollisionAction, hasPasteOption, isCopyAlways, performPostPasteProcessing, shouldOverrideChildPasteOperation, shouldOverrideCopyOperation, shouldSaveContainmentFeature`

Constructor Detail

### AbstractClipboardSupport

    public AbstractClipboardSupport()

  Initializes me.

Method Detail

### isNameable

    public boolean isNameable(EObject eObject)

  MSL has extensions for metamodels to indicate which objects can have names.

  Specified by:
    `isNameable` in interface `IClipboardSupport`
  Parameters:
    `eObject` - an `EObject`
  Returns:
    whether the `eObject` supports a "name" of some kind
  See Also:
    `IClipboardSupport.getName(EObject)`, `IClipboardSupport.setName(EObject, String)`

### getName

    public java.lang.String getName(EObject eObject)

  MSL has extensions for metamodels to get object names.

  Specified by:
    `getName` in interface `IClipboardSupport`
  Parameters:
    `eObject` - an element
  Returns:
    the element's "name" if it has any, or `null` if not
  See Also:
    `IClipboardSupport.isNameable(EObject)`

### setName

    public void setName(EObject eObject,
                        java.lang.String name)

  MSL has extensions for metamodels to set object names.

  Specified by:
    `setName` in interface `IClipboardSupport`
  Parameters:
    `eObject` - an element
    `name` - the element's new "name", or `null` to clear it
  See Also:
    `IClipboardSupport.isNameable(EObject)`

### getResource

    public XMLResource getResource(EObject eObject)

  Description copied from interface: `IClipboardSupport`
  Obtains the resource containing an `eObject` or, if the `eObject` is to be copied but is not attached to a resource, the resource containing some related element that the detached `eObject` would otherwise have been in.

  Specified by:
    `getResource` in interface `IClipboardSupport`
  Parameters:
    `eObject` - the object for which we need the associated resource
  Returns:
    the containing resource or, if the `eObject` is detached, some resource from which it is reachable via some other attached object

### sendCreateNotification

    public void sendCreateNotification(EObject eObject)

  MSL implements creation notifications.

  Specified by:
    `sendCreateNotification` in interface `IClipboardSupport`
  Parameters:
    `eObject` - an object newly created in the editing domain

### canContain

    public boolean canContain(EObject container,
                              EReference reference,
                              EClass containedType)

  MSL has extensions for metamodels to implement containment conditions.

  Specified by:
    `canContain` in interface `IClipboardSupport`
  Parameters:
    `container` - a prospective containing object
    `reference` - the containment reference to check
    `containedType` - the type of the prospective contained object
  Returns:
    `true` if an element of the specified type is permitted to be contained as indicated; `false`, otherwise

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.