001: /*******************************************************************************
002: * Copyright (c) 2000, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.pde.core.build;
011:
012: import org.eclipse.core.runtime.CoreException;
013: import org.eclipse.pde.core.IWritable;
014:
015: /**
016: * Jar entry represents one 'library=folder list' entry
017: * in plugin.jars file.
018: */
019: public interface IBuildEntry extends IWritable {
020: /**
021: * A property name for changes to the 'name' field.
022: */
023: public static final String P_NAME = "name"; //$NON-NLS-1$
024: /**
025: * The prefix for any key denoting the source folders that
026: * should be compiled into a JAR. The suffix will
027: * be the name of the JAR.
028: */
029: public static final String JAR_PREFIX = "source."; //$NON-NLS-1$
030: /**
031: * The prefix for any key denoting output folders for a particular
032: * JAR. The suffix will be the name of the JAR.
033: */
034: public static final String OUTPUT_PREFIX = "output."; //$NON-NLS-1$
035: /**
036: * The name of the key that lists all the folders and files
037: * to be included in the binary build.
038: */
039: public static final String BIN_INCLUDES = "bin.includes"; //$NON-NLS-1$
040: /**
041: * The name of the key that lists all the folders and files
042: * to be included in the source build.
043: */
044: public static final String SRC_INCLUDES = "src.includes"; //$NON-NLS-1$
045: /**
046: * The name of the key that declares extra library entries to be added
047: * to the class path at build time only..
048: */
049: public static final String JARS_EXTRA_CLASSPATH = "jars.extra.classpath"; //$NON-NLS-1$
050: /**
051: * The name of the key that declares additional plug-in dependencies to augment development classpath
052: *
053: * @since 3.2
054: */
055: public static final String SECONDARY_DEPENDENCIES = "additional.bundles"; //$NON-NLS-1$
056:
057: /**
058: * Adds the token to the list of token for this entry.
059: * This method will throw a CoreException if
060: * the model is not editable.
061: *
062: * @param token a name to be added to the list of tokens
063: */
064: void addToken(String token) throws CoreException;
065:
066: /**
067: * Returns a model that owns this entry
068: * @return build.properties model
069: */
070: IBuildModel getModel();
071:
072: /**
073: * Returns the name of this entry.
074: * @return the entry name
075: */
076: String getName();
077:
078: /**
079: * Returns an array of tokens for this entry
080: * @return array of tokens
081: */
082: String[] getTokens();
083:
084: /**
085: * Returns true if the provided token exists in this entry.
086: * @return true if the token exists in the entry
087: */
088: boolean contains(String token);
089:
090: /**
091: * Removes the token from the list of tokens for this entry.
092: * This method will throw a CoreException if
093: * the model is not editable.
094: *
095: * @param token a name to be removed from the list of tokens
096: */
097: void removeToken(String token) throws CoreException;
098:
099: /**
100: * Changes the name of the token without changing its
101: * position in the list. This method will throw
102: * a CoreException if the model is not editable.
103: *
104: * @param oldToken the old token name
105: * @param newToken the new token name
106: */
107: void renameToken(String oldToken, String newToken)
108: throws CoreException;
109:
110: /**
111: * Sets the name of this build entry. This
112: * method will throw a CoreException if
113: * model is not editable.
114: *
115: * @param name the new name for the entry
116: */
117: void setName(String name) throws CoreException;
118: }
|