1 11 package org.eclipse.pde.internal.core.natures; 12 13 import org.eclipse.core.resources.IProject; 14 import org.eclipse.core.runtime.CoreException; 15 import org.eclipse.pde.internal.core.PDECore; 16 17 18 public class PDE { 19 public static final String PLUGIN_ID = "org.eclipse.pde"; 21 public static final String MANIFEST_BUILDER_ID = 22 PLUGIN_ID + "." + "ManifestBuilder"; public static final String SCHEMA_BUILDER_ID = 24 PLUGIN_ID + "." + "SchemaBuilder"; public static final String PLUGIN_NATURE = PLUGIN_ID + "." + "PluginNature"; public static final String FEATURE_NATURE = PLUGIN_ID + "." + "FeatureNature"; public static final String SITE_NATURE = PLUGIN_ID + "." + "UpdateSiteNature"; public static final String FEATURE_BUILDER_ID = 29 PLUGIN_ID + "." + "FeatureBuilder"; public static final String SITE_BUILDER_ID = 31 PLUGIN_ID + "." + "UpdateSiteBuilder"; 33 34 public static boolean hasPluginNature(IProject project) { 35 try { 36 return project.hasNature(PLUGIN_NATURE); 37 } catch (CoreException e) { 38 PDECore.log(e); 39 return false; 40 } 41 } 42 43 public static boolean hasFeatureNature(IProject project) { 44 try { 45 return project.hasNature(FEATURE_NATURE); 46 } catch (CoreException e) { 47 PDECore.log(e); 48 return false; 49 } 50 } 51 52 public static boolean hasUpdateSiteNature(IProject project) { 53 try { 54 return project.hasNature(SITE_NATURE); 55 } catch (CoreException e) { 56 PDECore.log(e); 57 return false; 58 } 59 } 60 61 } 62 | Popular Tags |