1 11 package org.eclipse.pde.internal.build; 12 13 import java.io.IOException ; 14 import java.io.OutputStream ; 15 import java.util.LinkedHashMap ; 16 import java.util.Map ; 17 import org.eclipse.core.runtime.CoreException; 18 import org.eclipse.pde.internal.build.builder.FeatureBuildScriptGenerator; 19 import org.eclipse.update.core.Feature; 20 import org.eclipse.update.core.IIncludedFeatureReference; 21 22 public class SourceFeatureWriter extends FeatureWriter { 23 24 public SourceFeatureWriter(OutputStream out, Feature feature, FeatureBuildScriptGenerator generator) throws IOException { 25 super(out, feature, generator); 26 } 27 28 public void printIncludes() { 29 Map parameters = new LinkedHashMap (); 30 IIncludedFeatureReference[] features = feature.getFeatureIncluded(); 32 for (int i = 0; i < features.length; i++) { 33 parameters.clear(); 34 try { 35 parameters.put("id", features[i].getVersionedIdentifier().getIdentifier()); parameters.put("version", features[i].getVersionedIdentifier().getVersion()); } catch (CoreException e) { 38 e.printStackTrace(); } 40 41 printTag("includes", parameters, true, true, true); } 43 } 44 } 45 | Popular Tags |