Class FeatureRootAdvice
- java.lang.Object
-
- org.eclipse.tycho.p2.impl.publisher.rootfiles.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 Summary
Fields Modifier and Type Field Description private java.lang.String
artifactId
private java.util.Map<ConfigSpec,RootFilesProperties>
propertiesPerConfig
-
Constructor Summary
Constructors Constructor Description FeatureRootAdvice(BuildProperties buildProperties, java.io.File baseDir, java.lang.String artifactId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addFiles(RootFilesProperties rootProperties, org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor rootFilesDescriptor)
private void
addLinks(RootFilesProperties rootProperties, org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor rootFilesDescriptor)
private void
addPermissions(RootFilesProperties rootProperties, org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor rootFilesDescriptor)
private void
copyRootPropertiesToDescriptor(RootFilesProperties internalFormat, org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor externalFormat)
static org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice
createRootFileAdvice(IArtifactFacade featureArtifact, BuildPropertiesParser buildPropertiesParser)
private static void
ensureRootFilesConfigured(RootFilesProperties rootProperties, ConfigSpec configuration)
java.lang.String[]
getConfigurations()
org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor
getDescriptor(java.lang.String wsOsArch)
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 directoryorg.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer
getRootFileComputer(java.lang.String configSpec)
private boolean
hasRootFiles()
private org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor
initDescriptor(ConfigSpec configuration, java.lang.String configurationAsString)
boolean
isApplicable(java.lang.String configSpec, boolean includeDefault, java.lang.String id, org.eclipse.equinox.p2.metadata.Version version)
-
-
-
Field Detail
-
artifactId
private final java.lang.String artifactId
-
propertiesPerConfig
private java.util.Map<ConfigSpec,RootFilesProperties> propertiesPerConfig
-
-
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 interfaceorg.eclipse.equinox.p2.publisher.IPublisherAdvice
-
getConfigurations
public java.lang.String[] getConfigurations()
- Specified by:
getConfigurations
in interfaceorg.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 interfaceorg.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice
-
getDescriptor
public org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor getDescriptor(java.lang.String wsOsArch)
- Specified by:
getDescriptor
in interfaceorg.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)
-
ensureRootFilesConfigured
private static void ensureRootFilesConfigured(RootFilesProperties rootProperties, ConfigSpec configuration)
-
-