Interface IExternalObjectDumpSupport


  • public interface IExternalObjectDumpSupport
    Automatic generated external object dumps support. Allows to get or update automatic generating dumps and customize automatic dump generation.

    To dump external objects to custom destination path clients may use IExternalObjectDumper.

    See Also:
    IExternalObjectDumper
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Path getDump​(org.eclipse.core.resources.IProject project, org.eclipse.emf.ecore.EObject object, boolean waitForDump, org.eclipse.core.runtime.IProgressMonitor monitor)
      Returns the path of the auto generated external object dump.
      Path getDumpStorePath​(org.eclipse.core.resources.IProject project)
      Returns a path for dump external objects.
      boolean isEnabled​(org.eclipse.core.resources.IProject project)
      Returns whether auto dump generation is enabled for the given project.
      void setDumpStorePath​(org.eclipse.core.resources.IProject project, Path path)
      Sets path for dump external objects.
      void setEnabled​(org.eclipse.core.resources.IProject project, boolean enabled)
      Sets new enablement state of auto dump generation for the given project.
      void updateDump​(org.eclipse.core.resources.IProject project, org.eclipse.emf.ecore.EObject object, org.eclipse.core.runtime.IProgressMonitor monitor)
      Updates auto generating external object dump.
    • Method Detail

      • setDumpStorePath

        void setDumpStorePath​(org.eclipse.core.resources.IProject project,
                              Path path)
                       throws org.eclipse.core.runtime.CoreException
        Sets path for dump external objects.
        Parameters:
        project - the external objects project, must not be null
        path - the path for dump, must not be null
        Throws:
        org.eclipse.core.runtime.CoreException - if request fails
      • getDumpStorePath

        Path getDumpStorePath​(org.eclipse.core.resources.IProject project)
        Returns a path for dump external objects.
        Parameters:
        project - the project, must not be null
        Returns:
        a path for dump external objects, cannot be null
        Throws:
        InvalidPathException - if the path string cannot be converted to a Path
      • isEnabled

        boolean isEnabled​(org.eclipse.core.resources.IProject project)
        Returns whether auto dump generation is enabled for the given project.
        Returns:
        whether auto dump generation is enabled for the given project
      • setEnabled

        void setEnabled​(org.eclipse.core.resources.IProject project,
                        boolean enabled)
        Sets new enablement state of auto dump generation for the given project.
        Parameters:
        project - the project to set enablement state for, cannot be null
        enabled - new enablement state of auto dump generation for the given project
      • getDump

        Path getDump​(org.eclipse.core.resources.IProject project,
                     org.eclipse.emf.ecore.EObject object,
                     boolean waitForDump,
                     org.eclipse.core.runtime.IProgressMonitor monitor)
              throws org.eclipse.core.runtime.CoreException
        Returns the path of the auto generated external object dump. If dump is currently creating and waitForDump is true method will wait when creating finishes. If dump does not currently exist, dump support will create it.

        Returns null if dump support is disabled for the given project.

        Clients should not delete or move this dump.

        Parameters:
        project - the external object project, that holds object, cannot be null
        object - the external object in project, cannot be null
        waitForDump - whether need to wait for creating dump
        monitor - the progress monitor for reporting progress on how the wait is progressing, or null if no progress monitoring is required
        Returns:
        the path of the auto generated external object dump, never null
        Throws:
        org.eclipse.core.runtime.CoreException - if request fails
      • updateDump

        void updateDump​(org.eclipse.core.resources.IProject project,
                        org.eclipse.emf.ecore.EObject object,
                        org.eclipse.core.runtime.IProgressMonitor monitor)
                 throws org.eclipse.core.runtime.CoreException
        Updates auto generating external object dump. First, method will delete old dump to prevent DT users from old dump usage. Then method will schedule new dump creation.

        Do nothing if dump support is disabled for the given project.

        Parameters:
        project - the external object project, that holds object, cannot be null
        object - the external object in project, cannot be null
        monitor - the progress monitor for reporting progress on how the wait is progressing, or null if no progress monitoring is required
        Throws:
        org.eclipse.core.runtime.CoreException - if request fails