Class EclipseProject

    • Method Detail

      • unwrap

        public org.eclipse.core.resources.IProject unwrap()
        Description copied from interface: AAbstraction
        Returns the platform-specific object corresponding to this abstraction. The generic type parameter is used to avoid casts when assigning to platform-specific objects. It is the obligation of the caller to make sure the right type is used, otherwise a ClassCastException will be thrown.

        Sample usage:

         
         interface ACalendar extends AAbstraction[...]
         class LocalDateAsCalendarWrapper extends AWrapper<LocalDate>[...]
         [...]
         ACalendar calendar = Wrappers.of(LocalDate.now()).as(ACalendar.class);
         [...]
         LocalDate date = calendar.unwrap();
         
         
        Specified by:
        unwrap in interface AAbstraction
        Overrides:
        unwrap in class EclipseContainer
        See Also:
        Wrappers#unwrap(AAbstraction) for a way to unwrap potentially null abstractions.
      • project

        public org.eclipse.core.resources.IProject project()
      • getFile

        public AFile getFile​(java.lang.String name)
        Description copied from interface: AProject
        Returns the file with the given name inside this project. It may not exist.
        Specified by:
        getFile in interface AProject
        Parameters:
        name - a file name, will be resolved as a path relative to this project.
        Returns:
        the file identified by the name
      • getFolder

        public AFolder getFolder​(java.lang.String name)
        Description copied from interface: AProject
        Returns the folder with the given name inside this project. It may not exist.
        Specified by:
        getFolder in interface AProject
        Parameters:
        name - a folder name, will be resolved as a path relative to this project.
        Returns:
        the folder identified by the name
      • getReferencedProjects

        public java.util.Set<AProject> getReferencedProjects()
        Description copied from interface: AProject
        Returns all other projects this project references.
        Specified by:
        getReferencedProjects in interface AProject
      • delete

        public void delete​(org.eclipse.core.runtime.IProgressMonitor monitor)
        Description copied from interface: AResource
        Deletes the resource from the file system.
        Specified by:
        delete in interface AResource
        Overrides:
        delete in class EclipseResource
        Parameters:
        monitor - a progress monitor that is notified about the deletion process. When deleting a directory, individual file deletions are reported to the monitor to allow fine-grained progress reporting. The monitor may be null when progress does not need to be reported.
      • isIpsProject

        public boolean isIpsProject()
        Description copied from interface: AProject
        Returns whether this project is a Faktor-IPS project.
        Specified by:
        isIpsProject in interface AProject
      • build

        public void build​(ABuildKind kind,
                          org.eclipse.core.runtime.IProgressMonitor monitor)
        Description copied from interface: AProject
        Builds this project. The buildKind parameter determines, whether an incremental or full build is done and whether output folders are cleaned beforehand.
        Specified by:
        build in interface AProject
        Parameters:
        kind - the kind of build to perform
        monitor - a progress monitor that is notified about the build process. Individual file processing is reported to the monitor to allow fine-grained progress reporting. The monitor may be null when progress does not need to be reported.
      • getDefaultCharset

        public java.nio.charset.Charset getDefaultCharset()
        Description copied from interface: AProject
        Returns the default character set used for files in this project.
        Specified by:
        getDefaultCharset in interface AProject