Class PersistencerFactory

java.lang.Object
net.ssehub.easy.producer.eclipse.persistency.PersistencerFactory

public class PersistencerFactory extends Object
This class returns a correct IPersistencer instance as it is needed by the EASyPersistencer.
  • In case of a complete Eclipse Instance is running, the EclipsePersistencer is returned, which loads projects inside of the workspace.
  • In case EASy is ran outside of Eclipse, e.g. as a command line tool, the normal Persistencer will be returned.
Author:
El-Sharkawy
  • Constructor Details

    • PersistencerFactory

      public PersistencerFactory()
  • Method Details

    • getPersistencer

      public static net.ssehub.easy.producer.core.persistence.datatypes.IPersistencer getPersistencer(File projectFolder, EclipseProgressObserver obs, org.eclipse.core.resources.IProject project)
      Creates an IPersistencer instance.
      Parameters:
      projectFolder - The toplevel folder of the complete project.
      obs - progress observer
      project - the project instance to return a persistencer for, may be null then a default one may be obtained
      Returns:
      An IPersistencer depending on whether Eclipse is running or not.