1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.core.resources; 12 13 /** 14 * A project nature descriptor contains information about a project nature 15 * obtained from the plug-in manifest (<code>plugin.xml</code>) file. 16 * <p> 17 * Nature descriptors are platform-defined objects that exist 18 * independent of whether that nature's plug-in has been started. 19 * In contrast, a project nature's runtime object (<code>IProjectNature</code>) 20 * generally runs plug-in-defined code. 21 * </p> 22 * <p> 23 * This interface is not intended to be implemented by clients. 24 * </p> 25 * 26 * @see IProjectNature 27 * @see IWorkspace#getNatureDescriptor(String) 28 * @since 2.0 29 */ 30 public interface IProjectNatureDescriptor { 31 /** 32 * Returns the unique identifier of this nature. 33 * <p> 34 * The nature identifier is composed of the nature's plug-in id and the simple 35 * id of the nature extension. For example, if plug-in <code>"com.xyz"</code> 36 * defines a nature extension with id <code>"myNature"</code>, the unique 37 * nature identifier will be <code>"com.xyz.myNature"</code>. 38 * </p> 39 * @return the unique nature identifier 40 */ 41 public String getNatureId(); 42 43 /** 44 * Returns a displayable label for this nature. 45 * Returns the empty string if no label for this nature 46 * is specified in the plug-in manifest file. 47 * <p> Note that any translation specified in the plug-in manifest 48 * file is automatically applied. 49 * </p> 50 * 51 * @return a displayable string label for this nature, 52 * possibly the empty string 53 */ 54 public String getLabel(); 55 56 /** 57 * Returns the unique identifiers of the natures required by this nature. 58 * Nature requirements are specified by the <code>"requires-nature"</code> 59 * element on a nature extension. 60 * Returns an empty array if no natures are required by this nature. 61 * 62 * @return an array of nature ids that this nature requires, 63 * possibly an empty array. 64 */ 65 public String[] getRequiredNatureIds(); 66 67 /** 68 * Returns the identifiers of the nature sets that this nature belongs to. 69 * Nature set inclusion is specified by the <code>"one-of-nature"</code> 70 * element on a nature extension. 71 * Returns an empty array if no nature sets are specified for this nature. 72 * 73 * @return an array of nature set ids that this nature belongs to, 74 * possibly an empty array. 75 */ 76 public String[] getNatureSetIds(); 77 78 /** 79 * Returns whether this project nature allows linked resources to be created 80 * in projects where this nature is installed. 81 * 82 * @return boolean <code>true</code> if creating links is allowed, 83 * and <code>false</code> otherwise. 84 * @see IFolder#createLink(org.eclipse.core.runtime.IPath, int, org.eclipse.core.runtime.IProgressMonitor) 85 * @see IFile#createLink(org.eclipse.core.runtime.IPath, int, org.eclipse.core.runtime.IProgressMonitor) 86 * @since 2.1 87 */ 88 public boolean isLinkingAllowed(); 89 } 90