org.eclipse.core.internal.events
Class BuildCommand

java.lang.Object
  extended by org.eclipse.core.internal.resources.ModelObject
      extended by org.eclipse.core.internal.events.BuildCommand
All Implemented Interfaces:
java.lang.Cloneable, ICommand

public class BuildCommand
extends ModelObject
implements ICommand

The concrete implementation of ICommand. This object stores information about a particular builder, including a reference to the builder instance itself if it has been instantiated.


Constructor Summary
BuildCommand()
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object object)
           
 java.util.Map getArguments()
          Returns a table of the arguments for this command, or null if there are no arguments.
 java.util.Map getArguments(boolean makeCopy)
           
 IncrementalProjectBuilder getBuilder()
           
 java.lang.String getBuilderName()
          Returns the name of the builder to run for this command, or null if the name has not been set.
 int hashCode()
           
 boolean isBuilding(int trigger)
          Returns whether this build command responds to the given kind of build.
 boolean isConfigurable()
          Returns whether this command allows configuring of what kinds of builds it responds to.
 void setArguments(java.util.Map value)
          Sets this command's arguments to be the given table of name-values pairs, or to null if there are no arguments.
 void setBuilder(IncrementalProjectBuilder builder)
           
 void setBuilderName(java.lang.String value)
          Sets the name of the builder to run for this command.
 void setBuilding(int trigger, boolean value)
          Specifies whether this build command responds to the provided kind of build.
 void setConfigurable(boolean value)
          Sets whether this build command allows its build triggers to be configured.
 java.lang.String toString()
          For debugging purposes only
 
Methods inherited from class org.eclipse.core.internal.resources.ModelObject
getName, setName
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuildCommand

public BuildCommand()
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class ModelObject

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

getArguments

public java.util.Map getArguments()
Description copied from interface: ICommand
Returns a table of the arguments for this command, or null if there are no arguments. The argument names and values are both strings.

Specified by:
getArguments in interface ICommand
Returns:
a table of command arguments (key type : String value type : String), or null
See Also:
ICommand.getArguments()

getArguments

public java.util.Map getArguments(boolean makeCopy)

getBuilder

public IncrementalProjectBuilder getBuilder()

getBuilderName

public java.lang.String getBuilderName()
Description copied from interface: ICommand
Returns the name of the builder to run for this command, or null if the name has not been set.

Specified by:
getBuilderName in interface ICommand
Returns:
the name of the builder, or null if not set
See Also:
ICommand.getBuilderName()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isBuilding

public boolean isBuilding(int trigger)
Description copied from interface: ICommand
Returns whether this build command responds to the given kind of build.

By default, build commands respond to all kinds of builds.

Specified by:
isBuilding in interface ICommand
Parameters:
trigger - One of the *_BUILD constants defined on IncrementalProjectBuilder
Returns:
true if this build command responds to the specified kind of build, and false otherwise.
See Also:
ICommand.isBuilding(int)

isConfigurable

public boolean isConfigurable()
Description copied from interface: ICommand
Returns whether this command allows configuring of what kinds of builds it responds to. By default, commands are only configurable if the corresponding builder defines the ICommand.isConfigurable() attribute in its builder extension declaration. A command that is not configurable will always respond to all kinds of builds.

Specified by:
isConfigurable in interface ICommand
Returns:
true If this command allows configuration of what kinds of builds it responds to, and false otherwise.
See Also:
ICommand.setBuilding(int, boolean)

setArguments

public void setArguments(java.util.Map value)
Description copied from interface: ICommand
Sets this command's arguments to be the given table of name-values pairs, or to null if there are no arguments. The argument names and values are both strings.

Individual builders specify their argument expectations.

Note that modifications to the arguments of a command being used in a running builder may affect the run of that builder but will not affect any subsequent runs. To change a command permanently you must install the command into the relevant project build spec using IProjectDescription.setBuildSpec(ICommand[]).

Specified by:
setArguments in interface ICommand
Parameters:
value - a table of command arguments (keys and values must both be of type String), or null
See Also:
ICommand.setArguments(Map)

setBuilder

public void setBuilder(IncrementalProjectBuilder builder)

setBuilderName

public void setBuilderName(java.lang.String value)
Description copied from interface: ICommand
Sets the name of the builder to run for this command.

The builder name comes from the extension that plugs in to the standard org.eclipse.core.resources.builders extension point.

Specified by:
setBuilderName in interface ICommand
Parameters:
value - the name of the builder
See Also:
ICommand.setBuilderName(String)

setBuilding

public void setBuilding(int trigger,
                        boolean value)
Description copied from interface: ICommand
Specifies whether this build command responds to the provided kind of build.

When a command is configured to not respond to a given kind of build, the builder instance will not be called when a build of that kind is initiated.

This method has no effect if this build command does not allow its build kinds to be configured.

Specified by:
setBuilding in interface ICommand
Parameters:
trigger - One of the *_BUILD constants defined on IncrementalProjectBuilder
value - true if this build command responds to the specified kind of build, and false otherwise.
See Also:
ICommand.setBuilding(int, boolean)

setConfigurable

public void setConfigurable(boolean value)
Sets whether this build command allows its build triggers to be configured. This value should only be set when the builder extension declaration is read from the registry, or when a build command is read from the project description file on disk. The value is not otherwise mutable.


toString

public java.lang.String toString()
For debugging purposes only

Overrides:
toString in class java.lang.Object