Interface IJavaClassLinkEnabler

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IClassReferenceOwner, IGProp<GProp<?>[]>, ILinkCapable, IPropCnr, IPropDesigner
All Known Subinterfaces:
IEUIPanel
All Known Implementing Classes:
EditorVirtualSpace, EMLGroup, EMUISimpleDialog, EUIDialog, EUIPanel, EUIPanelPart

public interface IJavaClassLinkEnabler extends ILinkCapable, IPropDesigner, IClassReferenceOwner
Interface implemented by a property container that holds a ClassReference instance where the implementation of the class is attached to e.g. a VirtualSpace, and the property owner is implementing IClassReferenceOwner.
Author:
Christopher Mindus
  • Method Details

    • isClassLinkCapable

      default boolean isClassLinkCapable(LinkData data)
      Returns if this property container could potentially be link capable.

      This call is done many times during drag-drop and must be very fast and not cause too much garbage collection.

      Parameters:
      data - The link data.
      Returns:
      true if link capable for classes.
    • isLinkCapable

      default org.eclipse.core.runtime.IStatus isLinkCapable(LinkData data)
      Returns if this property container could potentially be link capable.

      This call is done many times during drag-drop and must be very fast and not cause too much garbage collection.

      Specified by:
      isLinkCapable in interface ILinkCapable
      Parameters:
      data - The link data.
      Returns:
      The status of capability of the operation.
    • addClassLinkOperations

      default void addClassLinkOperations(LinkData data, Collection<ILinkOperation> linkOps)
      Called when the drag-drop is to be performed (link or paste-link menu item). The link-capable instance fills in only what it handles.
      Parameters:
      data - The link data.
      linkOps - List of link operations is filled in when operations are found.
    • getLinkOperations

      default Collection<ILinkOperation> getLinkOperations(LinkData data)
      Called when the drag-drop is to be performed (link or paste-link menu item). The link-capable instance fills in only what it handles.
      Specified by:
      getLinkOperations in interface ILinkCapable
      Parameters:
      data - The link data.
      Returns:
      The list of operations required.
    • getClassReference

      EditorClassReference getClassReference(String id, boolean doCreateIfNotPresent)
      Gets or creates the ClassReference in the property container.

      Panel do not use "ID" because there is a single class connection with the name Atom.CLASS.

      Specified by:
      getClassReference in interface IClassReferenceOwner
      Parameters:
      id - ID for the class reference if several exist, null for default.
      doCreateIfNotPresent - Flag to create the property (this flag can only be true in Designer)!
      Returns:
      The resolved class reference instance, null if the ClassReference doesn't exist if the create flag is false. If flag is true, an orphan unresolved EditorClassReference instance (ONLY for the Designer).