Search in sources :

Example 1 with AbstractArtifactDependencyWalker

use of org.eclipse.tycho.core.osgitools.AbstractArtifactDependencyWalker in project tycho by eclipse.

the class ArtifactDependencyWalkerTest method walkProduct.

protected void walkProduct(String productFile, final ArrayList<PluginDescription> plugins, final ArrayList<FeatureDescription> features) throws Exception, IOException, XmlPullParserException {
    DependencyArtifacts platform = getTargetPlatform();
    final ProductConfiguration product = ProductConfiguration.read(new File(productFile));
    ArtifactDependencyWalker walker = new AbstractArtifactDependencyWalker(platform) {

        @Override
        public void walk(ArtifactDependencyVisitor visitor) {
            traverseProduct(product, visitor);
        }
    };
    walker.walk(new ArtifactDependencyVisitor() {

        @Override
        public void visitPlugin(PluginDescription plugin) {
            plugins.add(plugin);
        }

        @Override
        public boolean visitFeature(FeatureDescription feature) {
            features.add(feature);
            return true;
        }
    });
}
Also used : AbstractArtifactDependencyWalker(org.eclipse.tycho.core.osgitools.AbstractArtifactDependencyWalker) DependencyArtifacts(org.eclipse.tycho.artifacts.DependencyArtifacts) ProductConfiguration(org.eclipse.tycho.model.ProductConfiguration) FeatureDescription(org.eclipse.tycho.core.FeatureDescription) AbstractArtifactDependencyWalker(org.eclipse.tycho.core.osgitools.AbstractArtifactDependencyWalker) ArtifactDependencyWalker(org.eclipse.tycho.core.ArtifactDependencyWalker) File(java.io.File) PluginDescription(org.eclipse.tycho.core.PluginDescription) ArtifactDependencyVisitor(org.eclipse.tycho.core.ArtifactDependencyVisitor)

Aggregations

File (java.io.File)1 DependencyArtifacts (org.eclipse.tycho.artifacts.DependencyArtifacts)1 ArtifactDependencyVisitor (org.eclipse.tycho.core.ArtifactDependencyVisitor)1 ArtifactDependencyWalker (org.eclipse.tycho.core.ArtifactDependencyWalker)1 FeatureDescription (org.eclipse.tycho.core.FeatureDescription)1 PluginDescription (org.eclipse.tycho.core.PluginDescription)1 AbstractArtifactDependencyWalker (org.eclipse.tycho.core.osgitools.AbstractArtifactDependencyWalker)1 ProductConfiguration (org.eclipse.tycho.model.ProductConfiguration)1