1 11 package org.eclipse.update.internal.ui.model; 12 13 import org.eclipse.core.runtime.*; 14 import org.eclipse.update.configuration.*; 15 import org.eclipse.update.core.*; 16 import org.eclipse.update.internal.ui.UpdateUIMessages; 17 18 22 public abstract class FeatureAdapter extends UIModelObject implements IFeatureAdapter { 23 private boolean included=false; 24 25 28 public IInstallConfiguration getInstallConfiguration() { 29 return null; 30 } 31 32 public boolean isIncluded() { 33 return included; 34 } 35 36 protected void setIncluded(boolean included) { 37 this.included = included; 38 } 39 40 public String toString() { 41 try { 42 IFeature feature = getFeature(null); 43 return feature.getLabel(); 44 } 45 catch (CoreException e) { 46 return UpdateUIMessages.FeatureAdapter_failure; 47 } 48 } 49 public boolean hasIncludedFeatures(IProgressMonitor monitor) { 50 try { 51 IFeatureReference [] included = getFeature(monitor).getIncludedFeatureReferences(); 52 return included.length>0; 53 } 54 catch (CoreException e) { 55 return false; 56 } 57 } 58 } 59 | Popular Tags |