Class AbstractHierarchicalFileSystemSupport

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.core.resources.IProject project  
      static String SOURCE_FOLDER  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.eclipse.core.runtime.IPath getBaseSourceFolder()
      Specifies base source folder.
      org.eclipse.core.resources.IFile getFile​(org.eclipse.emf.ecore.EObject eObject)
      Returns file for given model object.
      org.eclipse.core.resources.IFile getFile​(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference feature)
      Returns file for given for given external property feature and context.
      protected abstract org.eclipse.core.runtime.IPath getFilePath​(org.eclipse.emf.ecore.EObject eObject)  
      org.eclipse.core.runtime.IPath getPath​(org.eclipse.emf.ecore.EObject eObject)
      Returns path to file in project for given object.
      abstract org.eclipse.core.runtime.IPath getPath​(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference feature)
      Returns path to file in project for given external property feature and context.
    • Field Detail

      • project

        protected org.eclipse.core.resources.IProject project
    • Constructor Detail

      • AbstractHierarchicalFileSystemSupport

        public AbstractHierarchicalFileSystemSupport​(org.eclipse.core.resources.IProject project)
        Constructor
        Parameters:
        project - the context project, not null
    • Method Detail

      • getFile

        public org.eclipse.core.resources.IFile getFile​(org.eclipse.emf.ecore.EObject eObject)
        Description copied from interface: IProjectFileSystemSupport
        Returns file for given model object.
        Specified by:
        getFile in interface IProjectFileSystemSupport
        Parameters:
        eObject - the model object, not null
        Returns:
        file for given model object or null if model object is not supported
      • getFile

        public org.eclipse.core.resources.IFile getFile​(org.eclipse.emf.ecore.EObject context,
                                                        org.eclipse.emf.ecore.EReference feature)
        Description copied from interface: IProjectFileSystemSupport
        Returns file for given for given external property feature and context.
        Specified by:
        getFile in interface IProjectFileSystemSupport
        Parameters:
        context - the model object, not null
        feature - the feature refer to external property of given context, not null
        Returns:
        file in context project for given external property feature and context or null if model object is not supported
      • getPath

        public org.eclipse.core.runtime.IPath getPath​(org.eclipse.emf.ecore.EObject eObject)
        Description copied from interface: IProjectFileSystemSupport
        Returns path to file in project for given object.
        Specified by:
        getPath in interface IProjectFileSystemSupport
        Parameters:
        eObject - the model object, not null
        Returns:
        path to file in project for given object or null if model object is not supported
      • getPath

        public abstract org.eclipse.core.runtime.IPath getPath​(org.eclipse.emf.ecore.EObject context,
                                                               org.eclipse.emf.ecore.EReference feature)
        Description copied from interface: IProjectFileSystemSupport
        Returns path to file in project for given external property feature and context.
        Specified by:
        getPath in interface IProjectFileSystemSupport
        Parameters:
        context - the model object context, not null
        feature - the feature refer to external property of given context, not null
        Returns:
        path to file in project for given external property feature and context or null if model object is not supported
      • getBaseSourceFolder

        protected org.eclipse.core.runtime.IPath getBaseSourceFolder()
        Specifies base source folder.
        Returns:
        base source folder (not null)
      • getFilePath

        protected abstract org.eclipse.core.runtime.IPath getFilePath​(org.eclipse.emf.ecore.EObject eObject)
        Parameters:
        eObject - the object to get path for (not null)
        Returns:
        path starting from SOURCE_FOLDER for given eObject where its content can be stored or null