Class FeatureRootAdvice

  • All Implemented Interfaces:
    org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice, org.eclipse.equinox.p2.publisher.IPublisherAdvice

    public class FeatureRootAdvice
    extends java.lang.Object
    implements org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice
    This class handles definitions of root files in build.properties according to http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.pde.doc.user/tasks/pde_rootfiles.htm
    • Field Detail

      • artifactId

        private final java.lang.String artifactId
    • Constructor Detail

      • FeatureRootAdvice

        public FeatureRootAdvice​(BuildProperties buildProperties,
                                 java.io.File baseDir,
                                 java.lang.String artifactId)
    • Method Detail

      • createRootFileAdvice

        public static org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice createRootFileAdvice​(IArtifactFacade featureArtifact,
                                                                                                       BuildPropertiesParser buildPropertiesParser)
        Parameters:
        featureArtifact -
        Returns:
        IFeatureRootAdvice if root file configuration in build properties exists otherwise return null
      • getProjectBaseDir

        public static java.io.File getProjectBaseDir​(IArtifactFacade featureArtifact)
        Assumptions for resolving the project base directory of the given artifact:
        • packaging type of the artifact:"eclipse-feature"
        • the location of the feature artifact is absolute and points to the built feature.jar
        • the build output folder is located in a subfolder of the project base directory
        Returns:
        the project base directory of the given artifact if found under the above assumptions, otherwise null
      • hasRootFiles

        private boolean hasRootFiles()
      • isApplicable

        public boolean isApplicable​(java.lang.String configSpec,
                                    boolean includeDefault,
                                    java.lang.String id,
                                    org.eclipse.equinox.p2.metadata.Version version)
        Specified by:
        isApplicable in interface org.eclipse.equinox.p2.publisher.IPublisherAdvice
      • getConfigurations

        public java.lang.String[] getConfigurations()
        Specified by:
        getConfigurations in interface org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice
      • getRootFileComputer

        public org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer getRootFileComputer​(java.lang.String configSpec)
        Specified by:
        getRootFileComputer in interface org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice
      • getDescriptor

        public org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor getDescriptor​(java.lang.String wsOsArch)
        Specified by:
        getDescriptor in interface org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice
      • initDescriptor

        private org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor initDescriptor​(ConfigSpec configuration,
                                                                                           java.lang.String configurationAsString)
      • copyRootPropertiesToDescriptor

        private void copyRootPropertiesToDescriptor​(RootFilesProperties internalFormat,
                                                    org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor externalFormat)
      • addFiles

        private void addFiles​(RootFilesProperties rootProperties,
                              org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor rootFilesDescriptor)
      • addLinks

        private void addLinks​(RootFilesProperties rootProperties,
                              org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor rootFilesDescriptor)
      • addPermissions

        private void addPermissions​(RootFilesProperties rootProperties,
                                    org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor rootFilesDescriptor)