Interface ISourceConstructImplSupport

All Superinterfaces:
IElement, IElementImpl, IElementImplExtension, IElementImplSupport, IModelManager.Provider, ISourceConstruct, ISourceConstructImpl, ISourceConstructImplExtension, ISourceElement, ISourceElementImpl, ISourceElementImplSupport
All Known Implementing Classes:
SourceConstruct

public interface ISourceConstructImplSupport extends ISourceElementImplSupport, ISourceConstructImplExtension
A "trait-like" interface providing a skeletal implementation of ISourceConstructImplExtension to minimize the effort required to implement that interface. Clients may implement ("mix in") this interface directly or extend SourceConstruct.

In general, the members first defined in this interface are not intended to be referenced outside the subtype hierarchy.

Restriction:
This interface is not intended to be extended by clients.
  • Method Details

    • defaultHashCode_

      default int defaultHashCode_()
      Description copied from interface: IElementImplSupport
      A default implementation of IElement.hashCode() cannot be provided in an interface, but clients can implement hashCode by delegating to this default method.

      By default, the hash code for an element is a combination of hash codes for its name and its parent element. This method is specialized in ISourceConstructImplSupport to include the element's occurrence count, and in ISourceFileImplSupport to return the hash code for the underlying file object, if there is one. This method is not intended to be replaced by clients; if necessary, clients should override hashCode directly.

      Specified by:
      defaultHashCode_ in interface IElementImplSupport
      Returns:
      a hash code value
    • defaultEquals_

      default boolean defaultEquals_(Object obj)
      Description copied from interface: IElementImplSupport
      A default implementation of IElement.equals(Object) cannot be provided in an interface, but clients can implement equals by delegating to this default method.

      By default, two elements that implement this interface are equal if they are identical or if they can equal each other and do have equal names and equal parents. This method is specialized in ISourceConstructImplSupport and ISourceFileImplSupport to also compare occurrence counts and underlying file objects respectively. This method is not intended to be replaced by clients; if necessary, clients should override equals directly.

      Specified by:
      defaultEquals_ in interface IElementImplSupport
      Parameters:
      obj - the object with which to compare
      Returns:
      true if this element is equal to the given object, and false otherwise
    • exists_

      default boolean exists_()
      Returns whether this element exists in the model.

      Handles may or may not be backed by an actual element. Handles that are backed by an actual element are said to "exist".

      This implementation returns true if there is a cached body for this element; otherwise, attempts to open this element to determine the result.

      Specified by:
      exists_ in interface IElementImpl
      Specified by:
      exists_ in interface IElementImplSupport
      Returns:
      true if this element exists in the model, and false if this element does not exist
    • isOpenable_

      default boolean isOpenable_()
      This implementation always returns false.
      Specified by:
      isOpenable_ in interface IElementImplSupport
      Returns:
      true if this element is openable, and false otherwise
    • validateExistence_

      default void validateExistence_(IContext context) throws org.eclipse.core.runtime.CoreException
      This implementation throws assertion error; the openable parent builds the whole structure and determines child existence.
      Specified by:
      validateExistence_ in interface IElementImplSupport
      Parameters:
      context - the operation context (not null)
      Throws:
      org.eclipse.core.runtime.CoreException - if this element shall not exist
      See Also:
    • buildStructure_

      default void buildStructure_(IContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
      This implementation throws assertion error; the openable parent builds the whole structure in one go.
      Specified by:
      buildStructure_ in interface IElementImplSupport
      Parameters:
      context - the operation context (not null)
      monitor - a progress monitor (not null). The caller must not rely on IProgressMonitor.done() having been called by the receiver
      Throws:
      org.eclipse.core.runtime.CoreException - if the structure could not be determined
    • toStringName_

      default void toStringName_(StringBuilder builder, IContext context)
      Specified by:
      toStringName_ in interface IElementImplSupport