1 11 package org.eclipse.update.internal.core; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.osgi.util.NLS; 15 import org.eclipse.update.core.Feature; 16 import org.eclipse.update.core.IFeatureContentConsumer; 17 import org.eclipse.update.core.Utilities; 18 19 22 public class TargetFeature extends Feature { 23 24 25 28 private IFeatureContentConsumer contentConsumer; 29 30 31 34 public TargetFeature() { 35 super(); 36 } 37 38 41 public void setContentConsumer(IFeatureContentConsumer contentConsumer) { 42 this.contentConsumer = contentConsumer; 43 contentConsumer.setFeature(this); 44 } 45 46 49 public IFeatureContentConsumer getFeatureContentConsumer() throws CoreException { 50 if (this.contentConsumer == null) { 51 throw Utilities.newCoreException( NLS.bind(Messages.Feature_NoFeatureContentConsumer, (new String [] { getURL().toExternalForm() })), null); 52 } 53 return contentConsumer; 54 } 55 56 } 57 | Popular Tags |